Skip to content

Unexpected Result from hyp1f1 with NaN input #488

Description

@jacksonvanover

mpmath version: 1.1.0

When the third argument for hyp1f1 in the mp context is a NaN, a 1 is returned
regardless of the other input. For what it's worth, the fp context
version throws a NoConvergence Exception. For the same input, SciPy
and GSL agree on an output of NaN.

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 *
>>> import numpy as np
>>> mp.hyp1f1(2.5,2.2,np.nan)
mpf('1.0')
>>> mp.hyp1f1(1,2.2,np.nan)
mpf('1.0')
>>> mp.hyp1f1(1,2002.2,np.nan)
mpf('1.0')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions