top | item 6162534

(no title)

Tibbes | 12 years ago

Hmmmm, make that:

    def gauss(x):
        return (x+1)*x/2
(consider gauss(11), for example)

You gotta admit, on an article about the difference between integer and floating-point arithmetic, that's pretty ironic!

discuss

order

joe24pack|12 years ago

It's odd that the odd numbers slipped my mind. Thank you for your gracious correction.