help-octave
[Top][All Lists]
Advanced

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

Re: Calculation issue with octave (data unexpectedly go to zero at some


From: Ben Abbott
Subject: Re: Calculation issue with octave (data unexpectedly go to zero at some point)
Date: Thu, 27 Feb 2014 19:35:27 -0500

On Feb 27, 2014, at 7:28 PM, Dmitri A. Sergatskov <address@hidden> wrote:

> On Thu, Feb 27, 2014 at 6:25 PM, Ben Abbott <address@hidden> wrote:
> 
>> > octave> fix(0.6/0.2)
>> > ans =  2
>> >
>> > I have a strong suspicion that Matlab returns 3 here.
>> >
>> > Dmitri.
>> 
>> I had the same expectation. However, when I tested Matlab it gave the same 
>> result as Octave.
> 
> What about mod(0.6,0.2), rem(0.6, 0.2)?

Both return 0

Ben



reply via email to

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