-
Notifications
You must be signed in to change notification settings - Fork 405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fldpi only loads pi to 53-bit accuracy instead of 64-bit accuracy #3451
Comments
On anything compiling for an x86 platform with the 0x4000c90fdaa22168c235 = 3.14159265358979323851... |
The Intel manual says FLDPI loads C90FDAA2 2168C234 C which gives you 3.141592653589793238 |
The problem here is the damn MSVC compilers don't actually support long double as 80-bit floating point, long double is the same as double. The sad thing is the old 16-bit DOS MS C compilers did in fact support long double as 80-bit floating point. Another problem is that MSVC doesn't support 64-bit inline assembly so the inline assembly in fpu_instructions_x86.h can't be used. The 32-bit builds of DOSBox-X work fine. |
Yeah, unfortunately microsoft decided not to support the extended precision long double nor inline assembly in the 64-bit version of the compiler. The MinGW 64-bit version for windows should support |
I switched to the 32-bit build which works fine. Technically this isn't a bug in DOSBox-X so I guess this can be closed. |
Code of Conduct & Contributing Guidelines
Have you checked that no other similar bug report(s) already exists?
What operating system(s) this bug have occurred on?
Windows 7 SP 1 (64-bit)
What version(s) of DOSBox-X have this bug?
0.83.25, 0.84.0 (64-bit builds only)
Describe the bug
fldpi only loads pi to 53-bit accuracy instead of 64-bit accuracy. The fraction loaded is C90FDAA2 2168C000
This is also true of the instructions fldl2t, fldl2e, fldlg2, fldln2
Expected behavior
fldpi should load the fraction C90FDAA2 2168C234
Steps to reproduce the behaviour
Get DEBUG or DEBUGX from my website - https://pcdosretro.github.io/enhdebug.htm
a
fninit
fldpi
fstp tbyte ptr [80]
int 3
g
d 80 la
Used configuration
No response
Emulator log
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: