1 year ago
#228485
Szczepan Hołyszewski
Does `continued_fraction(d)` for a quadratic field element d compute whole preperiod and period eagerly?
New to sage, toying with continued fractions. I noticed that my code experiences performance degradation when I use continued_fraction(d)
, where d is represented as a QuadraticField
element, and the CF has long period (in the thousands). There is no slowness if the same value is represented as a regular sage.symbolic.expression.Expression
.
Does sage compute the preperiod and period eagerly for elements of quadratic fields? Am I better off not using QuadraticField values if all I need is a constant number of first partial quotients regardless of period length?
sage
0 Answers
Your Answer