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:class=servoy sSummery}{colgroup}{column: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:class=servoy sSummery}{colgroup}{column: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]\(digits)
Returns a string representing the number in fixed-point 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}{table}\\ 

{table:class=servoy sDetail}{colgroup}{column:width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Property Details{th}{tr}{tbody:id=97AB6E58682CFE28-2C7FC724-403F43CD-B517938E-E154093ED4BE3C3AA8F1C1A9}{tr:id=name}{td}h6.MAX_VALUE{td}{tr}{tr:id=des}{td}{sub-section:97AB6E58682CFE28-2C7FC724-403F43CD-B517938E-E154093ED4BE3C3AA8F1C1A9_des|text=|trigger=button}{sub-section}{sub-section:97AB6E58682CFE28-2C7FC724-403F43CD-B517938E-E154093ED4BE3C3AA8F1C1A9_des|trigger=none|class=sIndent}The largest representable number.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:97AB6E58682CFE28-2C7FC724-403F43CD-B517938E-E154093ED4BE3C3AA8F1C1A9_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:97AB6E58682CFE28-2C7FC724-403F43CD-B517938E-E154093ED4BE3C3AA8F1C1A9_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:97AB6E58682CFE28-2C7FC724-403F43CD-B517938E-E154093ED4BE3C3AA8F1C1A9_ret|text=|trigger=button}{sub-section}{sub-section:97AB6E58682CFE28-2C7FC724-403F43CD-B517938E-E154093ED4BE3C3AA8F1C1A9_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:97AB6E58682CFE28-2C7FC724-403F43CD-B517938E-E154093ED4BE3C3AA8F1C1A9_see|text=|trigger=button}{sub-section}{sub-section:97AB6E58682CFE28-2C7FC724-403F43CD-B517938E-E154093ED4BE3C3AA8F1C1A9_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:97AB6E58682CFE28-2C7FC724-403F43CD-B517938E-E154093ED4BE3C3AA8F1C1A9_see|text=|trigger=button}{sub-section}{sub-section:97AB6E58682CFE28-2C7FC724-403F43CD-B517938E-E154093ED4BE3C3AA8F1C1A9_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:97AB6E58682CFE28-2C7FC724-403F43CD-B517938E-E154093ED4BE3C3AA8F1C1A9_sam|text=|trigger=button}{sub-section}{sub-section:97AB6E58682CFE28-2C7FC724-403F43CD-B517938E-E154093ED4BE3C3AA8F1C1A9_sam|class=sIndent|trigger=none}{code:language=javascript}
application.output("Largest number: " + Number.MAX_VALUE);
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=4B1D86B8A92070CF-AFAE93EE-451F4F9C-B504974C-BBCA91F2B58CCA7C2B4013FC}{tr:id=name}{td}h6.MIN_VALUE{td}{tr}{tr:id=des}{td}{sub-section:4B1D86B8A92070CF-AFAE93EE-451F4F9C-B504974C-BBCA91F2B58CCA7C2B4013FC_des|text=|trigger=button}{sub-section}{sub-section:4B1D86B8A92070CF-AFAE93EE-451F4F9C-B504974C-BBCA91F2B58CCA7C2B4013FC_des|trigger=none|class=sIndent}The smallest representable number.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:4B1D86B8A92070CF-AFAE93EE-451F4F9C-B504974C-BBCA91F2B58CCA7C2B4013FC_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:4B1D86B8A92070CF-AFAE93EE-451F4F9C-B504974C-BBCA91F2B58CCA7C2B4013FC_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:4B1D86B8A92070CF-AFAE93EE-451F4F9C-B504974C-BBCA91F2B58CCA7C2B4013FC_ret|text=|trigger=button}{sub-section}{sub-section:4B1D86B8A92070CF-AFAE93EE-451F4F9C-B504974C-BBCA91F2B58CCA7C2B4013FC_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:4B1D86B8A92070CF-AFAE93EE-451F4F9C-B504974C-BBCA91F2B58CCA7C2B4013FC_see|text=|trigger=button}{sub-section}{sub-section:4B1D86B8A92070CF-AFAE93EE-451F4F9C-B504974C-BBCA91F2B58CCA7C2B4013FC_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:4B1D86B8A92070CF-AFAE93EE-451F4F9C-B504974C-BBCA91F2B58CCA7C2B4013FC_see|text=|trigger=button}{sub-section}{sub-section:4B1D86B8A92070CF-AFAE93EE-451F4F9C-B504974C-BBCA91F2B58CCA7C2B4013FC_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:4B1D86B8A92070CF-AFAE93EE-451F4F9C-B504974C-BBCA91F2B58CCA7C2B4013FC_sam|text=|trigger=button}{sub-section}{sub-section:4B1D86B8A92070CF-AFAE93EE-451F4F9C-B504974C-BBCA91F2B58CCA7C2B4013FC_sam|class=sIndent|trigger=none}{code:language=javascript}
application.output("Smallest number: " + Number.MIN_VALUE);
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=DB217FB120D3036A-F6E1BC9A-4FA6405A-B34F893A-BB0405C6D2EEBA6A3B52C033}{tr:id=name}{td}h6.NEGATIVE_INFINITY{td}{tr}{tr:id=des}{td}{sub-section:DB217FB120D3036A-F6E1BC9A-4FA6405A-B34F893A-BB0405C6D2EEBA6A3B52C033_des|text=|trigger=button}{sub-section}{sub-section:DB217FB120D3036A-F6E1BC9A-4FA6405A-B34F893A-BB0405C6D2EEBA6A3B52C033_des|trigger=none|class=sIndent}Special value representing negative infinity; returned on overflow.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:DB217FB120D3036A-F6E1BC9A-4FA6405A-B34F893A-BB0405C6D2EEBA6A3B52C033_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:DB217FB120D3036A-F6E1BC9A-4FA6405A-B34F893A-BB0405C6D2EEBA6A3B52C033_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:DB217FB120D3036A-F6E1BC9A-4FA6405A-B34F893A-BB0405C6D2EEBA6A3B52C033_ret|text=|trigger=button}{sub-section}{sub-section:DB217FB120D3036A-F6E1BC9A-4FA6405A-B34F893A-BB0405C6D2EEBA6A3B52C033_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:DB217FB120D3036A-F6E1BC9A-4FA6405A-B34F893A-BB0405C6D2EEBA6A3B52C033_see|text=|trigger=button}{sub-section}{sub-section:DB217FB120D3036A-F6E1BC9A-4FA6405A-B34F893A-BB0405C6D2EEBA6A3B52C033_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:DB217FB120D3036A-F6E1BC9A-4FA6405A-B34F893A-BB0405C6D2EEBA6A3B52C033_see|text=|trigger=button}{sub-section}{sub-section:DB217FB120D3036A-F6E1BC9A-4FA6405A-B34F893A-BB0405C6D2EEBA6A3B52C033_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:DB217FB120D3036A-F6E1BC9A-4FA6405A-B34F893A-BB0405C6D2EEBA6A3B52C033_sam|text=|trigger=button}{sub-section}{sub-section:DB217FB120D3036A-F6E1BC9A-4FA6405A-B34F893A-BB0405C6D2EEBA6A3B52C033_sam|class=sIndent|trigger=none}{code:language=javascript}
application.output("Negative infinity: " + Number.NEGATIVE_INFINITY);
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=4F2EC9B4C6A1F2D1-F0200495-4B7E4144-AD77A124-495BF8B374761F581FA6849A}{tr:id=name}{td}h6.NaN{td}{tr}{tr:id=des}{td}{sub-section:4F2EC9B4C6A1F2D1-F0200495-4B7E4144-AD77A124-495BF8B374761F581FA6849A_des|text=|trigger=button}{sub-section}{sub-section:4F2EC9B4C6A1F2D1-F0200495-4B7E4144-AD77A124-495BF8B374761F581FA6849A_des|trigger=none|class=sIndent}Special "not a number" value.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:4F2EC9B4C6A1F2D1-F0200495-4B7E4144-AD77A124-495BF8B374761F581FA6849A_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:4F2EC9B4C6A1F2D1-F0200495-4B7E4144-AD77A124-495BF8B374761F581FA6849A_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:4F2EC9B4C6A1F2D1-F0200495-4B7E4144-AD77A124-495BF8B374761F581FA6849A_ret|text=|trigger=button}{sub-section}{sub-section:4F2EC9B4C6A1F2D1-F0200495-4B7E4144-AD77A124-495BF8B374761F581FA6849A_ret|trigger=none|class=sIndent}Object{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:4F2EC9B4C6A1F2D1-F0200495-4B7E4144-AD77A124-495BF8B374761F581FA6849A_see|text=|trigger=button}{sub-section}{sub-section:4F2EC9B4C6A1F2D1-F0200495-4B7E4144-AD77A124-495BF8B374761F581FA6849A_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:4F2EC9B4C6A1F2D1-F0200495-4B7E4144-AD77A124-495BF8B374761F581FA6849A_see|text=|trigger=button}{sub-section}{sub-section:4F2EC9B4C6A1F2D1-F0200495-4B7E4144-AD77A124-495BF8B374761F581FA6849A_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:4F2EC9B4C6A1F2D1-F0200495-4B7E4144-AD77A124-495BF8B374761F581FA6849A_sam|text=|trigger=button}{sub-section}{sub-section:4F2EC9B4C6A1F2D1-F0200495-4B7E4144-AD77A124-495BF8B374761F581FA6849A_sam|class=sIndent|trigger=none}{code:language=javascript}
application.output("NaN: " + Number.NaN);
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=F58F6898119A249B-40C4E429-47EC4E95-8E4AA8D5-076D7F847DADF563366FE509}{tr:id=name}{td}h6.POSITIVE_INFINITY{td}{tr}{tr:id=des}{td}{sub-section:F58F6898119A249B-40C4E429-47EC4E95-8E4AA8D5-076D7F847DADF563366FE509_des|text=|trigger=button}{sub-section}{sub-section:F58F6898119A249B-40C4E429-47EC4E95-8E4AA8D5-076D7F847DADF563366FE509_des|trigger=none|class=sIndent}Special value representing infinity; returned on overflow.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:F58F6898119A249B-40C4E429-47EC4E95-8E4AA8D5-076D7F847DADF563366FE509_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F58F6898119A249B-40C4E429-47EC4E95-8E4AA8D5-076D7F847DADF563366FE509_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:F58F6898119A249B-40C4E429-47EC4E95-8E4AA8D5-076D7F847DADF563366FE509_ret|text=|trigger=button}{sub-section}{sub-section:F58F6898119A249B-40C4E429-47EC4E95-8E4AA8D5-076D7F847DADF563366FE509_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:F58F6898119A249B-40C4E429-47EC4E95-8E4AA8D5-076D7F847DADF563366FE509_see|text=|trigger=button}{sub-section}{sub-section:F58F6898119A249B-40C4E429-47EC4E95-8E4AA8D5-076D7F847DADF563366FE509_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:F58F6898119A249B-40C4E429-47EC4E95-8E4AA8D5-076D7F847DADF563366FE509_see|text=|trigger=button}{sub-section}{sub-section:F58F6898119A249B-40C4E429-47EC4E95-8E4AA8D5-076D7F847DADF563366FE509_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:F58F6898119A249B-40C4E429-47EC4E95-8E4AA8D5-076D7F847DADF563366FE509_sam|text=|trigger=button}{sub-section}{sub-section:F58F6898119A249B-40C4E429-47EC4E95-8E4AA8D5-076D7F847DADF563366FE509_sam|class=sIndent|trigger=none}{code:language=javascript}
application.output("Positive infinity: " + Number.POSITIVE_INFINITY);
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\ 

{table:class=servoy sDetail}{colgroup}{column:width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=C0CBA336ABC4AC16-F40F88E4-45B94BA5-9753BC61-FEE4708CA13D5E78AE5C67CB}{tr:id=name}{td}h6.toExponential{td}{tr}{tr:id=sig}{td}{span: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:C0CBA336ABC4AC16-F40F88E4-45B94BA5-9753BC61-FEE4708CA13D5E78AE5C67CB_des|text=|trigger=button}{sub-section}{sub-section:C0CBA336ABC4AC16-F40F88E4-45B94BA5-9753BC61-FEE4708CA13D5E78AE5C67CB_des|trigger=none|class=sIndent}Returns a string representing the number in exponential notation.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:C0CBA336ABC4AC16-F40F88E4-45B94BA5-9753BC61-FEE4708CA13D5E78AE5C67CB_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:C0CBA336ABC4AC16-F40F88E4-45B94BA5-9753BC61-FEE4708CA13D5E78AE5C67CB_prs|trigger=none}\[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}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:C0CBA336ABC4AC16-F40F88E4-45B94BA5-9753BC61-FEE4708CA13D5E78AE5C67CB_ret|text=|trigger=button}{sub-section}{sub-section:C0CBA336ABC4AC16-F40F88E4-45B94BA5-9753BC61-FEE4708CA13D5E78AE5C67CB_ret|trigger=none|class=sIndent}[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:C0CBA336ABC4AC16-F40F88E4-45B94BA5-9753BC61-FEE4708CA13D5E78AE5C67CB_see|text=|trigger=button}{sub-section}{sub-section:C0CBA336ABC4AC16-F40F88E4-45B94BA5-9753BC61-FEE4708CA13D5E78AE5C67CB_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:C0CBA336ABC4AC16-F40F88E4-45B94BA5-9753BC61-FEE4708CA13D5E78AE5C67CB_see|text=|trigger=button}{sub-section}{sub-section:C0CBA336ABC4AC16-F40F88E4-45B94BA5-9753BC61-FEE4708CA13D5E78AE5C67CB_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:C0CBA336ABC4AC16-F40F88E4-45B94BA5-9753BC61-FEE4708CA13D5E78AE5C67CB_sam|text=|trigger=button}{sub-section}{sub-section:C0CBA336ABC4AC16-F40F88E4-45B94BA5-9753BC61-FEE4708CA13D5E78AE5C67CB_sam|class=sIndent|trigger=none}{code:language=javascript}
var n = 123.45678;
application.output(n.toExponential(3));
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=5BD77C378946AC8F-A4150728-4D974BC7-97198441-19E5D855BA97BC6DE299E67B}{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{span}{span:id=iets|style=float: left;}\(digits){span}{td}{tr}{tr:id=des}{td}{sub-section:5BD77C378946AC8F-A4150728-4D974BC7-97198441-19E5D855BA97BC6DE299E67B_des|text=|trigger=button}{sub-section}{sub-section:5BD77C378946AC8F-A4150728-4D974BC7-97198441-19E5D855BA97BC6DE299E67B_des|trigger=none|class=sIndent}Returns a string representing the number in fixed-point notation.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:5BD77C378946AC8F-A4150728-4D974BC7-97198441-19E5D855BA97BC6DE299E67B_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:5BD77C378946AC8F-A4150728-4D974BC7-97198441-19E5D855BA97BC6DE299E67B_prs|trigger=none}\[digits\] -- The number of digits to appear after the decimal point. Defaults to 0.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:5BD77C378946AC8F-A4150728-4D974BC7-97198441-19E5D855BA97BC6DE299E67B_ret|text=|trigger=button}{sub-section}{sub-section:5BD77C378946AC8F-A4150728-4D974BC7-97198441-19E5D855BA97BC6DE299E67B_ret|trigger=none|class=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:5BD77C378946AC8F-A4150728-4D974BC7-97198441-19E5D855BA97BC6DE299E67B_see|text=|trigger=button}{sub-section}{sub-section:5BD77C378946AC8F-A4150728-4D974BC7-97198441-19E5D855BA97BC6DE299E67B_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:5BD77C378946AC8F-A4150728-4D974BC7-97198441-19E5D855BA97BC6DE299E67B_see|text=|trigger=button}{sub-section}{sub-section:5BD77C378946AC8F-A4150728-4D974BC7-97198441-19E5D855BA97BC6DE299E67B_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:5BD77C378946AC8F-A4150728-4D974BC7-97198441-19E5D855BA97BC6DE299E67B_sam|text=|trigger=button}{sub-section}{sub-section:5BD77C378946AC8F-A4150728-4D974BC7-97198441-19E5D855BA97BC6DE299E67B_sam|class=sIndent|trigger=none}{code:language=javascript}
var n = 123.45678;
application.output(n.toFixed(3));
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=7CAD161B9541DEFA-3FCDCEC2-48754310-A5ABA235-C54D7D1810B985BC8023C0AE}{tr:id=name}{td}h6.toPrecision{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}toPrecision{span}{span:id=iets|style=float: left;}\(precision){span}{td}{tr}{tr:id=des}{td}{sub-section:7CAD161B9541DEFA-3FCDCEC2-48754310-A5ABA235-C54D7D1810B985BC8023C0AE_des|text=|trigger=button}{sub-section}{sub-section:7CAD161B9541DEFA-3FCDCEC2-48754310-A5ABA235-C54D7D1810B985BC8023C0AE_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}{tr:id=prs}{td}*Parameters*\\{sub-section:7CAD161B9541DEFA-3FCDCEC2-48754310-A5ABA235-C54D7D1810B985BC8023C0AE_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:7CAD161B9541DEFA-3FCDCEC2-48754310-A5ABA235-C54D7D1810B985BC8023C0AE_prs|trigger=none}\[precision\] -- An integer specifying the number of significant digits.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:7CAD161B9541DEFA-3FCDCEC2-48754310-A5ABA235-C54D7D1810B985BC8023C0AE_ret|text=|trigger=button}{sub-section}{sub-section:7CAD161B9541DEFA-3FCDCEC2-48754310-A5ABA235-C54D7D1810B985BC8023C0AE_ret|trigger=none|class=sIndent}[String] -- 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=see}{td}*Also see*\\{sub-section:7CAD161B9541DEFA-3FCDCEC2-48754310-A5ABA235-C54D7D1810B985BC8023C0AE_see|text=|trigger=button}{sub-section}{sub-section:7CAD161B9541DEFA-3FCDCEC2-48754310-A5ABA235-C54D7D1810B985BC8023C0AE_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:7CAD161B9541DEFA-3FCDCEC2-48754310-A5ABA235-C54D7D1810B985BC8023C0AE_see|text=|trigger=button}{sub-section}{sub-section:7CAD161B9541DEFA-3FCDCEC2-48754310-A5ABA235-C54D7D1810B985BC8023C0AE_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:7CAD161B9541DEFA-3FCDCEC2-48754310-A5ABA235-C54D7D1810B985BC8023C0AE_sam|text=|trigger=button}{sub-section}{sub-section:7CAD161B9541DEFA-3FCDCEC2-48754310-A5ABA235-C54D7D1810B985BC8023C0AE_sam|class=sIndent|trigger=none}{code:language=javascript}
var n = 123.45678;
application.output(n.toPrecision(5));
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}