std::abs(int), std::labs, std::llabs, std::imaxabs
提供: 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 <cstdlib>
|
||
int abs( int n ); |
||
long abs( long n ); |
||
long long abs( long long n ); |
(C++11およびそれ以降) | |
long labs( long n ); |
||
long long llabs( long long n ); |
(C++11およびそれ以降) | |
Defined in header <cinttypes>
|
||
std::intmax_t abs( std::intmax_t n ); |
(C++11およびそれ以降) | |
std::intmax_t imaxabs( std::intmax_t n ); |
(C++11およびそれ以降) | |
整数の絶対値を計算する.
Original:
Computes the absolute value of an integer number.
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.
[編集] パラメータ
n | - | 整数値
Original: integer value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[編集] 値を返します
n
の絶対値(すなわち|n|
)Original:
the absolute value of
n
(i.e. |n|
)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: absolute value of a floating point value (|x|) The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数) | |
複素数の絶対値を返します Original: returns the magnitude of a complex number The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) | |
valarrayの各要素に関数を適用しstd::abs Original: applies the function std::abs to each element of valarray The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) |