We're dividing 870742 by 42 
The aim is to understand the frequency of 42 in 870742.

On to step 1:
If we divide 8 by 42, we get 0 and a remainder of 8.
Put 0 as the next digit of the answer. 
Result so far: 0.0
The remainder is 8 after subtracting 0 from 8.
Take the next digit (7) from the dividend and append it to 8, then repeat: 87 / 42

On to step 2:
87 divided by 42 is 2 with a remainder of 3.
Record the quotient 2 as the next digit in the result. 
Result so far: 2.0
Subtracting 84 from 87 leaves us with 3.
Take the next digit (0) from the dividend and append it to 3, then repeat: 30 / 42

Going ahead to step 3:
When dividing 30 by 42, we get 0 with a remainder of 30.
Record the quotient 0 as the next digit in the result. 
Result so far: 20.0
Subtracting 0 from 30 leaves us with 30.
Take the next digit (7) from the dividend and append it to 30, then repeat: 307 / 42

Advancing to step 4:
When dividing 307 by 42, we get 7 with a remainder of 13.
Put 7 as the next digit of the answer. 
Result so far: 207.0
Subtracting 294 from 307 leaves us with 13.
Fetch the next digit (4) from the dividend, attach it to 13 and continue: 134 / 42

Step 5:
42 goes into 134 3 times with a remainder of 8.
Write down 3 as next digit of the result. 
Result so far: 2073.0
The remainder is 8 after subtracting 126 from 134.
Grab the next digit (2) from the dividend, add it to 8, then carry on: 82 / 42

Moving on to step 6:
If we divide 82 by 42, we get 1 and a remainder of 40.
The next digit of our result is 1. 
Result so far: 20731.0
Subtract 42 from 82 to get 40.
Since there are no more digits in the dividend, we add a zero to the remainder making it 400, and continue the process.

Advancing to step 7:
The number 42 fits into 400 9 times, leaving a remainder of 22.
The next digit of our result is 9. 
Result so far: 20731.9
The remainder is 22 after subtracting 378 from 400.
Since there are no more digits in the dividend, we add a zero to the remainder making it 220, and continue the process.

Going ahead to step 8:
42 goes into 220 5 times with a remainder of 10.
The number 5 becomes the next digit in our result. 
Result so far: 20731.95
Subtract 210 from 220 to get 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

Going ahead to step 9:
100 divided by 42 is 2 with a remainder of 16.
The number 2 becomes the next digit in our result. 
Result so far: 20731.952
If we subtract 84 from 100, we get 16.
Since there are no more digits in the dividend, we add a zero to the remainder making it 160, and continue the process.

Advancing to step 10:
42 can be fit into 160 3 times, resulting in a remainder of 34.
The next digit of our result is 3. 
Result so far: 20731.9523
If we take 126 away from 160, we end up with 34.
Since there are no more digits in the dividend, we add a zero to the remainder making it 340, and continue the process.

On to step 11:
340 divided by 42 is 8 with a remainder of 4.
Write down 8 as next digit of the result. 
Result so far: 20731.95238
Subtracting 336 from 340 leaves us with 4.
Since there are no more digits in the dividend, we add a zero to the remainder making it 40, and continue the process.

Moving on to step 12:
40 divided by 42 is 0 with a remainder of 40.
The next digit of our result is 0. 
Result so far: 20731.95238
Subtracting 0 from 40 leaves us with 40.
Since there are no more digits in the dividend, we add a zero to the remainder making it 400, and continue the process.

Moving on to step 13:
42 can be fit into 400 9 times, resulting in a remainder of 22.
Use 9 as the next digit of our solution. 
Result so far: 20731.9523809
Deduct 378 from 400 and we're left with 22.
Since there are no more digits in the dividend, we add a zero to the remainder making it 220, and continue the process.

On to step 14:
220 divided by 42 is 5 with a remainder of 10.
Record the quotient 5 as the next digit in the result. 
Result so far: 20731.95238095
If we take 210 away from 220, we end up with 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

In conclusion, the division gives 20731.95238095 with a balance of 1e-08.