DB48X: HP48-like RPL implementation for DM42
|
Yesterday, 11:18 PM
Post: #499
|
|||
|
|||
RE: DB48X: HP48-like RPL implementation for DM42
(Yesterday 05:05 PM)n1msr Wrote: It becomes important when the Comb[inations] function is used (…) I just cobbled together this program for the HP-15C to calculate: \( \binom{n}{k} = \frac{n!}{k!(n-k)!} \) Code: 001 { 44 0 } STO 0 Example 5 ENTER 3 R/S 10.0000 Nothing to see here. That's what we expected. But it also allows us to calculate values of \(\binom{0.5}{k}\) for consecutive \(k\). Examples 0.5 ENTER 0 R/S 1.0000 0.5 ENTER 1 R/S 0.5000 0.5 ENTER 2 R/S -0.1250 0.5 ENTER 3 R/S 0.0625 0.5 ENTER 4 R/S -0.039062500 0.5 ENTER 5 R/S 0.027343750 0.5 ENTER 6 R/S -0.020507813 Compare this to the Taylor series of: \( \begin{align} \sqrt{1+x} &= (1+x)^{\frac{1}{2}} \\ &= 1+\frac{x}{2}-\frac{x^2}{8}+\frac{x^3}{16}-\frac{5x^4}{128}+\frac{7x^5}{256}-\frac{21x^6}{1024}+\cdots \end{align} \) As we can see in this example, there are good reasons to allow non-integer values in binomial coefficients. Hint: Don't try this with an HP 20b. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: mipa83, 4 Guest(s)