In the latest Datafile issue (V31 N2) Wlodek Mier-Jedrzejowicz says his best slide rule (one he actually never used as it was soon replaced by the HP-35), a top of the range model from the German company Aristo, had 30 scales on it. They included the sqrt(1 - x2) and sqrt(1 + x2) functions, which to this day, he says, are not available on calculators. Well, they can be implemented using only two steps each (four, if we count LBL and RTN) on most RPN programmable calculators, like the HP-11C, for instance. Is someone willing to present these or other solutions?
Sqrt(1 - x^2) & Sqrt(1 + x^2) functions
|
05-08-2012, 09:45 PM
05-08-2012, 09:55 PM
Sin(Arccos(x)) = Sqrt(1 - x^2) Cosh(Arcsinh(x)) = Sqrt(1 + x^2)
05-08-2012, 09:58 PM
Exactly!
05-08-2012, 11:07 PM
More interesting from a numeric standpoint are 1-sqrt(1-x2) and sqrt(1+x2)-1.
05-09-2012, 08:01 AM
No problem - all this can be done with two other functions that are available on HP calculators since 1979 - and today again on the 34s: sqrt(1+x^2) - 1 1 - sqrt(1-x^2)That's what these functions are made for. ;-) Dieter
05-10-2012, 10:04 AM
It's true that a numerically stable formula for sqrt(1-x^2)-1 for small x can be given in terms of ln(x+1) and exp(x)-1. However, a logarithm/exp combination is a very inefficient way to compute these functions! (E.g., the algorithm for x^2 is not exponentiating twice the log. For that matter, efficient algorithms for x^2 do not simply multiply x by itself.) A related thought: On the opposite case, when abs(x) is close to 1, say for concreteness that x=1-t for some small t, then evaluating sqrt(1-(1-t)^2) directly is numerically unstable, but never forget your algebra: rewrite in the stable form sqrt(t*(2-t)).
05-10-2012, 06:28 PM
Alternatively, multiply through by (1 + sqrt(1-x2)) over itself. A little bit of algebra leads to this formula: 1-sqrt(1-x2) = x2 / (1 + sqrt(1-x2)) which is stable. The same can be done for sqrt(1+x2)-1. - Pauli
05-10-2012, 10:27 PM
The old NOVUS 4510 Mathematician had a function (M + x2).
05-10-2012, 11:06 PM
Yeah. I remember that too. Wonder if that was added to give the 4510 a competitive edge, features incentive over TI & HP. Edited: 10 May 2012, 11:07 p.m.
05-11-2012, 11:02 PM
If you go to Article 437 you will see that the function permitted efficient accumulation of the sums needed for single variable statistical analysis in a machine which did not have a built-in Sum+ capability. |
« Next Oldest | Next Newest »
|