Timing of PDP-11 Instructions

Jim Battle frustum at pacbell.net
Sat Nov 26 20:37:42 CST 2005


Jerome H. Fine wrote:

> Hi All,
...
> Background:  I want to calculate the reciprocal (inverse) of a
> number between 1 and 65535 to an accuracy of 256 bits after
> the binary (or decimal) point.  This result will then be used to
> calculate the logarithm of that value which in turn will be used
> to calculate li(x) for values of x up to 10**38.  The code is in
> FORTRAN 77 (could also be in FORTRAN IV) which calls
> MACRO-11 code to do the really low level stuff such as
> repeated addition of many words with MANY Adc instructions
> following each addition (99.9% of the time the Adc instructions
> are never used).

Jerome, I didn't read all of this, but I have to ask: why do you need to compute 
the reciprocal at all?

	log(x^y) = y*log(x)

in this case, y=-1, so

	log(1/x) = -log(x)

accuracy is limited to your log computation, rather than being limited by your 
reciprocal and your log approximations.





More information about the cctalk mailing list