Skip to content

CalculusGenerator returning wrong answer #1

@eireksten

Description

@eireksten

As the generator creates a tree with the nodes, it could make mistakes when handling minus and plus.

4-(3+5) eq -4

The left part will be output as
4-3+5, which has the correct answer 6

Generated from the code:
[9+40_8+30-39_31+40, -890]
The correct answer is -810.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions