Panther Search Documentation Tutorials Devlogs Downloads Source Code

Documentation > Panther Documentation > Intrinsics > @div

@div

Panther
Documentation


1: func @div = <{T: Type, IS_EXACT: Bool}> (lhs: T, rhs: T) -> T;

  Integer division.

Template Parameters

  T: type of arguments and output - must be integral or a vector of integral

  IS_EXACT: If true, guarantees that the result never has a remainder

Parameters

  lhs: left-hand-side value of operation

  rhs: right-hand-side value of operation

Return Value

  Result value of the division

Notes

  If IS_EXACT is true, it is undefined behavior if (@div<{TYPE, true}>(a, b) * b) != .

Example

(TODO)

See Also

@fdiv Floating-point division
@rem Division remainder