Description Usage Arguments Details Author(s) Examples
Lorentz gamma correction term in special relativity
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
u |
Speed: either a vector of speeds or a vector of three-velocities or four-velocities |
d |
In function |
Function speed(u)
returns the speed of a 3vel
object or
4vel
object.
Function gam(u)
returns the Lorentz factor
see PDF
Function gamm1(u)
returns the Lorentz factor minus 1, useful
for slow speeds when larger accuracy is needed (much like
expm1()
); to see the R idiom, type “gamm1.3vel
”
at the commandline. Function gamm1()
is intended to work with
3vel
objects or speeds. The function will take a 4-velocity,
but this is not recommended as accuracy is lost (all it does is return
the time component of the 4-velocity minus 1).
Function gam_ur()
is used for the ultrarelativistic case where
speeds are very close to the speed of light (the function is named for
“gamma, ultrarelativistic”).
Function speedsquared(u)
returns the square of the speed of a
3vel
object. Use this to avoid taking a needless square root.
Robin K. S. Hankin
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | gam(seq(from=0,by=0.1,len=10))
gam(r3vel(6,0.7))
x <- as.3vel(c(0.1,0.4,0.5))
speed(x)
gam(speed(x)) # works, but slow and inaccurate
gam(x) # recommended: avoids needless coercion
## Use SI units and deal with terrestrial speeds. Use gamm1() for this.
sol(299792458)
sound <- 343 # speed of sound in SI
gam(sound)
gam(sound)-1
gamm1(sound) # gamm1() gives much higher precision
snail <- as.3vel(c(0.00275,0,0)) # even the world's fastest snail...
gamm1(snail) # ...has only a small relativistic correction
## For the ultrarelativistic case of speeds very close to the speed of
## light, use gam_ur():
sol(1) # revert to relativistic units
gam(0.99) - gam_ur(0.01) # zero to numerical accuracy
omgp <- 4.9e-24 # speed deficit of the Oh-My-God particle
gam(1-omgp) # numeric overflow
gam_ur(omgp) # large but finite
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.