Talk:Evaluate binomial coefficients: Difference between revisions
Content added Content deleted
(→Type Double inadeqate: new section) |
|||
Line 9: | Line 9: | ||
: In my times binomial coefficients were calculated using asymptotic series, which is of course a way different task. --[[User:Dmitry-kazakov|Dmitry-kazakov]] 09:53, 27 June 2010 (UTC) |
: In my times binomial coefficients were calculated using asymptotic series, which is of course a way different task. --[[User:Dmitry-kazakov|Dmitry-kazakov]] 09:53, 27 June 2010 (UTC) |
||
== Type Double inadeqate == |
|||
The binomial coefficients are of type Integer. If you use type Double instead (as in Java translated from Python), for instance binomCoeff(49, 6) gives 1.3983816000000002E7 |
Revision as of 19:34, 20 June 2014
Task Needs Refinement
The task needs more work. I've made the math look nicer, but it would help if we had some particular values to try to calculate too; I've done binom(60,30), but that requires a non-trivial component somewhere — even the result won't fit in 32-bit ints, let alone any intermediate values — so I don't know if it is really suitable as an actual task. –Donal Fellows 00:39, 12 April 2010 (UTC)
- I've refined this task a bit, and made it binom(5,3), okay? --Alegend 01:03, 12 April 2010 (UTC)
- That's great. Thanks! –Donal Fellows 12:52, 12 April 2010 (UTC)
- Welcome! :D --Alegend 21:00, 12 April 2010 (UTC)
- In my times binomial coefficients were calculated using asymptotic series, which is of course a way different task. --Dmitry-kazakov 09:53, 27 June 2010 (UTC)
Type Double inadeqate
The binomial coefficients are of type Integer. If you use type Double instead (as in Java translated from Python), for instance binomCoeff(49, 6) gives 1.3983816000000002E7