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

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

[Octave-bug-tracker] [bug #45945] Missing Matlab's special support for i


From: Ernst Reissner
Subject: [Octave-bug-tracker] [bug #45945] Missing Matlab's special support for integer literals
Date: Thu, 18 Aug 2016 11:30:33 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:48.0) Gecko/20100101 Firefox/48.0

Follow-up Comment #13, bug #45945 (project octave):

Maybe I do not fully understand the problem but I have the impression that
octaves favorite scalar type is double. 
Thus for literals no matter whether we have 42 or 42.0, 
this is a double although it fits into an int8 and into a single also. 
This is appropriate for all numeric types but two: 
int64 and uint64, because mantissa length of double is 53, 
whereas for uint64 it is 64 and for int64 it is 63. 
All other types fit into double. 

I would expect that all is ok, if the parser checks 
whether the literal fits into a double. 
If so it is treated as a double. 
Otherwise it is checked whether it fits into an int64. 
If so, it is an int64. 
Else it is checked whether it fits into an uint64. 
If so, it is an uint64. 
Else it is an error. 
Maybe it is a question how to treat a number which is written as a float
whereas it is an integer like 42.0 or what. 


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?45945>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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