Skip to content

Use of expint with ForwardDiff #475

Open
@mancellin

Description

While trying to ForwardDiff expint, I got the following error:

  MethodError: no method matching floatmax(::ForwardDiff.Dual{ForwardDiff.Tag{var"#135#136", Float64}, Float64, 3})

occurring at

scale = sqrt(floatmax(real(A)))

The issue is that ForwardDiff.jl only implements floatmax(T), while SpecialFunctions.jl uses floatmax(::T).
In Base, both are implemented, but only floatmax(T) is documented.

There are two possible straightforward solutions in this case (implementing floatmax(::T) in ForwardDiff, or adding a typeof in SpecialFunctions). Not sure if one of them should be preferred.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions