kpop fed this fish to the penguins on Sunday 22 June 2003 07:41 pm:
>
> thanks for the help, I think i will change all the numbers to floating
> points then do the eval
> and if the result is not a float that end with..0 i will inform the
> user they typed something wrong
>
Which is also not safe... Floating point is NOT an exact arithmetic.
Any good text on computerized numerical processing will explain that
one NEVER tests a floating point for equality. One test for the
difference between two values being less than some epsilon value.
--
> ================================================== ============ <
> | Wulfraed Dennis Lee Bieber KD6MOG <
> | Bestiaria Support Staff <
> ================================================== ============ <
> Bestiaria Home Page: http://www.beastie.dm.net/ <
> Home Page: http://www.dm.net/~wulfraed/ <