Last active
August 7, 2020 10:16
-
-
Save bennadel/572521d60260bb030256d1c2e15c3136 to your computer and use it in GitHub Desktop.
isNumeric() And numberFormat() Can Work With Very Large Numbers In Lucee CFML 5.3.6.61
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
true 10 | |
true 100 | |
true 1,000 | |
true 10,000 | |
true 100,000 | |
true 1,000,000 | |
true 10,000,000 | |
true 100,000,000 | |
true 1,000,000,000 | |
true 10,000,000,000 | |
true 100,000,000,000 | |
true 1,000,000,000,000 | |
true 10,000,000,000,000 | |
true 100,000,000,000,000 | |
true 1,000,000,000,000,000 | |
true 10,000,000,000,000,000 | |
true 100,000,000,000,000,000 | |
true 1,000,000,000,000,000,000 | |
true 10,000,000,000,000,000,000 | |
true 100,000,000,000,000,000,000 | |
true 1,000,000,000,000,000,000,000 | |
true 10,000,000,000,000,000,000,000 | |
true 99,999,999,999,999,990,000,000 | |
true 1,000,000,000,000,000,000,000,000 | |
true 9,999,999,999,999,999,000,000,000 | |
true 99,999,999,999,999,990,000,000,000 | |
true 999,999,999,999,999,900,000,000,000 | |
true 10,000,000,000,000,000,000,000,000,000 | |
true 100,000,000,000,000,000,000,000,000,000 | |
true 999,999,999,999,999,900,000,000,000,000 | |
true 9,999,999,999,999,999,000,000,000,000,000 | |
true 99,999,999,999,999,990,000,000,000,000,000 | |
true 1,000,000,000,000,000,000,000,000,000,000,000 | |
true 10,000,000,000,000,000,000,000,000,000,000,000 | |
true 100,000,000,000,000,000,000,000,000,000,000,000 | |
true 999,999,999,999,999,900,000,000,000,000,000,000 | |
true 9,999,999,999,999,998,000,000,000,000,000,000,000 | |
true 99,999,999,999,999,980,000,000,000,000,000,000,000 | |
true 999,999,999,999,999,800,000,000,000,000,000,000,000 | |
true 9,999,999,999,999,998,000,000,000,000,000,000,000,000 | |
true 99,999,999,999,999,980,000,000,000,000,000,000,000,000 | |
true 999,999,999,999,999,900,000,000,000,000,000,000,000,000 | |
true 9,999,999,999,999,999,000,000,000,000,000,000,000,000,000 | |
true 99,999,999,999,999,990,000,000,000,000,000,000,000,000,000 | |
true 1,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 | |
true 10,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 | |
true 100,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 | |
true 1,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 | |
true 10,000,000,000,000,001,000,000,000,000,000,000,000,000,000,000,000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
// Let's see how isNumeric() and numberFormat() work as we increase the | |
// order-of-magnitude to a large degree. | |
for ( i = 1 ; i < 50 ; i++ ) { | |
value = ( "1" & "0".repeatString( i ) ); | |
echo( isNumeric( value ) ); | |
echo( " " ); | |
echo( numberFormat( value ) ); | |
echo( "<br />" ); | |
} | |
</cfscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment