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

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

[Octave-bug-tracker] [bug #31512] Problem with code on Linux octave 3.2.


From: Rik
Subject: [Octave-bug-tracker] [bug #31512] Problem with code on Linux octave 3.2.3 and 3.2.4/// OK on mac w/ 3.2.3
Date: Fri, 05 Nov 2010 23:49:43 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Ubuntu/9.10 (karmic) Firefox/3.6.12

Follow-up Comment #5, bug #31512 (project octave):

I think JWE is right.  You might want to try the following code in Octave and
Matlab.


format long
rem([2; 2.1], 0.1)
ans =

   0.0999999999999999
   0.1000000000000000


As you can see, 2.0/0.1 leaves a remainder when calculated with binary
numbers which would not be the case for base10 numbers.

If Matlab is playing tricks with the divisor it would be very interesting to
know that. 

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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