Giter VIP home page Giter VIP logo

calc's Introduction

#Calculator This is a simple cli calculator that arose from my development of the cli bitwise calculator. Numeric arguments can be passed in decimal form. You can choose to output results in multiple radixes but this is not useful if you're doing floating point precision operations. This is intended to be a simple CLI tool to do a range of computations quickly. After peforming the inital operation, you have the choice of using the result with another operation of your choice.

###Usage

    #either are acceptable as it depends on your operation
    Usage
        calc [FLAGS] [NUM] [OPERATION] [NUM]
        calc [FLAGS] [NUM] [OPERATION]
    Flags

        -n
            disables colorized output(enabled by default)
        -r
            outputs result in base 2,8,16 (default output is base 10 only) 
        -h
            displays usage and exits
    Operations
        add
            returns num + num 
        sub
            returns num - num
        mul
            returns num * num
        div
            returns num / num
        pow
            returns num ^ num
        sqrt
            returns num ^ (1/2)
        curt
            returns num ^ (1/3)
        nrt
            returns num ^ (1/num)
        prct
            returns (num/num) * 100 
        mod
            returns num modulo num

###Installation

    #you may need to use sudo
    gem install calc

###Operations

  • Addition (add)
  • Subtraction (sub)
  • Multiplication (mul)
  • Division (div)
  • Sqaure Root (sqrt)
  • Cube Root (curt)
  • Nth Root (nrt)
  • Percent Of (prct)
  • Power to (pow)
  • Modulus (mod)

###Sample Runs Coming soon!...

calc's People

Contributors

vargash1 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.