https://github.com/zahash/csc
Command Line Scientific Calculator. Free Forever. Made with β€οΈ using π¦
https://github.com/zahash/csc
Last synced: 8 months ago
JSON representation
Command Line Scientific Calculator. Free Forever. Made with β€οΈ using π¦
- Host: GitHub
- URL: https://github.com/zahash/csc
- Owner: zahash
- License: mit
- Created: 2023-10-12T05:20:00.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-26T05:30:21.000Z (about 2 years ago)
- Last Synced: 2025-04-30T14:13:13.093Z (about 1 year ago)
- Language: Rust
- Homepage: https://crates.io/crates/csc
- Size: 56.6 KB
- Stars: 29
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
βββββββββββββββ βββββββ
ββββββββββββββββββββββββ
βββ βββββββββββ
βββ βββββββββββ
ββββββββββββββββββββββββ
βββββββββββββββ βββββββ
------------------------
Command Line Scientific Calculator. Free Forever. Made with β€οΈ using π¦
[](https://crates.io/crates/csc)
[](https://opensource.org/licenses/MIT)
## Download
[https://github.com/zahash/csc/releases](https://github.com/zahash/csc/releases)
( or )
```
cargo install csc
```
## Usage examples
launch the interactive prompt by typing `csc` to run multiple computations
```sh
a = 10
b = a + 1.14
c = log(b, 3) + sin(PI)
```
or run one off computations by simply providing them
```sh
$ csc 10 + 1.14
$ csc '10 + 1.14 * ln(50)'
```
## Features
```sh
# 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](https://en.wikipedia.org/wiki/Double-precision_floating-point_format)
(using the Rust type [`f64`](https://doc.rust-lang.org/std/primitive.f64.html)), 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.
## Meta
M. Zahash β zahash.z@gmail.com
Distributed under the MIT license. See `LICENSE` for more information.
[https://github.com/zahash/](https://github.com/zahash/)
## Contributing
1. Fork it ()
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