hypot
Da cppreference.com.
![]() | Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate. La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
Elemento definito nell'header <math.h> | ||
float hypotf(float x, float y ); | ||
double hypot(double x, double y ); | ||
longdouble hypotl(longdouble x, longdouble y ); | ||
Calcola la radice quadrata della somma dei quadrati di
x
e y
, senza troppopieno indebito o underflow intermedi del calcolo. Questa è la lunghezza dell'ipotenusa di un triangolo rettangolo con lati di lunghezza x
e y
, o la distanza del punto (x,y)
dall'origine (0,0)
, o la grandezza di un x+iy
numero complessoOriginal:
Computes the square root of the sum of the squares of
x
and y
, without undue overflow or underflow at intermediate stages of the computation. This is the length of the hypotenuse of a right-angled triangle with sides of length x
and y
, or the distance of the point (x,y)
from the origin (0,0)
, or the magnitude of a complex number x+iy
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Indice |
[modifica]Parametri
x | - | valore in virgola mobile Original: floating point value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
y | - | valore in virgola mobile Original: floating point value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[modifica]Valore di ritorno
L'ipotenusa di un triangolo rettangolo, √x2
+y2
.
+y2
.
Original:
The hypotenuse of a right-angled triangle, √x2
+y2
.
+y2
.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[modifica]Eccezioni
Se il risultato overflow, un errore di campo si può verificare e FE_OVERFLOW può essere sollevata.
Original:
If the result overflows, a range error may occur and FE_OVERFLOW may be raised.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Se il risultato è subnormale, un errore può verificarsi underflow e FE_UNDERFLOW può essere sollevata.
Original:
If the result is subnormal, an underflow error may occur and FE_UNDERFLOW may be raised.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[modifica]Note
Strategia di attuazione tipico è quello di calcolare l'equivalente di u√1+(
)2
dove
v |
u |
dove
u
è max(x,y) e v
è min(x,y).Original:
Typical implementation strategy is to calculate an equivalent of u√1+(
)2
where
v |
u |
where
u
is max(x,y) and v
is min(x,y).The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[modifica]Esempio
This section is incomplete Reason: no example |
[modifica]Vedi anche
calcola la radice quadrata (√x) Original: computes square root (√x) The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (funzione) | |
solleva un numero alla potenza data (xy) Original: raises a number to the given power (xy) The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (funzione) | |
C++ documentation for hypot |