About 2,100,000 results
Open links in new tab
  1. python - The liu hui series (use recursion way to calculate pi)

    Jan 24, 2022 · So the thing about Liu Hui series is that there's one part that's recursive and (the nested square roots) and the other part belongs to the formula, I think of this as being outside …

  2. performance - Python 3 approximate pi using 9 algorithms

    Jun 5, 2021 · So this is a script that approaches pi using 9 algorithms (actually only 7, two of the algorithms are implemented in two different ways each). In this script I used Liu Hui's π …

  3. Calculate Pi with Python - GeeksforGeeks

    Dec 1, 2020 · In this article, we will see how to calculate PI with Python and also how to use PI in Python. Calculate and Use PI in Python. Below are the ways by which we can calculate and …

  4. Liu Hui's π algorithm - Wikipedia

    Liu Hui was the first Chinese mathematician to provide a rigorous algorithm for calculation of π to any accuracy. Liu Hui's own calculation with a 96-gon provided an accuracy of five digits ie π ≈ …

  5. algorithm - Python pi calculation? - Stack Overflow

    pi += Decimal(t)/Decimal(deno) . pi = pi * Decimal(12)/Decimal(640320**(1.5)) pi = 1/pi. return pi. For some reason this code yields the vakue of pi up to only 15 decimals as compared with the …

  6. How to Write a Python Program to Calculate Pi - wikiHow

    Mar 10, 2025 · So the algorithm that you want to write is as follows: Calculate . Add or subtract the result of that calculation from the answer. Repeat for a specified amount of times. Return …

    • Views: 48.9K
    • 4 Ways to Calculate Pi · GitHub

      Mar 9, 2023 · In celebration of Pi Day I decided to compile together some of my previous algorithms in Python for calculating Pi, in addition to two new ones. The first algorithm is the …

    • Liu Hui’s algorithm for calculating Pi – Lucky's Notes

      Jul 12, 2010 · Liu Hui [刘徽] was a Chinese mathematician who lived in the Wei period. One of the things he was famous for was his method of calculating $latex \pi$ iteratively. This approach to …

    • How to Write Pi in Python - CodeRivers

      Apr 10, 2025 · This blog post will guide you through different ways of representing and using pi in Python, along with best practices. Table of Contents. Fundamental Concepts of Pi in Python; …

    • luh1202/Pi_in_Python: Python implementations of pi algorithms. - GitHub

      Python implementations of pi algorithms. Contribute to luh1202/Pi_in_Python development by creating an account on GitHub.

    • Some results have been removed
    Refresh