pawn@wpi.wpi.edu (Kevin Goroway) (04/30/89)
Has anyone noticed a problem with atof when compiling (Lattice 5.02) with the -f8 option? I get strange results... -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | Pawn@wpi.wpi.edu Worcester Polytechnic Institute, Mass, U.S.A. | | Pawn@wpi.Bitnet main() { printf("Hello World!\n"); } | =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
kevin@uts.amdahl.com (Kevin Clague) (05/02/89)
In article <2112@wpi.wpi.edu> pawn@wpi.wpi.edu (Kevin Goroway) writes: >Has anyone noticed a problem with atof when compiling (Lattice 5.02) with >the -f8 option? I get strange results... > No, but I had problems with sscanf(string,"%f",&my_float). Maybe they are related. >-- >=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= >| Pawn@wpi.wpi.edu Worcester Polytechnic Institute, Mass, U.S.A. | >| Pawn@wpi.Bitnet main() { printf("Hello World!\n"); } | >=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -- UUCP: kevin@uts.amdahl.com or: {sun,decwrl,hplabs,pyramid,seismo,oliveb}!amdahl!kevin DDD: 408-737-5481 USPS: Amdahl Corp. M/S 249, 1250 E. Arques Av, Sunnyvale, CA 94086 [ Any thoughts or opinions which may or may not have been expressed ] [ herein are my own. They are not necessarily those of my employer. ]
bjornmu@idt.unit.no (05/03/89)
I've also had problems with Lattice 5.02 and the -f8 option. A few examples (from DBW_Render): This code produced a Guru #3 ("Address Error"): hit = <expression> && sfs[0] + sfs[1] <= 1.0; Had to be rewritten as: hit = <expression>; if (sfs[0] + sfs[1] > 1.0) hit = FALSE; This test always failed, even when count = 2.0 and maxcount = 0.0: if (count > maxcount) maxcount = count; But this worked fine: if (count > maxcount + 0.0) maxcount = count; These problems always seem to invlove comparison of floating point values. So be careful! Or wait for the next release..... :-} Bj|rn Munch ===========