Would it be more accurate to say that the direction of truncation rather than rounding versus truncation is the cause of the difference?
Here's a real MRE
void setup() {
Serial.begin(115200);
delay(1000);
long q1, q2;
long dividend = -251776000;
q1 = dividend >> 12;
q2 = dividend / 4096L;
float asFloat = dividend / 4096.0;
Serial.print(" this as float = "); Serial.println(asFloat);
Serial.print(q1); Serial.print("\t\t");
Serial.print(q2); Serial.print("\t\t");
}
void loop() {
while(1);
}
a7