Incorrect formatting of decimal values #400
Labels
A-Confirmed
Definitely a bug
C-Moderate Effort
Should take a moderate amount of time to address.
S-Nice to have
Minor importance
U-Pretty Printing
Z-Bug
Describe the bug
The decimal formatting of some negative rational values is incorrect.
To Reproduce
Expected vs actual behavior
The negative sign should always be to the left of the decimal and appear at most once. The misplacement of the negative sign affects the logic of the formatting, as can be seen in the
0.3 * (-0.3)
example, which has a representation structurally similar to the equal expression-0.1 + 0.01
but not the correct representation-0.09
.Additional context
After group consideration, the resolution may be to remove decimal representation entirely from the language, or at least extract formatting data from the expressions themselves and into a REPL command, e.g.
Disco> :decimal <expr>
.The text was updated successfully, but these errors were encountered: