derivations of all formulas can be found
HERE.
to make calculations even faster i suggest using assember and math coprocessor (described in "the art of assembler programming").
currently there are described functions : exp, ln, log2, logN, sin, cos, tan, sinh, cosh, tanh, pow
i have already implemented them using assember and fpu instructions, and all of them are about 30%-40% faster.
Complex arithmetics
today something about generating Mandelbrot like fractals - that is about complex numbers arithmetics. to generate classical Mandelbrot fractal we need only multiplication and addition of complex numbers. but we would like to have possibility to generate fractals defined with much more complicated equations (for example skull fractal). to achive this we need to define not only simple complex arithmetics, but also other operations (square root, power functions ) and functions (logarithmic, trigonometric... ).