def special_rel():
print('Let\'s calculate the length along the x-axis and relativistic mass')
print('for an object moving along the x direction with velocity v, with |v|=1, and exit if it is.
if (abs(v)-1.0) >=1e-19: #check that v is less than one with some tolerance.
print('Error: please choose v with |v|<1. Returning ...')
return
else:
gamma = (1-v**2)**(-0.5)
m_prime = gamma * m
l_prime = l/gamma
print('The gamma factor is :', gamma)
print('The relativistic mass of the object is: ', m_prime, ' kg.')
print('The relativistic length of the object is: ', l_prime,' m.')
return m, l, v, gamma, m_prime, l_prime