
(FPCore (x y z t) :precision binary64 (+ x (* (* y z) (- (tanh (/ t y)) (tanh (/ x y))))))
double code(double x, double y, double z, double t) {
return x + ((y * z) * (tanh((t / y)) - tanh((x / y))));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y * z) * (tanh((t / y)) - tanh((x / y))))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y * z) * (Math.tanh((t / y)) - Math.tanh((x / y))));
}
def code(x, y, z, t): return x + ((y * z) * (math.tanh((t / y)) - math.tanh((x / y))))
function code(x, y, z, t) return Float64(x + Float64(Float64(y * z) * Float64(tanh(Float64(t / y)) - tanh(Float64(x / y))))) end
function tmp = code(x, y, z, t) tmp = x + ((y * z) * (tanh((t / y)) - tanh((x / y)))); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y * z), $MachinePrecision] * N[(N[Tanh[N[(t / y), $MachinePrecision]], $MachinePrecision] - N[Tanh[N[(x / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y \cdot z\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 8 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ x (* (* y z) (- (tanh (/ t y)) (tanh (/ x y))))))
double code(double x, double y, double z, double t) {
return x + ((y * z) * (tanh((t / y)) - tanh((x / y))));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y * z) * (tanh((t / y)) - tanh((x / y))))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y * z) * (Math.tanh((t / y)) - Math.tanh((x / y))));
}
def code(x, y, z, t): return x + ((y * z) * (math.tanh((t / y)) - math.tanh((x / y))))
function code(x, y, z, t) return Float64(x + Float64(Float64(y * z) * Float64(tanh(Float64(t / y)) - tanh(Float64(x / y))))) end
function tmp = code(x, y, z, t) tmp = x + ((y * z) * (tanh((t / y)) - tanh((x / y)))); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y * z), $MachinePrecision] * N[(N[Tanh[N[(t / y), $MachinePrecision]], $MachinePrecision] - N[Tanh[N[(x / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y \cdot z\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right)
\end{array}
y_m = (fabs.f64 y) (FPCore (x y_m z t) :precision binary64 (if (<= y_m 3.7e+177) (fma z (* y_m (- (tanh (/ t y_m)) (tanh (/ x y_m)))) x) (+ x (* z (- t x)))))
y_m = fabs(y);
double code(double x, double y_m, double z, double t) {
double tmp;
if (y_m <= 3.7e+177) {
tmp = fma(z, (y_m * (tanh((t / y_m)) - tanh((x / y_m)))), x);
} else {
tmp = x + (z * (t - x));
}
return tmp;
}
y_m = abs(y) function code(x, y_m, z, t) tmp = 0.0 if (y_m <= 3.7e+177) tmp = fma(z, Float64(y_m * Float64(tanh(Float64(t / y_m)) - tanh(Float64(x / y_m)))), x); else tmp = Float64(x + Float64(z * Float64(t - x))); end return tmp end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_, t_] := If[LessEqual[y$95$m, 3.7e+177], N[(z * N[(y$95$m * N[(N[Tanh[N[(t / y$95$m), $MachinePrecision]], $MachinePrecision] - N[Tanh[N[(x / y$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(x + N[(z * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;y_m \leq 3.7 \cdot 10^{+177}:\\
\;\;\;\;\mathsf{fma}\left(z, y_m \cdot \left(\tanh \left(\frac{t}{y_m}\right) - \tanh \left(\frac{x}{y_m}\right)\right), x\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \left(t - x\right)\\
\end{array}
\end{array}
y_m = (fabs.f64 y) (FPCore (x y_m z t) :precision binary64 (if (<= y_m 2.8e+177) (+ x (* (- (tanh (/ t y_m)) (tanh (/ x y_m))) (* y_m z))) (+ x (* z (- t x)))))
y_m = fabs(y);
double code(double x, double y_m, double z, double t) {
double tmp;
if (y_m <= 2.8e+177) {
tmp = x + ((tanh((t / y_m)) - tanh((x / y_m))) * (y_m * z));
} else {
tmp = x + (z * (t - x));
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y_m <= 2.8d+177) then
tmp = x + ((tanh((t / y_m)) - tanh((x / y_m))) * (y_m * z))
else
tmp = x + (z * (t - x))
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z, double t) {
double tmp;
if (y_m <= 2.8e+177) {
tmp = x + ((Math.tanh((t / y_m)) - Math.tanh((x / y_m))) * (y_m * z));
} else {
tmp = x + (z * (t - x));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z, t): tmp = 0 if y_m <= 2.8e+177: tmp = x + ((math.tanh((t / y_m)) - math.tanh((x / y_m))) * (y_m * z)) else: tmp = x + (z * (t - x)) return tmp
y_m = abs(y) function code(x, y_m, z, t) tmp = 0.0 if (y_m <= 2.8e+177) tmp = Float64(x + Float64(Float64(tanh(Float64(t / y_m)) - tanh(Float64(x / y_m))) * Float64(y_m * z))); else tmp = Float64(x + Float64(z * Float64(t - x))); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z, t) tmp = 0.0; if (y_m <= 2.8e+177) tmp = x + ((tanh((t / y_m)) - tanh((x / y_m))) * (y_m * z)); else tmp = x + (z * (t - x)); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_, t_] := If[LessEqual[y$95$m, 2.8e+177], N[(x + N[(N[(N[Tanh[N[(t / y$95$m), $MachinePrecision]], $MachinePrecision] - N[Tanh[N[(x / y$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(y$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;y_m \leq 2.8 \cdot 10^{+177}:\\
\;\;\;\;x + \left(\tanh \left(\frac{t}{y_m}\right) - \tanh \left(\frac{x}{y_m}\right)\right) \cdot \left(y_m \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \left(t - x\right)\\
\end{array}
\end{array}
y_m = (fabs.f64 y) (FPCore (x y_m z t) :precision binary64 (if (or (<= t -4.4e-14) (not (<= t 1.2e-42))) (+ x (* y_m (* z (tanh (/ t y_m))))) (+ x (* z (- t (* y_m (tanh (/ x y_m))))))))
y_m = fabs(y);
double code(double x, double y_m, double z, double t) {
double tmp;
if ((t <= -4.4e-14) || !(t <= 1.2e-42)) {
tmp = x + (y_m * (z * tanh((t / y_m))));
} else {
tmp = x + (z * (t - (y_m * tanh((x / y_m)))));
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((t <= (-4.4d-14)) .or. (.not. (t <= 1.2d-42))) then
tmp = x + (y_m * (z * tanh((t / y_m))))
else
tmp = x + (z * (t - (y_m * tanh((x / y_m)))))
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z, double t) {
double tmp;
if ((t <= -4.4e-14) || !(t <= 1.2e-42)) {
tmp = x + (y_m * (z * Math.tanh((t / y_m))));
} else {
tmp = x + (z * (t - (y_m * Math.tanh((x / y_m)))));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z, t): tmp = 0 if (t <= -4.4e-14) or not (t <= 1.2e-42): tmp = x + (y_m * (z * math.tanh((t / y_m)))) else: tmp = x + (z * (t - (y_m * math.tanh((x / y_m))))) return tmp
y_m = abs(y) function code(x, y_m, z, t) tmp = 0.0 if ((t <= -4.4e-14) || !(t <= 1.2e-42)) tmp = Float64(x + Float64(y_m * Float64(z * tanh(Float64(t / y_m))))); else tmp = Float64(x + Float64(z * Float64(t - Float64(y_m * tanh(Float64(x / y_m)))))); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z, t) tmp = 0.0; if ((t <= -4.4e-14) || ~((t <= 1.2e-42))) tmp = x + (y_m * (z * tanh((t / y_m)))); else tmp = x + (z * (t - (y_m * tanh((x / y_m))))); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_, t_] := If[Or[LessEqual[t, -4.4e-14], N[Not[LessEqual[t, 1.2e-42]], $MachinePrecision]], N[(x + N[(y$95$m * N[(z * N[Tanh[N[(t / y$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(t - N[(y$95$m * N[Tanh[N[(x / y$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.4 \cdot 10^{-14} \lor \neg \left(t \leq 1.2 \cdot 10^{-42}\right):\\
\;\;\;\;x + y_m \cdot \left(z \cdot \tanh \left(\frac{t}{y_m}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \left(t - y_m \cdot \tanh \left(\frac{x}{y_m}\right)\right)\\
\end{array}
\end{array}
y_m = (fabs.f64 y) (FPCore (x y_m z t) :precision binary64 (if (<= y_m 1.4e+64) (+ x (* y_m (* z (tanh (/ t y_m))))) (+ x (* z (- t x)))))
y_m = fabs(y);
double code(double x, double y_m, double z, double t) {
double tmp;
if (y_m <= 1.4e+64) {
tmp = x + (y_m * (z * tanh((t / y_m))));
} else {
tmp = x + (z * (t - x));
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y_m <= 1.4d+64) then
tmp = x + (y_m * (z * tanh((t / y_m))))
else
tmp = x + (z * (t - x))
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z, double t) {
double tmp;
if (y_m <= 1.4e+64) {
tmp = x + (y_m * (z * Math.tanh((t / y_m))));
} else {
tmp = x + (z * (t - x));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z, t): tmp = 0 if y_m <= 1.4e+64: tmp = x + (y_m * (z * math.tanh((t / y_m)))) else: tmp = x + (z * (t - x)) return tmp
y_m = abs(y) function code(x, y_m, z, t) tmp = 0.0 if (y_m <= 1.4e+64) tmp = Float64(x + Float64(y_m * Float64(z * tanh(Float64(t / y_m))))); else tmp = Float64(x + Float64(z * Float64(t - x))); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z, t) tmp = 0.0; if (y_m <= 1.4e+64) tmp = x + (y_m * (z * tanh((t / y_m)))); else tmp = x + (z * (t - x)); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_, t_] := If[LessEqual[y$95$m, 1.4e+64], N[(x + N[(y$95$m * N[(z * N[Tanh[N[(t / y$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;y_m \leq 1.4 \cdot 10^{+64}:\\
\;\;\;\;x + y_m \cdot \left(z \cdot \tanh \left(\frac{t}{y_m}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \left(t - x\right)\\
\end{array}
\end{array}
y_m = (fabs.f64 y)
(FPCore (x y_m z t)
:precision binary64
(if (<= y_m 1.75e-8)
x
(if (or (<= y_m 1.6e+73) (and (not (<= y_m 2.65e+175)) (<= y_m 1.15e+206)))
(* x (- 1.0 z))
(+ x (* z t)))))y_m = fabs(y);
double code(double x, double y_m, double z, double t) {
double tmp;
if (y_m <= 1.75e-8) {
tmp = x;
} else if ((y_m <= 1.6e+73) || (!(y_m <= 2.65e+175) && (y_m <= 1.15e+206))) {
tmp = x * (1.0 - z);
} else {
tmp = x + (z * t);
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y_m <= 1.75d-8) then
tmp = x
else if ((y_m <= 1.6d+73) .or. (.not. (y_m <= 2.65d+175)) .and. (y_m <= 1.15d+206)) then
tmp = x * (1.0d0 - z)
else
tmp = x + (z * t)
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z, double t) {
double tmp;
if (y_m <= 1.75e-8) {
tmp = x;
} else if ((y_m <= 1.6e+73) || (!(y_m <= 2.65e+175) && (y_m <= 1.15e+206))) {
tmp = x * (1.0 - z);
} else {
tmp = x + (z * t);
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z, t): tmp = 0 if y_m <= 1.75e-8: tmp = x elif (y_m <= 1.6e+73) or (not (y_m <= 2.65e+175) and (y_m <= 1.15e+206)): tmp = x * (1.0 - z) else: tmp = x + (z * t) return tmp
y_m = abs(y) function code(x, y_m, z, t) tmp = 0.0 if (y_m <= 1.75e-8) tmp = x; elseif ((y_m <= 1.6e+73) || (!(y_m <= 2.65e+175) && (y_m <= 1.15e+206))) tmp = Float64(x * Float64(1.0 - z)); else tmp = Float64(x + Float64(z * t)); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z, t) tmp = 0.0; if (y_m <= 1.75e-8) tmp = x; elseif ((y_m <= 1.6e+73) || (~((y_m <= 2.65e+175)) && (y_m <= 1.15e+206))) tmp = x * (1.0 - z); else tmp = x + (z * t); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_, t_] := If[LessEqual[y$95$m, 1.75e-8], x, If[Or[LessEqual[y$95$m, 1.6e+73], And[N[Not[LessEqual[y$95$m, 2.65e+175]], $MachinePrecision], LessEqual[y$95$m, 1.15e+206]]], N[(x * N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;y_m \leq 1.75 \cdot 10^{-8}:\\
\;\;\;\;x\\
\mathbf{elif}\;y_m \leq 1.6 \cdot 10^{+73} \lor \neg \left(y_m \leq 2.65 \cdot 10^{+175}\right) \land y_m \leq 1.15 \cdot 10^{+206}:\\
\;\;\;\;x \cdot \left(1 - z\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot t\\
\end{array}
\end{array}
y_m = (fabs.f64 y) (FPCore (x y_m z t) :precision binary64 (if (<= y_m 2.2e+41) x (+ x (* z (- t x)))))
y_m = fabs(y);
double code(double x, double y_m, double z, double t) {
double tmp;
if (y_m <= 2.2e+41) {
tmp = x;
} else {
tmp = x + (z * (t - x));
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y_m <= 2.2d+41) then
tmp = x
else
tmp = x + (z * (t - x))
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z, double t) {
double tmp;
if (y_m <= 2.2e+41) {
tmp = x;
} else {
tmp = x + (z * (t - x));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z, t): tmp = 0 if y_m <= 2.2e+41: tmp = x else: tmp = x + (z * (t - x)) return tmp
y_m = abs(y) function code(x, y_m, z, t) tmp = 0.0 if (y_m <= 2.2e+41) tmp = x; else tmp = Float64(x + Float64(z * Float64(t - x))); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z, t) tmp = 0.0; if (y_m <= 2.2e+41) tmp = x; else tmp = x + (z * (t - x)); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_, t_] := If[LessEqual[y$95$m, 2.2e+41], x, N[(x + N[(z * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;y_m \leq 2.2 \cdot 10^{+41}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \left(t - x\right)\\
\end{array}
\end{array}
y_m = (fabs.f64 y) (FPCore (x y_m z t) :precision binary64 (if (<= y_m 7.5e-8) x (* x (- 1.0 z))))
y_m = fabs(y);
double code(double x, double y_m, double z, double t) {
double tmp;
if (y_m <= 7.5e-8) {
tmp = x;
} else {
tmp = x * (1.0 - z);
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y_m <= 7.5d-8) then
tmp = x
else
tmp = x * (1.0d0 - z)
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z, double t) {
double tmp;
if (y_m <= 7.5e-8) {
tmp = x;
} else {
tmp = x * (1.0 - z);
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z, t): tmp = 0 if y_m <= 7.5e-8: tmp = x else: tmp = x * (1.0 - z) return tmp
y_m = abs(y) function code(x, y_m, z, t) tmp = 0.0 if (y_m <= 7.5e-8) tmp = x; else tmp = Float64(x * Float64(1.0 - z)); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z, t) tmp = 0.0; if (y_m <= 7.5e-8) tmp = x; else tmp = x * (1.0 - z); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_, t_] := If[LessEqual[y$95$m, 7.5e-8], x, N[(x * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;y_m \leq 7.5 \cdot 10^{-8}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - z\right)\\
\end{array}
\end{array}
y_m = (fabs.f64 y) (FPCore (x y_m z t) :precision binary64 x)
y_m = fabs(y);
double code(double x, double y_m, double z, double t) {
return x;
}
y_m = abs(y)
real(8) function code(x, y_m, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z, double t) {
return x;
}
y_m = math.fabs(y) def code(x, y_m, z, t): return x
y_m = abs(y) function code(x, y_m, z, t) return x end
y_m = abs(y); function tmp = code(x, y_m, z, t) tmp = x; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_, t_] := x
\begin{array}{l}
y_m = \left|y\right|
\\
x
\end{array}
(FPCore (x y z t) :precision binary64 (+ x (* y (* z (- (tanh (/ t y)) (tanh (/ x y)))))))
double code(double x, double y, double z, double t) {
return x + (y * (z * (tanh((t / y)) - tanh((x / y)))));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + (y * (z * (tanh((t / y)) - tanh((x / y)))))
end function
public static double code(double x, double y, double z, double t) {
return x + (y * (z * (Math.tanh((t / y)) - Math.tanh((x / y)))));
}
def code(x, y, z, t): return x + (y * (z * (math.tanh((t / y)) - math.tanh((x / y)))))
function code(x, y, z, t) return Float64(x + Float64(y * Float64(z * Float64(tanh(Float64(t / y)) - tanh(Float64(x / y)))))) end
function tmp = code(x, y, z, t) tmp = x + (y * (z * (tanh((t / y)) - tanh((x / y))))); end
code[x_, y_, z_, t_] := N[(x + N[(y * N[(z * N[(N[Tanh[N[(t / y), $MachinePrecision]], $MachinePrecision] - N[Tanh[N[(x / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \left(z \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right)\right)
\end{array}
herbie shell --seed 2024008
(FPCore (x y z t)
:name "SynthBasics:moogVCF from YampaSynth-0.2"
:precision binary64
:herbie-target
(+ x (* y (* z (- (tanh (/ t y)) (tanh (/ x y))))))
(+ x (* (* y z) (- (tanh (/ t y)) (tanh (/ x y))))))