Post

Replies

Boosts

Views

Activity

Comment on sizeof(long double) differs in Intel vs. ARM64 (ARM64 long doubles are just doubles). How to get extended precision in Apple Silicon?
Quinn, thank you for your response, it has clarified an issue I have been pondering. Out of curiosity, a few years ago, I wrote a Random Number Generator based on original work by MIT, Boston, in the mid 80s, project URN. It is simple, cute, and fast, with the period of the generator is expected to be around 10^171. And uniformity looks really really good, based on NIST Test Suite done years ago. I came back to it today, wondering if MacOS Big Sur had implemented 128bit functionality in Xcode C++, and maybe I could deploy it in my Random Number Generator. I found  Size of Long Double: 16 or 128bit, and as Size of Double 8 or 64bit, was so encouraged... But testing showed Long Double appeared to be the same as Double. It was exciting to find 2^216 gave me an exact result: 105312291668557186697918027683670432318895095400549111254310977536 to the very last of the 78 digits. As did 2^-49: 1.7763568394002504646778106689453125e-15 to 36 digits but digging around, discovered it turns out to be a quirk of an exact binary number, versus decimal approximation, which is limited of 19 digits. (I wonder why the 2^216 calculation did not result in an overflow?) So thank you, once again for your excplation... Since could not find how to deploy Float80 in Xcode C++, I have now happily satisfied my curiosity, and closed out the project.
Jun ’21