Skip to content

sqrt and log of rational series #18

Closed
@Sergey-A-Dovgal

Description

@Sergey-A-Dovgal

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.

import flint

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)])))

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

Cheers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions