Re: division

Discussion in 'Python' started by Dennis Lee Bieber, Jun 25, 2003.

  1. 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/ <
     
    Dennis Lee Bieber, Jun 25, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. walala
    Replies:
    12
    Views:
    1,947
  2. sunwij

    FLOATING POINT DIVISION

    sunwij, Dec 28, 2003, in forum: VHDL
    Replies:
    3
    Views:
    1,074
    sunwij
    Dec 29, 2003
  3. Manfred Balik

    polynomial division remainder

    Manfred Balik, May 12, 2004, in forum: VHDL
    Replies:
    5
    Views:
    3,374
    Mike Treseler
    May 18, 2004
  4. Replies:
    0
    Views:
    1,279
  5. Replies:
    94
    Views:
    4,674
    ┬Ča\\/b
    Feb 9, 2007
Loading...

Share This Page