modf. McGraw-Hill The Complete Reference Fourth Edition
광고
광고
C h a p t e r 2 7 : T h e M a t h e m a t i c a l F u n c t i o n s
743
The log10( ) function returns the base 10 logarithm for num. A domain error occurs if num is negative, and a range error occurs if the argument is zero.
A related function is log( ).
modf
#include <cmath> float modf(float num, float *i); double modf(double num, double *i); long double modf(long double num, long double *i);
pow
The modf( ) function decomposes num into its integer and fractional parts. It returns the fractional portion and places the integer part in the variable pointed to by i.
Related functions are frexp( ) and ldexp( ).
#include <cmath> float pow(float base, float exp); float pow(float base, int exp); double pow(double base, double exp); double pow(double base, int exp); long double pow(long double base, long double exp); long double pow(long double base, int exp);
sin
The pow( ) function returns base raised to the exp power (base
exp
). A domain error may occur if base is zero and exp is less than or equal to zero. It will also happen if
base is negative and exp is not an integer. An overflow produces a range error.
Related functions are exp( ), log( ), and sqrt( ).
#include <cmath> float sin(float arg); double sin(double arg); long double sin(long double arg);
The sin( ) function returns the sine of arg. The value of arg must be in radians.
다운로드
광고