Recently I have been doing more complicated math in OpenSCAD and I have run into something that I find strange. Take a simple math expression:
2 / 2 / 2. By any programming language this will equal 0.5 (1/2), and OpenSCAD agrees. Something like this:
2 / -2 / 2 should also be -0.5 for the same reason. However, OpenSCAD thinks this is -2. That is
echo(2 / -2 / 2); gives
ECHO: -2. My calculator, other programming languages (and myself) all say its -0.5.
Is this a quirk of OpenSCAD, or am I missing something obvious?