Skip to content

Vararg version of hypot does overflow and underflow on master #27141

@giordano

Description

@giordano

The point of the hypot function is to avoid underflow and overflow, however the implementation of the vararg method introduced with PR #25571 defeats this purpose:

julia> hypot(1e200, 0, 0)
Inf

julia> hypot(1e-300, 0, 0)
0.0

Instead in Julia 0.6 it gives the correct result:

ulia> hypot(1e200, 0, 0)
1.0e200

julia> hypot(1e-300, 0, 0)
1.0e-300

Edit: I've just seen this was already pointed out in #25571 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    mathsMathematical functionsregressionRegression in behavior compared to a previous version

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions