AminetAminet
Search:
84782 packages online
About
Recent
Browse
Search
Upload
Setup
Services

util/cli/Ev.lha

Mirror:Random
Showing: i386-aros icongeneric icon
No screenshot available
Short:Powerful expression evaluator - v1.3
Author: jive at algonet.se (Jesper Wilhelmsson)
Uploader:jive algonet se (Jesper Wilhelmsson)
Type:util/cli
Version:1.3
Architecture:m68k-amigaos
Date:2000-06-22
Requires:A brain
Replaces:Eval, distributed with Amiga OS.
Download:util/cli/Ev.lha - View contents
Readme:util/cli/Ev.readme
Downloads:587

I have for some time been very unsatisfied with the functions of the tool eval,
included in Amiga OS. I was hoping for an update in Amiga OS 3.5 but nothing
has been done to this tool.
Therefor I have written my own tool for mathematical evaluations.

The worst things about the old eval:

* It can't count! 1+2*3 should equal 7 not 9!! (no priorities?)
* No suport for binary numbers
* No support for decimal numbers
* Too few functions
* Not flexible enough to be userfriendly
* No bugfixes or upgrades are made from the developer

Ev is improved in theese areas and some other:

* The prioritys are correct! 1+2*3 = 7
* Ev supports all the old Eval input for compability reasons (except for e)
* Support for binary numbers added in input and output
* The constants pi and e added
* Support for decimal numbers added, both 0.1 and .1 are accepted
* Correct rounding of decimals

* New flexibility added with support for:
  * the words and (&), or (|), not (~)
  * both <<, >> and lsh, rsh (and l, r) for left/right shift
  * d## and @d for decimal input and output
  * several new ESC-codes in output (tab, bell, formfeed etc.)
  * number of digits in octal and hexadecimal output is optional
  * multiplication without '*'-token in obvious places
  * reading expressions from a file or stdin
  * multiple expression calculation, (see docs)
  * variables

* Several new functions:
  * absolute value (abs)
  * square root (sqrt)
  * faculty (!)
  * powered numbers (^)
  * trigonometric functions (sin, cos, tan, asin, acon, atan, sinh, cosh, tanh)
  * random number (rnd)
  * logarithmic functions (ln, log, log2, logx)

+ I will keep upgrading it if there is a need for that.

Downside of the new version:

* Bigger executable. I've used the tools bison and flex to create the parser
  and theese tools do not create small files.

* Not 100% compatible with Eval, e does not mean eqv any more since the
  number e=2.718281828...
  From v1.2 the %n, %o and %x has changed to @n, @o and @x to make Ev
  preform better in scripts, this means more compability to Eval is lost.
  On the other hand it was Amiga Inc. who told me to make the changes so I
  guess it's allright.

* The argument management seems to be different in some ways which seems
  to have a negative effect on the behaviour of Ev in scripts. For example
  the test script in the manual for OS 3.5 with Eval used as a counter will
  not work with Ev. Other scripts I have seen works fine though.

I hope thats it.


Contents of util/cli/Ev.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO     CRC       STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]                 1846    2802  65.9% -lh5- 5aa5 Jan 21  2000 Ev.info
[generic]                11824   24672  47.9% -lh5- 66de Apr 10  2000 Ev/Ev
[generic]                  166     240  69.2% -lh5- 956f Apr  9  2000 Ev/catalogs/svenska/Ev.catalog
[generic]                  202     271  74.5% -lh5- 791a Apr  4  2000 Ev/catalogs/Ev.cd
[generic]                12258   36236  33.8% -lh5- 7af5 Jun  7  2000 Ev/Ev.Guide
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total         5 files   26296   64221  40.9%            Jun 21  2000
Page generated in 0.02 seconds
Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>