Skip to main content
JS1's user avatar
JS1's user avatar
JS1's user avatar
JS1
  • Member for 10 years, 8 months
  • Last seen this week
Stats
28,806
reputation
1.4m
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,168
Score
298
Posts
49
Posts %
662
Score
178
Posts
29
Posts %
532
Score
129
Posts
21
Posts %
501
Score
128
Posts
21
Posts %
428
Score
118
Posts
19
Posts %
303
Score
72
Posts
12
Posts %
Top posts
View all questions and answers
answer
32
Aug 23, 2016
answer
26
Jul 11, 2016
answer
20
Dec 21, 2014
answer
20
Dec 23, 2014
answer
19
Dec 1, 2015
answer
18
Jan 9, 2017

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant