Talk:Pascal matrix generation: Difference between revisions

Content added Content deleted
(→‎range of numbers: Don't calculate factorials.)
m (→‎range of numbers: added a response.)
Line 12: Line 12:
:If you use the following instead of the factorial version then you can reduce the onset of overflow problems: <math>\frac{n(n-1)(n-2)\ldots(n-k+1)}{k(k-1)(k-2)\ldots 1}</math>
:If you use the following instead of the factorial version then you can reduce the onset of overflow problems: <math>\frac{n(n-1)(n-2)\ldots(n-k+1)}{k(k-1)(k-2)\ldots 1}</math>
:By calculating the numerator and denominator and comparing them separately to 2<sup>x</sup> you could explore when overflow might affect the calculation. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 05:50, 17 May 2015 (UTC)
:By calculating the numerator and denominator and comparing them separately to 2<sup>x</sup> you could explore when overflow might affect the calculation. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 05:50, 17 May 2015 (UTC)

:: The above formula is indeed the method that the REXX versions use, plus a refinement to optimize using the smaller factorial products. -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 06:07, 17 May 2015 (UTC)