help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-smalltalk] BUG in sysdep.h (Smalltalk)


From: Volker Hilsenstein
Subject: [Help-smalltalk] BUG in sysdep.h (Smalltalk)
Date: Fri, 27 Apr 2001 14:27:48 +0200 (CEST)

Hello,

I was looking for a way to implement isFinite() and isNaN()
for use in VC++. While searching the web I found the
isFinite() macro that is used in the C-Source for GNU Smalltalk.

libgst/sysdep.h:


/* These nice tests are simple, guaranteed and independent of byte order.
*/
#define isFinite(dbl)           (((dbl) == (dbl)) && ((dbl) != ((dbl) * 
1.5 + 1.0)))



One of my collueges immediately asked:

"So is -2.0 infinite" ?

I bet you will figure out an easy fix :-)

Cheers,

Volker 


--
Volker Hilsenstein                      phone: +49 6221 546316
Institute for Environmental Physics                     546628
University of Heidelberg              
INF 229 Room 442
69120 Heidelberg
Germany                 address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]