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
double-long cast on Intel 8080 #1687
Comments
Please see this page: https://github.com/z88dk/z88dk/wiki/Classic--Maths-Libraries for the maths libraries supported on the 8080. Effectively you'll need to use |
tried to use these, I got this:
|
I should have fixed up the dai problem (there was some errant code leftover from when I copied mbf32 as the base) - please try again tomorrow! For MBF32 the actual maths code isn't supplied with z88dk - you need to download an additional file and then build the library yourself. |
What is the download URL for the additional file? |
Just did a git pull but I got this:
|
Sorry, okay. So: Download URL is in this file: https://github.com/z88dk/z88dk/blob/master/libsrc/math/mbf32/z80/math_mbf32.asm Regarding daimath you'll need to rebuild:
|
Just did a complete removal of z88dk and total rebuild with:
then recompiled my code with
it worked! Thank you |
a question: are there reasons for preferring mbf32 instead of dai32 ? |
On CP/M I'm not sure it makes a difference - the dai32 fp format is the same as the AM9511 FPU so in theory the library could be extended to offload certain operations - see #1543 for the benefits (or not) If I remember correctly, the dai32math mantissa is 1 bit shorter than mbf32 but I don't think that has a serious impact. The mbf32 implementation is certainly a lot more tested than dai32math! - It's been embedded in the ROMs of various machines and nascom basic which has been ported pretty much everywhere. My gut says go with mbf32, but it's a personal choice - I think they perform roughly the same. |
is it on a different URL for license reasons? |
Actually it is a one bit shorter 7-bit exponent, which makes the range +63 to -64. The mantissa is identical.
👍 |
Hi, I produced this little program:
It should print "1.0000". It works if compiled for z80 cpu:
But, compiling it for Intel 8080, it produces a compile-time error:
The text was updated successfully, but these errors were encountered: