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: Wed, 27 Feb 2013 18:06:14 -0800

On 02/27/2013 05:55 PM, Daniel J Sebald wrote:
>
>>
>> I will have to check, but I don't think we are using the integer format
>> code '%d' when we print integers.  Instead, I think we are printing them as
>> floats with the width of the decimal portion set to zero.
>>
>> For example,
>> x = [-0 2 4];
>> sprintf ("%4.0f ", x)
>> ans =   -0    2    4
>
> Well, then this case is in error:
>
>>> octave:55>  [-0:3:6]
>>> ans =
>>>
>>>     0   3   6
>>>
This is the original error all over again [-0:3:6] produces the actual
sequence [0 3 6] which is correctly displayed as [0 3 6].

--Rik


reply via email to

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