You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Unary negation does not work correctly when using CONST. As @mkilgore figured out, the unary negation only works correctly for integers. See here.
Negation was only making use of the integer value when calculating the
negative, resulting in incorrect values when the original was actually a
floating-point value.
Fixes: QB64-Phoenix-Edition#542
mkilgore
added a commit
to mkilgore/QB64pe
that referenced
this issue
Oct 28, 2024
Negation was only making use of the integer value when calculating the
negative, resulting in incorrect values when the original was actually a
floating-point value.
Fixes: QB64-Phoenix-Edition#542
Describe the bug
Unary negation does not work correctly when using CONST. As @mkilgore figured out, the unary negation only works correctly for integers. See here.
To Reproduce
The above code prints:
-1 0 .4 1.4
Expected behavior
It should handle unary negation correctly for both integer and floating-point values.
Additional context
This was first reported here.
The text was updated successfully, but these errors were encountered: