Let's divide 57790 by 40
The aim is to understand the frequency of 40 in 57790.

Step 1:
40 can be fit into 5 0 times, resulting in a remainder of 5.
Use 0 as the next digit of our solution. 
Result so far: 0.0
Subtract 0 from 5 to get 5.
Grab the next digit (7) from the dividend, add it to 5, then carry on: 57 / 40

Step 2:
If we divide 57 by 40, we get 1 and a remainder of 17.
The next digit of our result is 1. 
Result so far: 1.0
If we subtract 40 from 57, we get 17.
Include the next digit (7) from the dividend after 17, then repeat: 177 / 40

Step 3:
The number 40 fits into 177 4 times, leaving a remainder of 17.
Write down 4 as next digit of the result. 
Result so far: 14.0
The remainder is 17 after subtracting 160 from 177.
Fetch the next digit (9) from the dividend, attach it to 17 and continue: 179 / 40

Let's proceed to step 4:
The number 40 fits into 179 4 times, leaving a remainder of 19.
The number 4 becomes the next digit in our result. 
Result so far: 144.0
If we subtract 160 from 179, we get 19.
Bring next digit (0) of the dividend behind the 19 and repeat the process: 190 / 40

On to step 5:
The number 40 fits into 190 4 times, leaving a remainder of 30.
The next digit of our result is 4. 
Result so far: 1444.0
Deduct 160 from 190 and we're left with 30.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

Advancing to step 6:
If we divide 300 by 40, we get 7 and a remainder of 20.
Record the quotient 7 as the next digit in the result. 
Result so far: 1444.7
Deduct 280 from 300 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:
The number 40 fits into 200 5 times, leaving a remainder of 0.
Use 5 as the next digit of our solution. 
Result so far: 1444.75
Subtracting 200 from 200 leaves us with 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Let's proceed to step 8:
When dividing 0 by 40, we get 0 with a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 1444.75
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.

Let's proceed to step 9:
40 goes into 0 0 times with a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 1444.75
If we subtract 0 from 0, we 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.

The final outcome is 1444.75, with a leftover of 0.0.