|
|
|
|
|
by drv
3932 days ago
|
|
This looks like an ideal case for something like ldexp(), but I couldn't find an equivalent function in Java at first glance. A lookup table seems like a bit of a shame for something that should be inherently fast in binary floating point, but it is probably the next best thing if poking around in the floating point bit representation isn't possible. |
|
(That's not to say that Java shouldn't have ldexp( ), just that it's not a fix-all.)