Yukino (1999-11-05)
Floating point expression evaluator.
Input (command line arguments):
Real literals: as many digits as you like. Scientific notation is
okay.
Operators:
( ) pi e (highest precedence)
^
sin cos tan asin acos atan ln log exp
- (unary)
* / %
+ - (binary) (lowest precedence)
Associativity is always from left to right.
Input is not case sensitive, but you should enclose them in quotes.
Output:
Yukino never complains. If you give her no expression, she will
say '?' Otherwise, for divide by zero, 0^0, asin PI and other
undefined expressions, Yukino will say -1.#IND, 1.#INF, Inf, or
crash the system, depending on your compiler.
Build (your experience may vary):
MSVC++ 6.0: Compiles and runs just fine, never complains.
DJGPP 2.8.1: Compiles and runs, but error handling is not as good.
Often crashes the system.
MSC 6.0: Compiles and runs, with long and messy error messages.
TC++ 3.0: Compiles and runs, with even longer error messages.
gcc 2.8.1 on Sun Solaris: Compiles but doesn't link.
gcc 2.8.0 on HPUX: Compiles but doesn't link.
CC on Sun Solaris: Doesn't compile.
Template based on Miyazawa Yukino from Kareshi Kanojo no Jijou.
--
omoikane@uguu.org - http://uguu.org/