Name : perl-Math-Expression-Evaluator
| |
Version : 0.3.2
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : lp155.7.1
| Date : 2023-07-20 17:57:21
|
Group : Development/Libraries/Perl
| Source RPM : perl-Math-Expression-Evaluator-0.3.2-lp155.7.1.src.rpm
|
Size : 0.07 MB
| |
Packager : https://www_suse_com/
| |
Summary : parses, compiles and evaluates mathematic expressions
|
Description :
Math::Expression::Evaluator is a parser, compiler and interpreter for mathematical expressions. It can handle normal arithmetics (includings powers wit \'^\' or \'**\'), builtin functions like sin() and variables.
Multiplication \'*\', division \'/\' and modulo \'%\' have the same precedence, and are evaluated left to right. The modulo operation follows the standard perl semantics, that is is the arguments are castet to integer before preforming the modulo operation.
Multiple exressions can be seperated by whitespaces or by semicolons \';\'. In case of multiple expressions the value of the last expression is returned.
Variables can be assigned with a single \'=\' sign, their name has to start with a alphabetic character or underscore \'[a-zA-Z_]\', and may contain alphabetic characters, digits and underscores.
Values for variables can also be provided as a hash ref as a parameter to val(). In case of collision the explicitly provided value is used:
$m->parse(\"a = 2; a\")->val({a => 1});
will return 1, not 2.
The following builtin functions are supported atm:
* *
trignometric functions: sin, cos, tan
* *
inverse trigonomic functions: asin, acos, atan
* *
Square root: sqrt
* *
exponentials: exp, sinh, cosh
* *
logarithms: log, log2, log10
* *
constants: pi() (you need the parenthesis to distinguish it from the variable pi)
* *
rounding: ceil(), floor()
* *
other: theta (theta(x) = 1 for x > 0, theta(x) = 0 for x < 0)
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-M/15.5/noarch |