We divide 40157 by 37
Our goal is to divide 40157 by 37.

On to step 1:
If we divide 4 by 37, we get 0 and a remainder of 4.
Use 0 as the next digit of our solution. 
Result so far: 0.0
Subtract 0 from 4 to get 4.
Append the next digit (0) from the dividend to 4 and continue with: 40 / 37

Advancing to step 2:
37 can be fit into 40 1 times, resulting in a remainder of 3.
The number 1 becomes the next digit in our result. 
Result so far: 1.0
Subtract 37 from 40 to get 3.
Fetch the next digit (1) from the dividend, attach it to 3 and continue: 31 / 37

Going ahead to step 3:
The number 37 fits into 31 0 times, leaving a remainder of 31.
Put 0 as the next digit of the answer. 
Result so far: 10.0
Deduct 0 from 31 and we're left with 31.
Fetch the next digit (5) from the dividend, attach it to 31 and continue: 315 / 37

Step 4:
The number 37 fits into 315 8 times, leaving a remainder of 19.
Put 8 as the next digit of the answer. 
Result so far: 108.0
If we subtract 296 from 315, we get 19.
Grab the next digit (7) from the dividend, add it to 19, then carry on: 197 / 37

Moving on to step 5:
If we divide 197 by 37, we get 5 and a remainder of 12.
Use 5 as the next digit of our solution. 
Result so far: 1085.0
If we subtract 185 from 197, we get 12.
Since there are no more digits in the dividend, we add a zero to the remainder making it 120, and continue the process.

Step 6:
37 goes into 120 3 times with a remainder of 9.
Write down 3 as next digit of the result. 
Result so far: 1085.3
Subtract 111 from 120 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.

Moving on to step 7:
When dividing 90 by 37, we get 2 with a remainder of 16.
The number 2 becomes the next digit in our result. 
Result so far: 1085.32
Subtract 74 from 90 to get 16.
Since there are no more digits in the dividend, we add a zero to the remainder making it 160, and continue the process.

Step 8:
160 divided by 37 is 4 with a remainder of 12.
Put 4 as the next digit of the answer. 
Result so far: 1085.324
If we take 148 away from 160, we end up with 12.
Since there are no more digits in the dividend, we add a zero to the remainder making it 120, and continue the process.

Let's proceed to step 9:
The number 37 fits into 120 3 times, leaving a remainder of 9.
Record the quotient 3 as the next digit in the result. 
Result so far: 1085.3243
If we subtract 111 from 120, we 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.

Advancing to step 10:
37 can be fit into 90 2 times, resulting in a remainder of 16.
Put 2 as the next digit of the answer. 
Result so far: 1085.32432
Subtracting 74 from 90 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.

Advancing to step 11:
The number 37 fits into 160 4 times, leaving a remainder of 12.
The number 4 becomes the next digit in our result. 
Result so far: 1085.324324
Deduct 148 from 160 and we're left with 12.
Since there are no more digits in the dividend, we add a zero to the remainder making it 120, and continue the process.

On to step 12:
If we divide 120 by 37, we get 3 and a remainder of 9.
The number 3 becomes the next digit in our result. 
Result so far: 1085.3243243
Deduct 111 from 120 and we're left with 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 37, we get 2 and a remainder of 16.
The next digit of our result is 2. 
Result so far: 1085.32432432
Subtracting 74 from 90 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.

The final result is 1085.32432432 with a remainder of 1.6e-08.