Pell numbers: Difference between revisions
→{{header|J}}: bugfix (... my focus is far too narrow when I forget to double check against the english description)
Thundergnat (talk | contribs) (→{{header|J}}: incorrect. √2 not 1/√2) |
(→{{header|J}}: bugfix (... my focus is far too narrow when I forget to double check against the english description)) |
||
Line 95:
=={{header|J}}==
As detailed in the task description, there's a variety of ways to compute these values.
Line 128 ⟶ 127:
Continuing... the first ten rational approximations to √2 here would be:
<lang J> }.(%~ _1}. +//.@,:~) nextPell^:9(0 1)
1
}.(%~ _1}. +//.@,:~) nextPell^:9(0 1x)
1
The first ten pell primes are:
|