Page 1 of 1

Math coprocessor funkiness/bugs?

Posted: Mon 15 Jan, 2018 2:25 am
by bloodbat
Hello! I was testing some MS-DOS software using a PCem emulated 486DX2 and ran into some err...interesting bugs/quirks whenever the coprocessor is available.
-Lotus 123 release 4 seems to store everything as floating point even when it's an integer if the coprocessor is do I know? When running the program in PCem using a 486DX or Pentium machine any integer value entered shows up as 0...or asterisks...or 1E-1x...anything but the entered value (try entering, say..."123" in a cell), intrigued I tested using PCem but under an emulated 286 (minimum for that release)...and the values are correct (no coprocessor), I tried a 486SX and the values were correct as well (again, no coprocessor), using the exact same configuration for PCem as the one used for the 486DX2 save the processor type, MS-DOS config.sys and autoexec.bat were also the very same used in the DX2 emulated machine. I also ran tests using a Win 98 VmWare machine and an XP VmWare machine, both machines had active coprocessors and both displayed and stored the values correctly.
-I tried going back a few releases...Lotus 123 2.4 stores and displays values correctly...until you try to draw a pie chart...then it's a mess. Poor, half eaten by a messy individual, pie chart!
-MS Word 5.5 is capable of doing simple math from highlighted values in text by pressing F2, I wanted to do a simple integer sum, the result always showed up as either zero or as a "longer than 14 digits" error (Word's limit)...again, when trying under a machine with no emulated coprocessor, the result showed up correctly (say 2+2 the result should be 4, but is zero in a DX or Pentium).
-Intel made a program to test math coprocessors available "CHKCOP, Intel's Math CoProcessor Test Program, Version 2.20" (could be found as in SimTel, I'm sure there are mirrors around, if not, I can provide the zip file), PCem's coprocessor fails the very first test: the Addition test. For completeness I tested DosBox and VMWare as well...and both fail...the 5th test (Transcendental).

I don't know whether PCem emulates math coprocessors, if it does, I think these are nasty bugs.

Re: Math coprocessor funkiness/bugs?

Posted: Mon 15 Jan, 2018 3:56 am
by A. Naim
When +0 and -0 not only exist, but are different and distinct values, then, well... Problems are basically inevitable.

Also somewhat inedible.

Re: Math coprocessor funkiness/bugs?

Posted: Mon 15 Jan, 2018 5:47 pm
by SarahWalker
I'll have a look - I'm aware there are still FPU bugs remaining.

In general though, my view is that PCem's FPU emulation is for 'entertainment purposes only' - good enough for games, not for anything that relies on eg full 80-bit accuracy or strict IEEE compliance. Spreadsheets are one of the areas that might cause some problems, though what you're seeing in Lotus 123 is probably beyond what I'd consider acceptable here. CHKCOP is the sort of thing that is likely to fail though.

Re: Math coprocessor funkiness/bugs?

Posted: Mon 15 Jan, 2018 6:06 pm
by bloodbat
Ohh I see, thanks for clearing that up :)
Any chance of a fix to at least get the values displayed properly, or should I just use an SX machine for that?