erf

Dec 6, 2013 at 6:32pm
Write your question here.


Hi

I want to know is there any function available for error function(erf) in Visual C++?
thanks

Last edited on Dec 9, 2013 at 7:40pm
Dec 6, 2013 at 6:35pm
Not in the standard library, but you could look at the Boost.Math library which I believe has an implementation.
Dec 6, 2013 at 6:38pm
thank you Zhouge,Can you tell more about that?

Appreciate
Dec 6, 2013 at 6:41pm
I'd recommend you just look at the Boost pages directly:
http://www.boost.org/doc/libs/1_55_0/libs/math/doc/html/math_toolkit/sf_erf/error_function.html
and such
Dec 6, 2013 at 6:46pm
std::erf() is part of the standard library. #include <cmath>
http://en.cppreference.com/w/cpp/numeric/math/erf

The current version of Visual C++ ought to have it.
Dec 6, 2013 at 7:06pm
Oh, you're absolutely right. Somehow I had convinced myself that it couldn't be in the standard library...
Dec 6, 2013 at 7:15pm
thanks JLBorges

when I copy the code in Visual C++ ,the C program can not identify erf
Dec 6, 2013 at 7:18pm
Could you should the small example you used that generates the error?
Dec 6, 2013 at 7:25pm
It is part of big problem,At first,I need to find that is it possible to use function for erf .If it is not any function available ,I have to think about writing code for this special function.But it is really painful.
Dec 6, 2013 at 7:27pm
Did you try the example on the reference page?
http://www.cplusplus.com/reference/cmath/erf/
Dec 6, 2013 at 7:38pm
yes.does not work
Dec 6, 2013 at 7:50pm
Topic archived. No new replies allowed.