| Crates.io | eva |
| lib.rs | eva |
| version | 0.3.1 |
| created_at | 2019-03-28 17:31:09.700091+00 |
| updated_at | 2022-11-08 01:53:24.772557+00 |
| description | Calculator REPL similar to bc(1) |
| homepage | https://github.com/nerdypepper/eva |
| repository | https://github.com/nerdypepper/eva |
| max_upload_size | |
| id | 124393 |
| size | 68,136 |

simple calculator REPL, similar to bc(1), with syntax highlighting and persistent history

$ brew install eva
$ cargo install eva
$ git clone https://github.com/nerdypepper/eva.git
$ cargo run
eva 0.3.1
NerdyPepper <akshayoppiliappan@gmail.com>
Calculator REPL similar to bc(1)
USAGE:
eva [OPTIONS] [INPUT]
ARGS:
<INPUT> Optional expression string to run eva in command mode
OPTIONS:
-b, --base <RADIX> Radix of calculation output (1 - 36) [default: 10]
-f, --fix <FIX> Number of decimal places in output (1 - 64) [default: 10]
-h, --help Print help information
-r, --radian Use radian mode
-V, --version Print version information
type out an expression and hit enter, repeat.
> 1 + sin(30)
1.5
> floor(sqrt(3^2 + 5^2))
5
> 5sin(45) + cos(0)
4.53553
$ cargo install eva --force
$ cargo install --force --path /path/to/eva
+ - * / ^ **+ -some constants available in rust standard library.
e pi
examples:
pi * 5^2 # πr²
all trigonometric functions expect input in degrees.
1 argument:
sin cos tan csc sec cot sinh cosh tanh
asin acos atan acsc asec acot ln log10 sqrt
ceil floor abs
2 arguments:
log nroot
deg(x) - convert x to degrees
rad(x) - convert x to radians
examples:
sqrt(sin(30)) # parentheses are mandatory for functions
log10100 # no
log10(100) # yes
log(1, 10) # function with two arguments
* operator>12sin(45(2)) # 12 * sin(45 * (2))
12
>ceil(sqrt(3^2 + 5^2 # ceil(sqrt(3^2 + 5^2))
6
_> sin(pi)
0.0548036650
> _^2
0.0030034417
>
> 1 + ln(-1)
Domain Error: Out of bounds!
the rust community has helped eva come a long way, but these devs deserve a special mention for their contributions: