T.R | Title | User | Personal Name | Date | Lines |
---|
1421.1 | does plundering count ? | HANNAH::OSMAN | see HANNAH::IGLOO$:[OSMAN]ERIC.VT240 | Tue Apr 16 1991 18:03 | 25 |
|
Well, let's see, we want
6^.7
That's
6^(7/10)
which is
(6^7)^(1/10)
which is
279936^(1/10)
which is between 4 and 5. Is that accurate enough ? If not, I could
start calculating
4.5^10
to tell you whether 6^.7 is closer to 4 or 5, etc.
/Eric
|
1421.2 | Use anachronism: Newton-Raphson | COOKIE::PBERGH | Peter Bergh, DTN 523-3007 | Tue Apr 16 1991 18:16 | 23 |
| <<< Note 1421.0 by SMAUG::ABBASI >>>
-< if you'r in 16 century, calculate this >-
m
>> how to calculate x where m<1.0 and |x|>2
>> ...
>> note that binomial of m
>> (1+x) for x>1 diverges
If you're madly in love with the binomial expansion, you can of course use the
identity
x**m == (1/x)**(-m)
and then apply the binomial expansion to the right-hand side if |x|>2.
Of course, the binomial expansion for fractional exponents was not known in the
sixteenth century.
Also, the power series is going to converge fairly slowly if x is large.
Probably, your best bet is to use Newton-Raphson (but that wasn't known in the
sixteenth century, either) -- if it converges, it converges quadratically.
|
1421.3 | Binary exponent expansion. | CADSYS::COOPER | Topher Cooper | Tue Apr 16 1991 18:40 | 19 |
| Well, the obvious way to me:
Problem, solve Y = x^m; 0<m<1 and x positive (I'm not sure how to deal
with a negative x in terms that would make sense to a 16th century
mathematician). Start with Y approximated by 1. Take the square root of
x. If m is beteen 1/2 and 1 then correct Y by multiplying it by the
square root just taken. Now repeat the process with m doubled and
the 1. (if any thrown away) and using the square-root of x for x.
Stop when the answer is "good enough".
Certainly a 16th century mathematician could have followed this
procedure, but would he (almost certainly a he, of course) have
understood what was *meant* by a fractional power? Had the simplifying
concept of nth-root = 1/nth power been discovered yet?
Since you restricted yourself to |x|>2, you obviously had something else
in mind.
Topher
|
1421.4 | | GUESS::DERAMO | Strange things are afoot at the Circle K! | Tue Apr 16 1991 18:56 | 4 |
| I understood |x|>2 to be there to stop the binary
expansion (1 + (x-1))^m with |x-1| < 1.
Dan
|
1421.5 | how is OTS$POWRR implemented? | SMAUG::ABBASI | | Wed Apr 17 1991 02:16 | 15 |
| jumping back to today, anyone knowes how this calculation implemented
in hardware? it is done by OTS$POWRR on VMS, do you think they used series
expansion here ? (via taking logs, or..?)
0001 PROGRAM test
0002 d = 6.0**.7
0003 END
0000 TEST::
0009 MOVF #^X33334033, -(SP) (push .7)
0010 MOVF #^X1C, -(SP) (push 6.0)
0013 CALLS #2, OTS$POWRR <------
001A MOVL R0, D(R11) (R0= 6.0**.7)
|
1421.6 | | ALLVAX::JROTH | I know he moves along the piers | Wed Apr 17 1991 09:14 | 18 |
| This is documented in the VMS math library doc set.
It uses logs and exponentials (which in turn play some games with
the floating point exponent and fraction and do minimax approximations.)
They in fact use series approximations to log base 2 and scale the
results for natural or base 10 logs.
Minimax approximations to a function, either rational or polynomial,
are fairly easy to create using the Remez exchange algorithm.
The only tricky part (at least in the past) was the need for
higher precision calculations than your target machine to avoid any
roundoff error in your final constants. Now with MAPLE and MATHEMATICA
you can program such routines almost trivially.
The method Topher describes was used to make the first tables of
logarithms.
- Jim
|
1421.7 | a restatement and another method | CSSE::NEILSEN | Wally Neilsen-Steinhardt | Wed Apr 17 1991 13:52 | 27 |
| If the problem is to create a process that might be used in the 16th century,
then I am lost. I don't know when things like a^(b+c) = a^b * a^c were
discovered.
If the problem is to compute the power without using logarithms, then I like
Topher's method. You can also see it by writing m as a binary decimal. Then
x^m is a product of square roots of x, x^(1/(2^n)), and the factors
corresponding to zero digits in the binary fraction drop out. This would be
nice for a mathematician with a roomful of assistants: set the first to
computing square root of x and passing digits to the next, who computes the
square root of that, and so forth. The leader can multiply the various digits
as they are obtained. Medieval parallel processing.
Another way, more in the mathematical tradition, would be to form the
inequality
j/( 2^n ) < m < (j+1)/( 2^n )
with n suitably large. Note that if an equality ever appeared above, the exact
answer could be computed.
Raise x to the j and j+1 powers. Take the square root of the results, the
square root of this, and repeat to a total of n times. You end up with two
numbers bounding x^m. I think this is more computation for a given accuracy
than Topher's method.
I don't see a way to apply Newton's method to this problem.
|