We're dividing 987587 by 31 
We want to divide 987587 by 31.

Step 1:
9 divided by 31 is 0 with a remainder of 9.
Put 0 as the next digit of the answer. 
Result so far: 0.0
The remainder is 9 after subtracting 0 from 9.
Bring next digit (8) of the dividend behind the 9 and repeat the process: 98 / 31

Moving on to step 2:
If we divide 98 by 31, we get 3 and a remainder of 5.
Use 3 as the next digit of our solution. 
Result so far: 3.0
Deduct 93 from 98 and we're left with 5.
Take the next digit (7) from the dividend and append it to 5, then repeat: 57 / 31

Moving on to step 3:
The number 31 fits into 57 1 times, leaving a remainder of 26.
Use 1 as the next digit of our solution. 
Result so far: 31.0
If we subtract 31 from 57, we get 26.
Fetch the next digit (5) from the dividend, attach it to 26 and continue: 265 / 31

Let's proceed to step 4:
31 can be fit into 265 8 times, resulting in a remainder of 17.
Write down 8 as next digit of the result. 
Result so far: 318.0
Subtract 248 from 265 to get 17.
Take the next digit (8) from the dividend and append it to 17, then repeat: 178 / 31

Step 5:
178 divided by 31 is 5 with a remainder of 23.
The next digit of our result is 5. 
Result so far: 3185.0
If we take 155 away from 178, we end up with 23.
Append the next digit (7) from the dividend to 23 and continue with: 237 / 31

On to step 6:
237 divided by 31 is 7 with a remainder of 20.
The number 7 becomes the next digit in our result. 
Result so far: 31857.0
Deduct 217 from 237 and we're left with 20.
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 7:
31 goes into 200 6 times with a remainder of 14.
Put 6 as the next digit of the answer. 
Result so far: 31857.6
Subtract 186 from 200 to get 14.
Since there are no more digits in the dividend, we add a zero to the remainder making it 140, and continue the process.

On to step 8:
When dividing 140 by 31, we get 4 with a remainder of 16.
Write down 4 as next digit of the result. 
Result so far: 31857.64
Subtracting 124 from 140 leaves us with 16.
Since there are no more digits in the dividend, we add a zero to the remainder making it 160, and continue the process.

Let's proceed to step 9:
31 can be fit into 160 5 times, resulting in a remainder of 5.
Write down 5 as next digit of the result. 
Result so far: 31857.645
If we take 155 away from 160, we end up with 5.
Since there are no more digits in the dividend, we add a zero to the remainder making it 50, and continue the process.

Advancing to step 10:
When dividing 50 by 31, we get 1 with a remainder of 19.
The next digit of our result is 1. 
Result so far: 31857.6451
Subtract 31 from 50 to get 19.
Since there are no more digits in the dividend, we add a zero to the remainder making it 190, and continue the process.

On to step 11:
The number 31 fits into 190 6 times, leaving a remainder of 4.
The next digit of our result is 6. 
Result so far: 31857.64516
Subtract 186 from 190 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.

Advancing to step 12:
31 goes into 40 1 times with a remainder of 9.
Write down 1 as next digit of the result. 
Result so far: 31857.645161
Subtract 31 from 40 to get 9.
Since there are no more digits in the dividend, we add a zero to the remainder making it 90, and continue the process.

Step 13:
If we divide 90 by 31, we get 2 and a remainder of 28.
Record the quotient 2 as the next digit in the result. 
Result so far: 31857.6451612
If we take 62 away from 90, 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.

Going ahead to step 14:
280 divided by 31 is 9 with a remainder of 1.
The next digit of our result is 9. 
Result so far: 31857.64516129
Subtracting 279 from 280 leaves us with 1.
Since there are no more digits in the dividend, we add a zero to the remainder making it 10, and continue the process.

The final result is 31857.64516129 with a remainder of 1e-09.