Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Arbitrary-precision arithmetic in ColdFusion?

0 views
Skip to first unread message

JEEZUSwuzaHIPPIE

unread,
Nov 24, 2009, 4:59:36 PM11/24/09
to
I am trying to calculate the value of 100!. I need all of the
digits. ColdFusion gives me:

9.33262154445E+157

When what I want is:

93326215443944152681699238856266700490715968264381621
46859296389521759999322991560894146397615651828625369
7920827223758251185210916864000000000000000000000000

My code is:

function factorial(n)
{
if (n == 1) return 1;
return n * factorial(n - 1);
}

I tried using PrecisionEvaluate but can't seem to get what I need.

0 new messages