Skip to content

Commit

Permalink
Make hypot depend on the current power mode
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierHnt committed Mar 17, 2024
1 parent 4550d7d commit df032fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/intervals/arithmetic/power.jl
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,9 @@ Compute the hypotenuse.
Implement the `hypot` function of the IEEE Standard 1788-2015 (Table 10.5).
"""
Base.hypot(x::BareInterval, y::BareInterval) = sqrt(pown(x, 2) + pown(y, 2))
Base.hypot(x::BareInterval, y::BareInterval) = sqrt(_select_pown(power_mode(), x, 2) + _select_pown(power_mode(), y, 2))

Base.hypot(x::Interval, y::Interval) = sqrt(pown(x, 2) + pown(y, 2))
Base.hypot(x::Interval, y::Interval) = sqrt(_select_pown(power_mode(), x, 2) + _select_pown(power_mode(), y, 2))

"""
fastpow(x, y)
Expand Down

0 comments on commit df032fb

Please sign in to comment.