Documentation for {f32, f64}::hypot should clarify its behavior for negative values. #88944
Labels
A-docs
Area: Documentation for any part of the project, including the compiler, standard library, and tools
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
The documentation for the
f32::hypot
/f64::hypot
function readsand gives this example (and the analogous example for
f64
):Since lengths are always positive, it's unclear what this function does for negative values. My expectation is that it gives the hypotenuse of the right triangle whose leg lengths are the absolute values of
x
andy
, but I had to look up the relevant libc documentation to be sure, which readsThe text was updated successfully, but these errors were encountered: