From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,5aa89c69d7436344,start X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1994-09-01 05:00:09 PST Newsgroups: comp.sys.dec Path: bga.com!news.sprintlink.net!hookup!yeshua.marcam.com!news.kei.com!world!ade From: ade@world.std.com (Lee A Beaudette) Subject: Re: Help: Any VAX floating point emulation lib. for non-VAX Message-ID: Organization: The World Public Access UNIX, Brookline, MA Date: Thu, 1 Sep 1994 11:13:11 GMT Ken, Thank you very much, you are right. I'm using MS-VC++1.0. I could not find the way to match the IEEE with VC++ and MS-Japan rep. said there is no option to do that. However Borland C++ 3.1 has the option "Fast floating point", its help says "When this option is off, the compiler follows strict ANSI rules regarding floating-point conversion". After turned off this option, I got the exact same results with VAX on PC. Example : #define PI 3.14159265358979323846264338327950288 int main() { int i = 100; double b; b = cos((float)(PI * 0.5)); printf("%20.10lf\n", b); b = cos((float)(2.0 * PI * i / 400)); printf("%20.10lf\n", b); } VAX, BC(FFP off) print -0.0000000437 -0.0000000437 BC(FFP on), VC(emu, inline) print -0.0000000437 0.0000000000 VC(80x87, co-pro) print 0.0000000000 -0.0000000000 Again, thank you very much. For short term, I could switch to BC++ from VC++, but I still need to go VC++ sometime. Any idea ? Hisa Noguchi KYD00035@niftyserve.or.jp