[comp.sys.amiga.tech] Lattice 5.02 floating point

promac@iisat.UUCP (Promac Systems) (05/26/89)

I seem to be having a problem with accessing the 68881 directly in my 2500.
I have been in contact with Lattice and just got an ear full of static. The
problem seems to be in a few of the functions(ie log(xx)) gives me an answer
that is way off of what it should be(where xx stands for a floating point #).
ie. I run the savage benchmark using lc -fi -Lm, and I get an answer of 
    about 2.5E+04. I also get the same answer when using the normal math librari    -es. But when I access the 68881 by using the m68881.h header and -f8
    option on the compiler I get an answer of 3.483E+308???????

I have also tried to recompile DBW-Render and QRT with this option and they
just crash when they hit the math chip.

Any suggestions?? I tried the above examples with MANX and all is well.

later
Barry Comer                 
promac@iisat.UUCP

mwm@eris.berkeley.edu (Mike (I'll think of something yet) Meyer) (05/26/89)

In article <6@iisat.UUCP> promac@iisat.UUCP (Promac Systems) writes:
<I seem to be having a problem with accessing the 68881 directly in my 2500.
<I have been in contact with Lattice and just got an ear full of static. The
<problem seems to be in a few of the functions(ie log(xx)) gives me an answer
<that is way off of what it should be(where xx stands for a floating point #).
<ie. I run the savage benchmark using lc -fi -Lm, and I get an answer of 
<    about 2.5E+04. I also get the same answer when using the normal math librari    -es. But when I access the 68881 by using the m68881.h header and -f8
<    option on the compiler I get an answer of 3.483E+308???????

Look in include:m68881.h (be sure to get the text, not compacted,
version). All the math calls are defined as __builtin_fpc(<hexconstant>, d)
or some such. These all generate things to tweak the 68881, using the
constants to determine what operation you're going to do. I've been
told that if you're 68881 savy, you can figure out what they are
yourself, and what they should do.

Some of the constants are wrong. Most notablly, log. Lattice knows
this. Not having a 68881, I didn't get the details. Call the support
BBS and check the Amiga discussion for details.

	<mike

--
Estant assis, de nuit secrette estude,			Mike Meyer
Seul, repose sur la selle d'airain,   			mwm@berkeley.edu
Flambe exigue, sortant de solitude,   			ucbvax!mwm
Fait proferer qui n'est a croire vain.			mwm@ucbjade.BITNET

dwi@manta.NOSC.MIL (Steve Stamper) (05/27/89)

You have old include files, you need to change the log functions
inline code description in m68881.h.  I have recompiled and
run QRT succesfully in all options except -f8.  There are some
bugs in the -f8 option still.  Lattice is working on the problem.
I forget the exact fix to m68881.h but a quick look at the
function codes given as compared to the 881 opcodes (use a
881 manual from Motorola) shows the problem.
-Roger