Service Math

from math import Math

Port NameLocationProtocolInterfaces
iplocalMathInterface

List of Available Interfaces

MathInterface

Operation NameInput TypeOutput TypeFaultsDescription
absintint-Returns the absolute value of the input integer.
pivoiddouble-Returns the PI constant
powPowRequestdouble-Returns the result of .base to the power of .exponent (see request data type).
randomvoiddouble-Returns a random number d such that 0.0 <= d < 1.0.
roundRoundRequestTypedouble-
summationSummationRequestint-Returns the summation of values from .from to .to (see request data type). For example, .from=2 and .to=5 would produce a return value of 2+3+4+5=14.

Types

PowRequest:
Type Declaration
void {
  base[1,1]: double // 
  exponent[1,1]: double // 
}
RoundRequestType:
Type Declaration
double {
  decimals[0,1]: int // 
}
SummationRequest:
Type Declaration
void {
  from[1,1]: int // 
  to[1,1]: int // 
}