{{keywords>wiki library source code example reference}} ===== fmod ===== double fmod(double, double ); returns the remainder of a statement ===== cpp Sourcecode Example ===== #include /* including standard library */ #include /* including math library */ using namespace std; int main ( void ) { double y,x; x = 9; y = 4.2; //cout.setf(ios::fixed, ios::floatfield); cout.precision(8); cout << "rest of " << x << " / " << y << " is " << fmod(x,y) << endl; return 0; } ==== output ==== rest of 9 / 4.2 is 0.6