This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen

Bug 1775

Summary: erf does not have a scalar_erf_op in Core/functors/UnaryFunctors.h
Product: Eigen Reporter: Matthew Ludkin <m.ludkin1>
Component: Core - expression templatesAssignee: Nobody <eigen.nobody>
Status: RESOLVED WORKSFORME    
Severity: Documentation CC: chtz, gael.guennebaud, jacob.benoit.1, m.ludkin1
Priority: Normal    
Version: 3.3 (current stable)   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 1608    

Description Matthew Ludkin 2019-11-11 17:42:47 UTC
Erf is listed in the documentation at
http://eigen.tuxfamily.org/dox/namespaceEigen.html#ac336e0eba2b12dca8b01da1a006566c3
but using erf on Eign::VectorXd will not compile.

I think the error can be traced to a lack of scalar_erf_op in the file Core/functors/UnaryFunctors.h

I have written the required templates to invoke std::erf by using the trigonometric functions as a guide.

The fix also edits:
Core/GenericPacketMath.h
MathFunctions.h
Comment 1 Christoph Hertzberg 2019-11-11 17:59:05 UTC
On the one hand, `erf` is only supposed to work with `Array` types. On the other hand, you need to

   #include <unsupported/Eigen/SpecialFunctions>

Demo: https://godbolt.org/z/mHmE6X

The latter could definitely be documented better (also for related functions).

Or we could actually just move the entire SpecialFunctions module into Eigen/Core. --> DecisionNeeded
Comment 2 Matthew Ludkin 2019-11-11 18:20:58 UTC
Ok to the first (I was using the .array() member function). I didn't see anything about including an unsupported header. 
Thank you!
Comment 3 Nobody 2019-12-04 18:54:58 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/1775.