Remix.run Logo
perihelions 3 days ago

I can not confirm this; the parent calculation is the correct one. I can't immediately find what your error was. (edit: It's your [km/s]—you wrote [m/s] by mistake).

    (let* ((ρ ([g (cm -3)] 5))
           (d ([km] 22))
           (m (* ρ (expt d 3)))
           (v ([km (s -1)] 90))
           (ke (* 1/2 m (expt v 2)))
           (kg-tnt ([J (kg -1)] 4.2e6)))
      (values (/ ke kg-tnt)
       (as [megaton] (/ ke kg-tnt))))
    
    5.133857142857142e19 [KG]
    5.133857142857143e10 [MEGATON]
eesmith 3 days ago | parent [-]

My mistaken use of m/s instead of km/s, in a squared term, indeed gives a HUGE difference.

Thanks!