double fmod(double dX, double dModulus);
float fmod(float, float); double fmod(double, double); long double fmod(long double, long double);
float fmodf(float, float); long double fmodl(long double, long double);
* Note: Since C does not allow function overloading, these other versions of this function exist.
|
Domain (-∞, ∞) x (0, ∞) Range (-∞, ∞) Periodicity None Symmetry None Asymptotes None |
#include <iostream>
#include <cmath>
int main() {
using namespace std;
double dX = 30.1;
double dModulus = 1.0;
cout << "x = " << dX <<
" Modulus = " << dModulus <<
" fmod(x, Modulus) = " << fmod(dX, dModulus) << endl;
dX = 10.8;
dModulus = 3.14159;
cout << "x = " << dX <<
" Modulus = " << dModulus <<
" fmod(x, Modulus) = " << fmod(dX, dModulus) << endl;
return 0;
}
© 20072025 XoaX.net LLC. All rights reserved.