| delorie.com/archives/browse.cgi | search |
| Date: | Sun, 25 May 1997 13:53:39 +0300 (IDT) |
| From: | Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> |
| To: | Paul Shirley <Paul AT chocolat*foobar.co.uk> |
| cc: | djgpp AT delorie DOT com |
| Subject: | Re: float & ints & triangle3d_f |
| In-Reply-To: | <OsxmYGA+kegzEwW0@foobar.co.uk> |
| Message-ID: | <Pine.SUN.3.91.970525135315.4960S-100000@is> |
| MIME-Version: | 1.0 |
On Tue, 20 May 1997, Paul Shirley wrote: > Never compare floats if you can avoid it. If you really do have to do > it, compute the difference in fp, store it as a float then check bit31 > (the sign bit). This method can only tell whether two numbers are different, but it won't tell whether they are (approximately) equal.
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |