Steven G. Johnson Tue, 17 Dec 2013 17:53:28 -0800
Note that there is a quaternion example bundled with Julia, which you can use as a starting point.