一个计算器 REPL,类似于 bc(1)
简单的计算器 REPL,类似于 bc(1),具有语法高亮和持久历史记录
$ brew install eva$ cargo install eva$ git clone https://github.com/nerdypepper/eva
$ cd eva
$ cargo runeva 0.3.1
NerdyPepper
Calculator REPL similar to bc(1)
USAGE:
eva [OPTIONS] [INPUT]
ARGS:
Optional expression string to run eva in command mode
OPTIONS:
-b, --base Radix of calculation output (1 - 36) [default: 10]
-f, --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
输入一个表达式并按 Enter 键,然后重复此操作。
> 1 + sin(30)
1.5
> floor(sqrt(3^2 + 5^2))
> 5sin(45) + cos(0)
4.53553$ cargo install eva --force$ cargo install --force --path /path/to/eva+ - * / ^ **+ -Rust标准库中的一些常量。
e pi示例:
pi * 5^2 # πr²所有三角函数都期望以度为单位输入。
1 argument:
sin cos tan csc sec cot sinh cosh tanh
asin acos atan acsc asec acot ln log2 log10
sqrt ceil floor abs
2 arguments:
log nroot
deg(x) - convert x to degrees
rad(x) - convert x to radians示例:
sqrt(sin(30)) # parentheses are mandatory for functions
log10100 # no
log10(100) # yes
log(1, 10) # function with two arguments* 运算符>12sin(45(2)) # 12 * sin(45 * (2))5 12 6
暂无开放 Issues,或尚未同步最近议题。