fact=fact*n;if(fact==0) fact=1.0;else fact=n;
fact = fact * n;if ( fact == 0 ) return 1.0;else return n;
(fact *= n) == 0 ? 1.0 : n;