> > I have ported some code from Sparc to Intel. The code works fine except it > prints NaNs for some floats that are not NaNs at all. One of my co-workers > suggested I run the same code (of course compiled) on FreeBsd and see if > the NaNs appear. The FreeBsd code does not produce the NaNs. I have > searched the Web for Gcc and Nans and the closest I have come accross was > a mention of this problem on the Alpha chips and not Intel processors. > (Does that mean Intel copied that much from Digital that they too have > NaNs for usual float? :) :) ) > > So any expert out there where should I look further?
Dunno if I may call myself an expert, but something that would really help in diagnosing the problem, is to try to reduce the code to a small code snippet that produces the problem. It is hard to comment without seeing any actual code. The simple fact that code seems to work correctly on one system (FreeBSD) doesn't mean it is necessarily correct, as I discovered myself more than once :(. Did you try the gcc newsgroups? Eric Meijer -- E.L. Meijer ([EMAIL PROTECTED]) | tel. office +31 40 2472189 Eindhoven Univ. of Technology | tel. lab. +31 40 2475032 Lab. for Catalysis and Inorg. Chem. (TAK) | tel. fax +31 40 2455054 -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .