We look at the division of 586790 by 40 
We want to figure out the number of times 586790 can be divided by 40.

Going ahead to step 1:
40 goes into 5 0 times with a remainder of 5.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
If we take 0 away from 5, we end up with 5.
Bring next digit (8) of the dividend behind the 5 and repeat the process: 58 / 40

Step 2:
58 divided by 40 is 1 with a remainder of 18.
The number 1 becomes the next digit in our result. 
Result so far: 1.0
If we subtract 40 from 58, we get 18.
Include the next digit (6) from the dividend after 18, then repeat: 186 / 40

Advancing to step 3:
If we divide 186 by 40, we get 4 and a remainder of 26.
Use 4 as the next digit of our solution. 
Result so far: 14.0
If we take 160 away from 186, we end up with 26.
Take the next digit (7) from the dividend and append it to 26, then repeat: 267 / 40

Let's proceed to step 4:
The number 40 fits into 267 6 times, leaving a remainder of 27.
Put 6 as the next digit of the answer. 
Result so far: 146.0
If we subtract 240 from 267, we get 27.
Append the next digit (9) from the dividend to 27 and continue with: 279 / 40

Step 5:
40 can be fit into 279 6 times, resulting in a remainder of 39.
The number 6 becomes the next digit in our result. 
Result so far: 1466.0
Subtract 240 from 279 to get 39.
Fetch the next digit (0) from the dividend, attach it to 39 and continue: 390 / 40

Advancing to step 6:
The number 40 fits into 390 9 times, leaving a remainder of 30.
The next digit of our result is 9. 
Result so far: 14669.0
If we take 360 away from 390, we end up with 30.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

Advancing to step 7:
The number 40 fits into 300 7 times, leaving a remainder of 20.
Write down 7 as next digit of the result. 
Result so far: 14669.7
Subtract 280 from 300 to get 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

On to step 8:
The number 40 fits into 200 5 times, leaving a remainder of 0.
The next digit of our result is 5. 
Result so far: 14669.75
The remainder is 0 after subtracting 200 from 200.
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:
When dividing 0 by 40, we get 0 with a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 14669.75
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.

Moving on to step 10:
0 divided by 40 is 0 with a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 14669.75
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.

In conclusion, the division gives 14669.75 with a balance of 0.0.