PR libfortran/18966
[official-gcc.git] / libgfortran / intrinsics / erf.c
blob93329de4de315734e478b68699df34c6cf94fd76
1 /* Wrapper for systems without the C99 erff() and erfcf() functions
2 Copyright (C) 2004 Free Software Foundation, Inc.
4 This file is part of the GNU Fortran 95 runtime library (libgfortran).
6 Libgfortran is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
11 Libgfortran is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with libgfortran; see the file COPYING.LIB. If not,
18 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
21 #include "config.h"
22 #include <math.h>
23 #include "libgfortran.h"
25 #if HAVE_ERF && !HAVE_ERFF
26 float
27 erff (float x)
29 return (float) erf ((double) x);
31 #endif
33 #if HAVE_ERFC && !HAVE_ERFCF
34 float
35 erfcf (float x)
37 return (float) erfc ((double) x);
39 #endif