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

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

[Octave-bug-tracker] [bug #64692] colon range includes an extra value


From: Nicholas Jankowski
Subject: [Octave-bug-tracker] [bug #64692] colon range includes an extra value
Date: Tue, 19 Sep 2023 11:03:12 -0400 (EDT)

Follow-up Comment #8, bug #64692 (project octave):

I suspect matlab must have some similar behavior, but the tolerance is a bit
tighter than octave.  doing some simple bisection to find the balance point:

matlab

>> 1.8:.05+1.42187499999999989*eps:1.9

ans =

   1.800000000000000   1.850000000000000

>> 1.8:.05+1.42187499999999988*eps:1.9

ans =

   1.800000000000000   1.850000000000000   1.900000000000000

>> 1.42187499999999988*eps

ans =

 3.157196726277788e-16



Octave:

>>  1.8:.05+2.42187499999999978*eps:1.9
ans =
    1.8000    1.8500

>>  1.8:.05+2.42187499999999977*eps:1.9
ans =
    1.8000    1.8500    1.9000

>> 2.42187499999999977*eps
ans = 5.3776e-16




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?64692>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

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