Skip to content

factorial(algorithm=...) does not work as claimed #17489

@rwst

Description

@rwst

It's a defect because the reference/misc/sage/rings/arith.html documentation makes users expect the algorithm keyword to work but

sage: y=factorial(10^6,algorithm='gmp')
---------------------------------------------------------------------------
...
TypeError: __call__() got an unexpected keyword argument 'algorithm'

As the implementation of the algorithm keyword in symbolic function seems difficult (#17531) as pragmatic solution would be to accept that for algorithm to work the arith version of factorial must be explicitly called, see #19461 comment:9 for the general argument.
The rings version apparently gets overwritten on import and the function/ does not accept/transfer the algorithm keyword.

Depends on #24178

CC: @kcrisman @nthiery

Component: symbolics

Keywords: integer symbolic function

Reviewer: Jeroen Demeyer

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions