J
john.leidel
In doing some work on a library I'm writing, I'm trying to use the
`floor()` function to get the largest integral value of a variable.
I'm compiling everything using the mpich mpicc built with gcc 4.1.0
[standard build with OpenSuse 10.1]. For some reason, it doesn't like
my floor function :
mrng.c:137: error: called object 'floor' is not a function
I've included the correct <math.h>
The code is pretty simplistic :
ran->max_num = floor( td );
both `ran->max_num` and `td` are double values.
I wrote a *very* simple test program to see if it would find 'floor'
and it worked.
#include <stdio.h>
#include <stdlib.h>
int main( int argc, char **argv )
{
printf( "%s%f\n", "FLOOR OF 2.3 :: ", floor( 2.3 ) );
return 0;
}
Any thoughts why this is happening?
`floor()` function to get the largest integral value of a variable.
I'm compiling everything using the mpich mpicc built with gcc 4.1.0
[standard build with OpenSuse 10.1]. For some reason, it doesn't like
my floor function :
mrng.c:137: error: called object 'floor' is not a function
I've included the correct <math.h>
The code is pretty simplistic :
ran->max_num = floor( td );
both `ran->max_num` and `td` are double values.
I wrote a *very* simple test program to see if it would find 'floor'
and it worked.
#include <stdio.h>
#include <stdlib.h>
int main( int argc, char **argv )
{
printf( "%s%f\n", "FLOOR OF 2.3 :: ", floor( 2.3 ) );
return 0;
}
Any thoughts why this is happening?