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

Advancing to step 1:
4 divided by 51 is 0 with a remainder of 4.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
The remainder is 4 after subtracting 0 from 4.
Take the next digit (0) from the dividend and append it to 4, then repeat: 40 / 51

Moving on to step 2:
40 divided by 51 is 0 with a remainder of 40.
Write down 0 as next digit of the result. 
Result so far: 0.0
The remainder is 40 after subtracting 0 from 40.
Take the next digit (6) from the dividend and append it to 40, then repeat: 406 / 51

Moving on to step 3:
51 can be fit into 406 7 times, resulting in a remainder of 49.
Put 7 as the next digit of the answer. 
Result so far: 7.0
Subtracting 357 from 406 leaves us with 49.
Fetch the next digit (8) from the dividend, attach it to 49 and continue: 498 / 51

On to step 4:
When dividing 498 by 51, we get 9 with a remainder of 39.
The next digit of our result is 9. 
Result so far: 79.0
Deduct 459 from 498 and we're left with 39.
Include the next digit (7) from the dividend after 39, then repeat: 397 / 51

Step 5:
When dividing 397 by 51, we get 7 with a remainder of 40.
Put 7 as the next digit of the answer. 
Result so far: 797.0
The remainder is 40 after subtracting 357 from 397.
Since there are no more digits in the dividend, we add a zero to the remainder making it 400, and continue the process.

Step 6:
51 can be fit into 400 7 times, resulting in a remainder of 43.
Write down 7 as next digit of the result. 
Result so far: 797.7
If we subtract 357 from 400, we get 43.
Since there are no more digits in the dividend, we add a zero to the remainder making it 430, and continue the process.

Advancing to step 7:
If we divide 430 by 51, we get 8 and a remainder of 22.
The number 8 becomes the next digit in our result. 
Result so far: 797.78
The remainder is 22 after subtracting 408 from 430.
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 8:
220 divided by 51 is 4 with a remainder of 16.
Write down 4 as next digit of the result. 
Result so far: 797.784
The remainder is 16 after subtracting 204 from 220.
Since there are no more digits in the dividend, we add a zero to the remainder making it 160, and continue the process.

Going ahead to step 9:
51 can be fit into 160 3 times, resulting in a remainder of 7.
Put 3 as the next digit of the answer. 
Result so far: 797.7843
The remainder is 7 after subtracting 153 from 160.
Since there are no more digits in the dividend, we add a zero to the remainder making it 70, and continue the process.

Advancing to step 10:
51 goes into 70 1 times with a remainder of 19.
The next digit of our result is 1. 
Result so far: 797.78431
The remainder is 19 after subtracting 51 from 70.
Since there are no more digits in the dividend, we add a zero to the remainder making it 190, and continue the process.

Advancing to step 11:
51 goes into 190 3 times with a remainder of 37.
The number 3 becomes the next digit in our result. 
Result so far: 797.784313
Deduct 153 from 190 and we're left with 37.
Since there are no more digits in the dividend, we add a zero to the remainder making it 370, and continue the process.

On to step 12:
The number 51 fits into 370 7 times, leaving a remainder of 13.
The number 7 becomes the next digit in our result. 
Result so far: 797.7843137
The remainder is 13 after subtracting 357 from 370.
Since there are no more digits in the dividend, we add a zero to the remainder making it 130, and continue the process.

Going ahead to step 13:
130 divided by 51 is 2 with a remainder of 28.
Record the quotient 2 as the next digit in the result. 
Result so far: 797.78431372
Subtract 102 from 130 to get 28.
Since there are no more digits in the dividend, we add a zero to the remainder making it 280, and continue the process.

The final result is 797.78431372 with a remainder of 2.8e-08.