Skip to content
Prev 58653 / 398502 Next

About 'choose' function

On Mon, 8 Nov 2004 11:58:04 +0000 (GMT), John <cyracules at yahoo.co.uk>
wrote :
Generally 1:x will be taken to be of mode integer, so I would have
expected prod(1:x) to overflow around x==13, but whoever programmed it
was smart, and switched the values to floating point.  Floating point
evaluation of prod(1:x) overflows around x==171.  The ratio of two
overflows is undefined, so you get a NaN result.
Same problem.

Duncan Murdoch