Function func32871230(x As Double) As Double
Dim h1, h2, h3 As Integer, f1, f2, f3 As Double
f1 = (1 + x) / (1 + x ^ 2)
If Not (x = -1) Then f2 = (1 + x / (1 + x)) ^ 0.5
f3 = Abs(Sin(3 * x))
h1 = (1 - Sgn(x)) \ 2
h3 = (2 + Sgn(x - 1)) \ 2
h2 = (1 - h1) * (1 - h3)
func32871230 = f1 * h1 + f2 * h2 + f3 * h3
End Function
Excel VBA
Function func32871230(x As Double) As Double
Dim h1, h2, h3 As Integer, f1, f2, f3 As Double
f1 = (1 + x) / (1 + x ^ 2)
If Not (x = -1) Then f2 = (1 + x / (1 + x)) ^ 0.5
f3 = Abs(Sin(3 * x))
h1 = (1 - Sgn(x)) \ 2
h3 = (2 + Sgn(x - 1)) \ 2
h2 = (1 - h1) * (1 - h3)
func32871230 = f1 * h1 + f2 * h2 + f3 * h3
End Function
Excel VBA