Child pages
  • Number

Versions Compared

Key

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

...

Table Cell (td)
Number

...

DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY (EXCEPT INSIDE THE DIV BELOW WITH ID=DESCRIPTION), UNLESS YOU KNOW WHAT YOU'RE DOING.
THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO AUTO UPDATE THE CONTENT THROUGH THE DOC GENERATOR.
Enter additional information related to this 'class' inside the {div} macro with 'id=description'
Divcache
styleindexdisplay:none

...

iddescription

...

padding0px
width80px

...

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Property Summary
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
MAX_VALUE
The largest representable number.
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
MIN_VALUE
The smallest representable number.
true
refresh100d
showRefreshtrue
iddoc
titleRefresh page
showDatetrue
retryEnable

servoy sReturnTypes2100%height: 30px;2Supported ClientssWordListSmartClientsWordListWebClientsWordListNGClientsWordListMobileClient

servoy sSummary12%30%58%height: 30px;3Property SummaryThe largest representable number.The smallest representable number.Special value representing negative infinity; returned on overflow.

...

Table Cell (td)
Object

...

...

Special "not a number" value.

...

Table Cell (td)
Number
Special value representing infinity; returned on overflow.

...

...

padding0px
width80px

...

...

servoy sSummary12%30%58%height: 30px;

...

Table Head (th)
colspan2
Method Summary

...

Table Cell (td)
String
3Methods SummaryReturns a string representing the number in exponential notation.

...

Table Cell (td)
String

...

Returns a string representing the number in exponential notation.

...

Table Cell (td)
String

...

Returns a string representing the number in fixed-point notation.

...

Table Cell (td)
String

...

Table Cell (td)
String

...

Returns a string representing the number in fixed-point notation.

...

Converts the number into a string which is suitable for presentation in the given locale.

...

Table Cell (td)
String

...

Returns a string representing the number to a specified precision in fixed-point or exponential notation.

...

Table Cell (td)
String

...

Table Cell (td)
String

...

Returns a string representing the number to a specified precision in fixed-point or exponential notation.

...

Returns a string representing the specified Number object.

...

Table Cell (td)
String

...

id
HTML Table
Returns a string representing the specified Number object.

...

servoy sDetail2Property DetailsMAX_VALUEname

MAX_VALUE

id

des

sIndent
The largest representable number.
tdret

Returns

divsIndentclients

property

class
Colgroup Tag
Column
padding0px
width100%
Table Row (tr)
style2100%height:30px;
Table Head (th)
colspan1
Table Body (tbody)
idid
Table Row (tr)
Table Cell (td)
Table Row (tr)
Table Cell (td)
Div
classid
Table Row (tr)
classsIndent
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
application.output("Largest number: " + Number.MAX_VALUE);
Table Row (tr)
classlastDetailRow
Table Cell (td) Table Body (tbody)
idMIN_VALUE
Table Row (tr)
idname
Table Cell (td)
MIN_VALUE
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
The smallest representable number.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
application.output("Smallest number: " + Number.MIN_VALUE);
Table Row (tr)
classlastDetailRow
Table Cell (td) Table Body (tbody)
idNEGATIVE_INFINITY
Table Row (tr)
idname
Table Cell (td)
NEGATIVE_INFINITY
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Special value representing negative infinity; returned on overflow.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
application.output("Negative infinity: " + Number.NEGATIVE_INFINITY);
Table Row (tr)
classlastDetailRow
Table Cell (td) Table Body (tbody)
idNaN
Table Row (tr)
idname
Table Cell (td)
NaN
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Special "not a number" value.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Object
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
application.output("NaN: " + Number.NaN);
Table Row (tr)
classlastDetailRow
Table Cell (td) Table Body (tbody)
idPOSITIVE_INFINITY
Table Row (tr)
idname
Table Cell (td)
POSITIVE_INFINITY
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Special value representing infinity; returned on overflow.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
application.output("Positive infinity: " + Number.POSITIVE_INFINITY);
Table Row (tr)
classlastDetailRow
Table Cell (td)

...

idfunction
classservoy sDetail

...

padding0px
width100%
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan1
Method Details

...

idtoExponential
Table Row (tr)
idname
Table Cell (td)
toExponential
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
toExponential
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns a string representing the number in exponential notation.

...

idret

...

classsIndent

...

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
MIN_VALUEname

MIN_VALUE

dessIndent
The smallest representable number.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
NEGATIVE_INFINITYname

NEGATIVE_INFINITY

dessIndent
Special value representing negative infinity; returned on overflow.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
NaNname

NaN

dessIndent
Special "not a number" value.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
POSITIVE_INFINITYname

POSITIVE_INFINITY

dessIndent
Special value representing infinity; returned on overflow.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow

functionservoy sDetail2100%height:30px2Methods DetailstoExponentialname

toExponential()

dessIndent
Returns a string representing the number in exponential notation.
ret

Returns

sIndent A string representing the number in exponential notation.
clients

Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var n = 123.45678;
application.output(n.toExponential(3));

...

classlastDetailRow

...

idtoExponential-Number
Table Row (tr)
idname
Table Cell (td)
toExponential
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
toExponential
Span
(fractionDigits)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns a string representing the number in exponential notation.

...

idprs

...

classsIndent

...

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
toExponentialname

toExponential(fractionDigits)

dessIndent
Returns a string representing the number in exponential notation.
prs

Parameters

sIndentfractionDigitsAn integer specifying the number of digits after the decimal point. Defaults to as many digits as necessary to specify the number.

...

ret

...

Returns

...

...

sIndent

...

A string representing the number in exponential notation.clients

...

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

...

classlastDetailRow

...

idtoFixed
Table Row (tr)
idname
Table Cell (td)
toFixed
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
toFixed
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns a string representing the number in fixed-point notation.

...

idret

...

classsIndent

...

Sample

...

classsIndent

...

Code Block
languagejavascript
var n = 123.45678;
application.output(n.toExponential(3));
sIdentjavascriptlastDetailRowtoFixedname

toFixed()

dessIndent
Returns a string representing the number in fixed-point notation.
ret

Returns

sIndent A string representing the number in fixed-point notation.
clients

Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var n = 123.45678;
application.output(n.toFixed(3));

...

classlastDetailRow

...

idtoFixed-Number
Table Row (tr)
idname
Table Cell (td)
toFixed
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
toFixed
Span
(digits)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns a string representing the number in fixed-point notation.

...

idprs

...

classsIndent

...

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
toFixedname

toFixed(digits)

dessIndent
Returns a string representing the number in fixed-point notation.
prs

Parameters

sIndentdigitsThe number of digits to appear after the decimal point. Defaults to 0.

...

ret

...

Returns

...

...

sIndent

...

A string representing the number in fixed-point notation.clients

...

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

...

classlastDetailRow

...

idtoLocaleString
Table Row (tr)
idname
Table Cell (td)
toLocaleString
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
toLocaleString
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Converts the number into a string which is suitable for presentation in the given locale.

...

idret

...

classsIndent

...

Sample

...

classsIndent

...

Code Block
languagejavascript
var n = 123.45678;
application.output(n.toFixed(3));

...

sIdentjavascriptlastDetailRowtoLocaleStringname

toLocaleString()

dessIndent
Converts the number into a string which is suitable for presentation in the given locale.
ret

Returns

sIndent A string representing the number in the current locale.
clients

...

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

...

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns a string representing the number to a specified precision in fixed-point or exponential notation.

...

idret

...

classsIndent

...

Sample

...

classsIndent

...

Code Block
languagejavascript
var n = 1000000;
application.output(n.toLocaleString());

...

classlastDetailRow

...

idtoPrecision
Table Row (tr)
idname
Table Cell (td)
toPrecision
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
toPrecision
Span
()

...

sIdentjavascriptlastDetailRowtoPrecisionname

toPrecision()

dessIndent
Returns a string representing the number to a specified precision in fixed-point or exponential notation.
ret

Returns

sIndent A string representing the number to a specified precision in fixed-point or exponential notation.
clients

...

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

...

Table Row (tr)
idname
Table Cell (td)
toPrecision
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
toPrecision
Span
(precision)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns a string representing the number to a specified precision in fixed-point or exponential notation.

...

idprs

...

classsIndent

...

Sample

...

classsIndent

...

Code Block
languagejavascript
var n = 123.45678;
application.output(n.toPrecision(5));

...

classlastDetailRow

...

idtoPrecision-Number

...

sIdentjavascriptlastDetailRowtoPrecisionname

toPrecision(precision)

dessIndent
Returns a string representing the number to a specified precision in fixed-point or exponential notation.
prs

Parameters

sIndentprecisionAn integer specifying the number of significant digits.

...

ret

...

Returns

...

...

sIndent

...

A string representing the number to a specified precision in fixed-point or exponential notation.clients

...

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

...

classlastDetailRow

...

idtoString
Table Row (tr)
idname
Table Cell (td)
toString
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
toString
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns a string representing the specified Number object.

...

idret

...

classsIndent

...

Sample

...

classsIndent

...

Code Block
languagejavascript
var n = 123.45678;
application.output(n.toPrecision(5));

...

classlastDetailRow

...

idtoString-Number
Table Row (tr)
idname
Table Cell (td)
toString
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
toString
Span
(radix)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns a string representing the specified Number object.

...

idprs

...

classsIndent

...

sIdentjavascriptlastDetailRowtoStringname

toString()

dessIndent
Returns a string representing the specified Number object.
ret

Returns

sIndent A string representing the specified Number object.
clients

Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var n = 7;
application.output(n.toString()); //displays "7"
application.output(n.toString(2)); //displays "111"

...

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
toStringname

toString(radix)

dessIndent
Returns a string representing the specified Number object.
prs

Parameters

sIndentradixAn integer between 2 and 36 specifying the base to use for representing numeric values

...

ret

...

Returns

...

sIndent

...

A string representing the specified Number object.clients

...

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

...

classlastDetailRow

...

Sample

...

classsIndent

...

Code Block
languagejavascript
var n = 7;
application.output(n.toString()); //displays "7"
application.output(n.toString(2)); //displays "111"
sIdentjavascriptlastDetailRow