HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

eva — Simple calculator REPL, similar to `bc`, with syntax highlighting and persistent history. More infor

Submitted by: @import:tldr-pages··
0
Viewed 0 times
simplecommandsimilarcliwithcalculatorevarepl

Problem

How to use the eva command: Simple calculator REPL, similar to bc, with syntax highlighting and persistent history. More information: <https://github.com/oppiliappan/eva#usage>.

Solution

eva — Simple calculator REPL, similar to bc, with syntax highlighting and persistent history. More information: <https://github.com/oppiliappan/eva#usage>.

Run the calculator in interactive mode:
eva


Calculate the result of an expression:
eva "{{(1 + 2) * 2 ^ 2}}"


Calculate an expression forcing the number of decimal places to 5:
eva --fix {{5}} "{{5 / 3}}"


Calculate an expression with sine and cosine:
eva "{{sin(1) + cos(1)}}"

Code Snippets

Run the calculator in interactive mode

eva

Calculate the result of an expression

eva "{{(1 + 2) * 2 ^ 2}}"

Calculate an expression forcing the number of decimal places to 5

eva --fix {{5}} "{{5 / 3}}"

Calculate an expression with sine and cosine

eva "{{sin(1) + cos(1)}}"

Context

tldr-pages: common/eva

Revisions (0)

No revisions yet.