John D. Cook 8/9/2026

A simple range reduction method

Read Original

This article explains a simple range reduction technique for computing sine and cosine of large angles, addressing precision issues in naive reduction modulo π/2. It introduces the Cody-Waite method, which splits π/2 into two constants (C1 and C2) to achieve higher accuracy. The post includes Python code examples, compares naive vs. improved methods, and discusses limitations for very large arguments. It is relevant to numerical computing and algorithm development in programming.

A simple range reduction method

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser