sin(tan⁻¹(1/239)) = √2/338, cos(tan⁻¹(1/239)) = 239√2/338

sin(tan⁻¹(1/5)) = √26/26, cos(tan⁻¹(1/5)) = 5√26/26

sin(tan⁻¹(1)) = cos(tan⁻¹(1)) = √2/2

sin(a + b) = sin(a) cos(b) + sin(b) cos(a), cos(a+b) = cos(a) cos(b) - sin(a) sin(b)

So

sin(2 tan⁻¹(1/5)) = 2 sin(tan⁻¹(1/5)) cos(tan⁻¹(1/5)) = 5/13, cos(2 tan⁻¹(1/5)) = cos²(tan⁻¹(1/5)) - sin²(tan⁻¹(1/5)) = 12/13

sin(4 tan⁻¹(1/5)) = 2 sin(2 tan⁻¹(1/5)) cos(2 tan⁻¹(1/5)) = 120/169, cos(4 tan⁻¹(1/5)) = cos²(2 tan⁻¹(1/5)) - sin²(2 tan⁻¹(1/5)) = 119/169

sin(tan⁻¹(1/239) + tan⁻¹(1)) = sin(tan⁻¹(1/239)) cos(tan⁻¹(1)) + sin(tan⁻¹(1)) cos(tan⁻¹(1/239)) = 120/169, cos(tan⁻¹(1/239) + tan⁻¹(1)) = cos(tan⁻¹(1/239)) cos(tan⁻¹(1)) - sin(tan⁻¹(1/239)) sin(tan⁻¹(1)) = 119/169

Thus tan⁻¹(1/239) + tan⁻¹(1) = 4 tan⁻¹(1/5) or tan⁻¹(1) = 4 tan⁻¹(1/5) - tan⁻¹(1/239) (This is Machin's Formula.)

or π = 16 tan⁻¹(1/5) - 4 tan⁻¹(1/239) which is of some practical importance (at least historically) because direct calculation of tan⁻¹(1) from the Taylor series is much slower than tan⁻¹(1/5) or tan⁻¹(1/239).

π = 732 tan⁻¹(1/239) + 128 tan⁻¹(1/1023) - 272 tan⁻¹(1/5832) + 48 tan⁻¹(1/110443) - 48 tan⁻¹(1/4841182) - 400 tan⁻¹(1/6826318) is by one measure the "best" Machin-like formula which can be demonstrated by the same reasoning as above.