We're dividing 40017117 by 127 
We want to figure out the number of times 40017117 can be divided by 127.

Let's proceed to step 1:
The number 127 fits into 4 0 times, leaving a remainder of 4.
The next digit of our result is 0. 
Result so far: 0.0
If we take 0 away from 4, we end up with 4.
Append the next digit (0) from the dividend to 4 and continue with: 40 / 127

On to step 2:
127 goes into 40 0 times with a remainder of 40.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
The remainder is 40 after subtracting 0 from 40.
Take the next digit (0) from the dividend and append it to 40, then repeat: 400 / 127

Step 3:
When dividing 400 by 127, we get 3 with a remainder of 19.
Put 3 as the next digit of the answer. 
Result so far: 3.0
Deduct 381 from 400 and we're left with 19.
Bring next digit (1) of the dividend behind the 19 and repeat the process: 191 / 127

Advancing to step 4:
127 can be fit into 191 1 times, resulting in a remainder of 64.
Write down 1 as next digit of the result. 
Result so far: 31.0
Subtracting 127 from 191 leaves us with 64.
Include the next digit (7) from the dividend after 64, then repeat: 647 / 127

Step 5:
If we divide 647 by 127, we get 5 and a remainder of 12.
The number 5 becomes the next digit in our result. 
Result so far: 315.0
If we take 635 away from 647, we end up with 12.
Append the next digit (1) from the dividend to 12 and continue with: 121 / 127

Step 6:
When dividing 121 by 127, we get 0 with a remainder of 121.
The next digit of our result is 0. 
Result so far: 3150.0
Subtract 0 from 121 to get 121.
Bring next digit (1) of the dividend behind the 121 and repeat the process: 1211 / 127

Moving on to step 7:
The number 127 fits into 1211 9 times, leaving a remainder of 68.
The number 9 becomes the next digit in our result. 
Result so far: 31509.0
Deduct 1143 from 1211 and we're left with 68.
Append the next digit (7) from the dividend to 68 and continue with: 687 / 127

Advancing to step 8:
127 goes into 687 5 times with a remainder of 52.
Record the quotient 5 as the next digit in the result. 
Result so far: 315095.0
Deduct 635 from 687 and we're left with 52.
Since there are no more digits in the dividend, we add a zero to the remainder making it 520, and continue the process.

Going ahead to step 9:
If we divide 520 by 127, we get 4 and a remainder of 12.
Write down 4 as next digit of the result. 
Result so far: 315095.4
Subtracting 508 from 520 leaves us with 12.
Since there are no more digits in the dividend, we add a zero to the remainder making it 120, and continue the process.

Step 10:
120 divided by 127 is 0 with a remainder of 120.
Put 0 as the next digit of the answer. 
Result so far: 315095.4
The remainder is 120 after subtracting 0 from 120.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1200, and continue the process.

Advancing to step 11:
127 goes into 1200 9 times with a remainder of 57.
The number 9 becomes the next digit in our result. 
Result so far: 315095.409
The remainder is 57 after subtracting 1143 from 1200.
Since there are no more digits in the dividend, we add a zero to the remainder making it 570, and continue the process.

Advancing to step 12:
127 goes into 570 4 times with a remainder of 62.
The number 4 becomes the next digit in our result. 
Result so far: 315095.4094
Subtracting 508 from 570 leaves us with 62.
Since there are no more digits in the dividend, we add a zero to the remainder making it 620, and continue the process.

On to step 13:
127 goes into 620 4 times with a remainder of 112.
The number 4 becomes the next digit in our result. 
Result so far: 315095.40944
If we take 508 away from 620, we end up with 112.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1120, and continue the process.

Our division results in 315095.40944 with a remaining 0.000112.