I read these and it didn't seem to answer my question Correct strtod implementation? How do I implement strtod?
From this post I got the min/max double What are the actual min/max values for float and double (C++)
In C I can write this line just fine
double d = -179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0
Trying to parse a string of it (and the positive max value) is a different story. The code works up until the last digit (the 8) where I get inf on the *10 line. Essentially I wrote
double result=0; for loop { result = result*10; result = result+singleDigit }
strtod handles it just fine and I can't understand any implementation I see online. It becomes inf on the multiplication line. How the heck do I get the last digit?