이름공간
변수
행위

std::fmod

cppreference.com
< cpp‎ | numeric‎ | math
 
 
 
Common mathematical functions
Functions
Basic operations
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)(C++11)(C++11)
Exponential functions
(C++11)
(C++11)
(C++11)
(C++11)
Power functions
(C++11)
(C++11)
Trigonometric and hyperbolic functions
(C++11)
(C++11)
(C++11)
Error and gamma functions
(C++11)
(C++11)
(C++11)
(C++11)
Nearest integer floating point operations
(C++11)(C++11)(C++11)
(C++11)
(C++11)
(C++11)(C++11)(C++11)
Floating point manipulation functions
(C++11)(C++11)
(C++11)
(C++11)
Classification/Comparison
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
Macro constants
(C++11)(C++11)(C++11)(C++11)(C++11)
 
<cmath> 에 정의되어 있음.
float       fmod(float x, float y );
(1)
double      fmod(double x, double y );
(2)
longdouble fmod(longdouble x, longdouble y );
(3)
Promoted    fmod( Arithmetic x, Arithmetic y );
(4) (since C++11)

나누기 연산 x/y의 나머지를 계산 합니다. 즉 어떤 정수 n으로 x-ny를 계산한 결과로 결과의 크기는 y의 크기보다 작습니다.

4) 만약 모든 인자가 정수 타입이면 double로 캐스팅 합니다. 인자 중에 longdouble이 있으면 반환 타입도 longdouble입니다. 그 외에는 double입니다.

[편집]Parameters

x, y - 부동 소수점 값

[편집]Return value

인자로 나눗셈을 수행한 나머지 값. 결과는 x와 동일한 부호를 가집니다.

[편집]See also

the quotient and remainder of integer division
(function)[edit]
(C++11)
signed remainder of the division operation
(function)[edit]
close