diff --git a/configure b/configure index f334749b2a8..c6e24d0891f 100755 --- a/configure +++ b/configure @@ -17416,6 +17416,8 @@ for ac_func in \ cbrt \ cbrtf \ erf \ + erfc \ + erfcf \ erff \ exp2 \ exp2f \ diff --git a/configure.ac b/configure.ac index bae5ba0ba7b..5bee74ab961 100644 --- a/configure.ac +++ b/configure.ac @@ -2603,6 +2603,8 @@ AC_CHECK_FUNCS(\ cbrt \ cbrtf \ erf \ + erfc \ + erfcf \ erff \ exp2 \ exp2f \ diff --git a/dlls/api-ms-win-crt-math-l1-1-0/api-ms-win-crt-math-l1-1-0.spec b/dlls/api-ms-win-crt-math-l1-1-0/api-ms-win-crt-math-l1-1-0.spec index fb5c35059fd..a1668bb8f21 100644 --- a/dlls/api-ms-win-crt-math-l1-1-0/api-ms-win-crt-math-l1-1-0.spec +++ b/dlls/api-ms-win-crt-math-l1-1-0/api-ms-win-crt-math-l1-1-0.spec @@ -221,9 +221,9 @@ @ stub ctanhl @ stub ctanl @ cdecl erf(double) ucrtbase.erf -@ stub erfc -@ stub erfcf -@ stub erfcl +@ cdecl erfc(double) ucrtbase.erfc +@ cdecl erfcf(float) ucrtbase.erfcf +@ cdecl erfcl(double) ucrtbase.erfcl @ cdecl erff(float) ucrtbase.erff @ cdecl erfl(double) ucrtbase.erfl @ cdecl exp(double) ucrtbase.exp diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index 323d5f43c01..d44812a2646 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -2123,9 +2123,9 @@ @ stub ctanl @ cdecl -ret64 div(long long) MSVCRT_div @ cdecl erf(double) MSVCR120_erf -@ stub erfc -@ stub erfcf -@ stub erfcl +@ cdecl erfc(double) MSVCR120_erfc +@ cdecl erfcf(float) MSVCR120_erfcf +@ cdecl erfcl(double) MSVCR120_erfcl @ cdecl erff(float) MSVCR120_erff @ cdecl erfl(double) MSVCR120_erfl @ cdecl exit(long) MSVCRT_exit diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec index 73101c74379..8c3ecfd1d36 100644 --- a/dlls/msvcr120_app/msvcr120_app.spec +++ b/dlls/msvcr120_app/msvcr120_app.spec @@ -1789,9 +1789,9 @@ @ stub ctanl @ cdecl -ret64 div(long long) msvcr120.div @ cdecl erf(double) msvcr120.erf -@ stub erfc -@ stub erfcf -@ stub erfcl +@ cdecl erfc(double) msvcr120.erfc +@ cdecl erfcf(float) msvcr120.erfcf +@ cdecl erfcl(double) msvcr120.erfcl @ cdecl erff(float) msvcr120.erff @ cdecl erfl(double) msvcr120.erfl @ cdecl exit(long) msvcr120.exit diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index 9eed9b8b897..89c45c794ce 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -2772,6 +2772,38 @@ LDOUBLE CDECL MSVCR120_erfl(LDOUBLE x) return MSVCR120_erf(x); } +/********************************************************************* + * erfc (MSVCR120.@) + */ +double CDECL MSVCR120_erfc(double x) +{ +#ifdef HAVE_ERFC + return erfc(x); +#else + return 1 - MSVCR120_erf(x); +#endif +} + +/********************************************************************* + * erfcf (MSVCR120.@) + */ +float CDECL MSVCR120_erfcf(float x) +{ +#ifdef HAVE_ERFCF + return erfcf(x); +#else + return MSVCR120_erfc(x); +#endif +} + +/********************************************************************* + * erfcl (MSVCR120.@) + */ +LDOUBLE CDECL MSVCR120_erfcl(LDOUBLE x) +{ + return MSVCR120_erfc(x); +} + /********************************************************************* * fmaxf (MSVCR120.@) */ diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec index aacf3614daf..017f086fc19 100644 --- a/dlls/ucrtbase/ucrtbase.spec +++ b/dlls/ucrtbase/ucrtbase.spec @@ -2266,9 +2266,9 @@ @ stub ctanl @ cdecl -ret64 div(long long) MSVCRT_div @ cdecl erf(double) MSVCR120_erf -@ stub erfc -@ stub erfcf -@ stub erfcl +@ cdecl erfc(double) MSVCR120_erfc +@ cdecl erfcf(float) MSVCR120_erfcf +@ cdecl erfcl(double) MSVCR120_erfcl @ cdecl erff(float) MSVCR120_erff @ cdecl erfl(double) MSVCR120_erfl @ cdecl exit(long) MSVCRT_exit diff --git a/include/config.h.in b/include/config.h.in index 2e909fdf975..e5b646586d8 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -141,6 +141,12 @@ /* Define to 1 if you have the `erf' function. */ #undef HAVE_ERF +/* Define to 1 if you have the `erfc' function. */ +#undef HAVE_ERFC + +/* Define to 1 if you have the `erfcf' function. */ +#undef HAVE_ERFCF + /* Define to 1 if you have the `erff' function. */ #undef HAVE_ERFF