Fix ThermoSnapshot.isValid(T) (and sped it up).
Fix ThermoSnapshot.isValid(T) (and sped it up).

It used to return True if T was no more than 1,000,000 times too high or low! It
now checks the right thing, and it does so without logarithms and absolutes, so
is ~2.5 times faster. (It's small, but this function is called a lot!)

>>> import timeit
>>> timeit.Timer('math.log10(abs(1-500.0/500.05))<-5', 'import math').timeit()
0.78184604644775391
>>> timeit.Timer('(abs(1-500.0/500.05))<0.00001', 'import math').timeit()
0.34678912162780762
>>> timeit.Timer('ratio=500.0/500.05; (ratio<1.00001 and ratio>0.99999)', 'import math').timeit()
0.27086305618286133

git-svn-id: 38f1702c2d2bc28f7341d40983eddaad0d99b903@197 37378900-1858-4726-a06b-e54562fdc990

nyee/RMG-Py,nickvandewiele/RMG-Py,enochd/RMG-Py,KEHANG/RMG-Py,comocheng/RMG-Py,nickvandewiele/RMG-Py,pierrelb/RMG-Py,pierrelb/RMG-Py,nyee/RMG-Py,comocheng/RMG-Py,chatelak/RMG-Py,chatelak/RMG-Py,faribas/RMG-Py,faribas/RMG-Py,enochd/RMG-Py,KEHANG/RMG-Py