c and java arithmetic expression and parenthesis <p>can anyone help me to understand how are translated this 2 expression:</p> <p>FIRST</p> <pre><code>double val = 1/(b-1)/t*log(x1/x2); </code></pre> <p>I have broke it with some c in many parts, but I have 2 different results:</p> <pre><code>double val2 = ( 1/(b-1) ) / ( t*log(x1/x2) ); double b,t,x1,x2; b= 0.1; t= 0.2; x1 = 0.3; x2=0.4; double val = 1/(b-1)/t*log(x1/x2); printf ("%1.4e",val); double val2 = ( 1/(b-1) ) / ( t*log(x1/x2) ); printf ("%1.4e",val2); if(val!=val2){ printf("different!"); }else printf("its ok"); return 0; </code></pre> <p>SECOND QUESTION: Are there many differences of precision from double in c and java for very low order numbers? </p> <p>Thank you.</p>