def exp(v): hv = 0.5*v theta = np.linalg.norm(hv) a = trig.sinox(theta) b = math.cos(theta) return Quaternion(b, a*hv)