Skip to content

Inconsistent handling of exact function arguments #22142

@dkrenn

Description

@dkrenn

At the moment we have

sage: polylog(QQbar(sqrt(2)),3)
polylog(1.414213562373095?, 3)

and

sage: log(QQbar(sqrt(2)))
0.346573590279973
sage: type(_)
<type 'sage.rings.real_mpfr.RealNumber'>

So the logarithm of an exact value loses the exactness.

I would expect a symbolic expression

sage: log(QQbar(sqrt(2)))
log(1.414213562373095?)

where the argument is the symbolic encapsulation of QQbar(sqrt(2)) (for the same reason why the logarithm of the integer 2 becomes the symbolic log(2).

This is fixed for all GinacFunctions in Pynac git master. The ticket should doctest them in the resp. files under sage/functions.

Depends on #22219

CC: @behackl @cheuberg

Component: algebra

Keywords: Pynac

Author: Daniel Krenn

Branch/Commit: c252b4d

Reviewer: Ralf Stephan

Issue created by migration from https://trac.sagemath.org/ticket/22142

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions