Continued update using double instead of float. Updated documentation. fixed major bug: cosine function actually called sine...