public static float atanh(float x) { if (Math.Abs(x) >= 1f) return 0; return (0.5f) * (float)Math.Log((1f + x) / (1f - x)); }