Quantcast
Channel: PTC Community: Message List
Viewing all articles
Browse latest Browse all 12262

Re: How to correct the Pell(n) function ? (for n = 181)

$
0
0

For some N (like 2,5,10) m is just 1 (second element of C is already greater than the root of N) and so your calculation of the rearranged vector c fails. Either include another if-statement to cope with that case (then c<--C) or do it completely different like in the attached.

1.png

0.png


Viewing all articles
Browse latest Browse all 12262

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>