i have two different programs that compare float and double variales and gives output , i shown that below : 1. #include main() { int r; float f=22.5; double d=22.5; r=(f==d); printf("r=%d",r); } **Output:- r=1** 2. #include main() { int r; float f=22.7; double d=22.7; r=(f==d); printf("r=%d",r); } **Output:- r=0** why this happen that for 22.5 both are same and gives o/p 1 and 22.7 both (f & d) are different and gives o/p 0 +0 Hello, I wrote a library for arbitrary precision arithmetic recently and spent a long time implementing efficient multiplication algorithms. Now I am looking to see if it is possible for me to optimize anywhere else. One place that I thought should be more optimizeable is my division algorithm. Right now I use (hiding some internal implementation stuff): Int divide(Int numerator, Int denominator)const { if (denominator==0) return DIVIDE_BY_ZERO_ERROR; if (numerator==0) return 0; if (numerator.sign()!=denominator.sign())//result is negative return -((-numerator)/denominator); if (numerator==denominator) return 1; Int num=numerator.abs(); Int den=denominator.abs(); Int ret=0; while (num>den) { ret++; num-=den; } return ret; } Which is fairly slow, … +0 Solved +0 I need to calculate chi squared cdf from x->infinity with n=255 degrees of freedom. I cannot seem to get it to work. You can find formulae for chi squared distributions using google. Here is my non-functional approximation code: double riemannsum(double(*fnc)(double),double dx, double xmin, double xmax) { double ret=0; double x=xmin; while (x

The End.