move functions to lib

This commit is contained in:
filifa
2025-09-06 00:19:56 -04:00
parent b953ade1a1
commit 58d9185296
3 changed files with 63 additions and 61 deletions

View File

@@ -47,8 +47,9 @@ func pell(cmd *cobra.Command, args []string) {
period = 2 * r
}
ch := cFracConvergents(a0, repetend)
ch := lib.CFracConvergents(a0, repetend)
// TODO: consider breaking after finding the fundamental solution and using the recurrence relation to find the following solutions
for i := 1; true; i = (i + 1) % period {
r := <-ch
if i == period-1 {