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
For two Int types, there is no question as to how the operation should be performed as it involves only integer division, e.g. a - ((a / b) * b), where a / b naturally truncates.
However, for Float operands or Int operands implicitly coerced to Float because the other operand is Float, floating point division is involved and there are several different methods for performing the operation.
I would assume the intention is to define the operator in terms of truncation to align with most programming languages, but some notable languages are flooring instead (e.g. Python, Ruby), so an explicit clarification is probably required for the WDL specification.
The text was updated successfully, but these errors were encountered:
Currently the remainder
%
operator (i.e. modulo) is accepting ofInt
andFloat
as operand types.For two
Int
types, there is no question as to how the operation should be performed as it involves only integer division, e.g.a - ((a / b) * b)
, wherea / b
naturally truncates.However, for
Float
operands orInt
operands implicitly coerced toFloat
because the other operand isFloat
, floating point division is involved and there are several different methods for performing the operation.I would assume the intention is to define the operator in terms of truncation to align with most programming languages, but some notable languages are flooring instead (e.g. Python, Ruby), so an explicit clarification is probably required for the WDL specification.
The text was updated successfully, but these errors were encountered: