[Bugzilla] [Bug 15506] Stéphane MOTTELET has commented the bug
bugzilla.admin at scilab.org
bugzilla.admin at scilab.org
Tue Mar 27 15:45:36 CEST 2018
http://bugzilla.scilab.org/show_bug.cgi?id=15506
--------- Bug Summary -----------
uint64() is puzzled over [uint64(%inf)/2 uint64(%inf)]
---------- Changed by ------------
stephane.mottelet at utc.fr
---------- What changed ----------
--- Comment #7 from Stéphane MOTTELET <stephane.mottelet at utc.fr> ---
Ok. To me, the central problem is the one with uint64 itself, since all operations are overloaded and are concluded by a final iconvert which is
itself internally overloaded to %i_convert.sci, finally dispatched to int8,uint8,....,int64,uint64 :
Windows:
--> uint64(2^64)
ans =
9223372036854775808
OSX, Linux:
--> uint64(2^64)
ans =
0
A priori, the cast (double) -> (unsigned long long) is done in
void convert_int(U* _pIn, int _iSize, T* _pOut)
lines 28...55 in scilab/modules/integer/sci_gateway/cpp/sci_int.cpp. The cast operation is done at line 52:
_pOut[i] = (T)_pIn[i];
here "T" should be the type of _pOut->get(), here unsigned long long. Considered the obtained result under Windows, the cast does not work as it
should.
--
You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/bugzilla/attachments/20180327/058e8b99/attachment.htm>
More information about the Bugzilla
mailing list