ath - Evaluate mathematical expressions in a compact one-liner

  1. SYNOPSIS
  2. DESCRIPTION
  3. BUGS
  4. AUTHOR
  5. COPYRIGHT AND LICENSE
  6. SEE ALSO

SYNOPSIS

$ perl -Math -e'2+2'
$ perl -Math -e'5!'
$ perl -Math -e'round e^(i*pi)'
$ perl -Math -e'log 5rand'
$ perl -Math -e'2π'
$ perl -Math=-bignum -e'30!'
$ perl -Math=-bigrat -e'3/9'

DESCRIPTION

A source filter that parses and evaluates the source code as a mathematical expression using Math::Calc::Parser, and prints the result. The -bignum or -bigrat flags may be passed to activate the corresponding option.

BUGS

Report any issues on the public bugtracker.

AUTHOR

Dan Book, [email protected]

Copyright 2015, Dan Book.

This library is free software; you may redistribute it and/or modify it under the terms of the Artistic License version 2.0.

SEE ALSO

Math::Calc::Parser