Skip to content

Incorrect result from gegenbauer function of order 0 #494

@jacksonvanover

Description

@jacksonvanover

mpmath version: 1.1.0

Though the gegenbauer polynomial of degree zero is defined to be 1 over its whole domain, we get a result of 0.0 when the second argument is 0. This is true in both the fp and mp contexts.

Example:

Python 3.6.8 (default, Aug 20 2019, 17:12:48) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from mpmath import *
>>> mp.gegenbauer(0, 0, 2.2)
mpf('0.0')
>>> mp.gegenbauer(0, 1, 2.2)
mpf('1.0')
>>> mp.gegenbauer(0, 4, 2.2)
mpf('1.0')
>>> mp.gegenbauer(0, 0, 1.8)
mpf('0.0')
>>> mp.gegenbauer(0, 1, 1.8)
mpf('1.0')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions