help-octave
[Top][All Lists]
Advanced

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

Re: ranges?


From: John W. Eaton
Subject: Re: ranges?
Date: Wed, 23 Aug 2006 09:59:11 -0400

On 23-Aug-2006, Louis Pecora wrote:

| Dmitri A. Sergatskov wrote:
| > On 8/22/06, John W. Eaton <address@hidden> wrote:
| >
| >   
| >> Class must be double for compatibilty.  Internally, Octave still has a
| >> special data type to represent ranges.  That's why you see only 24
| >> bytes used in the first case.  Most (all?) arithmetic operations on
| >> ranges result in matrices though, so that's why you see 80 bytes used
| >> in the second case.  Adding optimized operations for ranges is
| >> possible, but someone has to do the work.
| >>     
| >
| > I understand the conversion. I just was confused by apparent contradiction
| > between the Size and the Class for idx. Now I understand the reason.
| >
| >   
| >> See also the typeinfo function, which returns the name of the internal
| >> data type instead of the Matlab-compatible class name.
| >>     
| 
| 
| Might this cause a problem when you have to do an operation on an index 
| to determine a new index?  Floating point truncation or rounding may 
| convert back to the wrong (integer) index.

Only if you use or generate non-integer values or values larger than
around 2^52 somewhere along the way.

jwe


reply via email to

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