J
Joakim Hove
Hello,
consider a function:
double some_func(double arg) {
/*
*/
}
When this function is called with a float argument, and the result
assigned to a float variable like this:
float float_arg;
float float_result;
float_result = some_func(float_arg);
Are the necessary conversions guaranteed tok place automatically? And
if this is autoamtically taken care of, why does the standard (C99)
require functions like logf and sinf. Is it just to gain speed by
avoiding conversions, and possible using a 'cruder' algorithm?
Regards
Joakim
consider a function:
double some_func(double arg) {
/*
*/
}
When this function is called with a float argument, and the result
assigned to a float variable like this:
float float_arg;
float float_result;
float_result = some_func(float_arg);
Are the necessary conversions guaranteed tok place automatically? And
if this is autoamtically taken care of, why does the standard (C99)
require functions like logf and sinf. Is it just to gain speed by
avoiding conversions, and possible using a 'cruder' algorithm?
Regards
Joakim