Challenge: can you take the sqrt (n) using only one operation

  • Context: Undergrad 
  • Thread starter Thread starter logics
  • Start date Start date
  • Tags Tags
    Challenge
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
31 replies · 8K views
It can be done in one step provided you specify the precision in advance.

You use the number as the index into an array containing the root. As long as the precision is specified, each real number is represented by an integer. Most modern computers will perform the indexed register load as an atomic operation (single step).
 
Mathematics news on Phys.org
Mark44 said:
Did you mean "viewers"?
I'm of courteous disposition and act my age, do you expect a reply?

I suggested: (edited OP)
The best known algorithm EDIT: i.e. iterative method ('Babylonian') to take the square root of a number requires 3 operations...
Do you know a simpler or faster one?
Can you find a method that requires only 1 operation? (No = 1)

EDIT : a [square]root is found with Nt ops., iterating Ni times a formula that requires No ops. using N+ different op-signs. Nt = Ni * No.
Babylonian method
, [itex]\sqrt{354.045^2}, ([/itex] if x0 = 300.00) : N+=No = 3, Ni = 4 , 3 * 4 [itex]\rightarrow[/itex] Nt = 12 operations
if No = 1 [itex]\rightarrow[/itex] (N+ = 1, Nt = Ni); [in the title: N+ = 1 [itex]\rightarrow[/itex] No = 1 , Nt < 12] ;
Nt < 8 is a 'good' solution, (5 * 1) = 5 operations would be 'brilliant'.
Post #31 proves that new readers can't carefully examine all previous posts. An edit to the OP would probably help. Thanks.
 
Last edited: