Given a triangle \$ABC\$, extend its three sides by the opposite side length, as shown in the figure below. Then the six points surprisingly lie on a circle called the Conway circle, whose center coincides with the incenter (the center of incircle, the circle that is tangent to the three sides from the inside).
Given three side lengths \$a,b,c\$ of the triangle \$ABC\$, calculate the perimeter of the hexagon \$A_b B_a B_c C_b C_a A_c\$ (formed by the six points on the Conway circle).
The answer must be within
1e-6 relative error from the expected. You can assume the side lengths form a valid non-degenerate triangle.
The shortest code in bytes wins.
a b c ans --------------------- 1 1 1 9.000000 2 2 3 20.399495 3 4 5 35.293155 6 7 12 65.799785 2.3 4.5 6.7 31.449770