round() problem?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • JZ

    round() problem?

    >>> round(3999.0) == round(3990)
    False[color=blue][color=green][color=darkred]
    >>> round(3990.0) == round(3990)[/color][/color][/color]
    True[color=blue][color=green][color=darkred]
    >>>[/color][/color][/color]

    What is going on here??

    (used Python 2.2.3/WinXP)

    --
    JZ ICQ:6712522
  • Erik Max Francis

    #2
    Re: round() problem?

    JZ wrote:
    [color=blue][color=green][color=darkred]
    > >>> round(3999.0) == round(3990)[/color][/color]
    > False[color=green][color=darkred]
    > >>> round(3990.0) == round(3990)[/color][/color]
    > True[color=green][color=darkred]
    > >>>[/color][/color]
    >
    > What is going on here??[/color]

    Um, why would you think that's wrong?

    --
    Erik Max Francis && max@alcyone.com && http://www.alcyone.com/max/
    __ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
    / \ Never had very much to say / Laugh last, laugh longest
    \__/ Des'ree

    Comment

    • JZ

      #3
      Re: round() problem?

      On Sun, 02 Nov 2003 15:29:45 -0800, Erik Max Francis <max@alcyone.co m>
      wrote:
      [color=blue]
      >Um, why would you think that's wrong?[/color]

      All is OK. I canceled this message but you were faster than news
      servers.

      --
      JZ ICQ:6712522


      Comment

      Working...