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

Advancing to step 1:
When dividing 4 by 789, we get 0 with a remainder of 4.
Put 0 as the next digit of the answer. 
Result so far: 0.0
If we subtract 0 from 4, we get 4.
Bring next digit (0) of the dividend behind the 4 and repeat the process: 40 / 789

Moving on to step 2:
If we divide 40 by 789, we get 0 and a remainder of 40.
Use 0 as the next digit of our solution. 
Result so far: 0.0
The remainder is 40 after subtracting 0 from 40.
Fetch the next digit (7) from the dividend, attach it to 40 and continue: 407 / 789

Let's proceed to step 3:
789 goes into 407 0 times with a remainder of 407.
Write down 0 as next digit of the result. 
Result so far: 0.0
Subtract 0 from 407 to get 407.
Append the next digit (8) from the dividend to 407 and continue with: 4078 / 789

Step 4:
When dividing 4078 by 789, we get 5 with a remainder of 133.
Put 5 as the next digit of the answer. 
Result so far: 5.0
If we subtract 3945 from 4078, we get 133.
Include the next digit (4) from the dividend after 133, then repeat: 1334 / 789

Let's proceed to step 5:
789 goes into 1334 1 times with a remainder of 545.
Record the quotient 1 as the next digit in the result. 
Result so far: 51.0
Deduct 789 from 1334 and we're left with 545.
Bring next digit (4) of the dividend behind the 545 and repeat the process: 5454 / 789

On to step 6:
When dividing 5454 by 789, we get 6 with a remainder of 720.
Write down 6 as next digit of the result. 
Result so far: 516.0
If we subtract 4734 from 5454, we get 720.
Include the next digit (0) from the dividend after 720, then repeat: 7200 / 789

Let's proceed to step 7:
If we divide 7200 by 789, we get 9 and a remainder of 99.
Record the quotient 9 as the next digit in the result. 
Result so far: 5169.0
Subtract 7101 from 7200 to get 99.
Bring next digit (1) of the dividend behind the 99 and repeat the process: 991 / 789

Going ahead to step 8:
789 goes into 991 1 times with a remainder of 202.
Write down 1 as next digit of the result. 
Result so far: 51691.0
The remainder is 202 after subtracting 789 from 991.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2020, and continue the process.

Going ahead to step 9:
789 goes into 2020 2 times with a remainder of 442.
The number 2 becomes the next digit in our result. 
Result so far: 51691.2
If we take 1578 away from 2020, we end up with 442.
Since there are no more digits in the dividend, we add a zero to the remainder making it 4420, and continue the process.

Going ahead to step 10:
If we divide 4420 by 789, we get 5 and a remainder of 475.
The next digit of our result is 5. 
Result so far: 51691.25
If we take 3945 away from 4420, we end up with 475.
Since there are no more digits in the dividend, we add a zero to the remainder making it 4750, and continue the process.

Going ahead to step 11:
If we divide 4750 by 789, we get 6 and a remainder of 16.
The next digit of our result is 6. 
Result so far: 51691.256
The remainder is 16 after subtracting 4734 from 4750.
Since there are no more digits in the dividend, we add a zero to the remainder making it 160, and continue the process.

Step 12:
160 divided by 789 is 0 with a remainder of 160.
The next digit of our result is 0. 
Result so far: 51691.256
If we take 0 away from 160, we end up with 160.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1600, and continue the process.

Let's proceed to step 13:
When dividing 1600 by 789, we get 2 with a remainder of 22.
Record the quotient 2 as the next digit in the result. 
Result so far: 51691.25602
Subtracting 1578 from 1600 leaves us 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.

Let's proceed to step 14:
When dividing 220 by 789, we get 0 with a remainder of 220.
The next digit of our result is 0. 
Result so far: 51691.25602
The remainder is 220 after subtracting 0 from 220.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2200, and continue the process.

Advancing to step 15:
When dividing 2200 by 789, we get 2 with a remainder of 622.
The next digit of our result is 2. 
Result so far: 51691.2560202
If we take 1578 away from 2200, we end up with 622.
Since there are no more digits in the dividend, we add a zero to the remainder making it 6220, and continue the process.

Moving on to step 16:
The number 789 fits into 6220 7 times, leaving a remainder of 697.
Record the quotient 7 as the next digit in the result. 
Result so far: 51691.25602027
If we take 5523 away from 6220, we end up with 697.
Since there are no more digits in the dividend, we add a zero to the remainder making it 6970, and continue the process.

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