Quote Originally Posted by flp1969 View Post
0 isn't a number?

Let's say we have 0.382:
Code:
x = log10(fabs(0.382));  // x = -0.417937
return x >= 0 ? x + 1 : 1;  // 1
There is 1 integral algarism there: 0.

If you need to consider zero (the integral part) as "no algarism", change the final 1 to zero:
Code:
  return x >= 0 ? x + 1 : 0;
I don't know why but I run the code and I thought It didn't gave me the right result for some reason but now that I run it, I get 1.

And all that while I DO NOT do drugs. Imagine if I was doing....