LLVM implements the IEEE 128 bit float type (LLVM fp128). Can we have it as a new data type in Xojo? Something like a “Quad” type?
This will solve precision errors like we have processing large numbers as those currently using the Currency type.
Scientists and any user of very large or very small values will have benefits, not only the financial markets.
Dim GlobalValue As Currency = 3726192846283.8363
GlobalValue = GlobalValue + (GlobalValue * 0.0002311) // Internally it will be calculated using Quads and rounded to Currency
GlobalValue = GlobalValue + 12312424213453.7653 - 12312422303752.3894 // Using quads internally it works
Another issue to consider is that Xojo doesn’t promote math variables to the largest type when executing your function, so signing on to <https://xojo.com/issue/4920> would also be an important consideration for large (or small) math operations.
It does not help to fix the Xojo precision errors as already debated, and give us a wonderful “sub-product” of a “Quad” type. It’s READY in LLVM, why not just use it? Python, Haskel, Scala and Rust have implementations of it from LLVM.