We look at the division of 40447231 by 317 
The aim is to understand the frequency of 317 in 40447231.

On to step 1:
317 can be fit into 4 0 times, resulting in a remainder of 4.
The next digit of our result is 0. 
Result so far: 0.0
The remainder is 4 after subtracting 0 from 4.
Bring next digit (0) of the dividend behind the 4 and repeat the process: 40 / 317

Moving on to step 2:
40 divided by 317 is 0 with a remainder of 40.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Subtract 0 from 40 to get 40.
Append the next digit (4) from the dividend to 40 and continue with: 404 / 317

Step 3:
317 can be fit into 404 1 times, resulting in a remainder of 87.
Write down 1 as next digit of the result. 
Result so far: 1.0
If we take 317 away from 404, we end up with 87.
Append the next digit (4) from the dividend to 87 and continue with: 874 / 317

Let's proceed to step 4:
874 divided by 317 is 2 with a remainder of 240.
Use 2 as the next digit of our solution. 
Result so far: 12.0
Subtracting 634 from 874 leaves us with 240.
Fetch the next digit (7) from the dividend, attach it to 240 and continue: 2407 / 317

On to step 5:
317 goes into 2407 7 times with a remainder of 188.
Record the quotient 7 as the next digit in the result. 
Result so far: 127.0
The remainder is 188 after subtracting 2219 from 2407.
Bring next digit (2) of the dividend behind the 188 and repeat the process: 1882 / 317

Going ahead to step 6:
317 can be fit into 1882 5 times, resulting in a remainder of 297.
Use 5 as the next digit of our solution. 
Result so far: 1275.0
If we take 1585 away from 1882, we end up with 297.
Append the next digit (3) from the dividend to 297 and continue with: 2973 / 317

On to step 7:
317 can be fit into 2973 9 times, resulting in a remainder of 120.
The number 9 becomes the next digit in our result. 
Result so far: 12759.0
Subtracting 2853 from 2973 leaves us with 120.
Bring next digit (1) of the dividend behind the 120 and repeat the process: 1201 / 317

Going ahead to step 8:
317 can be fit into 1201 3 times, resulting in a remainder of 250.
The number 3 becomes the next digit in our result. 
Result so far: 127593.0
Subtracting 951 from 1201 leaves us with 250.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2500, and continue the process.

Step 9:
The number 317 fits into 2500 7 times, leaving a remainder of 281.
The next digit of our result is 7. 
Result so far: 127593.7
If we take 2219 away from 2500, we end up with 281.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2810, and continue the process.

On to step 10:
When dividing 2810 by 317, we get 8 with a remainder of 274.
The number 8 becomes the next digit in our result. 
Result so far: 127593.78
If we take 2536 away from 2810, we end up with 274.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2740, and continue the process.

Moving on to step 11:
317 goes into 2740 8 times with a remainder of 204.
The number 8 becomes the next digit in our result. 
Result so far: 127593.788
The remainder is 204 after subtracting 2536 from 2740.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2040, and continue the process.

The final outcome is 127593.788, with a leftover of 0.0204.