Talk:Chemical calculator: Difference between revisions

Line 44:
== precision of atomic masses ==
Since the atomic masses for some elements are expressed in greater precision,   shouldn't the computer programming solutions reflect that?   Most languages (at this time) aren't using enough arithmetic precision to give a precise result   (in particular, the formula that contains sodium).   Also, shouldn't the   '''assert'''   in the Rosetta Code task preamble be updated   (with greater precision)   for   '''sodium sulfate'''?     -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 22:09, 27 March 2019 (UTC)
:There is almost never a good reason to use the equality operator with floating point numbers. Especially in '''assert'''. Moreover, the mass of a compound is only as accurate as the least accurate component, so there is no point in dealing with arbitrary precision. Anyway, "usual" floating point numbers have nowadays 17 digits of precision. It's much more than the most accurate atomic mass. [[User:Eoraptor|Eoraptor]] ([[User talk:Eoraptor|talk]]) 19:35, 1 April 2019 (UTC)
1,336

edits