Hi Arash,

Because when you use** (double)(4/x)** it firstly does **4/x** calculation and if the x is defined as integer the result will be integer too for example:
**4/5** will be calculated as **0**. But if the **
x **is defined as Double there will be no calculation error.

When you use **(double)4/x** system first casts **4** to double and then does the calculation and the calculation will be
**4.0/x**.