Ответ:
Function min(a As Double, b As Double) As Double
Dim a1 As Double, b1 As Double, ab As Double, z As Integer
z = Sgn(Abs(a — b))
a1 = Abs(a)
b1 = Abs(b)
ab = a1 + b1
a1 = a + ab
b1 = b + ab
min = a * Sgn(Int(b1 / a1)) * z + b * Sgn(Int(a1 / b1)) * z
End Function
Function negcube(x As Double, y As Double, z As Double)
Dim i As Double
i = (x — Abs(x)) / 2
x = x + (x * x — 1) * i
i = (y — Abs(y)) / 2
y = y + (y * y — 1) * i
i = (z — Abs(z)) / 2
z = z + (z * z — 1) * i
End Function
Excel VBA