Skip to content

Commit

Permalink
fix precision in mass example
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Kienzle committed Feb 13, 2024
1 parent fed2097 commit 55ce71c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/sphinx/guide/formula_grammar.rst
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ compute molar mass and neutron/xray scattering length density:
>>> import periodictable
>>> SiO2 = periodictable.formula('SiO2')
>>> hydrated = SiO2 + periodictable.formula('3H2O')
>>> print(f"{hydrated} mass {hydrated.mass}")
>>> print(f"{hydrated} mass {hydrated.mass:.3f}")
SiO2(H2O)3 mass 114.128
>>> rho,mu,inc = periodictable.neutron_sld('SiO2+3H2O',density=1.5,wavelength=4.75)
>>> print(f"{hydrated} neutron sld {rho:.3g}")
Expand Down

0 comments on commit 55ce71c

Please sign in to comment.