Skip to content

Include the semantic of arithmetic operations #2

@meevee98

Description

@meevee98

I'm converting everything to Kotlin because I was having too many problems with Null Pointer Exception with Java. #1 is the current list of what has to be done for now.
While is everything being refactored, should be good to check the current behaviour of the arithmetic operations in the semantic phase.

Arithmetic Operations:

  • Addition
    • Allowed to integer and rational operands
    • The result depends on the operands. If both are integers, the result is an integer. Otherwise, the result is rational.
  • Subtraction
    • Allowed to integer and rational operands
    • The result depends on the operands. If both are integers, the result is an integer. Otherwise, the result is rational.
  • Multiplication
    • Allowed to integer and rational operands
    • The result depends on the operands. If both are integers, the result is an integer. Otherwise, the result is rational.
  • Rational Division
    • Allowed to integer and rational operands
    • The result is always a rational value
  • Integer Division
    • Allowed to integer operands
    • The result is always an integer value
  • Modulo
    • Allowed to integer operands
    • The result is always an integer value

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