Access to 128-bit floats on suitable (64bit ARM) platforms?
Noting the recent determination that long doubles are 128 bits on Raspberry Pi 4 (and Pi 3), I'm wondering if there's any way to access that facility from a BBC Basic?
0
Comments
-
(Oops, should have specified that they need to be running a 64 bit OS)0
-
In Matrix Brandy, all floating point types (as with BASIC VI) are 64-bit, and that's available on all supported platforms including RISC OS on ARM-26. For some calculations, they are internally calculated using whatever "long double" offers to minimise loss of precision in intermediate steps, but the final value is returned as a 64-bit float. This could give rise to the same function returning subtly different values on different hardware, but the intention is to get the best result available in the available 64 bits. At this stage there is no facility to expose float128s in BASIC.0
-
Thanks, that makes sense. (It looks as if these float128s might well be implemented in software and therefore be a lot slower than the corresponding 80 bit floats on Intel. But I'm not sure of this.)0
-
It looks as if these float128s might well be implemented in software and therefore be a lot slower than the corresponding 80 bit floats on Intel. But I'm not sure of this.
Rather more interesting, from my perspective, is the support for 80-bit long-doubles (96-bits, once padded to the standard 16-byte alignment of 64-bit platforms) on the Apple M1 and M2 CPUs, by Apple's Rosetta 2 x86 emulation.
The performance of this is so spectacular that I wonder whether Apple has incorporated some unadvertised instructions in its implementation of the ARM architecture to accelerate it. Probably not, but with Apple you never know!
0