Using greater floating-point precision in more internal intermediate calculations, where possible.
Cleaned up C include statements.