Let's divide 40589083 by 312
The aim is to understand the frequency of 312 in 40589083.

Going ahead to step 1:
The number 312 fits into 4 0 times, leaving a remainder of 4.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
Subtracting 0 from 4 leaves us with 4.
Grab the next digit (0) from the dividend, add it to 4, then carry on: 40 / 312

Going ahead to step 2:
312 can be fit into 40 0 times, resulting in a remainder of 40.
Write down 0 as next digit of the result. 
Result so far: 0.0
If we subtract 0 from 40, we get 40.
Take the next digit (5) from the dividend and append it to 40, then repeat: 405 / 312

Advancing to step 3:
If we divide 405 by 312, we get 1 and a remainder of 93.
Record the quotient 1 as the next digit in the result. 
Result so far: 1.0
Subtracting 312 from 405 leaves us with 93.
Append the next digit (8) from the dividend to 93 and continue with: 938 / 312

Let's proceed to step 4:
The number 312 fits into 938 3 times, leaving a remainder of 2.
Write down 3 as next digit of the result. 
Result so far: 13.0
The remainder is 2 after subtracting 936 from 938.
Include the next digit (9) from the dividend after 2, then repeat: 29 / 312

Advancing to step 5:
The number 312 fits into 29 0 times, leaving a remainder of 29.
Put 0 as the next digit of the answer. 
Result so far: 130.0
The remainder is 29 after subtracting 0 from 29.
Take the next digit (0) from the dividend and append it to 29, then repeat: 290 / 312

On to step 6:
312 can be fit into 290 0 times, resulting in a remainder of 290.
Record the quotient 0 as the next digit in the result. 
Result so far: 1300.0
If we take 0 away from 290, we end up with 290.
Append the next digit (8) from the dividend to 290 and continue with: 2908 / 312

Step 7:
If we divide 2908 by 312, we get 9 and a remainder of 100.
Record the quotient 9 as the next digit in the result. 
Result so far: 13009.0
Subtracting 2808 from 2908 leaves us with 100.
Append the next digit (3) from the dividend to 100 and continue with: 1003 / 312

Step 8:
The number 312 fits into 1003 3 times, leaving a remainder of 67.
Record the quotient 3 as the next digit in the result. 
Result so far: 130093.0
Subtracting 936 from 1003 leaves us with 67.
Since there are no more digits in the dividend, we add a zero to the remainder making it 670, and continue the process.

Advancing to step 9:
The number 312 fits into 670 2 times, leaving a remainder of 46.
The next digit of our result is 2. 
Result so far: 130093.2
Subtracting 624 from 670 leaves us with 46.
Since there are no more digits in the dividend, we add a zero to the remainder making it 460, and continue the process.

Advancing to step 10:
312 can be fit into 460 1 times, resulting in a remainder of 148.
Use 1 as the next digit of our solution. 
Result so far: 130093.21
If we take 312 away from 460, we end up with 148.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1480, and continue the process.

Advancing to step 11:
1480 divided by 312 is 4 with a remainder of 232.
Use 4 as the next digit of our solution. 
Result so far: 130093.214
Subtract 1248 from 1480 to get 232.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2320, and continue the process.

Let's proceed to step 12:
2320 divided by 312 is 7 with a remainder of 136.
The next digit of our result is 7. 
Result so far: 130093.2147
Subtracting 2184 from 2320 leaves us with 136.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1360, and continue the process.

Going ahead to step 13:
312 goes into 1360 4 times with a remainder of 112.
Put 4 as the next digit of the answer. 
Result so far: 130093.21474
Subtract 1248 from 1360 to get 112.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1120, and continue the process.

Advancing to step 14:
The number 312 fits into 1120 3 times, leaving a remainder of 184.
Write down 3 as next digit of the result. 
Result so far: 130093.214743
Deduct 936 from 1120 and we're left with 184.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1840, and continue the process.

On to step 15:
312 can be fit into 1840 5 times, resulting in a remainder of 280.
Use 5 as the next digit of our solution. 
Result so far: 130093.2147435
If we take 1560 away from 1840, we end up with 280.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2800, and continue the process.

On to step 16:
If we divide 2800 by 312, we get 8 and a remainder of 304.
The next digit of our result is 8. 
Result so far: 130093.21474358
The remainder is 304 after subtracting 2496 from 2800.
Since there are no more digits in the dividend, we add a zero to the remainder making it 3040, and continue the process.

After the division, we end up with 130093.21474358 and a remainder of 3.04e-07.