View Single Post
Old 09-05-2012, 11:26 AM   #9
geekmaster
Grand Sorcerer
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,070
Karma: 9670050
Join Date: Nov 2011
Location: MN USA
Device: Kindles,Nooks,etc.
Quote:
Originally Posted by NiLuJe View Post
... I don't think bitwise operations make much sense on floats... (And FWIW, a C/C++ compiler would also throw the same kind of error: don't ).
I have used bitwise operators on floats in C. There are some really efficient "magic algorithms" that use that trick. But you may need to tell the compiler not to choke on it.

For example, take a look at these:
http://aggregate.org/MAGIC/#Absolute Value of a Float
http://aggregate.org/MAGIC/#Comparison of Float Values

Last edited by geekmaster; 09-05-2012 at 11:36 AM.
geekmaster is online now   Reply With Quote