We divide 798146 by 40
We want to figure out the number of times 798146 can be divided by 40.

Let's proceed to step 1:
When dividing 7 by 40, we get 0 with a remainder of 7.
The next digit of our result is 0. 
Result so far: 0.0
The remainder is 7 after subtracting 0 from 7.
Append the next digit (9) from the dividend to 7 and continue with: 79 / 40

Step 2:
40 goes into 79 1 times with a remainder of 39.
Record the quotient 1 as the next digit in the result. 
Result so far: 1.0
Subtract 40 from 79 to get 39.
Take the next digit (8) from the dividend and append it to 39, then repeat: 398 / 40

Moving on to step 3:
The number 40 fits into 398 9 times, leaving a remainder of 38.
Use 9 as the next digit of our solution. 
Result so far: 19.0
If we subtract 360 from 398, we get 38.
Take the next digit (1) from the dividend and append it to 38, then repeat: 381 / 40

Step 4:
40 goes into 381 9 times with a remainder of 21.
Put 9 as the next digit of the answer. 
Result so far: 199.0
If we subtract 360 from 381, we get 21.
Append the next digit (4) from the dividend to 21 and continue with: 214 / 40

Advancing to step 5:
When dividing 214 by 40, we get 5 with a remainder of 14.
Use 5 as the next digit of our solution. 
Result so far: 1995.0
The remainder is 14 after subtracting 200 from 214.
Include the next digit (6) from the dividend after 14, then repeat: 146 / 40

On to step 6:
146 divided by 40 is 3 with a remainder of 26.
Use 3 as the next digit of our solution. 
Result so far: 19953.0
If we subtract 120 from 146, we 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.

Step 7:
40 goes into 260 6 times with a remainder of 20.
Write down 6 as next digit of the result. 
Result so far: 19953.6
The remainder is 20 after subtracting 240 from 260.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

Let's proceed to step 8:
40 goes into 200 5 times with a remainder of 0.
Write down 5 as next digit of the result. 
Result so far: 19953.65
If we subtract 200 from 200, we get 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Advancing to step 9:
40 goes into 0 0 times with a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 19953.65
Subtract 0 from 0 to get 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Advancing to step 10:
40 can be fit into 0 0 times, resulting in a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 19953.65
The remainder is 0 after subtracting 0 from 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

The final result is 19953.65 with a remainder of 0.0.