Do you have complete code for PalmOS? There is no Int64...

Kind regards, Harald

-
Harald Schlangmann
[EMAIL PROTECTED]
http://www.gps-laptimer.de

-----Ursprüngliche Nachricht-----
Von: %%email.bounce%% [mailto:%%email.bounce%%] Im Auftrag von Luc Le Blanc
Gesendet: Samstag, 29. September 2007 18:46
An: Palm Developer Forum
Betreff: Setting/testing a float/double with NAN

I do float and double computations and I sometimes need to set them as NAN (Not 
A Number) to signal something could not be computed. Conversely, I must be able 
to test for NAN equality.

A float NAN is 0x7FC00000 while a double NAN is 0x7FF8000000000000. But how can 
I define these constants so that I can do

float = fNAN;
and
if ( f == fNAN )

I tried:

const Int64 dNAN = 0x7FF8000000000000;
const Int32 fNAN = 0x7FC00000;

but when I do

float f = fNAN, it ends up with 0x4EFF8000 instead. I tried various casts, as 
well as #defines, to no avail. What is the trick?


Luc Le Blanc
-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/



-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to