descriptionConvenient calculator for the command line
last changeTue, 27 Nov 2018 08:31:14 +0000 (09:31 +0100)
readme

mucalc - convenient command line calculator

This calculator is intended for command line users.

It evaluates mathematical expressions that are given as arguments, read from an input stream, or typed interactively.

In interactive mode, it provides line editing with tab-completion and persistent history using GNU readline.

The evaluation of expressions is handled by the [muParser] (http://muparser.beltoforion.de/) math parser library.

Available constants: - pi, e

Available functions: - deg, rad, - sin, asin, cos, acos, tan, atan, atan2, - sinh, asinh, cosh, acosh, tanh, atanh, - pow, exp, exp2, exp10, log, ln, log2, log10, sqrt, cbrt, - abs, sign, fract, int, ceil, floor, round, rint, trunc, - min, max, sum, avg, med, - clamp, step, smoothstep, mix, - random, srand48, drand48

Available operators: - ^, *, /, %, +, -, ==, !=, <, >, <=, >=, ||, &&, ?:

Other features: - Support for variables without explicit declaration - Support for multiple expressions on one line, separated by commas - Tab-completion for functions, constants, and variables

Example:

> sin(pi/2)

1

> sin(rad(90))

1

> a = 2^3 + 2

10

> b = sqrt(49) * 2 + 6

20

> sin(2 * pi) + a * b / log10(a^(b/4)) + cos(rad(12*(a+b))) + sign(a)

42

shortlog
2018-11-27 Martin LambersBump version to 1.7. master v1.7
2018-11-27 Martin LambersFix printf() string for modulo operator.
2018-11-27 Martin LambersFix modulo operator %: it is left associative, not...
2018-11-26 Martin LambersBump version to 1.6 v1.6
2018-11-26 Martin LambersUpdate README.
2018-11-26 Martin LambersAdd the modulo operator '%' and remove the modulo funct...
2018-06-08 Martin LambersImprove README.md
2018-06-08 Martin LambersImprove README.md
2018-06-08 Martin LambersMove README to Markdown format.
2016-08-03 Martin LambersMark random-number functions as not optimizable.
2016-07-01 Martin LambersImprove error reporting. v1.5
2016-06-07 Martin LambersAdd functions that return pseudo random numbers.
2015-02-02 Martin LambersBump version to 1.3. v1.3
2015-02-02 Martin LambersAdjust precision of printed results.
2015-01-21 Martin LambersImprove readline usage: activate blink-matching-parenth... v1.2
2015-01-21 Martin LambersCheck for out-of-memory condition with old C strdup().
...
tags
2 months ago v1.7 v1.7
2 months ago v1.6 v1.6
2 years ago v1.5
4 years ago v1.3 v1.3
4 years ago v1.2 v1.2
4 years ago v1.1 v1.1
4 years ago v1.0 v1.0
heads
2 months ago master