...
In the past few days I ported D.H.Bailey's floating point library over from double to extended floats. It is interesting that Bailey's code did not need adjustment when the mantissa was widened from 106 to 128 bits.
On 25/09/2026 10:17 am, marcel hendrix wrote:
...
In the past few days I ported D.H.Bailey's floating point library over from double to extended floats. It is interesting that Bailey's code did not need adjustment when the mantissa was widened from 106 to 128 bits.
I wondered about the constant SPLIT. Apparently some sort of magic number.
...
The original paper mentioned by JVN, "Software for Doubled-Precision Floating-Point Computations", Seppo Linnainmaa, ACM Transactions on Mathematical Software, Vol 7, No 3, September 1981, Pages 272-283, explains the procedure and gives the algorithm for SPLIT. Maybe unfortunately, Julian decided to define SPLIT as a magic number instead
of writing
-- split = beta^(p-floor(p/2)) + 1, for beta=2 p=53
53e 53e F2/ FLOOR F- F2^X F1+ FCONSTANT split ( 134217729e )
...
On 25/09/2026 4:24 pm, marcel hendrix wrote:
...
The original paper mentioned by JVN, "Software for Doubled-Precision Floating-Point Computations", Seppo Linnainmaa, ACM Transactions on Mathematical Software, Vol 7, No 3, September 1981, Pages 272-283, explains the procedure and gives the algorithm for SPLIT. Maybe unfortunately, Julian decided to define SPLIT as a magic number instead
of writing
-- split = beta^(p-floor(p/2)) + 1, for beta=2 p=53
53e 53e F2/ FLOOR F- F2^X F1+ FCONSTANT split ( 134217729e )
...
So SPLIT for extended precision is 4294967297e ?
On 9/25/2026 4:38 PM, dxf wrote:
On 25/09/2026 4:24 pm, marcel hendrix wrote:
...
The original paper mentioned by JVN, "Software for Doubled-Precision Floating-Point Computations", Seppo Linnainmaa, ACM Transactions on Mathematical Software, Vol 7, No 3, September 1981, Pages 272-283, explains the procedure and gives the algorithm for SPLIT. Maybe unfortunately, Julian decided to define SPLIT as a magic number instead
of writing
-- split = beta^(p-floor(p/2)) + 1, for beta=2 p=53
53e 53e F2/ FLOOR F- F2^X F1+ FCONSTANT split ( 134217729e )
...
So SPLIT for extended precision is 4294967297e ?
FORTH> split f.-a 4294967297.0000000000000000000
In the past few days I ported D.H.Bailey's floating point library over
from double to extended floats. It is interesting that Bailey's code did
not need adjustment when the mantissa was widened from 106 to 128 bits.
The package is able to deliver about 38 decimal digits, about 6 orders
of magnitude better than ddfloat manages. Also, the exponent can be
+/-4900 instead of +/-308. Unfortunately, qd-fp.frt is about 2 to 3
times slower than dd-fp.frt.
I still have some problems with the trigonometric functions, which
*appear* to become inaccurate for large angles. However, this may again
be caused by limitations in MATLAB's vpa() function -- I use vpa to test
the accuracy of the functions, and it works just fine for 106 bits but
not for 128.
On 9/25/2026 4:38 PM, dxf wrote:
On 25/09/2026 4:24 pm, marcel hendrix wrote:
...
The original paper mentioned by JVN, "Software for Doubled-Precision Floating-Point Computations", Seppo Linnainmaa, ACM Transactions on Mathematical Software, Vol 7, No 3, September 1981, Pages 272-283, explains the procedure and gives the algorithm for SPLIT. Maybe unfortunately, Julian decided to define SPLIT as a magic number instead
of writing
-- split = beta^(p-floor(p/2)) + 1, for beta=2 p=53
53e 53e F2/ FLOOR F- F2^X F1+ FCONSTANT split ( 134217729e )
...
So SPLIT for extended precision is 4294967297e ?
FORTH> split f.-a 4294967297.0000000000000000000
-marcel
On 26/09/2026 1:13 am, marcel hendrix wrote:
On 9/25/2026 4:38 PM, dxf wrote:
On 25/09/2026 4:24 pm, marcel hendrix wrote:
...
The original paper mentioned by JVN, "Software for Doubled-Precision Floating-Point Computations", Seppo Linnainmaa, ACM Transactions on Mathematical Software, Vol 7, No 3, September 1981, Pages 272-283, explains the procedure and gives the algorithm for SPLIT. Maybe unfortunately, Julian decided to define SPLIT as a magic number instead
of writing
-- split = beta^(p-floor(p/2)) + 1, for beta=2 p=53
53e 53e F2/ FLOOR F- F2^X F1+ FCONSTANT split ( 134217729e )
...
So SPLIT for extended precision is 4294967297e ?
FORTH> split f.-a 4294967297.0000000000000000000
-marcel
Here's my DD updated for Extended-precision:
https://pastebin.com/ZNV592Wb
I still have some problems with the trigonometric functions, which
*appear* to become inaccurate for large angles. However, this may
again be caused by limitations in MATLAB's vpa() function -- I use vpa
to test the accuracy of the functions, and it works just fine for 106
bits but not for 128.
On 25-09-2026 02:17, marcel hendrix wrote:
In the past few days I ported D.H.Bailey's floating point library over
from double to extended floats. It is interesting that Bailey's code did
not need adjustment when the mantissa was widened from 106 to 128 bits.
The package is able to deliver about 38 decimal digits, about 6 orders
of magnitude better than ddfloat manages. Also, the exponent can be
+/-4900 instead of +/-308. Unfortunately, qd-fp.frt is about 2 to 3
times slower than dd-fp.frt.
If you only want 128 bit precision, the Eckert FP library offers 128 bit
on 64 bit platforms, since its mantissa is two cells (and one cell for >exponent and sign bits).
However, I suspect D.H.Bailey library also features math functions,
tuned for that task -- and that's quite a different story. I tuned all
my float libraries for 64-bit, but I doubt I'll get that accuracy. ;-)
I still have some problems with the trigonometric functions, which
*appear* to become inaccurate for large angles. However, this may again
be caused by limitations in MATLAB's vpa() function -- I use vpa to test
the accuracy of the functions, and it works just fine for 106 bits but
not for 128.
We used to have Casio's "Keisan Online Calculator for Math and Science" >online -- which was great. I used it extensively for developing my
incomplete Beta functions. However, it's gone.
Nowadays I use Qalculate! You can set the precision in the display "set >precision <n>" (https://qalculate.github.io/ -- yeah, it's got Windows
as well).
It's pretty extensive..
Hans Bezemer
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 74 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 122:20:51 |
| Calls: | 1,194 |
| Files: | 1,352 |
| Messages: | 290,355 |