We look at the division of 840787 by 38 
We're looking to find how many times 38 goes into 840787.

On to step 1:
The number 38 fits into 8 0 times, leaving a remainder of 8.
The next digit of our result is 0. 
Result so far: 0.0
Deduct 0 from 8 and we're left with 8.
Bring next digit (4) of the dividend behind the 8 and repeat the process: 84 / 38

Step 2:
38 goes into 84 2 times with a remainder of 8.
Write down 2 as next digit of the result. 
Result so far: 2.0
Subtracting 76 from 84 leaves us with 8.
Grab the next digit (0) from the dividend, add it to 8, then carry on: 80 / 38

On to step 3:
When dividing 80 by 38, we get 2 with a remainder of 4.
The number 2 becomes the next digit in our result. 
Result so far: 22.0
Deduct 76 from 80 and we're left with 4.
Append the next digit (7) from the dividend to 4 and continue with: 47 / 38

Moving on to step 4:
When dividing 47 by 38, we get 1 with a remainder of 9.
Record the quotient 1 as the next digit in the result. 
Result so far: 221.0
Subtract 38 from 47 to get 9.
Bring next digit (8) of the dividend behind the 9 and repeat the process: 98 / 38

Moving on to step 5:
38 can be fit into 98 2 times, resulting in a remainder of 22.
Record the quotient 2 as the next digit in the result. 
Result so far: 2212.0
If we take 76 away from 98, we end up with 22.
Fetch the next digit (7) from the dividend, attach it to 22 and continue: 227 / 38

On to step 6:
If we divide 227 by 38, we get 5 and a remainder of 37.
Use 5 as the next digit of our solution. 
Result so far: 22125.0
If we take 190 away from 227, we end up with 37.
Since there are no more digits in the dividend, we add a zero to the remainder making it 370, and continue the process.

On to step 7:
When dividing 370 by 38, we get 9 with a remainder of 28.
The number 9 becomes the next digit in our result. 
Result so far: 22125.9
If we take 342 away from 370, we end up with 28.
Since there are no more digits in the dividend, we add a zero to the remainder making it 280, and continue the process.

On to step 8:
38 can be fit into 280 7 times, resulting in a remainder of 14.
Write down 7 as next digit of the result. 
Result so far: 22125.97
The remainder is 14 after subtracting 266 from 280.
Since there are no more digits in the dividend, we add a zero to the remainder making it 140, and continue the process.

Going ahead to step 9:
The number 38 fits into 140 3 times, leaving a remainder of 26.
Use 3 as the next digit of our solution. 
Result so far: 22125.973
Subtract 114 from 140 to get 26.
Since there are no more digits in the dividend, we add a zero to the remainder making it 260, and continue the process.

Advancing to step 10:
The number 38 fits into 260 6 times, leaving a remainder of 32.
Use 6 as the next digit of our solution. 
Result so far: 22125.9736
If we take 228 away from 260, we end up with 32.
Since there are no more digits in the dividend, we add a zero to the remainder making it 320, and continue the process.

Let's proceed to step 11:
If we divide 320 by 38, we get 8 and a remainder of 16.
The number 8 becomes the next digit in our result. 
Result so far: 22125.97368
If we subtract 304 from 320, 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.

Moving on to step 12:
If we divide 160 by 38, we get 4 and a remainder of 8.
Use 4 as the next digit of our solution. 
Result so far: 22125.973684
If we take 152 away from 160, we end up with 8.
Since there are no more digits in the dividend, we add a zero to the remainder making it 80, and continue the process.

Advancing to step 13:
80 divided by 38 is 2 with a remainder of 4.
Write down 2 as next digit of the result. 
Result so far: 22125.9736842
Subtract 76 from 80 to get 4.
Since there are no more digits in the dividend, we add a zero to the remainder making it 40, and continue the process.

Let's proceed to step 14:
38 can be fit into 40 1 times, resulting in a remainder of 2.
The next digit of our result is 1. 
Result so far: 22125.97368421
If we subtract 38 from 40, we get 2.
Since there are no more digits in the dividend, we add a zero to the remainder making it 20, and continue the process.

The final result is 22125.97368421 with a remainder of 2e-09.