octave-maintainers
[Top][All Lists]
Advanced

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

64-bit integer arithmetics v2


From: Jaroslav Hajek
Subject: 64-bit integer arithmetics v2
Date: Sun, 5 Oct 2008 11:39:11 +0200

hi,

this is an improved version of the previous attempt at implementing
64-bit arithmetics.
The mixed precision operators and relations should now work robustly
in all cases (and in case you have long double, they will even be fast
:)
These expressions should now work as expected:
uint64(2^64), int64(2^63)...
a = 1.9*2^61; b = uint64(a); b++; b > a
a = 1.9*2^61; b = int64(a); b++; b > a
(note that these two may already work in current tip and/or 3.0.x
because of the CPU using long double behind the scene, but it will
probably depend on optimization level) and maybe more ... (tests yet
to be written).
also, the mixed (u)int64-double binary operations avoid precision loss
(using long double if possible).

OK to push?

regards

-- 
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz

Attachment: int_patch2.diff
Description: Text Data


reply via email to

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