You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that if one of the coefficients of a rational power series is a non-integer then the condition that the constant term is one, fails.
Example.
importflintQQ=flint.fmpqlog=flint.fmpq_series.log# this one works okprint(log(flint.fmpq_series([1,1])))
# here is I get ValueError: log() of power series: constant term must be oneprint(log(flint.fmpq_series([1,1,QQ(3,8)])))
The same goes with sqrt.
My best guess is that it is because fmpq series is represented as a fraction, and it thinks that the leading term is equal to 8.
My flint version is 2.7.1, and python-flint is 0.3.0
This one seems to be working fine now with python-flint 0.6.0:
In [1]: importflint
...:
...: QQ=flint.fmpq
...: log=flint.fmpq_series.log
...:
...: # this one works ok
...: print(log(flint.fmpq_series([1,1])))
...:
...: # here is I get ValueError: log() of power series: constant term must be one
...: print(log(flint.fmpq_series([1,1,QQ(3,8)])))
x+ (-1/2)*x^2+1/3*x^3+ (-1/4)*x^4+1/5*x^5+ (-1/6)*x^6+1/7*x^7+ (-1/8)*x^8+1/9*x^9+O(x^10)
x+ (-1/8)*x^2+ (-1/24)*x^3+7/128*x^4+ (-11/320)*x^5+23/1536*x^6+ (-13/3584)*x^7+ (-17/16384)*x^8+73/36864*x^9+O(x^10)
Looks like it was fixed in c715d51 from gh-39 so python-flint 0.4.0.
Activity
[-]sqrt anf log of rational series[/-][+]sqrt and log of rational series[/+]oscarbenjamin commentedon Aug 26, 2024
This one seems to be working fine now with python-flint 0.6.0:
Looks like it was fixed in c715d51 from gh-39 so python-flint 0.4.0.