Skip to content

Unary negation does not work correctly when using CONST #542

Closed
@a740g

Description

@a740g

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

CONST C1! = -1.4!
CONST C2! = -0.4!
CONST C3! = 0.4!
CONST C4! = 1.4!

PRINT C1, C2, C3, C4

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions