Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Multiplicative inverse
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Algorithms == The reciprocal may be computed by hand with the use of [[long division]]. Computing the reciprocal is important in many [[division algorithm]]s, since the quotient ''a''/''b'' can be computed by first computing 1/''b'' and then multiplying it by ''a''. Noting that <math>f(x) = 1/x - b</math> has a [[Zero of a function|zero]] at ''x'' = 1/''b'', [[Newton's method]] can find that zero, starting with a guess <math>x_0</math> and iterating using the rule: :<math>x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)} = x_n - \frac{1/x_n - b}{-1/x_n^2} = 2x_n - bx_n^2 = x_n(2 - bx_n).</math> This continues until the desired precision is reached. For example, suppose we wish to compute 1/17 β 0.0588 with 3 digits of precision. Taking ''x''<sub>0</sub> = 0.1, the following sequence is produced: :''x''<sub>1</sub> = 0.1(2 β 17 Γ 0.1) = 0.03 :''x''<sub>2</sub> = 0.03(2 β 17 Γ 0.03) = 0.0447 :''x''<sub>3</sub> = 0.0447(2 β 17 Γ 0.0447) β 0.0554 :''x''<sub>4</sub> = 0.0554(2 β 17 Γ 0.0554) β 0.0586 :''x''<sub>5</sub> = 0.0586(2 β 17 Γ 0.0586) β 0.0588 A typical initial guess can be found by rounding ''b'' to a nearby power of 2, then using [[bit shift]]s to compute its reciprocal. In [[constructive mathematics]], for a real number ''x'' to have a reciprocal, it is not sufficient that ''x'' β 0. There must instead be given a ''rational'' number ''r'' such that 0 < ''r'' < |''x''|. In terms of the approximation [[algorithm]] described above, this is needed to prove that the change in ''y'' will eventually become arbitrarily small. [[File:X to x power showing minimum.svg|thumb|Graph of f(''x'') = ''x''<sup>''x''</sup> showing the minimum at (1/''e'', ''e''<sup>β1/''e''</sup>).]] This iteration can also be generalized to a wider sort of inverses; for example, [[Invertible matrix#Newton's method|matrix inverses]].
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)