Skip to content
fn

vtanh_unfixed_f32

void vtanh_unfixed_f32(const float * in, float * out, int n)

Single-precision elementwise hyperbolic tangent via raw vvtanhf without the near-zero identity post-fix. Used by GELU's tanh approximation, where 1 + tanh(u) absorbs a 1-ulp difference on a tiny u (LCD-595).

References

Accelerate.framework vvtanhf.

Parameters

inconst float*
Input buffer.
outfloat*
Output buffer.
nstd::size_t
Element count.