This commit is contained in:
Jacob Signorovitch 2024-12-07 09:16:17 -05:00
parent 85e17ede84
commit 64ef797727

View File

@ -26,6 +26,7 @@ double acc_float(int c) {
if (*inp == '.') { if (*inp == '.') {
char* oinp = inp++; char* oinp = inp++;
while (isdigit(*inp)) { while (isdigit(*inp)) {
// TODO:
// Accumulate as int, divide once at end. // Accumulate as int, divide once at end.
value = value + (((double)(*inp - '0'))/pow(10.0l, (double)(inp-oinp))); // Accumulate value. value = value + (((double)(*inp - '0'))/pow(10.0l, (double)(inp-oinp))); // Accumulate value.
inp++; inp++;