is there 'error function' function erf() or erfc() in math.h in dev c++. ok...i try to call the function, it says "implicit declaration function" which obviously means its not exist.anybody know where i can get the source code/function of this function.
from wikipedia (error function)
"C/C++: It is implemented as the functions double erf(double x) and double erfc(double x) in the header math.h or cmath in the GNU version. This is not part of the standard and depends on individual library implementations. The pairs of functions {erff(),erfcf()} and {erfl(),erfcl()} take and return values of type float and long double respectively."
thanks a lot!!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
As it says it is not standard. Although Dev-C++ uses the GNU C/C++ copmpiler it does not use the GNU C library. It uses Microsoft's VC++ C runtime library (MSVCRT.DLL). The library documentation is here: http://msdn2.microsoft.com/en-us/library/59ey50w6(VS.80).aspx
The GNU C library is open source, so you gan get the source for this function (http://www.gnu.org/software/libc/)
The GNU C library has system dependencies which make it unsuitable for compilation on Windows, however it is unlikely that this function or its variants have any such dependencies, so you could port it.
Alternatively of course simply implement it yourself.
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hi,
is there 'error function' function erf() or erfc() in math.h in dev c++. ok...i try to call the function, it says "implicit declaration function" which obviously means its not exist.anybody know where i can get the source code/function of this function.
from wikipedia (error function)
"C/C++: It is implemented as the functions double erf(double x) and double erfc(double x) in the header math.h or cmath in the GNU version. This is not part of the standard and depends on individual library implementations. The pairs of functions {erff(),erfcf()} and {erfl(),erfcl()} take and return values of type float and long double respectively."
thanks a lot!!
As it says it is not standard. Although Dev-C++ uses the GNU C/C++ copmpiler it does not use the GNU C library. It uses Microsoft's VC++ C runtime library (MSVCRT.DLL). The library documentation is here: http://msdn2.microsoft.com/en-us/library/59ey50w6(VS.80).aspx
The GNU C library is open source, so you gan get the source for this function (http://www.gnu.org/software/libc/)
The GNU C library has system dependencies which make it unsuitable for compilation on Windows, however it is unlikely that this function or its variants have any such dependencies, so you could port it.
Alternatively of course simply implement it yourself.
Clifford