All Projects → nerdypepper → eva

nerdypepper / eva

Licence: MIT license
a calculator REPL, similar to bc(1)

Programming Languages

rust
11053 projects
Nix
1067 projects

Projects that are alternatives of or similar to eva

shellmath
Yes, Virginia, you can do floating-point arithmetic in Bash!
Stars: ✭ 33 (-93.83%)
Mutual labels:  calculator
rsc
A handwritten scientific calculator for interpreting equations.
Stars: ✭ 32 (-94.02%)
Mutual labels:  calculator
rpn
Command-Line RPN Calculator
Stars: ✭ 22 (-95.89%)
Mutual labels:  calculator
nano-id-cc
Nano ID collision calculator
Stars: ✭ 31 (-94.21%)
Mutual labels:  calculator
Atosym
algebraic expressions parsing and evaluation through a property system based algorithm
Stars: ✭ 15 (-97.2%)
Mutual labels:  calculator
glGraph
A 2d Graphing Calculator written in C++ using Modern OpenGL
Stars: ✭ 15 (-97.2%)
Mutual labels:  calculator
Love-Calculator
Let's Calculate love with real data. Love Calculator by Mohammed Cha
Stars: ✭ 54 (-89.91%)
Mutual labels:  calculator
kafka-cluster-size-calculator
An Apache Kafka cluster size calculator
Stars: ✭ 36 (-93.27%)
Mutual labels:  calculator
rpncalc
RPNCalc: The Command Line Reverse Polish Notation (RPN) Calculator
Stars: ✭ 19 (-96.45%)
Mutual labels:  calculator
menu-calc
A calculator for Rofi/dmenu(2)
Stars: ✭ 45 (-91.59%)
Mutual labels:  calculator
calculator
Calculator app designed for elementary OS
Stars: ✭ 73 (-86.36%)
Mutual labels:  calculator
calculator
C++ operator precedence parser
Stars: ✭ 73 (-86.36%)
Mutual labels:  calculator
Mather
A powerful expression-based calculator, unit converter, and general computation engine for Android
Stars: ✭ 49 (-90.84%)
Mutual labels:  calculator
DevHelpBox
we are creating this community so that other developers can get benefits of it.
Stars: ✭ 35 (-93.46%)
Mutual labels:  calculator
eqn
A gem to evaluate mathematical equations.
Stars: ✭ 32 (-94.02%)
Mutual labels:  calculator
react-calculator
📐 PWA React + Redux Calculator
Stars: ✭ 65 (-87.85%)
Mutual labels:  calculator
N-Matrix-Programmer
A software to write an optimized code that calculates inverse and determinant of N by N matrix.
Stars: ✭ 35 (-93.46%)
Mutual labels:  calculator
util
封装了一些Java常用的功能
Stars: ✭ 19 (-96.45%)
Mutual labels:  calculator
fcal
Extensive math expression evaluator library for JavaScript and Node.js
Stars: ✭ 86 (-83.93%)
Mutual labels:  calculator
bitcointaxer
Crypto-TAX Gain/Loss Calculator
Stars: ✭ 33 (-93.83%)
Mutual labels:  calculator

heroimg.png

eva

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

eva.png

installation

  • Homebrew
$ brew install eva
  • crates.io
$ cargo install eva
  • manual
$ git clone https://github.com/nerdypepper/eva.git
$ cargo run

usage

eva 0.3.0
NerdyPepper <[email protected]>
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

updating

  • crates.io
$ cargo install eva --force
  • manual
$ cargo install --force --path /path/to/eva

operators

  • binary operators: + - * / ^ **
  • unary operators: + -

constants

some constants available in rust standard library.

e      pi

examples:

pi * 5^2  # πr²

functions

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

quality of life features

  • auto insertion of * operator
>12sin(45(2))             # 12 * sin(45 * (2))
12
  • auto balancing of parentheses
>ceil(sqrt(3^2 + 5^2      # ceil(sqrt(3^2 + 5^2))
6
  • use previous answer with _
> sin(pi)
0.0548036650
> _^2
0.0030034417
>
  • super neat error handling
> 1 + ln(-1)
Domain Error: Out of bounds!
  • syntax highlighting

todo

  • add support for variables (pi, e, _ (previous answer))
  • syntax highlighting
  • multiple arg functions
  • screenshots
  • create logo
  • unary operators (minus, plus)
  • add detailed error handler
  • add unit tests
  • lineditor with syntax highlighting
  • add more functions

contributors

the rust community has helped eva come a long way, but these devs deserve a special mention for their contributions:

Ivan Tham
Milan Marković
asapokl

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].