Maven module :un.api : api-common :
Class : un.api.number.Arithmetic
Extends/Implements : -
Subclasses : -

Arithmetic operations.
author  Bertrand COTE


Variables : -
Functions : add, subtract, mult, divide, zero, isZero, one, isOne, pow




Addition.
param  other value
return  this + other
Arithmetic add (Arithmetic other)


Subtraction.
param  other value
return  this - other
Arithmetic subtract (Arithmetic other)


Multiplication.
param  other value
return  this * other
Arithmetic mult (Arithmetic other)


Division.
param  other value
return  this / other
Arithmetic divide (Arithmetic other)


Zero: neutral element for additions.
return  zero element
Arithmetic zero ()


Test if this is zero.
return  true if this is zero
boolean isZero ()


One: neutral element for multiplications.
return  one element
Arithmetic one ()


Test if this is one.
return  true if this is one
boolean isOne ()


Power.
param  n power
return  this ^ n
Arithmetic pow (int n)