Message-ID: <2140942895.52645.1600786103447.JavaMail.CONFLUENCE\$@confluence> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_52644_832871977.1600786103447" ------=_Part_52644_832871977.1600786103447 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html Math Functions

# Math Functions

=20
=20
=20
=20

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

## Ceiling

### Declaration

=20
```int Cei=
ling(double d)```
=20

### Syntax

=20
```Ceiling=
(<d>)```
=20

#### 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 c= onverted to a double if not.

### Examples

=20
```Ceiling=
(52.154); // Returns a value of 53```
=20

## Exp

### Declaration

=20
```double =
Exp(double d)```
=20

### Syntax

=20
```Exp(<=
;d>)```
=20

#### 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 doub= le and is first converted to a double if not.

### Examples

=20
```Exp(4.6=
0517); // Returns a value of 100 (99.9999814011926)```
=20

## Floor

### Declaration

=20
```int Flo=
or(double d)```
=20

### Syntax

=20
```Floor(&=
lt;d>)```
=20

#### 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 fi= rst converted to a double if not.

### Examples

=20
```Floor(5=
2.654); // Returns a value of 52```
=20

## Log

### Declaration

=20
```double =
Log(double d)```
=20

### Syntax

=20
```Log(<=
;d>)```
=20

#### Required Parameters

• `d:` A double value

### Description

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

### Examples

=20
```Log(100=
); // Returns a value of 4.60517018598809
Log("5a"); // Returns 1.6094379124341
// Treated as if Log(5)```
=20

## Log10

### Declaration

=20
```double =
Log10(double d)```
=20

### Syntax

=20
```Log10(&=
lt;d>)```
=20

#### Required Parameters

• `d:` A double value

### Description

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

### Examples

=20
```log10(1=
00); // Returns a value of 2

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

## Mod

### Declaration

=20
```long Mo=
d(long numerator, long denominator)```
=20

### Syntax

=20
```Mod(<=
;numerator>, <denominator>)```
=20

#### 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

=20
```Mod(300=
5, 1000); // Returns 5
Mod(204, 17); // Returns 0
Mod(-206, 17); // Returns -2```
=20

## Pow

### Declaration

=20
```double =
Pow(double base, double exponent)```
=20

### Syntax

=20
```Pow(<=
;base>, <exponent>)```
=20

#### Required Parameters

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

### Description

Returns the mathematical result base^exponent, or&nbs= p;base to the power of exponent. The argum= ents should be doubles and are first converted to doubles if not.

### Examples

=20
```Pow(2,3=
); // Returns a value of 8```
=20

## Round

### Declaration

=20
```string =
Round(double d[, int numPlaces])```
=20

### Syntax

=20
```Round(&=
lt;d>[, <numPlaces>])```
=20

#### Required Parameters

• d: A double value

#### Optional Parameters

• `numPlaces:` An integer number of plac= es of precision. If omitted, the default is 0.

### Description

Returns the given value rounded to a specified precision and then c= onverted to a string. The argument should be a double and is first con= verted 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()` functio= n.

### Examples

=20
```Round(9=
.53537465, 4); // Returns the string "9.5354"```
=20

## RoundToInt

### Declaration

=20
```int Rou=
ndToInt(double d)```
=20

### Syntax

=20
```RoundTo=
Int(<d>)```
=20

#### 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 d= ouble if not.

### Examples

=20
```RoundTo=
Int(9.5353); // Returns a value of 10```
=20

## Sqrt

### Declaration

=20
```double =
Sqrt(double d)```
=20

### Syntax

=20
```Sqrt(&l=
t;d>)```
=20

#### 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

=20
```Sqrt(9)=
; // Returns a value of 3```
=20

=20
=20
=20
=20
Search in This Topic
=20
=20
= =20 =20 =20 =20 =20
=20
=20
=20
=20
=20
=20

=20
=20

=20
=20
=20
=20
Related Topics
=20
=20

L= ast updated:  Oct 11, 2018

=20
=20
=20
------=_Part_52644_832871977.1600786103447--