0
c-usage of 'floor(log10(abs(x))) + 1'
could anyone please explain what 'floor(log10(abs(x))) + 1' mean and its working?
1 Answer
+ 1
It returns the log of the absolute value of an "x" value rounded to the floor. You could rewrite it like this:
int absoluteValue = abs(x);
int logAbsVal = log10(absoluteValue);
int floorRoundedNumber = floor(logAbsVal);