Added math SSE2 implementation on x86 platforms

NOTE: double is used as scalar, it may conflict with float assumption of existing code.