This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
Bug 1775 - erf does not have a scalar_erf_op in Core/functors/UnaryFunctors.h
Summary: erf does not have a scalar_erf_op in Core/functors/UnaryFunctors.h
Status: RESOLVED WORKSFORME
Alias: None
Product: Eigen
Classification: Unclassified
Component: Core - expression templates (show other bugs)
Version: 3.3 (current stable)
Hardware: All All
: Normal Documentation
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 3.x
  Show dependency treegraph
 
Reported: 2019-11-11 17:42 UTC by Matthew Ludkin
Modified: 2019-12-04 18:54 UTC (History)
4 users (show)



Attachments

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.

Note You need to log in before you can comment on or make changes to this bug.