plcalc

plcalc — C expression type calculator

Synopsis

plcalc [ C expression ]

plcalc --version

Introduction

The plcalc program parses C expression type calculations and returns the result. Input for the ProLinga Calc library are normal C expressions containing operators, float or integer constants and variables. Precedence and semantic of operators is the same as in C language. There are two extra binary operators: >>> unsigned shift right and ** raising to power. plcalc supports the standard set of functions from C mathematics library and also defines function prime(n), which returns smallest prime number >= n.

Options

C expression

C expressions as "2+3" and more complicated ones like "2*sin(3)". In the plcalc shell, variables can also be set. x=1+2 and the next input x+4 will return 7.