Auto tests for floating-point code

Added Python script to replicate results from Weirdness1 in a more
automatic way.