View Single Post
Old 09-05-2012, 11:26 AM   #9
geekmaster
Carpe diem, c'est la vie.
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,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
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