octave-maintainers
[Top][All Lists]
Advanced

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

Re: Preserving signbit for range operator


From: Rik
Subject: Re: Preserving signbit for range operator
Date: Thu, 28 Feb 2013 06:20:24 -0800

2/28/13

Daniel, Michael,

It turns out that preserving the signbit is quite straightforward.  I coded
up most of a changeset last night, but need to do some benchmarking and add
some tests for the new behavior before completing it.  The root of the
problem is that the signbit can be lost through addition.  The expression
we were using for calculating range values was val = base + inc * i where i
could run from 0 to num_elements - 1.  For the first value the expression
is val = base + 0 and (-0 + 0) == 0.

--Rik


reply via email to

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