Child pages
  • Number

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{hidden}
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY, UNLESS YOU KNOW WHAT YOU'RE DOING.
		THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO EXTRACT CHANGES FROM THE PAGE AND MERGE THEM BACK INTO SERVOY SOURCE{hidden}
{sub-section:description|text=}{sub-section}\\ 

{table:id=|class=servoy sSummary}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Property Summary{th}{tr}{tbody}{tr}{td}[Number]{td}{td}[#MAX_VALUE]
The largest representable number.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#MIN_VALUE]
The smallest representable number.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#NEGATIVE_INFINITY]
Special value representing negative infinity; returned on overflow.{td}{tr}{tbody}{tbody}{tr}{td}[Object]{td}{td}[#NaN]
Special "not a number" value.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#POSITIVE_INFINITY]
Special value representing infinity; returned on overflow.{td}{tr}{tbody}{table}\\ 

{table:id=|class=servoy sSummary}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[String]{td}{td}[#toExponential]\(\[fractionDigits\])
Returns a string representing the number in exponential notation.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#toFixed#toExponential]\(\[digits\]fractionDigits)
Returns a string representing the number in fixed\-pointexponential notation.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#toLocaleString#toFixed]\()
Converts the number into Returns a string whichrepresenting is suitable for presentationthe number in the given localefixed\-point notation.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#toPrecision#toFixed]\(\[precision\]digits)
Returns a string representing the number to a specified precision in fixed\-point or exponential notation.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#toString#toLocaleString]\(\[radix\])
ReturnsConverts the number into a string which is representingsuitable thefor specifiedpresentation Number object.{td}{tr}{tbody}{table}\\ 

{table:id=property|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Property Details{th}{tr}{tbody:id=MAX_VALUEin the given locale.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#toPrecision]\()
Returns a string representing the number to a specified precision in fixed\-point or exponential notation.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#toPrecision]\(precision)
Returns a string representing the number to a specified precision in fixed\-point or exponential notation.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#toString]\()
Returns a string representing the specified Number object.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#toString]\(radix)
Returns a string representing the specified Number object.{td}{tr}{tbody}{table}\\ 

{table:id=property|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Property Details{th}{tr}{tbody:id=MAX_VALUE|class=node}{tr:id=name}{td}h6.MAX_VALUE{td}{tr}{tr:id=des}{td}{sub-section:MAX_VALUE_des|text=|trigger=button}{sub-section}{sub-section:MAX_VALUE_des|trigger=none|class=sIndent}The largest representable number.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:MAX_VALUE_snc|text=|trigger=button}{sub-section}{sub-section:MAX_VALUE_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:MAX_VALUE_prs|text=|trigger=button}{sub-section}{sub-section:MAX_VALUE_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:MAX_VALUE_ret|text=|trigger=button}{sub-section}{sub-section:MAX_VALUE_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:MAX_VALUE_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:MAX_VALUE_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:MAX_VALUE_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:MAX_VALUE_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:MAX_VALUE_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:MAX_VALUE_sam|trigger=none}{code:language=javascript}
application.output("Largest number: " + Number.MAX_VALUE);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=MIN_VALUE|class=node}{tr:id=name}{td}h6.MIN_VALUE{td}{tr}{tr:id=des}{td}{sub-section:MIN_VALUE_des|text=|trigger=button}{sub-section}{sub-section:MIN_VALUE_des|trigger=none|class=sIndent}The smallest representable number.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:MIN_VALUE_snc|text=|trigger=button}{sub-section}{sub-section:MIN_VALUE_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:MIN_VALUE_prs|text=|trigger=button}{sub-section}{sub-section:MIN_VALUE_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:MIN_VALUE_ret|text=|trigger=button}{sub-section}{sub-section:MIN_VALUE_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:MIN_VALUE_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:MIN_VALUE_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:MIN_VALUE_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:MIN_VALUE_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:MIN_VALUE_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:MIN_VALUE_sam|trigger=none}{code:language=javascript}
application.output("Smallest number: " + Number.MIN_VALUE);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=NEGATIVE_INFINITY|class=node}{tr:id=name}{td}h6.NEGATIVE_INFINITY{td}{tr}{tr:id=des}{td}{sub-section:NEGATIVE_INFINITY_des|text=|trigger=button}{sub-section}{sub-section:NEGATIVE_INFINITY_des|trigger=none|class=sIndent}Special value representing negative infinity; returned on overflow.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:NEGATIVE_INFINITY_snc|text=|trigger=button}{sub-section}{sub-section:NEGATIVE_INFINITY_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:NEGATIVE_INFINITY_prs|text=|trigger=button}{sub-section}{sub-section:NEGATIVE_INFINITY_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:NEGATIVE_INFINITY_ret|text=|trigger=button}{sub-section}{sub-section:NEGATIVE_INFINITY_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:NEGATIVE_INFINITY_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:NEGATIVE_INFINITY_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:NEGATIVE_INFINITY_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:NEGATIVE_INFINITY_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:NEGATIVE_INFINITY_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:NEGATIVE_INFINITY_sam|trigger=none}{code:language=javascript}
application.output("Negative infinity: " + Number.NEGATIVE_INFINITY);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=NaN|class=node}{tr:id=name}{td}h6.NaN{td}{tr}{tr:id=des}{td}{sub-section:NaN_des|text=|trigger=button}{sub-section}{sub-section:NaN_des|trigger=none|class=sIndent}Special "not a number" value.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:NaN_snc|text=|trigger=button}{sub-section}{sub-section:NaN_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:NaN_prs|text=|trigger=button}{sub-section}{sub-section:NaN_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:NaN_ret|text=|trigger=button}{sub-section}{sub-section:NaN_ret|trigger=none|class=sIndent}[Object]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:NaN_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:NaN_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:NaN_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:NaN_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:NaN_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:NaN_sam|trigger=none}{code:language=javascript}
application.output("NaN: " + Number.NaN);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=POSITIVE_INFINITY|class=node}{tr:id=name}{td}h6.MAXPOSITIVE_VALUEINFINITY{td}{tr}{tr:id=des}{td}{sub-section:MAXPOSITIVE_VALUEINFINITY_des|text=|trigger=button}{sub-section}{sub-section:MAXPOSITIVE_VALUEINFINITY_des|trigger=none|class=sIndent}The largest representable numberSpecial value representing infinity; returned on overflow.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:MAXPOSITIVE_VALUEINFINITY_snc|text=|trigger=button}{sub-section}{sub-section:MAXPOSITIVE_VALUEINFINITY_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:MAXPOSITIVE_VALUEINFINITY_prs|text=|trigger=button}{sub-section}{sub-section:MAXPOSITIVE_VALUEINFINITY_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:MAXPOSITIVE_VALUEINFINITY_ret|text=|trigger=button}{sub-section}{sub-section:MAXPOSITIVE_VALUEINFINITY_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:MAXPOSITIVE_VALUEINFINITY_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:MAXPOSITIVE_VALUEINFINITY_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:MAXPOSITIVE_VALUEINFINITY_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:MAXPOSITIVE_VALUEINFINITY_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:MAXPOSITIVE_VALUEINFINITY_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:MAXPOSITIVE_VALUEINFINITY_sam|trigger=none}{code:language=javascript}
application.output("LargestPositive numberinfinity: " + Number.MAX_VALUE);
{code}{sub-section}{div}POSITIVE_INFINITY);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\ 

{table:id=function|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=toExponential|class=node}{tr:id=name}{td}h6.toExponential{td}{tr}{tr:classid=lastDetailRowsig}{td}{td}{tr}{tbody}{tbody:id=MIN_VALUE|class=node}{tr:id=name}{td}h6.MIN_VALUEspan:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}toExponential{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:MINtoExponential_VALUE_des|text=|trigger=button}{sub-section}{sub-section:MIN_VALUEtoExponential_des|trigger=none|class=sIndent}The smallest representable numberReturns a string representing the number in exponential notation.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:MIN_VALUEtoExponential_snc|text=|trigger=button}{sub-section}{sub-section:MINtoExponential_VALUE_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:MIN_VALUEtoExponential_prs|text=|trigger=button}{sub-section}{sub-section:MINtoExponential_VALUE_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:MIN_VALUEtoExponential_ret|text=|trigger=button}{sub-section}{sub-section:MIN_VALUEtoExponential_ret|trigger=none|class=sIndent}[Number]String] -- A string representing the number in exponential notation.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:MIN_VALUEtoExponential_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:MIN_VALUEtoExponential_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:MINtoExponential_VALUE_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:MIN_VALUEtoExponential_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:MINtoExponential_VALUE_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:MIN_VALUEtoExponential_sam|trigger=none}{code:language=javascript}
var n = 123.45678;
application.output("Smallest number: " + Number.MIN_VALUEn.toExponential(3));
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{td}{tr}{tbody}{tbody:id=toExponential-Number|class=node}{tr:id=name}{td}h6.toExponential{td}{tr}{tr:id=sig}{td}{tr}{tbody}{tbody:id=NEGATIVE_INFINITY|class=node}{tr:id=name}{td}h6.NEGATIVE_INFINITYspan:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}toExponential{span}{span:id=iets|style=float: left;}\(fractionDigits){span}{td}{tr}{tr:id=des}{td}{sub-section:NEGATIVE_INFINITYtoExponential-Number_des|text=|trigger=button}{sub-section}{sub-section:NEGATIVE_INFINITYtoExponential-Number_des|trigger=none|class=sIndent}SpecialReturns a valuestring representing negativethe infinity;number returnedin onexponential overflownotation.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:NEGATIVE_INFINITYtoExponential-Number_snc|text=|trigger=button}{sub-section}{sub-section:NEGATIVE_INFINITYtoExponential-Number_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:NEGATIVE_INFINITYtoExponential-Number_prs|text=|trigger=button}{sub-section}{sub-section:NEGATIVE_INFINITYtoExponential-Number_prs|trigger=none|class=sIndent}\{[Number]} fractionDigits -- An integer specifying the number of digits after the decimal point. Defaults to as many digits as necessary to specify the number.
{sub-section}{td}{tr}{builder-showtr}{tr:id=ret}{td}*Returns*\\{sub-section:NEGATIVE_INFINITYtoExponential-Number_ret|text=|trigger=button}{sub-section}{sub-section:NEGATIVE_INFINITYtoExponential-Number_ret|trigger=none|class=sIndent}[Number]String] -- A string representing the number in exponential notation.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:NEGATIVE_INFINITYtoExponential-Number_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:NEGATIVE_INFINITYtoExponential-Number_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:NEGATIVEtoExponential-Number_INFINITY_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:NEGATIVEtoExponential-Number_INFINITY_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:NEGATIVE_INFINITYtoExponential-Number_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:NEGATIVEtoExponential-Number_INFINITY_sam|trigger=none}{code:language=javascript}
var n = 123.45678;
application.output("Negative infinity: " + Number.NEGATIVE_INFINITYn.toExponential(3));
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=toFixed|class=node}{tr:id=name}{td}h6.toFixed{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}toFixed{tdspan}{tr}{tbody}{tbodyspan:id=NaNiets|class=node}{tr:id=name}{td}h6.NaNstyle=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:NaNtoFixed_des|text=|trigger=button}{sub-section}{sub-section:NaNtoFixed_des|trigger=none|class=sIndent}Special "not a number" valueReturns a string representing the number in fixed\-point notation.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:NaNtoFixed_snc|text=|trigger=button}{sub-section}{sub-section:NaNtoFixed_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:NaNtoFixed_prs|text=|trigger=button}{sub-section}{sub-section:NaNtoFixed_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:NaNtoFixed_ret|text=|trigger=button}{sub-section}{sub-section:NaNtoFixed_ret|trigger=none|class=sIndent}[Object]=sIndent}[String] -- A string representing the number in fixed-point notation.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:NaNtoFixed_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:NaNtoFixed_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:NaNtoFixed_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:NaNtoFixed_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:NaNtoFixed_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:NaNtoFixed_sam|trigger=none}{code:language=javascript}
var n = 123.45678;
application.output("NaN: " + Number.NaNn.toFixed(3));
{code}{sub-section}{div}-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=toFixed-Number|class=node}{tr:id=name}{td}h6.toFixed{td}{tr}{tr:classid=lastDetailRowsig}{td}{td}{tr}{tbody}{tbody:id=POSITIVE_INFINITY|class=node}{tr:id=name}{td}h6.POSITIVE_INFINITYspan:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}toFixed{span}{span:id=iets|style=float: left;}\(digits){span}{td}{tr}{tr:id=des}{td}{sub-section:POSITIVE_INFINITYtoFixed-Number_des|text=|trigger=button}{sub-section}{sub-section:POSITIVE_INFINITYtoFixed-Number_des|trigger=none|class=sIndent}SpecialReturns a valuestring representing the infinity;number returned on overflowin fixed\-point notation.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:POSITIVE_INFINITYtoFixed-Number_snc|text=|trigger=button}{sub-section}{sub-section:POSITIVE_INFINITYtoFixed-Number_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:POSITIVE_INFINITYtoFixed-Number_prs|text=|trigger=button}{sub-section}{sub-section:POSITIVEtoFixed-Number_INFINITY_prs|trigger=none|class=sIndent}\{[Number]} digits -- The number of digits to appear after the decimal point. Defaults to 0.
{sub-section}{td}{tr}{builder-showtr}{tr:id=ret}{td}*Returns*\\{sub-section:POSITIVE_INFINITYtoFixed-Number_ret|text=|trigger=button}{sub-section}{sub-section:POSITIVE_INFINITYtoFixed-Number_ret|trigger=none|class=sIndent}[Number]String] -- A string representing the number in fixed-point notation.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:POSITIVE_INFINITYtoFixed-Number_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:POSITIVE_INFINITYtoFixed-Number_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:POSITIVEtoFixed-Number_INFINITY_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:POSITIVEtoFixed-Number_INFINITY_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:POSITIVE_INFINITYtoFixed-Number_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:POSITIVEtoFixed-Number_INFINITY_sam|trigger=none}{code:language=javascript}
var n = 123.45678;
application.output("Positive infinity: " + Number.POSITIVE_INFINITYn.toFixed(3));
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\ 

{table:id=function|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=toExponentialtoLocaleString|class=node}{tr:id=name}{td}h6.toExponentialtoLocaleString{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}toExponentialtoLocaleString{span}{span:id=iets|style=float: left;}\(\[fractionDigits\]){span}{td}{tr}{tr:id=des}{td}{sub-section:toExponentialtoLocaleString_des|text=|trigger=button}{sub-section}{sub-section:toExponentialtoLocaleString_des|trigger=none|class=sIndent}ReturnssIndent}Converts the number into a string representing the numberwhich is suitable for presentation in the exponentialgiven notationlocale.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:toExponentialtoLocaleString_snc|text=|trigger=button}{sub-section}{sub-section:toExponentialtoLocaleString_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:toExponentialtoLocaleString_prs|text=|trigger=button}{sub-section}{sub-section:toExponential_prs|trigger=none|class=sIndent}\{[Number]} \[fractionDigits\] -- An integer specifying the number of digits after the decimal point. Defaults to as many digits as necessary to specify the number.
|trigger=button}{sub-section}{sub-section:toLocaleString_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:toExponentialtoLocaleString_ret|text=|trigger=button}{sub-section}{sub-section:toExponentialtoLocaleString_ret|trigger=none|class=sIndent}[String] -- A string representing the number in exponentialthe current notationlocale.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:toExponentialtoLocaleString_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:toExponentialtoLocaleString_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:toExponentialtoLocaleString_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:toExponentialtoLocaleString_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:toExponentialtoLocaleString_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:toExponentialtoLocaleString_sam|trigger=none}{code:language=javascript}
var n = 123.456781000000;
application.output(n.toExponentialtoLocaleString(3));
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=toFixedtoPrecision|class=node}{tr:id=name}{td}h6.toFixedtoPrecision{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}toFixedtoPrecision{span}{span:id=iets|style=float: left;}\(\[digits\]){span}{td}{tr}{tr:id=des}{td}{sub-section:toFixedtoPrecision_des|text=|trigger=button}{sub-section}{sub-section:toFixedtoPrecision_des|trigger=none|class=sIndent}Returns a string representing the number to a specified precision in fixed\-point or exponential notation.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:toFixedtoPrecision_snc|text=|trigger=button}{sub-section}{sub-section:toFixedtoPrecision_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:toFixedtoPrecision_prs|text=|trigger=button}{sub-section}{sub-section:toFixedtoPrecision_prs|trigger=none|class=sIndent}\{[Number]} \[digits\] -- The number of digits to appear after the decimal point. Defaults to 0.
{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:toFixedtoPrecision_ret|text=|trigger=button}{sub-section}{sub-section:toFixedtoPrecision_ret|trigger=none|class=sIndent}[String] -- A string representing the number to a specified precision in fixed-pointpoint or exponential notation.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:toFixedtoPrecision_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:toFixedtoPrecision_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:toFixedtoPrecision_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:toFixedtoPrecision_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:toFixedtoPrecision_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:toFixedtoPrecision_sam|trigger=none}{code:language=javascript}
var n = 123.45678;
application.output(n.toFixedtoPrecision(35));
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=toLocaleStringtoPrecision-Number|class=node}{tr:id=name}{td}h6.toLocaleStringtoPrecision{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}toLocaleStringtoPrecision{span}{span:id=iets|style=float: left;}\(precision){span}{td}{tr}{tr:id=des}{td}{sub-section:toLocaleStringtoPrecision-Number_des|text=|trigger=button}{sub-section}{sub-section:toLocaleStringtoPrecision-Number_des|trigger=none|class=sIndent}ConvertsReturns a string representing the number intoto a stringspecified whichprecision is suitable for presentation in the given localein fixed\-point or exponential notation.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:toLocaleStringtoPrecision-Number_snc|text=|trigger=button}{sub-section}{sub-section:toLocaleStringtoPrecision-Number_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:toLocaleStringtoPrecision-Number_prs|text=|trigger=button}{sub-section}{sub-section:toLocaleStringtoPrecision-Number_prs|trigger=none|class=sIndent}sIndent}\{[Number]} precision -- An integer specifying the number of significant digits.
{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:toLocaleStringtoPrecision-Number_ret|text=|trigger=button}{sub-section}{sub-section:toLocaleStringtoPrecision-Number_ret|trigger=none|class=sIndent}[String] -- A string representing the number to a specified precision in fixed-point theor currentexponential localenotation.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:toLocaleStringtoPrecision-Number_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:toLocaleStringtoPrecision-Number_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:toLocaleStringtoPrecision-Number_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:toLocaleStringtoPrecision-Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:toLocaleStringtoPrecision-Number_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:toLocaleStringtoPrecision-Number_sam|trigger=none}{code:language=javascript}
var n = 1000000123.45678;
application.output(n.toLocaleStringtoPrecision(5));
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=toPrecisiontoString|class=node}{tr:id=name}{td}h6.toPrecisiontoString{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}toPrecisiontoString{span}{span:id=iets|style=float: left;}\(\[precision\]){span}{td}{tr}{tr:id=des}{td}{sub-section:toPrecisiontoString_des|text=|trigger=button}{sub-section}{sub-section:toPrecisiontoString_des|trigger=none|class=sIndent}Returns a string representing the number to a specified precision in fixed\-point or exponential notationNumber object.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:toPrecisiontoString_snc|text=|trigger=button}{sub-section}{sub-section:toPrecisiontoString_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:toPrecisiontoString_prs|text=|trigger=button}{sub-section}{sub-section:toPrecisiontoString_prs|trigger=none|class=sIndent}\{[Number]} \[precision\] -- An integer specifying the number of significant digits.
{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:toPrecisiontoString_ret|text=|trigger=button}{sub-section}{sub-section:toPrecisiontoString_ret|trigger=none|class=sIndent}[String] -- A string representing the number to a specified precision in fixed-point or exponential notation string representing the specified Number object.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:toPrecisiontoString_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:toPrecisiontoString_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:toPrecisiontoString_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:toPrecisiontoString_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:toPrecisiontoString_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:toPrecisiontoString_sam|trigger=none}{code:language=javascript}
var n = 123.45678; 7;
application.output(n.toString()); //displays "7"
application.output(n.toPrecisiontoString(52)); //displays "111"
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=toString-Number|class=node}{tr:id=name}{td}h6.toString{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}toString{span}{span:id=iets|style=float: left;}\(\[radix\]){span}{td}{tr}{tr:id=des}{td}{sub-section:toString-Number_des|text=|trigger=button}{sub-section}{sub-section:toString-Number_des|trigger=none|class=sIndent}Returns a string representing the specified Number object.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:toString-Number_snc|text=|trigger=button}{sub-section}{sub-section:toString-Number_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:toString-Number_prs|text=|trigger=button}{sub-section}{sub-section:toString-Number_prs|trigger=none|class=sIndent}\{[Number]} \[radix\] -- An integer between 2 and 36 specifying the base to use for representing numeric values
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:toString-Number_ret|text=|trigger=button}{sub-section}{sub-section:toString-Number_ret|trigger=none|class=sIndent}[String] -- A string representing the specified Number object.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:toString-Number_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:toString-Number_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:toString-Number_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:toString-Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:toString-Number_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:toString-Number_sam|trigger=none}{code:language=javascript}
var n = 7;
application.output(n.toString()); //displays "7"
application.output(n.toString(2)); //displays "111"
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}