bool MM () { double rsTR, rsPR, rsLG; long lsTR, lsPR, lsLG; rsTR = TR (); rsPR = log10C (PR32 (D2B (pow (2, rsTR)), Odd_), rsTR); rsLG = log10C (rsTR, PR32 (D2B (rsTR), Odd_)); lsTR = D2B (rsTR); lsPR = D2B (rsPR); lsLG = D2B (rsLG); unsigned long l = 0xAC1DFACEL; struct int_sqrt q, m; US (l, &q); unsigned long rZ = lsTR + q.sqrt + lsPR + lsLG; if (construct (rZ) == true) { return (true); } else { return (false); }; }
main(int argc, char *argv[]) { double f, lf; char *dummy; while (--argc) { f = strtod((const char *)(*(++argv)), &dummy); if (0.0 == f) { puts("0! = 0"); continue; } if (-1.0 == (lf = log10factorial(f))) { printf(">>> ERROR: %g! is not a valid expression\n", f); continue; } if (171.0 > f) printf("%.14g! = %.14g\n", f, pow(10.0, lf)); else { printf("%.14g! = %.14ge+%ld\n", f, pow(10.0, dfrac(lf)), (long)dround(lf)); } } lf = log10C(1000000L,750000L); printf("\nJust to dazzle with you with big numbers:\n" "C(1000000,750000) = %.14ge+%ld\n", pow(10.0, dfrac(lf)), (long)dround(lf)); lf = log10P(1000000L,750000L); printf("\n...once more:\n" "P(1000000,750000) = %.14ge+%ld\n", pow(10.0, dfrac(lf)), (long)dround(lf)); return EXIT_SUCCESS; }