Who Took My Toilet Paper? You step into the restroom, and notice that the toilet paper has missing! It occurs to you that someone had stolen it. Strangely enough, the first thing you would like to know is the amount of toilet paper the thief stole.

Task

You are given three integers \$ I \$, \$ R \$, and \$ G \$, the details of the toilet paper, where \$ I \$ is the radius of the inner ring, \$ R \$ is the number of rotations, and \$ G \$ is the thickness. The task is to return/output out the length of the toilet paper.

The toilet paper can be viewed as an Archimedes' spiral, which starts at coordinate \$ (I, 0) \$, and rotates a total of \$ R \$ times in the counterclockwise direction, with a distance of \$ G \$ between each gap.

More formally, the Archimedes' spiral here is defined as the set of all points whose locations over time move away from the origin counterclockwise at a constant speed and with constant angular velocity.

Due to potential precision issues, your answer will be judged correct if they pass all the sample cases below when rounded to \$ 1 \$ decimal place.

In the diagram below, \$ I = 5 \$, \$ R = 3 \$, \$ G = 4 \$, and the total length is \$ \approx 207.7 \$.



Test Cases

I R G -&gt; answer rounded to 1 decimal place (note that the answer does not have to be rounded)
0 1 1 -&gt; 3.4
5 3 4 -&gt; 207.7
12 9 2 -&gt; 1187.7


This is code-golf, so the shortest code in bytes wins!
J, 66 bytes

1#.2|@-/\1e3&amp;((-:@[%:_1:)^[:i.1+[*0{])((*{:)+[*(1{])*1e3%~i.@#@[)]


Try it online!

This could be golfed more, but I'm putting it away for now.

Instead of taking an analytic approach I am using complex number arithmetic to break the spiral down into 1000 straight line segments per rotation, and then summing those segments.

I find the 500th root of -1, and keep multiplying it by itself to rotate it and get an approximation to the next spiral point.  

Because the spiral also moves outward, we need to take the new vector, normalize it, multiply the normal vector by 1/1000 of the thickness, and then add that little correction to the new vector.

Conceptually, we're doing something similar to approximating a circle's circumference with the short sides of many triangles.



The idea is simple, but the golf part of it boils down to boring bookkeeping and argument parsing which isn't worth going into.  In theory the realization of this method could be a lot shorter.