Fixing geometric functions and adding mathematical extensions for functions return doubles.