Created attachment 936 [details]
Patch created with "hg export tip".
Add a PacketMath version of the Error Function (erf).
This is build along the same lines as the tanh implementation, added it in the same way in the same places. No idea if this is the right way to do it.
To make this work, I had to move the packet definition of erf from SpecialFunctionsPacketMath.h to GenericPacketMath.h, probably since the former is not included in the right places.
I've also added the default implementations of tanh and erf for float packets to the other architectures that seem able to support it and don't yet have a custom implementation.
Thanks for the patch. The implementation should go to:
(see how plog or psin/pcos are implemented).
And there should be some unit tests (in test/packetmath.cpp).
IMO, the EIGEN_FAST_MATH flag is a bit debatable at the moment (see Bug 1687).
For the record, this has been included in changeset e36d6897ee5d