|
Post by asg1981rus on Sept 6, 2021 10:26:24 GMT 1
Hi. I'm relatively new to vDos, but googling and searching this forum didn't help, so I post it here: I have several old DOS scientific programs, that run smooth on NTVDM under virtual PC (Windows 7, 32-bit), and under DosBox. But using both of them has their own drawback, keeping it short -- I was looking for a substitute. At first sight the vDos seemed perfect candidate, but closer look revealed major problem with the way vDos treats floating point math. Example -- I run a simulation with one of the DOS codes under DosBox, it completes without problem delivering meaningful results. I repeat the same calculation under vDos and get either unreasonable results, that obviously significantly differ from the ones obtained with the DosBox. Sometimes I even get the DOS application crash with "run-time error M6203: MATH - exp: OVERFLOW error". I've tried to download old source code of vDos from SourceForge, compiled and linked it without troubles, but my code won't even start in that version of vDos, it crashes immediately with "run-time error R6002 - floating point not loaded".
Can anybody help me?
Best regards, Alexander.
|
|
|
Post by asg1981rus on Sept 6, 2021 10:30:23 GMT 1
I forgot to mention, that the version I'm using is vDos 2021.05.01.
|
|
|
Post by Jos on Sept 6, 2021 11:44:32 GMT 1
Could you post one of these programs with instructions what to look for?
Jos
|
|
|
Post by asg1981rus on Sept 7, 2021 11:21:53 GMT 1
Could you post one of these programs with instructions what to look for? Jos Hi, Jos. Unfortunately no, I cannot post this particular executable. I've tried to reproduce this error with a simple code of my own writing, but so far haven't succeed -- no matter what ridiculous input I put into this simple math calculus #include <stdio.h> #include <math.h> void main() { double a, b, c; a = 800.0; b = sin(a); c = exp(-a); printf("%e, %e, %e", a, b, c); } I still don't get any errors. Maybe it's because the compiler (WATCOM) does something smart with the code, or maybe the reason for MATH OVERFLOW is not in calculation part.
|
|
|
Post by Jos on Sept 7, 2021 11:47:13 GMT 1
Without something to reproduce your issue it’s impossible to determine what causes it.
Could be anything from a discrepancy between 64 and 80 bit internal FPU storage of floating point numbers, to the program (or a library) correcting a supposed FPU bug…
You'll have to stick with DOSBox.
Jos
|
|