Skip to content

Commit f2319b5

Browse files
authored
hypot scaling constant folding (#36365)
The scaling constant in `hypot` wasn't being constant folded. Fixes #36353.
1 parent 40e2d59 commit f2319b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

base/math.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ function hypot(x::T, y::T) where T<:AbstractFloat
659659
end
660660

661661
# Operands do not vary widely
662-
scale = eps(sqrt(floatmin(T))) #Rescaling constant
662+
scale = eps(T)*sqrt(floatmin(T)) #Rescaling constant
663663
if ax > sqrt(floatmax(T)/2)
664664
ax = ax*scale
665665
ay = ay*scale

0 commit comments

Comments
 (0)