Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: division

Thread Tools

Re: division

Dennis Lee Bieber
Posts: n/a
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.

> ================================================== ============ <
> Removed) | Wulfraed Dennis Lee Bieber KD6MOG <
> (E-Mail Removed) | Bestiaria Support Staff <
> ================================================== ============ <
> Bestiaria Home Page: <
> Home Page: <

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
division by 7 without using division operator C Programming 94 02-09-2007 06:57 AM
SRT DIvision, Square root and reciprocal square root VHDL 0 05-27-2004 06:23 AM
polynomial division remainder Manfred Balik VHDL 5 05-18-2004 02:37 AM
FLOATING POINT DIVISION sunwij VHDL 3 12-29-2003 04:44 AM
will Synposys Design Compiler support division by two's power and integer rounding? walala VHDL 12 09-14-2003 03:49 PM