Panther Search Documentation Tutorials Devlogs Downloads Source Code

Documentation > Panther Documentation > Intrinsics > @sub

@sub

Panther
Documentation


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

  Integer subtraction.

Template Parameters

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

  MAY_WRAP: If true, subtraction is alowed to wrap

Parameters

  lhs: left-hand-side value of operation

  rhs: right-hand-side value of operation

Return Value

  Result value of the subtraction

Notes

  If MAY_WRAP is false, wrapping is undefined behavior. However, setting MAY_WRAP to false may allow the compiler to optimize better.

Example

(TODO)

See Also

@subWrap Integer subtraction that returns if operation wrapped
@subWrap Integer subtraction that returns if operation wrapped
@fsub Floating-point subtraction