hypot
提供: cppreference.com
![]() |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
Defined in header <math.h>
|
||
float hypotf( float x, float y ); |
||
double hypot( double x, double y ); |
||
long double hypotl( long double x, long double y ); |
||
計算の中間段階での過度のオーバーフローまたはアンダーフローが発生することなく、
x
とy
の二乗和の平方根を計算します。これは、長さの辺をもつ直角三角形の斜辺の長さx
とy
、または起点(x,y)
、または複素数(0,0)
の大きさから点x+iy
の距離Original:
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.
目次 |
[編集] パラメータ
x | - | 浮動小数点値
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 | - | 浮動小数点値
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. |
[編集] 値を返します
直角三角形の斜辺、√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.
[編集] 例外
結果がオーバーフローした場合は、範囲エラーが発生する可能性があり、FE_OVERFLOWが発生する場合があります.
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.
結果が非正規の場合は、アンダーフローエラーが発生する可能性があり、FE_UNDERFLOWが発生する場合があります.
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.
[編集] ノート
典型的な実装戦略はu√1+(
)2
の等価
v |
u |
の等価
u
ですmax(x,y)と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.
[編集] 例
This section is incomplete Reason: no example |
[編集] も参照してください
平方根は(√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. (関数) | |
与えられた電力(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. (関数) | |
C++ documentation for hypot
|