gam: Gamma correction

Description Usage Arguments Details Author(s) Examples

Description

Lorentz gamma correction term in special relativity

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## S3 method for class '3vel'
speed(u)
## S3 method for class '4vel'
speed(u)
speedsquared(u)
gam(u)
gamm1(u)
## S3 method for class '3vel'
gam(u)
## S3 method for class '4vel'
gam(u)
## S3 method for class '3vel'
gamm1(u)
## S3 method for class '4vel'
gamm1(u)
gam_ur(d)

Arguments

u

Speed: either a vector of speeds or a vector of three-velocities or four-velocities

d

In function gam_ur(), deficit of speed; speed of light minus speed of object

Details

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.

Author(s)

Robin K. S. Hankin

Examples

 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

lorentz documentation built on Oct. 23, 2020, 5:50 p.m.