[[wp:Machin-like_formula|Machin-like formulas]] are useful for efficiently computing numerical approximations for
;Task:
Verify the following Machin-like formulas are correct by calculating the value of '''tan''' (''right hand side)'' for each equation using exact arithmetic and showing they equal '''1''':
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
and confirm that the following formula is ''incorrect'' by showing '''tan''' (''right hand side)'' is ''not'' '''1''':
:
These identities are useful in calculating the values:
:
:
:
You can store the equations in any convenient data structure, but for extra credit parse them from human-readable [[Check_Machin-like_formulas/text_equations|text input]].
Note: to formally prove the formula correct, it would have to be shown that '' < right hand side < '' due to '''' periodicity.