Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt

The math functions provide additional mathematical operators beyond the basic arithmetical operators of Jitterbit Script.

Ceiling

Declaration

Code Block
int Ceiling(double d)

Syntax

Code Block
Ceiling(<d>)

Required Parameters

  • d: A double value

Description

Returns the mathematical ceiling (rounded up to the nearest integer) of a given value as an integer. The argument should be a double and is first converted to a double if not.

Examples

Code Block
Ceiling(52.154); // Returns a value of 53

Backtotop

Exp

Declaration

Code Block
double Exp(double d)

Syntax

Code Block
Exp(<d>)

Required Parameters

  • d: A double value

Description

Returns the mathematical result e^d, or e to the power of d. The argument should be a double and is first converted to a double if not.

Examples

Code Block
Exp(4.60517); // Returns a value of 100 (99.9999814011926)

Backtotop

Floor

Declaration

Code Block
int Floor(double d)

Syntax

Code Block
Floor(<d>)

Required Parameters

  • d: A double value

Description

Returns the mathematical floor (rounded down to the nearest integer) of a given value as an integer. The argument should be a double and is first converted to a double if not.

Examples

Code Block
Floor(52.654); // Returns a value of 52

Backtotop

Log

Declaration

Code Block
double Log(double d)

Syntax

Code Block
Log(<d>)

Required Parameters

  • d: A double value

Description

Returns the natural log (logarithm to the base e) of a given value. The argument should be a double and is first converted to a double if not.

Examples

Code Block
Log(100); // Returns a value of 4.60517018598809
Log("5a"); // Returns 1.6094379124341
// Treated as if Log(5)

Backtotop

Log10

Declaration

Code Block
double Log10(double d)

Syntax

Code Block
Log10(<d>)

Required Parameters

  • d: A double value

Description

Returns the logarithm to the base 10 of a given value. The argument should be a double and is first converted to a double if not.

Examples

Code Block
log10(100); // Returns a value of 2

log10("5a"); // Returns 0.698970004336019
// Treated as if Log10(5)

Backtotop

Mod

Declaration

Code Block
long Mod(long numerator, long denominator)

Syntax

Code Block
Mod(<numerator>, <denominator>)

Required Parameters

  • numerator: A long value
  • denominator: A long value

Description

Calculates the modulus (the remainder) of the division of the numerator by the denominator. The return value has the same sign as the numerator. If the denominator is 0, the numerator is returned.

Examples

Code Block
Mod(3005, 1000); // Returns 5
Mod(204, 17); // Returns 0
Mod(-206, 17); // Returns -2

Backtotop

Pow

Declaration

Code Block
double Pow(double base, double exponent)

Syntax

Code Block
Pow(<base>, <exponent>)

Required Parameters

  • base: A double value, 
  • exponent: A double value

Description

Returns the mathematical result base^exponent, or base to the power of exponent. The arguments should be doubles and are first converted to doubles if not.

Examples

Code Block
Pow(2,3); // Returns a value of 8

Backtotop

Round

Declaration

Code Block
string Round(double d[, int numPlaces])

Syntax

Code Block
Round(<d>[, <numPlaces>])

Required Parameters

  • d: A double value

Optional Parameters

  • numPlaces: An integer number of places of precision. If omitted, the default is 0.

Description

Returns the given value rounded to a specified precision and then converted to a string. The argument should be a double and is first converted to a double if not. This function is designed for displaying values (not computing) as the output is a string. 

This function is similar to the String Format() function.

Examples

Code Block
Round(9.53537465, 4); // Returns the string "9.5354"

Backtotop

RoundToInt

Declaration

Code Block
int RoundToInt(double d)

Syntax

Code Block
RoundToInt(<d>)

Required Parameters

  • d: A double value

Description

Returns the given value rounded to the nearest integer (no decimal places). The argument should be a double and is first converted to a double if not.

Examples

Code Block
RoundToInt(9.5353); // Returns a value of 10

Backtotop

Sqrt

Declaration

Code Block
double Sqrt(double d)

Syntax

Code Block
Sqrt(<d>)

Required Parameters

  • d: A double value

Description

Returns the square root of a given value. The argument should be a double and is first converted to a double if not.

Examples

Code Block
Sqrt(9); // Returns a value of 3

Backtotop

Panel
borderColor#8C9CB4
titleColor#FFFFFF
titleBGColor#8C9CB4
titleSearch in This Topic
Page Tree Search
rootPageFormula Builder
Panel
borderColor#65379B
titleColor#FFFFFF
titleBGColor#65379B
titleOn This Page
Table of Content Zone

Table of Contents
maxLevel3
minLevel2
indent20px
excludeSyntax|Declaration|Description|Example|Examples

Panel
borderColor#00B886
titleColor#FFFFFF
titleBGColor#00B886
titleRelated Topics
Content by Label
showLabelsfalse
max1000
showSpacefalse
sorttitle
cqllabel = "formula-builder-overview" and space = currentSpace()

HideElements
metastrue

Last updated: 

Lastmodifieddate