Use 'inf' as large value instead of 1e20

'inf' is always bigger than any number, 1e20 is not.