Skip to content

feat: Add mass energy equivalence in physics and doctests #10202

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Oct 23, 2023
Merged
Prev Previous commit
Next Next commit
Update physics/mass_energy_equivalence.py
  • Loading branch information
tianyizheng02 authored Oct 23, 2023
commit bed531e62d077d051f64b3ce9b6bf4c152449449
4 changes: 2 additions & 2 deletions physics/mass_energy_equivalence.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ def energy_from_mass(mass: float) -> float:

Usage example:
>>> energy_from_mass(124.56)
1.1194894506345802e+19
1.11948945063458e+19
>>> energy_from_mass(320)
2.8760165719578165e+19
28760165719578164480
>>> energy_from_mass(0)
0.0
>>> energy_from_mass(-967.9)
Expand Down