Skip to main content

Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
JS1's user avatar
JS1's user avatar
JS1's user avatar
JS1
  • Member for 10 years, 11 months
  • Last seen more than a week ago
Stats
28,876
reputation
1.5m
reached
610
answers
1
question
Loading…
About

Member of the Floating point police™, who believe that unnecessary and/or careless use of floating point is a crime.

// Please use x*x here instead.
int xsquared = pow(x, 2);

// num = 1000 will cause this to fail.
int numDigits = (log(num) / log(10)) + 1;
3
gold badges
41
silver badges
83
bronze badges
1,170
Score
298
Posts
49
Posts %
664
Score
178
Posts
29
Posts %
535
Score
129
Posts
21
Posts %
503
Score
128
Posts
21
Posts %
431
Score
118
Posts
19
Posts %
306
Score
72
Posts
12
Posts %
Morty Proxy This is a proxified and sanitized view of the page, visit original site.