We divide 40058 by 38
We want to divide 40058 by 38.

Advancing to step 1:
38 can be fit into 4 0 times, resulting in a remainder of 4.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Subtracting 0 from 4 leaves us with 4.
Take the next digit (0) from the dividend and append it to 4, then repeat: 40 / 38

Step 2:
When dividing 40 by 38, we get 1 with a remainder of 2.
Use 1 as the next digit of our solution. 
Result so far: 1.0
Subtracting 38 from 40 leaves us with 2.
Fetch the next digit (0) from the dividend, attach it to 2 and continue: 20 / 38

Moving on to step 3:
If we divide 20 by 38, we get 0 and a remainder of 20.
Put 0 as the next digit of the answer. 
Result so far: 10.0
Subtracting 0 from 20 leaves us with 20.
Grab the next digit (5) from the dividend, add it to 20, then carry on: 205 / 38

Advancing to step 4:
When dividing 205 by 38, we get 5 with a remainder of 15.
Record the quotient 5 as the next digit in the result. 
Result so far: 105.0
Subtract 190 from 205 to get 15.
Include the next digit (8) from the dividend after 15, then repeat: 158 / 38

Going ahead to step 5:
38 can be fit into 158 4 times, resulting in a remainder of 6.
Write down 4 as next digit of the result. 
Result so far: 1054.0
Subtract 152 from 158 to get 6.
Since there are no more digits in the dividend, we add a zero to the remainder making it 60, and continue the process.

On to step 6:
38 can be fit into 60 1 times, resulting in a remainder of 22.
Put 1 as the next digit of the answer. 
Result so far: 1054.1
If we take 38 away from 60, we end up with 22.
Since there are no more digits in the dividend, we add a zero to the remainder making it 220, and continue the process.

Moving on to step 7:
220 divided by 38 is 5 with a remainder of 30.
The number 5 becomes the next digit in our result. 
Result so far: 1054.15
If we subtract 190 from 220, we 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.

Going ahead to step 8:
If we divide 300 by 38, we get 7 and a remainder of 34.
Put 7 as the next digit of the answer. 
Result so far: 1054.157
Deduct 266 from 300 and we're left with 34.
Since there are no more digits in the dividend, we add a zero to the remainder making it 340, and continue the process.

Step 9:
340 divided by 38 is 8 with a remainder of 36.
Record the quotient 8 as the next digit in the result. 
Result so far: 1054.1578
Deduct 304 from 340 and we're left with 36.
Since there are no more digits in the dividend, we add a zero to the remainder making it 360, and continue the process.

Going ahead to step 10:
If we divide 360 by 38, we get 9 and a remainder of 18.
Put 9 as the next digit of the answer. 
Result so far: 1054.15789
Subtract 342 from 360 to get 18.
Since there are no more digits in the dividend, we add a zero to the remainder making it 180, and continue the process.

Moving on to step 11:
If we divide 180 by 38, we get 4 and a remainder of 28.
The number 4 becomes the next digit in our result. 
Result so far: 1054.157894
Subtract 152 from 180 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.

Let's proceed to step 12:
The number 38 fits into 280 7 times, leaving a remainder of 14.
The next digit of our result is 7. 
Result so far: 1054.1578947
If we subtract 266 from 280, we 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.

Step 13:
The number 38 fits into 140 3 times, leaving a remainder of 26.
The number 3 becomes the next digit in our result. 
Result so far: 1054.15789473
Subtract 114 from 140 to get 26.
Since there are no more digits in the dividend, we add a zero to the remainder making it 260, and continue the process.

In conclusion, the division gives 1054.15789473 with a balance of 2.6e-08.