Skip to content

feat: Approximate pi with machin's formula#3127

Open
56ghluf wants to merge 1 commit intoTheAlgorithms:masterfrom
56ghluf:feat/pi_machin
Open

feat: Approximate pi with machin's formula#3127
56ghluf wants to merge 1 commit intoTheAlgorithms:masterfrom
56ghluf:feat/pi_machin

Conversation

@56ghluf
Copy link
Copy Markdown

@56ghluf 56ghluf commented Apr 13, 2026

Description of Change

Checklist

  • Added description of change
  • Added file name matches File name guidelines
  • Added tests and example, test must pass
  • Added documentation so that the program is self-explanatory and educational - Doxygen guidelines
  • PR title follows semantic commit guidelines
  • Search previous suggestions before making a new one, as yours may be a duplicate.
  • I acknowledge that all my contributions will be made under the project's license.

Notes:
Added a file math/pi_machin.cpp. Creates a namespace in the math namespace called pi_approximation. Includes a function in this namespace which approximates pi by using Machin's formula and the power series of arctan (see https://en.wikipedia.org/wiki/Machin-like_formula).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant