D
Dr John Stockton
JRS: In article <[email protected]>, dated Sat, 10 Dec
2005 12:55:36 local, seen in Thomas
You meant "... might allow your readers ...".
function Fac(m) { return m<2 ? 1 : m*Fac(--m) }
My small system will currently calculate (as Infinity) Fac(357) but not
Fac(358).
2005 12:55:36 local, seen in Thomas
'PointedEars' Lahn said:Dr said:[...] Thomas 'PointedEars' Lahn [...] posted :There are two approaches: iterative and recursive; the former
will allow you to calculate factorials of greater integers, of
course still with increasing loss of precision.
Why do you say that? [...]
Because how many recursive calls are possible, thus which is the greatest
factorial that can be calculated through that approach, is limited by the
range for IEEE doubles and the stack size; the greatest factorial that can
be calculated through the iterative approach is only limited by the range
for IEEE doubles.
You meant "... might allow your readers ...".
function Fac(m) { return m<2 ? 1 : m*Fac(--m) }
My small system will currently calculate (as Infinity) Fac(357) but not
Fac(358).