TOP SECRET BOMB CALCULATION The first program outputs: Yield is: 2.6944002417374e+21 (Joule) The second: Storing value with incorrect units at ex/emm.pl line 16 So using the typing has found a problem: $yield = $eff * $mass * $c **3; Which we can fix, and get: Yield is: 8987551787368.18 (Joule)