Gonzo,

You can do this with BigDecimal and NumberFormat java classes:

<cfset n = "4.7e-013">
<cfset bigD = CreateObject("java", "java.math.BigDecimal")>
<cfset numFormat = CreateObject("java", "java.text.NumberFormat")>
<cfset numFormat = numFormat.getInstance()>
<cfset bigD.init(n)>
<cfset numFormat.setMaximumFractionDigits(100)>
<cfset numFormat.setMaximumIntegerDigits(100)>
<cfoutput>#numFormat.format(bigD.doubleValue())#</cfoutput>

--
Pete Freitag
http://foundeo.com/ - ColdFusion Consulting & Products
http://petefreitag.com/ - My Blog
Web Application Firewall For ColdFusion: http://foundeo.com/security/


On Tue, Apr 28, 2009 at 7:02 PM, Gonzo Rock <[email protected]> wrote:
>
> Having trouble converting numbers like
>
> 4.7e-013
> and
> 1.234e+012
>
> into decimal notation
>
> 0.00000000000047
> and
> 1234000000000.0
>
> scoured this list for "scientific notation" and found some discussion but
> ... alas no cigar, as they say.
>
> any help would be appreciated ;-)
>
> thanks,
> Gonzo
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:322082
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to