LIT
2024-06-01 18:19:32 UTC
Reply
PermalinkGforth: -3 10 / . -1 ok
PForth: -3 10 / . 0 ok
ciforth: S[ ] OK -3 10 / .
0
ESP32Forth: --> -3 10 / .
-1 ok
TCL: % expr -3 / 10
-1
ANSI-C: printf("%d\n", -3 / 10) gives output 0
Guys, whatever you can write about floored/non-floored
division -- it's nothing more than kind of "dialectic".
When one divides -3 by 10 the result CANNOT be higher/lower
than 0, because there's larger difference between -10 and -3
than between 0 and -3. Simple.
The -1 result is contrary to logic. It's nonsense.
From what I see even TCL is sick for this "floorness",
not just quite a few Forths.