Date: Tue, 06 Sep 1994 11:55:28 +1000 From: Bill Metzenthen Subject: Re: djgpp 1.12 math emulator To: djgpp AT sun DOT soe DOT clarkson DOT edu Pieter Kunst (kunst AT prl DOT philips DOT nl) wrote: > Minxian Yang (s9001200 AT csdvax DOT csd DOT unsw DOT edu DOT au) writes: > > I tried to port a Gamma function routine in Numerical Recipes Fortran to > > djgpp 1.11. The result was something like Gamma(7.0) = 712.906 (the true > > value should be 720.000). My computer is an NEC 386D20. Though my problem > > is not with djgpp's emulator, I do need some help on the precision of djgpp. > > Hello Minxian, > > I tried the sample program below (gamma.c) with DJGPP 1.12m1 to check the > gamma function given in Numerical Recipes. > Gamma(7) returns 719.999999868 on my PC, but I have a 486DX (which includes > a coprocessor). I'm sure some of the DJGPP users with a 386SX machine > (i.e. no coprocessor, just EMU387) can compile the program below to see what > result is obtained with EMU387 (and post the result to you, as well as to the > list). If accuracy is of importance, I suggest that you try the alternative FPU emulator which is in wmemu112.zip. It was written for djgpp 1.11, but I have no reports yet that it doesn't work with 1.12 (I use Linux these days, so I don't keep up to date with the very latest djgpp, but I will attempt to fix problems if people report them). Under djgpp 1.11, I get the following result with Pieter's program: gamma(7) = 719.999999868 --Bill