Skip to content

virajbhartiya/sciops

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—    β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
β•šβ•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β• β•šβ•β•β•β•β–ˆβ–ˆβ•‘
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘   β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘
β•šβ•β•β•β•β•β•β• β•šβ•β•β•β•β•β•β•šβ•β•    β•šβ•β•β•β•β•β• β•šβ•β•     β•šβ•β•β•β•β•β•β•
                                            
                                                                                                                                                   

------------------------
Command Line Scientific Calculator. Made with ❀️ using πŸ¦€

Usage examples

launch the interactive prompt by typing sciops to run multiple computations

a = 10
b = a + 1.14
c = log(b, 3) + sin(PI)

or run one off computations by simply providing them

$ sciops 10 + 1.14
$ sciops '10 + 1.14 * ln(50)'

Features

# basic arithmetic and assignment
a = 1
b = -2 % a * (3^2 / 4)
b += 100

# functions
               
exp(x)
sqrt(x)
cbrt(x)
abs(x)
floor(x)
ceil(x)
round(x)

ln(x)
log2(x)
log10(x)
log(x, b)

sin(rad)
cos(rad)
tan(rad)

sinh(rad)
cosh(rad)
tanh(rad)

asin(rad)
acos(rad)
atan(rad)

asinh(rad)
acosh(rad)
atanh(rad)

All calculations are done using 64 bit binary floating point arithmetic (using the Rust type f64), so you can come across the limitations of this implementation, and observe behavior that may be different from other β€œscientific calculators”, such as the following:

  • Rounding errors that may be surprising in decimal notation (e.g. evaluating 0.1 + 0.2 prints 0.30000000000000004).
  • Special values such as β€œinfinity”, β€œnot a number” or a negative zero can be the result of calculations that overflow or have invalid arguments.

Contributing

  1. Fork it (https://github.com/virajbhartiya/sciops/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

About

A scientific calculator written in Rust πŸ¦€

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages