![]() |
32 vs 64 bit math - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3) +---- Forum: Help Me! (https://qb64phoenix.com/forum/forumdisplay.php?fid=10) +---- Thread: 32 vs 64 bit math (/showthread.php?tid=3713) |
32 vs 64 bit math - FCS_coder - 05-29-2025 Hi all, new to the forum, new to QB64, but have done some coding in QB. I have a general question on the math capabilities available. I am tied down rright now to a 32-bit Win 11 machine. I would like to do some math operations using 64-bit integers. Will QB 64 be able to give me the full precision of the 64-bits? I realize that I will lose speed on the thunking from 32 to 64 bits, but I can always recompile and run on a 64-bit machine when I get access to one. I want to start coding again since I have some forced free time so expect some more general under-the-hood type questions. RE: 32 vs 64 bit math - SMcNeill - 05-29-2025 You're fine -- both on the asking as many questions needed part and the math part as well. We're happy to help and encourage folks to ask any questions they might have; no one here ever complains over stupid questions. *Though we do complain about Pete, but that's a different type of stupid...* ![]() As for the math issue, it's not an issue. Your 32-bit machine should run and handle 64-bit math and such with the same precision and results as 64-bit systems. In fact, most math is done on FPU math processors, with are 80-bit math handling, instead of 32 or 64! You're welcome to post some simple test code and ask folks to share their results so you can see the precision doesn't change on your system, but I'm fairly certain you'll get the same answers between 32 and 64-bit systems. (One caveat -- ARM systems seem to be limited to less precison than x86 or x64 systems, but you didn't ask about those. If anyone is curious, feel free to ask @a470g about the differences, as he's just spent the last few weeks working them out so QB64PE will soon start compiling on ARM systems without many problems.) RE: 32 vs 64 bit math - Jack - 05-29-2025 arm64 as is used on the Pi 5 and with 64-bit Pi OS has a 128-bit long double type, though that type is probably not available in QB64 RE: 32 vs 64 bit math - a740g - 05-29-2025 (05-29-2025, 01:27 PM)Jack Wrote: arm64 as is used on the Pi 5 and with 64-bit Pi OS has a 128-bit long double type, though that type is probably not available in QB64 That has to be emulated support because ARM says there is no hardware support for it - https://developer.arm.com/documentation/ka004751/1-0 If the underlying C++ compiler / RTL supports 128-bit long double, then QB64-PE will support it as well. (05-29-2025, 10:37 AM)FCS_coder Wrote: Hi all, new to the forum, new to QB64, but have done some coding in QB. How are you running Windows 11 32-bit? As far as I know, Microsoft never released a 32-bit edition of Windows 11. Windows 10 was the last version to include one. Just curious. ![]() RE: 32 vs 64 bit math - SMcNeill - 05-29-2025 https://learn.microsoft.com/en-us/answers/questions/1479466/does-windows-11-exist-in-both-bit-versions-(32-and Quote:No. Windows 11 exist in 64 bit only. There is no 32 bit version of Windows 11 available. RE: 32 vs 64 bit math - FCS_coder - 05-30-2025 Ooops, yeah, you're right. It's Win 10. Funnily enough, it tells me I can't upgrade to 11, even though it keeps reminding me. If I had my choice, I'd be running 7, but never look a gift horse, etc, etc... RE: 32 vs 64 bit math - Jack - 05-30-2025 @a740g I figured that it was emulated, but now am curious how the QB84 _Float type will behave RE: 32 vs 64 bit math - Jack - 05-30-2025 OK, I modified qbs_str.cpp to output 34 significant digits for _Float and run the following test on Raspberry Pi 5 with Pi OS Code: (Select All)
output Code: (Select All) digits exp is the only function that gives full precision RE: 32 vs 64 bit math - Jack - 05-30-2025 the following works ok Code: (Select All)
|