Skip to content
fn

vtanh_f32

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

Single-precision elementwise hyperbolic tangent.

Computes outi=tanh⁡(ini)\text{out}_i = \tanh(\text{in}_i) via vvtanhf, with ∣x∣≤3.52×10−4|x| \le 3.52 \times 10^{-4} set back to x (see split_edges in Vforce.cpp).

References

Accelerate.framework vvtanhf.

Parameters

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