MathGolf, 1010 8 bytes
8D*╠♂/e▬8D*╠e▬(*
Inputs in the order: \$v_{exhaust}, m_{end}\$, where \$v_{exhaust}\$ is taken as a floatfloat† representing tenths (e.g. 24.0
).
Explanation:
8D* # Multiply 8 by 14: 112
╠ # Divide it by the first (implicit) input-float (exhaust speed)
♂/ # Divide it byas 10tenths)
e▬ # Push e (2.718281828459045) to the power this
( # Decrement it by 1
* # Multiply it to the second (implicit) input-integer (mass)
# (after which the entire stack is output implicitly as resulting fuel mass)
NOTE† : /
is used for both integer division (if both arguments are integers) and regular division (if either or both arguments are floats). So I can't take the first input \$v_{exhaust}\$ "as integer representing tenths" as allowed in the challenge description to golf the ♂/
, since it would result in integer-division. If I'm allowed to take the tenths as floats (e.g. 24.0
instead of 2.4
), the ♂/
can be removed for -2 bytesan integer.