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
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
The text was updated successfully, but these errors were encountered:
As I said in this comment, it's still missing one case related to the arithmetic operation that is the division by zero, but it is a special case and we can think of it later. What do you think?
Since we are initially just converting what was coded in Java to Kotlin and most of the verifications is nowhere to be found in the Java version, I agree that these verifications have some priority. Once the basic refactoring has been done, we will work on it. For now, I'm just leaving it in the backlog.
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:
The text was updated successfully, but these errors were encountered: