This looks like an ideal case for something like ldexp(), but I couldn&#x27;t find an equivalent function in Java at first glance.<p>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&#x27;t possible.