Jump to content

Talk:TPK algorithm

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 217.209.101.58 (talk) at 04:39, 3 June 2007 (Python example). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Domain errors

What amazes me is that not only the algorithm itself is sensitive to math domain errors, but that none of the implementations I've seen given seem to do anything about it. (For very large positive values one could solve f(t)==400, yielding for t around 4.3, and write 'TOO LARGE' before ever evaluating f(t).) bsod 18:44, 1 June 2006 (UTC)[reply]

Python example

The page says: list instead of an array, (although there is an array module available) The writer seems to assume the python list type is not an array. It's a resizable vector type (implemented as an array). The python array module is for storing masses of ints or floats without Object overhead.

Why not

for i in [int(raw_input()) for i in range(11)][::-1]

ALGOL source code

I reformatted the ALGOL code to make it more readable. In particular, it wasn't obvious where the f() procedure ends and the statements in the outer begin/end block begin. I'm not an Algol expert, so if I got any of it wrong, please feel free to correct it. — Loadmaster 17:51, 15 May 2007 (UTC)[reply]