On 11/18/2013 03:20 PM, Dimitri Maziuk wrote: > On 11/18/2013 03:07 PM, Geoffrey Hutchison wrote: >>> In the meantime, here's the patch -- feel free to rename "Prevalent" if >> >> I think my big question is why you do the loop in the > GetPrevalentIsotope() method? Why not just round the mass to an integer? > > There should be no perceptible difference in runtime, typically a tight > loop like this would be optimized to run out of cache. > > Rounding doubles, on the other hand, comes with the possibility that the > nearest representable value to 238.050788 is actually within > 0.490000003849 amu of 238.000000 and will round the wrong way.
I meant to put a zero or two between the "." and "49" ... -- Dimitri Maziuk Programmer/sysadmin BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Shape the Mobile Experience: Free Subscription Software experts and developers: Be at the forefront of tech innovation. Intel(R) Software Adrenaline delivers strategic insight and game-changing conversations that shape the rapidly evolving mobile landscape. Sign up now. http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss