### 8 releases

0.1.7 | Oct 27, 2023 |
---|---|

0.1.6 | Oct 26, 2023 |

#**214** in Math

**85** downloads per month

**MIT**license

38KB

872 lines

██████╗███████╗ ██████╗ ██╔════╝██╔════╝██╔════╝ ██║ ███████╗██║ ██║ ╚════██║██║ ╚██████╗███████║╚██████╗ ╚═════╝╚══════╝ ╚═════╝ ------------------------ Command Line Scientific Calculator. Free Forever. Made with ❤️ using 🦀

## Download

https://github.com/zahash/csc/releases

( or )

`cargo`` install csc`

## Usage examples

launch the interactive prompt by typing

to run multiple computations`csc`

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

or run one off computations by simply providing them

`$`` csc 10 + 1.14`
`$`` csc ``'`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

), 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:`f64`

- Rounding errors that may be surprising in decimal notation (e.g. evaluating

prints`0.``1``+``0.``2`

).`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.

## Meta

M. Zahash – zahash.z@gmail.com

Distributed under the MIT license. See

for more information.`LICENSE`

## Contributing

- Fork it (https://github.com/zahash/csc/fork)
- Create your feature branch (

)`git``checkout`feature/fooBar`-`b - Commit your changes (

)`git``commit``-`am`'`Add some fooBar`'` - Push to the branch (

)`git``push origin feature/fooBar` - Create a new Pull Request

#### Dependencies

~6.5MB

~115K SLoC