Simple equation not working. rad = ((oppl/hypl)*(M_PI/180));

 
  rad = ((oppl/hypl)*(M_PI/180));
 
gouki1001:
  rad = ((oppl/hypl)*(M_PI/180));

How do you know it doesn't work?

Check the variables values separately and compare them with rad's variable value at the same time.
 
Arash Lakzadeh:

How do you know it doesn't work?

Check the variables values separately and compare them with rad's variable value at the same time.

I know mql havs 

/

Quotient of division



and

%

Residue of division

 Im trying to find a function to the the real numbers as outut not just the remainder or the whole numbers of the quotient.  

 
gouki1001:
  rad = ((oppl/hypl)*(M_PI/180));


rad = (oppl/hypl)*M_PI/180;

 
gouki1001:

I know mql havs 

/

Quotient of division



and

%

Residue of division

 Im trying to find a function to the the real numbers as outut not just the remainder or the whole numbers of the quotient.  

Go from the division formula

D = d*q + r

if you know dividend D(real), divisor d(real) and remainder q(integer) you get the rest (real) r = D - d*q

 
paul selvan:

Go from the division formula

D = d*q + r

if you know dividend D(real), divisor d(real) and remainder q(integer) you get the rest (real) r = D - d*q

The problem is that MQL4 doesnt have a powerful enuff arithmetic unit. Sin Cos and Tan Trigonometric functions dont work well.

 

I don't know if this help. But whenever i stumble across this kind of equation in my coding, I'll make sure all parameters is in "double" types.

Then, if "division" is involve in calculation, you need to make sure numerator (oppl && M_PI) is not equal to zero.

Hope this help.