At the following procedure in a 1^{st} step the quaternions will be converted to complex numbers. Then in a 2^{nd} step the complex function is executed. In a 3^{rd} step the complex result will be converted to a quaternion using the old quaternion.
Because I didnot find a publication with a proper description about this topic, I don't know whether this is correct and whether I can use this procedure for all function I used it. It would be nice to get a hint about this. (email: info@calc3d.com)
Procedure
The function func(q) should be executed with the quaternion
q can be seperated into the
 real part and the

 imaginary part .

With this a complex number
is created.
The function func(z) is executed with this complex number.
Using the imaginary part of the former quaternion the result is created:
 with

This procedure is used in Calc 3D for the following functions:
sin; cos; tan; sinh; cosh; tanh; arcsin; arccos; arctan; arccot; arsinh; arcosh; artanh; arcoth; log; exp