icemann wrote:Where would that be used?
The x86 FPU has built-in commands to load seven constants. They are 0.0, 1.0, pi, ln(2), log2(e), log(2), and log2(10). The last four are used because the FPU can calculate only log2(x) and 2^x directly; multiplying with the right constant before/after the log2/2^x operation yields e^x, ln(x), log(x) and 10^x.
The values of the last four constants in the code were a little on the short side for an 80 bit number (that's the native precision of the x87 FPUs) - I should've read the code more closely to discover that the FPU emulation is limited to 64 bit on non-x86 host systems. So basically the patch is worthless unless and until the FPU emulation is extended to more than 64 bit precision on non-x86 hosts.