We're dividing 118586 by 40 
We want to figure out the number of times 118586 can be divided by 40.

Step 1:
1 divided by 40 is 0 with a remainder of 1.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
If we take 0 away from 1, we end up with 1.
Grab the next digit (1) from the dividend, add it to 1, then carry on: 11 / 40

Going ahead to step 2:
40 can be fit into 11 0 times, resulting in a remainder of 11.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
If we take 0 away from 11, we end up with 11.
Fetch the next digit (8) from the dividend, attach it to 11 and continue: 118 / 40

Moving on to step 3:
When dividing 118 by 40, we get 2 with a remainder of 38.
The number 2 becomes the next digit in our result. 
Result so far: 2.0
If we take 80 away from 118, we end up with 38.
Take the next digit (5) from the dividend and append it to 38, then repeat: 385 / 40

Moving on to step 4:
The number 40 fits into 385 9 times, leaving a remainder of 25.
Record the quotient 9 as the next digit in the result. 
Result so far: 29.0
Subtracting 360 from 385 leaves us with 25.
Take the next digit (8) from the dividend and append it to 25, then repeat: 258 / 40

Moving on to step 5:
The number 40 fits into 258 6 times, leaving a remainder of 18.
The number 6 becomes the next digit in our result. 
Result so far: 296.0
Subtracting 240 from 258 leaves us with 18.
Include the next digit (6) from the dividend after 18, then repeat: 186 / 40

Moving on to step 6:
186 divided by 40 is 4 with a remainder of 26.
The next digit of our result is 4. 
Result so far: 2964.0
Subtracting 160 from 186 leaves us with 26.
Since there are no more digits in the dividend, we add a zero to the remainder making it 260, and continue the process.

Going ahead to step 7:
40 can be fit into 260 6 times, resulting in a remainder of 20.
Put 6 as the next digit of the answer. 
Result so far: 2964.6
If we take 240 away from 260, we end up 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.

Step 8:
200 divided by 40 is 5 with a remainder of 0.
The number 5 becomes the next digit in our result. 
Result so far: 2964.65
Subtract 200 from 200 to 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.

Moving on to step 9:
40 can be fit into 0 0 times, resulting in a remainder of 0.
Use 0 as the next digit of our solution. 
Result so far: 2964.65
Subtract 0 from 0 to 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.

Step 10:
40 can be fit into 0 0 times, resulting in a remainder of 0.
The next digit of our result is 0. 
Result so far: 2964.65
Subtract 0 from 0 to 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.

In conclusion, the division gives 2964.65 with a balance of 0.0.