octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #46859] Error in "for" cycle


From: Lachlan Andrew
Subject: [Octave-bug-tracker] [bug #46859] Error in "for" cycle
Date: Mon, 11 Jan 2016 05:03:45 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:41.0) Gecko/20100101 Firefox/41.0

Follow-up Comment #6, bug #46859 (project octave):

Michale, I like your idea of showing that the answer isn't exactly an
integer.

Many of the comments below are about the fact that the end-point is not well
defined if floating point is involved.  However, the real puzzle is that
adding integers *much less than the mantissa size* gives a non-integer
result.

Representing 1000 only takes 10 bits, whereas a double should be able to do
integer arithmetic for numbers up to 52 bits without error, shouldn't it?

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?46859>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]