Let's divide 80587 by 40
We want to divide 80587 by 40.

Advancing to step 1:
40 can be fit into 8 0 times, resulting in a remainder of 8.
The next digit of our result is 0. 
Result so far: 0.0
If we take 0 away from 8, we end up with 8.
Include the next digit (0) from the dividend after 8, then repeat: 80 / 40

Advancing to step 2:
If we divide 80 by 40, we get 2 and a remainder of 0.
Put 2 as the next digit of the answer. 
Result so far: 2.0
Deduct 80 from 80 and we're left with 0.
Grab the next digit (5) from the dividend, add it to 0, then carry on: 5 / 40

Let's proceed to step 3:
When dividing 5 by 40, we get 0 with a remainder of 5.
The next digit of our result is 0. 
Result so far: 20.0
Subtract 0 from 5 to get 5.
Fetch the next digit (8) from the dividend, attach it to 5 and continue: 58 / 40

On to step 4:
When dividing 58 by 40, we get 1 with a remainder of 18.
Use 1 as the next digit of our solution. 
Result so far: 201.0
If we subtract 40 from 58, we get 18.
Include the next digit (7) from the dividend after 18, then repeat: 187 / 40

Moving on to step 5:
When dividing 187 by 40, we get 4 with a remainder of 27.
Use 4 as the next digit of our solution. 
Result so far: 2014.0
The remainder is 27 after subtracting 160 from 187.
Since there are no more digits in the dividend, we add a zero to the remainder making it 270, and continue the process.

Advancing to step 6:
The number 40 fits into 270 6 times, leaving a remainder of 30.
Record the quotient 6 as the next digit in the result. 
Result so far: 2014.6
Subtract 240 from 270 to get 30.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

Moving on to step 7:
The number 40 fits into 300 7 times, leaving a remainder of 20.
The number 7 becomes the next digit in our result. 
Result so far: 2014.67
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.

Moving on to step 8:
When dividing 200 by 40, we get 5 with a remainder of 0.
The next digit of our result is 5. 
Result so far: 2014.675
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.

Let's proceed to step 9:
If we divide 0 by 40, we get 0 and a remainder of 0.
Use 0 as the next digit of our solution. 
Result so far: 2014.675
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.

Step 10:
The number 40 fits into 0 0 times, leaving a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 2014.675
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.

After the division, we end up with 2014.675 and a remainder of 0.0.