There was an old trick for calculating floating point log_2(x) back in assembly language days: Assume 1.0<=x<2.0. Square it 7 times, to convert mantissa bits (bits to the right of the binary point) into exponent bits. Decant the 7 exponent bits into the nascent logarithm; zero them out in the x^128 value, bringing it back into the 1.0 - 2.0 range. Rinse, repeat, till you've got 28 bits of logarithm. (The PDP6 had 36-bit words.) A similar trick essentially reproduces SP's idea: Iterate: cos 2x = 2 (cos x)^2 - 1 Keeping track of the sign of cos(2^N x) will read out x/pi in binary. (I learned these from Gosper.) Rich ----- Quoting Simon Plouffe <simon.plouffe@gmail.com>:
Hello,
there is a way to compute with the ruler and compass some numbers like arctan(1/2)/Pi, bit by bit, but the complexity is growing like the square of each iteration unfortunately,
https://cs.uwaterloo.ca/journals/JIS/compass.html
best regards,
simon plouffe
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun