Skip to content

Commit 3e2f90f

Browse files
authored
Make hypot docs example more type stable (JuliaLang#58918)
1 parent d82ccc1 commit 3e2f90f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/src/manual/functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ julia> function hypot(x, y)
178178
return x*sqrt(1 + r*r)
179179
end
180180
if y == 0
181-
return x
181+
return float(x)
182182
end
183183
r = x/y
184184
return y*sqrt(1 + r*r)

0 commit comments

Comments
 (0)