View Single Post
Old 09-05-2012, 11:26 AM   #9
geekmaster
bit basher & pixel pusher
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: 5,682
Karma: 7581653
Join Date: Nov 2011
Location: A young man living in an old man's body.
Device: Too many.
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 offline   Reply With Quote