[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference rusure::math

Title:Mathematics at DEC
Moderator:RUSURE::EDP
Created:Mon Feb 03 1986
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2083
Total number of notes:14613

1421.0. "if you'r in 16 century, calculate this" by SMAUG::ABBASI () Tue Apr 16 1991 18:33

    easy question:  
                        m
    how to calculate   x   where m<1.0 and |x|>2
    example   
                  .7
                6
    
    without using Logarithms tables. (and offcourse no calculators :-) )
    note that binomial of      m
                          (1+x)   for x>1 diverges...(at least that how it
                                                      was last time i looked)
    /naser
    
     
T.RTitleUserPersonal
Name
DateLines
1421.1does plundering count ?HANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Tue Apr 16 1991 20:0325
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.2Use anachronism: Newton-RaphsonCOOKIE::PBERGHPeter Bergh, DTN 523-3007Tue Apr 16 1991 20:1623
                      <<< 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.3Binary exponent expansion.CADSYS::COOPERTopher CooperTue Apr 16 1991 20:4019
    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.4GUESS::DERAMOStrange things are afoot at the Circle K!Tue Apr 16 1991 20:564
        I understood |x|>2 to be there to stop the binary
        expansion (1 + (x-1))^m with |x-1| < 1.
        
        Dan
1421.5how is OTS$POWRR implemented?SMAUG::ABBASIWed Apr 17 1991 04:1615
    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.6ALLVAX::JROTHI know he moves along the piersWed Apr 17 1991 11:1418
    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.7a restatement and another methodCSSE::NEILSENWally Neilsen-SteinhardtWed Apr 17 1991 15:5227
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.