Skip to content

Evaluating limits of hyperu function #512

@jacksonvanover

Description

@jacksonvanover

mpmath version: 1.1.0

For certain inputs, e.g. hyperu(1, 2, inf), the implementations for mpmath, scipy, and gsl all agree on the output (0 in this case). However, when the first parameter is a zero, mpmath's implementation diverges from the others (which consistently return 1) by returning a NaN. On the other hand, the version in the fp namespace evaluates to 1, matching the other libraries

Python 3.6.8 (default, Oct  7 2019, 12:59:55) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from mpmath import *
>>> from scipy import special
>>> import numpy as np
>>> mp.hyperu(0, 1, np.inf)
mpf('nan')
>>> special.hyperu(0, 1, np.inf)
1.0
>>> special.hyperu(0, 2, np.inf)
1.0
>>> mp.hyperu(0, 2, np.inf)
mpf('nan')
>>> fp.hyperu(0, 2, np.inf)
1.0
>>> fp.hyperu(0, 1, np.inf)
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