0 Members and 1 Guest are viewing this topic.
I was a little disappointed I put in a slightly greater velocity than c but it made no attempt at an answer, could not the energy be included too
If v>c then sqrt(negative value) and it's illegal in math.
- The speed of light shall be as a constant in program and not as input.
- There should be only a single line with the result, in units that can be selected with a selector at the end.
- There should be a reset button.
- Add compute on paste event and on key up event; that may remove the compute button and save the user of one click.
- Add compute on select units.
And most importantly: debug it. If fails sometimes: It generated NaN at speeds lower than the speed of light.
I was talking about from point of view of programming that sqrt(-value) is causing error.But if you want I can change equation to:m=m0/sqrt(abs(1-v*v/c*c))I have tested this and surprisingly when v=2c, the result is m=m0/sqrt(3), so if m0 = 1 kg, m=0.577 kg.
You could probably easily add fields for space and time dilation, too. Maybe just a field to show how much length contracts and time slows.