-
Notifications
You must be signed in to change notification settings - Fork 350
Closed
Labels
bugIssues describing unexpected behavior or defects. Remember: a bug is a sign of a missing test!Issues describing unexpected behavior or defects. Remember: a bug is a sign of a missing test!plasmapy.formulary.quantumRelated to the plasmapy.formulary.quantum moduleRelated to the plasmapy.formulary.quantum module
Description
The current doctest error for plasmapy.formulary.quantum.chemical_formula() is a result of a floating point arithmetic error...
There is a large difference in n_e when we convert from cm ** -3 to m ** -3...
>>> (1.e27*u.m**-3) - (1.e21*u.cm**-3).to(u.m**-3)
<Quantity 1.37438953e+11 1 / m3>Thus, even though the inputs are essentially identical, the following yields...
>>> chemical_potential(1.e27 ** u.m ** -3, 11000 * u.K)
<Quantity 2.00039985e-12>
>>> chemical_potential(1.e21 ** u.cm ** -3, 11000 * u.K)
<Quantity 5.1487703e-12>@namurphy @StanczakDominik Thoughts??? If we can't figure out a quick fix, then I feel like we should exclude this code from the source until we determine a solution.
Originally posted by @rocco8773 in #722 (comment)
Metadata
Metadata
Assignees
Labels
bugIssues describing unexpected behavior or defects. Remember: a bug is a sign of a missing test!Issues describing unexpected behavior or defects. Remember: a bug is a sign of a missing test!plasmapy.formulary.quantumRelated to the plasmapy.formulary.quantum moduleRelated to the plasmapy.formulary.quantum module
