floating-point emulators on PC's, a question from Cleve Moler
David G. Hough on validgh
dgh
Wed Jun 19 05:46:33 PDT 1991
Hi. We're trying to build a version of MATLAB that will run
on IBM-type PC's WITHOUT 80x87 chips. (Until now, all MATLAB's
have required the math chips.) We're using the Microsoft 6.0 C
compiler. I had thought they did a good job of emulating the
exception handling. But either we're not compiling with the
correct flags, or they're not handling exceptions correctly.
Even things like
double x, Zero = 0;
x = 1/Zero;
printf("x = %e\n",x);
give us x = 0.00000, not infinity.
So, I have a couple of questions.
1. How does Microsoft C handle 1/0, 0/0, log(0), etc. in
their default mode which is 'sposed to run with or without
the math coprocessor?
2. What compile flags do we need to set to get proper handling
if it is available?
3. If we need to provide our own exception handler, is there
a decent one somewhere that we could start from?
If anybody wants to set us straight, please respond to
moleramathworks.com
or call me at
508-653-1415 (extension 352 if you get our machine.)
Thanks a lot.
-- Cleve Moler
More information about the Numeric-interest
mailing list