Closed jfmengels closed 9 months ago
Should we also simplify floor 1.2
to 1
? :thinking:
To add:
round (round n) --> round n
ceiling (ceiling n) --> ceiling n
floor (floor n) --> floor n
truncate (truncate n) --> truncate n
including composition
can be done using operationDoesNotChangeResultOfOperationCheck
and operationDoesNotChangeResultOfOperationCompositionCheck
Those don't type check so we don't have to handle them.
True, those don't return number
, my mistake
In the following examples I'm using
1
but imagine any literal integer (so1
but not1.0
)toFloat 1
->1
round 1
->1
ceiling 1
->1
floor 1
->1
truncate 1
->1
Compositions of these functions:
round << toFloat
->identity
ceiling << toFloat
->identity
floor << toFloat
->identity
truncate << toFloat
->identity