John D. Cook 8/7/2026

cos(200!)

Read Original

This article discusses the computational challenge of evaluating trigonometric functions like cosine for extremely large numbers, using 200! as an example. It explains that while logarithms can be approximated using only leading digits, cosine depends on the remainder modulo 2π, which requires every digit of the number. The author demonstrates via bc -l that altering any digit of 200! can change cos(200!) to nearly any value, highlighting the need for extended precision arithmetic. The post is relevant to programming, numerical methods, and Python's math library limitations.

cos(200!)

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser