Originally Posted By: Paul
and I have to assign variables to the numbers that I use to
perform the calculations other wise all I end up with is
a number.

as in

v = 5
c = 100
t = 1
t1 = 0

when I press the calculate button

v=v*v
c=c*c
t=v/c
t=sqrt(t)
t=1-t
t1=1*t

t1 is then output to a textbox.

I'm afraid I am confused with what you are doing. I see that you are reusing all of your variables, and that confuses me.
Why don't you define some intermediate variables to make sure that you aren't changing something that shouldn't be changed. For example:

v = 5
c = 100
t= 1
a = v*v
b = c*c
d= a/b
e = 1 - d
f = sqrt(e)
t1 = t * f

That is an accurate representation of the relativistic time contraction formula, setting aside that in the formula C is a constant equal to approximately 300 million meters/second.

And of course I would probably combine those all into one long formula, rather than doing it one step at a time. But if you aren't comfortable using shorthand then this way will give a correct answer.

Maybe you really should refresh your memory of algebra.

Bill Gill


C is not the speed of light in a vacuum.
C is the universal speed limit.