On Arduino Mega, why do I get an overflow error if I try to use a float > 1e11? See my example please

float LL;
void setup() {
// put your setup code here, to run once:
}

void loop() {
// put your main code here, to run repeatedly:
Serial.begin(115200);

LL=1e11;
Serial.print("The value of LL: "); Serial.println(LL);

// I get an overflow error. WHY????????

delay(1000);
}

It's an open issue

I got the same result on an UNO.

See

for the workaround.

a7

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.