floatlog not working good
#1

when I'm doing:
Код:
printf("log10 of 100 is: %i", floatlog(100, 10));
I'm getting in the dos box:
log10 of 100 is: 1073741824
Reply
#2

It's not integer, but float.

pawn Код:
printf("log10 of 100 is: %f", floatlog(100, 10));
Output: log10 of 100 is: 2.000000
Reply
#3

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
It's not integer, but float.

pawn Код:
printf("log10 of 100 is: %f", floatlog(100, 10));
Output: log10 of 100 is: 2.000000
Oh thanks, I didn't thought about it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)