View Single Post
Old 09-05-2012, 12:26 PM   #9
geekmaster
Всё гениальное просто.
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,070
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
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 12:36 PM.
geekmaster is offline   Reply With Quote