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: Daniel J Sebald
Subject: Re: Preserving signbit for range operator
Date: Mon, 25 Feb 2013 15:11:16 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16

On 02/25/2013 02:45 PM, Michael D. Godfrey wrote:
On 02/25/2013 03:37 PM, Daniel J Sebald wrote:
octave:6> [0:-3:-5]
ans =

0 -3
But:
octave:3> [-0:-3:-5]
ans =

-0 -3

Symmetry of any interest?


Symmetry is tough simply because IEEE specification doesn't have a +0, but the alternate output you give is technically the correct result by definition. [a:z:b] for [-0:-3:-5] means a=-0; the result should be -0 -3. But for [0:-3:-5] the result is 0 -3.

Currently, it is this Octave result

octave:28> [-0:3:5]
ans =

   0   3

which is not abiding by the definition.

Dan


reply via email to

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