cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

nibal
Challenger

log* functions are bugged in latest stable APPSDK-2.9.1

From inside a kernel:

logb(2.000) = 1065353216 !!

Same for rest of log functions (log2, log10, log...)

Plz fix

0 Likes
1 Solution
dipak
Big Boss

I guess, you might have used format specifier as "%d" inside the printf statement. Please try as follows:

printf("\n logb(2.000) = %f", logb(2.000))

OR

printf("\n logb(2.000) = %d", (int)(logb(2.000)));

View solution in original post

2 Replies
dipak
Big Boss

I guess, you might have used format specifier as "%d" inside the printf statement. Please try as follows:

printf("\n logb(2.000) = %f", logb(2.000))

OR

printf("\n logb(2.000) = %d", (int)(logb(2.000)));

Oops! My bad.  Ty for your fast response;-)

0 Likes