Tweak POLY_AMP_MAX to work around #5.
More readable math, don't reset poly_time until thread is joined.
Major style changes

Including turning some pointer addition into array indices (there's literally no difference from the generated ASM, it's just to make things more legible)