SynthBasics:moogVCF from YampaSynth-0.2

Percentage Accurate: 92.9% → 96.5%
Time: 12.4s
Alternatives: 8
Speedup: 1.0×

Specification

?
\[\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} \]
(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:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 8 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 92.9% accurate, 1.0× speedup?

\[\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} \]
(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}

Alternative 1: 96.5% accurate, 1.0× speedup?

\[\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} \]
(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}
Derivation
  1. Initial program 94.7%

    \[x + \left(y \cdot z\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right) \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. associate-*l*N/A

      \[\leadsto \mathsf{+.f64}\left(x, \left(y \cdot \color{blue}{\left(z \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right)\right)}\right)\right) \]
    2. *-commutativeN/A

      \[\leadsto \mathsf{+.f64}\left(x, \left(\left(z \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right)\right) \cdot \color{blue}{y}\right)\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\left(z \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right)\right), \color{blue}{y}\right)\right) \]
    4. *-lowering-*.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(z, \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right)\right), y\right)\right) \]
    5. --lowering--.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(\tanh \left(\frac{t}{y}\right), \tanh \left(\frac{x}{y}\right)\right)\right), y\right)\right) \]
    6. tanh-lowering-tanh.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(\mathsf{tanh.f64}\left(\left(\frac{t}{y}\right)\right), \tanh \left(\frac{x}{y}\right)\right)\right), y\right)\right) \]
    7. /-lowering-/.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(\mathsf{tanh.f64}\left(\mathsf{/.f64}\left(t, y\right)\right), \tanh \left(\frac{x}{y}\right)\right)\right), y\right)\right) \]
    8. tanh-lowering-tanh.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(\mathsf{tanh.f64}\left(\mathsf{/.f64}\left(t, y\right)\right), \mathsf{tanh.f64}\left(\left(\frac{x}{y}\right)\right)\right)\right), y\right)\right) \]
    9. /-lowering-/.f6497.6%

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(\mathsf{tanh.f64}\left(\mathsf{/.f64}\left(t, y\right)\right), \mathsf{tanh.f64}\left(\mathsf{/.f64}\left(x, y\right)\right)\right)\right), y\right)\right) \]
  4. Applied egg-rr97.6%

    \[\leadsto x + \color{blue}{\left(z \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right)\right) \cdot y} \]
  5. Final simplification97.6%

    \[\leadsto x + y \cdot \left(z \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right)\right) \]
  6. Add Preprocessing

Alternative 2: 96.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right) \cdot \left(z \cdot y\right)\\ \mathbf{if}\;t\_1 \leq 5 \cdot 10^{+304}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(t - x\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (+ x (* (- (tanh (/ t y)) (tanh (/ x y))) (* z y)))))
   (if (<= t_1 5e+304) t_1 (* z (- t x)))))
double code(double x, double y, double z, double t) {
	double t_1 = x + ((tanh((t / y)) - tanh((x / y))) * (z * y));
	double tmp;
	if (t_1 <= 5e+304) {
		tmp = t_1;
	} else {
		tmp = z * (t - x);
	}
	return tmp;
}
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
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + ((tanh((t / y)) - tanh((x / y))) * (z * y))
    if (t_1 <= 5d+304) then
        tmp = t_1
    else
        tmp = z * (t - x)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x + ((Math.tanh((t / y)) - Math.tanh((x / y))) * (z * y));
	double tmp;
	if (t_1 <= 5e+304) {
		tmp = t_1;
	} else {
		tmp = z * (t - x);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x + ((math.tanh((t / y)) - math.tanh((x / y))) * (z * y))
	tmp = 0
	if t_1 <= 5e+304:
		tmp = t_1
	else:
		tmp = z * (t - x)
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x + Float64(Float64(tanh(Float64(t / y)) - tanh(Float64(x / y))) * Float64(z * y)))
	tmp = 0.0
	if (t_1 <= 5e+304)
		tmp = t_1;
	else
		tmp = Float64(z * Float64(t - x));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x + ((tanh((t / y)) - tanh((x / y))) * (z * y));
	tmp = 0.0;
	if (t_1 <= 5e+304)
		tmp = t_1;
	else
		tmp = z * (t - x);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(N[(N[Tanh[N[(t / y), $MachinePrecision]], $MachinePrecision] - N[Tanh[N[(x / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 5e+304], t$95$1, N[(z * N[(t - x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right) \cdot \left(z \cdot y\right)\\
\mathbf{if}\;t\_1 \leq 5 \cdot 10^{+304}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;z \cdot \left(t - x\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 x (*.f64 (*.f64 y z) (-.f64 (tanh.f64 (/.f64 t y)) (tanh.f64 (/.f64 x y))))) < 4.9999999999999997e304

    1. Initial program 97.6%

      \[x + \left(y \cdot z\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right) \]
    2. Add Preprocessing

    if 4.9999999999999997e304 < (+.f64 x (*.f64 (*.f64 y z) (-.f64 (tanh.f64 (/.f64 t y)) (tanh.f64 (/.f64 x y)))))

    1. Initial program 51.3%

      \[x + \left(y \cdot z\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, z\right), \color{blue}{\left(\frac{t - x}{y}\right)}\right)\right) \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, z\right), \mathsf{/.f64}\left(\left(t - x\right), \color{blue}{y}\right)\right)\right) \]
      2. --lowering--.f6451.3%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, z\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), y\right)\right)\right) \]
    5. Simplified51.3%

      \[\leadsto x + \left(y \cdot z\right) \cdot \color{blue}{\frac{t - x}{y}} \]
    6. Taylor expanded in z around inf

      \[\leadsto \color{blue}{z \cdot \left(t - x\right)} \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{\left(t - x\right)}\right) \]
      2. --lowering--.f6493.8%

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(t, \color{blue}{x}\right)\right) \]
    8. Simplified93.8%

      \[\leadsto \color{blue}{z \cdot \left(t - x\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification97.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right) \cdot \left(z \cdot y\right) \leq 5 \cdot 10^{+304}:\\ \;\;\;\;x + \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right) \cdot \left(z \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(t - x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 71.8% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 4.6 \cdot 10^{-68}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.35 \cdot 10^{+171}:\\ \;\;\;\;x + \left(z \cdot y\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \frac{x}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \left(t - x\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= y 4.6e-68)
   x
   (if (<= y 1.35e+171)
     (+ x (* (* z y) (- (tanh (/ t y)) (/ x y))))
     (+ x (* z (- t x))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= 4.6e-68) {
		tmp = x;
	} else if (y <= 1.35e+171) {
		tmp = x + ((z * y) * (tanh((t / y)) - (x / y)));
	} else {
		tmp = x + (z * (t - x));
	}
	return tmp;
}
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
    real(8) :: tmp
    if (y <= 4.6d-68) then
        tmp = x
    else if (y <= 1.35d+171) then
        tmp = x + ((z * y) * (tanh((t / y)) - (x / y)))
    else
        tmp = x + (z * (t - x))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= 4.6e-68) {
		tmp = x;
	} else if (y <= 1.35e+171) {
		tmp = x + ((z * y) * (Math.tanh((t / y)) - (x / y)));
	} else {
		tmp = x + (z * (t - x));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if y <= 4.6e-68:
		tmp = x
	elif y <= 1.35e+171:
		tmp = x + ((z * y) * (math.tanh((t / y)) - (x / y)))
	else:
		tmp = x + (z * (t - x))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (y <= 4.6e-68)
		tmp = x;
	elseif (y <= 1.35e+171)
		tmp = Float64(x + Float64(Float64(z * y) * Float64(tanh(Float64(t / y)) - Float64(x / y))));
	else
		tmp = Float64(x + Float64(z * Float64(t - x)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= 4.6e-68)
		tmp = x;
	elseif (y <= 1.35e+171)
		tmp = x + ((z * y) * (tanh((t / y)) - (x / y)));
	else
		tmp = x + (z * (t - x));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[y, 4.6e-68], x, If[LessEqual[y, 1.35e+171], N[(x + N[(N[(z * y), $MachinePrecision] * N[(N[Tanh[N[(t / y), $MachinePrecision]], $MachinePrecision] - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq 4.6 \cdot 10^{-68}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 1.35 \cdot 10^{+171}:\\
\;\;\;\;x + \left(z \cdot y\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \frac{x}{y}\right)\\

\mathbf{else}:\\
\;\;\;\;x + z \cdot \left(t - x\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < 4.59999999999999994e-68

    1. Initial program 96.3%

      \[x + \left(y \cdot z\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right) \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf

      \[\leadsto \color{blue}{x} \]
    4. Step-by-step derivation
      1. Simplified61.8%

        \[\leadsto \color{blue}{x} \]

      if 4.59999999999999994e-68 < y < 1.3499999999999999e171

      1. Initial program 97.6%

        \[x + \left(y \cdot z\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right) \]
      2. Add Preprocessing
      3. Taylor expanded in x around 0

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, z\right), \mathsf{\_.f64}\left(\mathsf{tanh.f64}\left(\mathsf{/.f64}\left(t, y\right)\right), \color{blue}{\left(\frac{x}{y}\right)}\right)\right)\right) \]
      4. Step-by-step derivation
        1. /-lowering-/.f6483.7%

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, z\right), \mathsf{\_.f64}\left(\mathsf{tanh.f64}\left(\mathsf{/.f64}\left(t, y\right)\right), \mathsf{/.f64}\left(x, \color{blue}{y}\right)\right)\right)\right) \]
      5. Simplified83.7%

        \[\leadsto x + \left(y \cdot z\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \color{blue}{\frac{x}{y}}\right) \]

      if 1.3499999999999999e171 < y

      1. Initial program 80.9%

        \[x + \left(y \cdot z\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right) \]
      2. Add Preprocessing
      3. Taylor expanded in y around inf

        \[\leadsto \color{blue}{x + z \cdot \left(t - x\right)} \]
      4. Step-by-step derivation
        1. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(x, \color{blue}{\left(z \cdot \left(t - x\right)\right)}\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(z, \color{blue}{\left(t - x\right)}\right)\right) \]
        3. --lowering--.f6490.8%

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(t, \color{blue}{x}\right)\right)\right) \]
      5. Simplified90.8%

        \[\leadsto \color{blue}{x + z \cdot \left(t - x\right)} \]
    5. Recombined 3 regimes into one program.
    6. Final simplification68.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 4.6 \cdot 10^{-68}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.35 \cdot 10^{+171}:\\ \;\;\;\;x + \left(z \cdot y\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \frac{x}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \left(t - x\right)\\ \end{array} \]
    7. Add Preprocessing

    Alternative 4: 71.3% accurate, 1.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 1.5 \cdot 10^{-67}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \left(z \cdot \left(\tanh \left(\frac{t}{y}\right) - \frac{x}{y}\right)\right)\\ \end{array} \end{array} \]
    (FPCore (x y z t)
     :precision binary64
     (if (<= y 1.5e-67) x (+ x (* y (* z (- (tanh (/ t y)) (/ x y)))))))
    double code(double x, double y, double z, double t) {
    	double tmp;
    	if (y <= 1.5e-67) {
    		tmp = x;
    	} else {
    		tmp = x + (y * (z * (tanh((t / y)) - (x / y))));
    	}
    	return tmp;
    }
    
    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
        real(8) :: tmp
        if (y <= 1.5d-67) then
            tmp = x
        else
            tmp = x + (y * (z * (tanh((t / y)) - (x / y))))
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t) {
    	double tmp;
    	if (y <= 1.5e-67) {
    		tmp = x;
    	} else {
    		tmp = x + (y * (z * (Math.tanh((t / y)) - (x / y))));
    	}
    	return tmp;
    }
    
    def code(x, y, z, t):
    	tmp = 0
    	if y <= 1.5e-67:
    		tmp = x
    	else:
    		tmp = x + (y * (z * (math.tanh((t / y)) - (x / y))))
    	return tmp
    
    function code(x, y, z, t)
    	tmp = 0.0
    	if (y <= 1.5e-67)
    		tmp = x;
    	else
    		tmp = Float64(x + Float64(y * Float64(z * Float64(tanh(Float64(t / y)) - Float64(x / y)))));
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t)
    	tmp = 0.0;
    	if (y <= 1.5e-67)
    		tmp = x;
    	else
    		tmp = x + (y * (z * (tanh((t / y)) - (x / y))));
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_] := If[LessEqual[y, 1.5e-67], x, N[(x + N[(y * N[(z * N[(N[Tanh[N[(t / y), $MachinePrecision]], $MachinePrecision] - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;y \leq 1.5 \cdot 10^{-67}:\\
    \;\;\;\;x\\
    
    \mathbf{else}:\\
    \;\;\;\;x + y \cdot \left(z \cdot \left(\tanh \left(\frac{t}{y}\right) - \frac{x}{y}\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if y < 1.50000000000000016e-67

      1. Initial program 96.3%

        \[x + \left(y \cdot z\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right) \]
      2. Add Preprocessing
      3. Taylor expanded in x around inf

        \[\leadsto \color{blue}{x} \]
      4. Step-by-step derivation
        1. Simplified61.8%

          \[\leadsto \color{blue}{x} \]

        if 1.50000000000000016e-67 < y

        1. Initial program 90.7%

          \[x + \left(y \cdot z\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right) \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. associate-*l*N/A

            \[\leadsto \mathsf{+.f64}\left(x, \left(y \cdot \color{blue}{\left(z \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right)\right)}\right)\right) \]
          2. *-commutativeN/A

            \[\leadsto \mathsf{+.f64}\left(x, \left(\left(z \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right)\right) \cdot \color{blue}{y}\right)\right) \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\left(z \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right)\right), \color{blue}{y}\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(z, \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right)\right), y\right)\right) \]
          5. --lowering--.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(\tanh \left(\frac{t}{y}\right), \tanh \left(\frac{x}{y}\right)\right)\right), y\right)\right) \]
          6. tanh-lowering-tanh.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(\mathsf{tanh.f64}\left(\left(\frac{t}{y}\right)\right), \tanh \left(\frac{x}{y}\right)\right)\right), y\right)\right) \]
          7. /-lowering-/.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(\mathsf{tanh.f64}\left(\mathsf{/.f64}\left(t, y\right)\right), \tanh \left(\frac{x}{y}\right)\right)\right), y\right)\right) \]
          8. tanh-lowering-tanh.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(\mathsf{tanh.f64}\left(\mathsf{/.f64}\left(t, y\right)\right), \mathsf{tanh.f64}\left(\left(\frac{x}{y}\right)\right)\right)\right), y\right)\right) \]
          9. /-lowering-/.f6495.9%

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(\mathsf{tanh.f64}\left(\mathsf{/.f64}\left(t, y\right)\right), \mathsf{tanh.f64}\left(\mathsf{/.f64}\left(x, y\right)\right)\right)\right), y\right)\right) \]
        4. Applied egg-rr95.9%

          \[\leadsto x + \color{blue}{\left(z \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right)\right) \cdot y} \]
        5. Taylor expanded in x around 0

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(\mathsf{tanh.f64}\left(\mathsf{/.f64}\left(t, y\right)\right), \color{blue}{\left(\frac{x}{y}\right)}\right)\right), y\right)\right) \]
        6. Step-by-step derivation
          1. /-lowering-/.f6486.4%

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(\mathsf{tanh.f64}\left(\mathsf{/.f64}\left(t, y\right)\right), \mathsf{/.f64}\left(x, y\right)\right)\right), y\right)\right) \]
        7. Simplified86.4%

          \[\leadsto x + \left(z \cdot \left(\tanh \left(\frac{t}{y}\right) - \color{blue}{\frac{x}{y}}\right)\right) \cdot y \]
      5. Recombined 2 regimes into one program.
      6. Final simplification68.8%

        \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 1.5 \cdot 10^{-67}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \left(z \cdot \left(\tanh \left(\frac{t}{y}\right) - \frac{x}{y}\right)\right)\\ \end{array} \]
      7. Add Preprocessing

      Alternative 5: 69.5% accurate, 17.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 78000000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \left(t - x\right)\\ \end{array} \end{array} \]
      (FPCore (x y z t)
       :precision binary64
       (if (<= y 78000000.0) x (+ x (* z (- t x)))))
      double code(double x, double y, double z, double t) {
      	double tmp;
      	if (y <= 78000000.0) {
      		tmp = x;
      	} else {
      		tmp = x + (z * (t - x));
      	}
      	return tmp;
      }
      
      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
          real(8) :: tmp
          if (y <= 78000000.0d0) then
              tmp = x
          else
              tmp = x + (z * (t - x))
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t) {
      	double tmp;
      	if (y <= 78000000.0) {
      		tmp = x;
      	} else {
      		tmp = x + (z * (t - x));
      	}
      	return tmp;
      }
      
      def code(x, y, z, t):
      	tmp = 0
      	if y <= 78000000.0:
      		tmp = x
      	else:
      		tmp = x + (z * (t - x))
      	return tmp
      
      function code(x, y, z, t)
      	tmp = 0.0
      	if (y <= 78000000.0)
      		tmp = x;
      	else
      		tmp = Float64(x + Float64(z * Float64(t - x)));
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t)
      	tmp = 0.0;
      	if (y <= 78000000.0)
      		tmp = x;
      	else
      		tmp = x + (z * (t - x));
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_] := If[LessEqual[y, 78000000.0], x, N[(x + N[(z * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;y \leq 78000000:\\
      \;\;\;\;x\\
      
      \mathbf{else}:\\
      \;\;\;\;x + z \cdot \left(t - x\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if y < 7.8e7

        1. Initial program 96.6%

          \[x + \left(y \cdot z\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right) \]
        2. Add Preprocessing
        3. Taylor expanded in x around inf

          \[\leadsto \color{blue}{x} \]
        4. Step-by-step derivation
          1. Simplified62.4%

            \[\leadsto \color{blue}{x} \]

          if 7.8e7 < y

          1. Initial program 88.3%

            \[x + \left(y \cdot z\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right) \]
          2. Add Preprocessing
          3. Taylor expanded in y around inf

            \[\leadsto \color{blue}{x + z \cdot \left(t - x\right)} \]
          4. Step-by-step derivation
            1. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(x, \color{blue}{\left(z \cdot \left(t - x\right)\right)}\right) \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(z, \color{blue}{\left(t - x\right)}\right)\right) \]
            3. --lowering--.f6479.9%

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(t, \color{blue}{x}\right)\right)\right) \]
          5. Simplified79.9%

            \[\leadsto \color{blue}{x + z \cdot \left(t - x\right)} \]
        5. Recombined 2 regimes into one program.
        6. Add Preprocessing

        Alternative 6: 63.8% accurate, 21.3× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 600000000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - z\right)\\ \end{array} \end{array} \]
        (FPCore (x y z t)
         :precision binary64
         (if (<= y 600000000.0) x (* x (- 1.0 z))))
        double code(double x, double y, double z, double t) {
        	double tmp;
        	if (y <= 600000000.0) {
        		tmp = x;
        	} else {
        		tmp = x * (1.0 - z);
        	}
        	return tmp;
        }
        
        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
            real(8) :: tmp
            if (y <= 600000000.0d0) then
                tmp = x
            else
                tmp = x * (1.0d0 - z)
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z, double t) {
        	double tmp;
        	if (y <= 600000000.0) {
        		tmp = x;
        	} else {
        		tmp = x * (1.0 - z);
        	}
        	return tmp;
        }
        
        def code(x, y, z, t):
        	tmp = 0
        	if y <= 600000000.0:
        		tmp = x
        	else:
        		tmp = x * (1.0 - z)
        	return tmp
        
        function code(x, y, z, t)
        	tmp = 0.0
        	if (y <= 600000000.0)
        		tmp = x;
        	else
        		tmp = Float64(x * Float64(1.0 - z));
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t)
        	tmp = 0.0;
        	if (y <= 600000000.0)
        		tmp = x;
        	else
        		tmp = x * (1.0 - z);
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_, t_] := If[LessEqual[y, 600000000.0], x, N[(x * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;y \leq 600000000:\\
        \;\;\;\;x\\
        
        \mathbf{else}:\\
        \;\;\;\;x \cdot \left(1 - z\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if y < 6e8

          1. Initial program 96.6%

            \[x + \left(y \cdot z\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right) \]
          2. Add Preprocessing
          3. Taylor expanded in x around inf

            \[\leadsto \color{blue}{x} \]
          4. Step-by-step derivation
            1. Simplified62.6%

              \[\leadsto \color{blue}{x} \]

            if 6e8 < y

            1. Initial program 88.1%

              \[x + \left(y \cdot z\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right) \]
            2. Add Preprocessing
            3. Taylor expanded in y around inf

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, z\right), \color{blue}{\left(\frac{t - x}{y}\right)}\right)\right) \]
            4. Step-by-step derivation
              1. /-lowering-/.f64N/A

                \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, z\right), \mathsf{/.f64}\left(\left(t - x\right), \color{blue}{y}\right)\right)\right) \]
              2. --lowering--.f6469.4%

                \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, z\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), y\right)\right)\right) \]
            5. Simplified69.4%

              \[\leadsto x + \left(y \cdot z\right) \cdot \color{blue}{\frac{t - x}{y}} \]
            6. Taylor expanded in x around inf

              \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot z\right)} \]
            7. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + -1 \cdot z\right)}\right) \]
              2. mul-1-negN/A

                \[\leadsto \mathsf{*.f64}\left(x, \left(1 + \left(\mathsf{neg}\left(z\right)\right)\right)\right) \]
              3. unsub-negN/A

                \[\leadsto \mathsf{*.f64}\left(x, \left(1 - \color{blue}{z}\right)\right) \]
              4. --lowering--.f6468.0%

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \color{blue}{z}\right)\right) \]
            8. Simplified68.0%

              \[\leadsto \color{blue}{x \cdot \left(1 - z\right)} \]
          5. Recombined 2 regimes into one program.
          6. Add Preprocessing

          Alternative 7: 60.5% accurate, 26.6× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.35 \cdot 10^{+232}:\\ \;\;\;\;z \cdot t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
          (FPCore (x y z t) :precision binary64 (if (<= z -1.35e+232) (* z t) x))
          double code(double x, double y, double z, double t) {
          	double tmp;
          	if (z <= -1.35e+232) {
          		tmp = z * t;
          	} else {
          		tmp = x;
          	}
          	return tmp;
          }
          
          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
              real(8) :: tmp
              if (z <= (-1.35d+232)) then
                  tmp = z * t
              else
                  tmp = x
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t) {
          	double tmp;
          	if (z <= -1.35e+232) {
          		tmp = z * t;
          	} else {
          		tmp = x;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t):
          	tmp = 0
          	if z <= -1.35e+232:
          		tmp = z * t
          	else:
          		tmp = x
          	return tmp
          
          function code(x, y, z, t)
          	tmp = 0.0
          	if (z <= -1.35e+232)
          		tmp = Float64(z * t);
          	else
          		tmp = x;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t)
          	tmp = 0.0;
          	if (z <= -1.35e+232)
          		tmp = z * t;
          	else
          		tmp = x;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_] := If[LessEqual[z, -1.35e+232], N[(z * t), $MachinePrecision], x]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;z \leq -1.35 \cdot 10^{+232}:\\
          \;\;\;\;z \cdot t\\
          
          \mathbf{else}:\\
          \;\;\;\;x\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if z < -1.35e232

            1. Initial program 89.0%

              \[x + \left(y \cdot z\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right) \]
            2. Add Preprocessing
            3. Taylor expanded in y around inf

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, z\right), \color{blue}{\left(\frac{t - x}{y}\right)}\right)\right) \]
            4. Step-by-step derivation
              1. /-lowering-/.f64N/A

                \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, z\right), \mathsf{/.f64}\left(\left(t - x\right), \color{blue}{y}\right)\right)\right) \]
              2. --lowering--.f6456.2%

                \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, z\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), y\right)\right)\right) \]
            5. Simplified56.2%

              \[\leadsto x + \left(y \cdot z\right) \cdot \color{blue}{\frac{t - x}{y}} \]
            6. Taylor expanded in x around 0

              \[\leadsto \color{blue}{t \cdot z} \]
            7. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto z \cdot \color{blue}{t} \]
              2. *-lowering-*.f6443.6%

                \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{t}\right) \]
            8. Simplified43.6%

              \[\leadsto \color{blue}{z \cdot t} \]

            if -1.35e232 < z

            1. Initial program 95.1%

              \[x + \left(y \cdot z\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right) \]
            2. Add Preprocessing
            3. Taylor expanded in x around inf

              \[\leadsto \color{blue}{x} \]
            4. Step-by-step derivation
              1. Simplified61.3%

                \[\leadsto \color{blue}{x} \]
            5. Recombined 2 regimes into one program.
            6. Add Preprocessing

            Alternative 8: 60.8% accurate, 213.0× speedup?

            \[\begin{array}{l} \\ x \end{array} \]
            (FPCore (x y z t) :precision binary64 x)
            double code(double x, double y, double z, double t) {
            	return x;
            }
            
            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
            end function
            
            public static double code(double x, double y, double z, double t) {
            	return x;
            }
            
            def code(x, y, z, t):
            	return x
            
            function code(x, y, z, t)
            	return x
            end
            
            function tmp = code(x, y, z, t)
            	tmp = x;
            end
            
            code[x_, y_, z_, t_] := x
            
            \begin{array}{l}
            
            \\
            x
            \end{array}
            
            Derivation
            1. Initial program 94.7%

              \[x + \left(y \cdot z\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right) \]
            2. Add Preprocessing
            3. Taylor expanded in x around inf

              \[\leadsto \color{blue}{x} \]
            4. Step-by-step derivation
              1. Simplified58.3%

                \[\leadsto \color{blue}{x} \]
              2. Add Preprocessing

              Developer Target 1: 96.5% accurate, 1.0× speedup?

              \[\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} \]
              (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}
              

              Reproduce

              ?
              herbie shell --seed 2024191 
              (FPCore (x y z t)
                :name "SynthBasics:moogVCF from YampaSynth-0.2"
                :precision binary64
              
                :alt
                (! :herbie-platform default (+ x (* y (* z (- (tanh (/ t y)) (tanh (/ x y)))))))
              
                (+ x (* (* y z) (- (tanh (/ t y)) (tanh (/ x y))))))