Menu

error function in dev c++?

n.i.a.r
2008-02-20
2012-09-26
  • n.i.a.r

    n.i.a.r - 2008-02-20

    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!!

     
    • cpns

      cpns - 2008-02-21

      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

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.