.\" Copyright (c) 1985 Regents of the University of California. .\" All rights reserved. The Berkeley software License Agreement .\" specifies the terms and conditions for redistribution. .\" .\" @(#)hypot.3m 6.5 (Berkeley) 5/12/86 .\" .TH HYPOT 3 "May 12, 1986" .UC 4 .ds up \fIulp\fR .SH NAME hypot \- Euclidean distance .SH SYNOPSIS .nf .ft B #include double hypot(double \fIx\fP, double \fIy\fP) .ft R .fi .SH DESCRIPTION Hypot(x, y) returns sqrt(x\(**x+y\(**y) computed in such a way that underflow will not happen, and overflow occurs only if the final result deserves it. .PP hypot(Inf, v) = hypot(v, Inf) = +Inf for all v, including NaN. .SH "ERROR (due to Roundoff, etc.)" Below 1 \*(ups. (\*(up = \fIU\fPnits in the \fIL\fPast \fIP\fPlace). .SH DIAGNOSTICS hypot(x, y) = Inf if x or y is +Inf or -Inf. .br hypot(x, y) = NaN if x or y is NaN (but not \(+-Inf). .SH SEE ALSO .BR math (3), .BR sqrt (3). .SH AUTHOR W. Kahan