Number

extends Node

The Number type represents a floating-point number with double precision.

Constructors

Number other, Node deep value = other.value; Node value this.value = value.numberValue();

Type Functions

abs()

Returns: The absolute value of this Number.

acos()

Calculate the trigonometric arc cosine of this Number.

asin()

Calculate the trigonometric arc sine of this Number.

atan()

Calculate the trigonometric arc tangent of this Number.

boolean()

Get the Boolean value of this Number.

See also: XPath v1.0 4.3 Boolean Functions

A number is true if and only if it is neither positive or negative zero nor NaN.

ceiling()

Returns: The smallest integer that is not less than this Number.

cos()

Calculate the trigonometric cosine of this Number.

exp()

Calculate Eulers number e raised to the power of this number.

factorial()

Returns: the factorial of this number.

floor()

Returns: The largest integer that is not greater than this Number.

format(Node pattern)

Returns: this Number as a formatted String .

Same as: format-number($this, $pattern)

infinite()

Returns: Boolean true if this Number is infinite.

log()

Calculate the natural algorithm (base e) of this Number.

NaN()

Returns: true if this number is Not a Number.

number()

pow(Node power)

Calculate this Number raised to the power of "power".

round()

Returns: The integer that is closest or equal to this Number.

sin()

Calculate the trigonometric sine of this Number.

sqrt()

Calculate the square root of this Number.

string()

See also: XPath v1.0 4.2 String Functions

A number is converted to a string as follows:

* NaN is converted to the string NaN

* positive zero is converted to the string 0

* negative zero is converted to the string 0

* positive infinity is converted to the string Infinity

* negative infinity is converted to the string -Infinity

* if the number is an integer, the number is represented in decimal form as a Number with no decimal point and no leading zeros, preceded by a minus sign (-) if the number is negative

otherwise, the number is represented in decimal form as a Number including a decimal point with at least one digit before the decimal point and at least one digit after the decimal point, preceded by a minus sign (-) if the number is negative; there must be no leading zeros before the decimal point apart possibly from the one required digit immediately before the decimal point; beyond the one required digit after the decimal point there must be as many, but only as many, more digits as are needed to uniquely distinguish the number from all other IEEE 754 numeric values.

tan()

Calculate the trigonometric tangent of this Number.

Functions inherited from Node