Nope. Here's my test program and output:
Code:
#include <stdio.h>
#include <math.h>
int main(void)
{
float theta = 31;
float alpha;
alpha = fmodf(31, 7);
printf("Using just literals, alpha = %f\n", alpha);
fmodf(theta, 7);
printf("Using a variable in the numerator, alpha = %f\n", alpha);
return 0;
}
Code:
$ gcc -Wall -o fmod fmod.c -lm
$ ./fmod
Using just literals, alpha = 3.000000
Using a variable in the numerator, alpha = 3.000000
Can you give us the smallest possible complete program that shows the differing behavior? Also, what OS, compiler, IDE, etc are you using (names and versions)?