SynthBasics:moogVCF from YampaSynth-0.2

Percentage Accurate: 93.2% → 98.4%
Time: 12.5s
Alternatives: 12
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 12 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: 93.2% 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: 98.4% accurate, 0.7× speedup?

\[\begin{array}{l} y_m = \left|y\right| \\ \begin{array}{l} \mathbf{if}\;y\_m \leq 9.5 \cdot 10^{+191}:\\ \;\;\;\;\mathsf{fma}\left(y\_m \cdot \left(\tanh \left(\frac{t}{y\_m}\right) - \tanh \left(\frac{x}{y\_m}\right)\right), z, 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 9.5e+191)
   (fma (* y_m (- (tanh (/ t y_m)) (tanh (/ x y_m)))) z 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 <= 9.5e+191) {
		tmp = fma((y_m * (tanh((t / y_m)) - tanh((x / y_m)))), z, 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 <= 9.5e+191)
		tmp = fma(Float64(y_m * Float64(tanh(Float64(t / y_m)) - tanh(Float64(x / y_m)))), z, 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, 9.5e+191], N[(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] * z + 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 9.5 \cdot 10^{+191}:\\
\;\;\;\;\mathsf{fma}\left(y\_m \cdot \left(\tanh \left(\frac{t}{y\_m}\right) - \tanh \left(\frac{x}{y\_m}\right)\right), z, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 9.4999999999999998e191

    1. Initial program 93.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. Step-by-step derivation
      1. +-commutativeN/A

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

        \[\leadsto \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right) \cdot \left(y \cdot z\right) + x \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right) \cdot y\right) \cdot z + x \]
      4. fma-defineN/A

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

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

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

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

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

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

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\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), y\right), z, x\right) \]
      11. /-lowering-/.f6497.8%

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\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), y\right), z, x\right) \]
    4. Applied egg-rr97.8%

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

    if 9.4999999999999998e191 < y

    1. Initial program 70.2%

      \[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--.f6495.7%

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

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

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

Alternative 2: 98.4% accurate, 1.0× speedup?

\[\begin{array}{l} y_m = \left|y\right| \\ \begin{array}{l} \mathbf{if}\;y\_m \leq 3.1 \cdot 10^{+192}:\\ \;\;\;\;x + \left(y\_m \cdot \left(\tanh \left(\frac{t}{y\_m}\right) - \tanh \left(\frac{x}{y\_m}\right)\right)\right) \cdot z\\ \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 3.1e+192)
   (+ x (* (* y_m (- (tanh (/ t y_m)) (tanh (/ x 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 <= 3.1e+192) {
		tmp = x + ((y_m * (tanh((t / y_m)) - tanh((x / 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 <= 3.1d+192) then
        tmp = x + ((y_m * (tanh((t / y_m)) - tanh((x / 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 <= 3.1e+192) {
		tmp = x + ((y_m * (Math.tanh((t / y_m)) - Math.tanh((x / 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 <= 3.1e+192:
		tmp = x + ((y_m * (math.tanh((t / y_m)) - math.tanh((x / 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 <= 3.1e+192)
		tmp = Float64(x + Float64(Float64(y_m * Float64(tanh(Float64(t / y_m)) - tanh(Float64(x / 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 <= 3.1e+192)
		tmp = x + ((y_m * (tanh((t / y_m)) - tanh((x / 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, 3.1e+192], N[(x + N[(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] * z), $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 3.1 \cdot 10^{+192}:\\
\;\;\;\;x + \left(y\_m \cdot \left(\tanh \left(\frac{t}{y\_m}\right) - \tanh \left(\frac{x}{y\_m}\right)\right)\right) \cdot z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 3.0999999999999999e192

    1. Initial program 93.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. Step-by-step derivation
      1. *-commutativeN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\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), y\right), z\right)\right) \]
      9. /-lowering-/.f6497.8%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\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), y\right), z\right)\right) \]
    4. Applied egg-rr97.8%

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

    if 3.0999999999999999e192 < y

    1. Initial program 70.2%

      \[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--.f6495.7%

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

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

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

Alternative 3: 96.6% accurate, 1.0× speedup?

\[\begin{array}{l} y_m = \left|y\right| \\ \begin{array}{l} \mathbf{if}\;y\_m \leq 1.3 \cdot 10^{+169}:\\ \;\;\;\;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 (<= y_m 1.3e+169)
   (+ 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 <= 1.3e+169) {
		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 <= 1.3d+169) 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 <= 1.3e+169) {
		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 <= 1.3e+169:
		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 <= 1.3e+169)
		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 <= 1.3e+169)
		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, 1.3e+169], 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 1.3 \cdot 10^{+169}:\\
\;\;\;\;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}
Derivation
  1. Split input into 2 regimes
  2. if y < 1.3e169

    1. Initial program 93.5%

      \[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 1.3e169 < y

    1. Initial program 72.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 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--.f6494.1%

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

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

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

Alternative 4: 83.0% accurate, 1.7× speedup?

\[\begin{array}{l} y_m = \left|y\right| \\ \begin{array}{l} \mathbf{if}\;y\_m \leq 2.3 \cdot 10^{-100}:\\ \;\;\;\;x\\ \mathbf{elif}\;y\_m \leq 3 \cdot 10^{+192}:\\ \;\;\;\;x + z \cdot \left(y\_m \cdot \left(\tanh \left(\frac{t}{y\_m}\right) - \frac{x}{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 2.3e-100)
   x
   (if (<= y_m 3e+192)
     (+ x (* z (* y_m (- (tanh (/ t y_m)) (/ x 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 <= 2.3e-100) {
		tmp = x;
	} else if (y_m <= 3e+192) {
		tmp = x + (z * (y_m * (tanh((t / y_m)) - (x / 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 <= 2.3d-100) then
        tmp = x
    else if (y_m <= 3d+192) then
        tmp = x + (z * (y_m * (tanh((t / y_m)) - (x / 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 <= 2.3e-100) {
		tmp = x;
	} else if (y_m <= 3e+192) {
		tmp = x + (z * (y_m * (Math.tanh((t / y_m)) - (x / 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 <= 2.3e-100:
		tmp = x
	elif y_m <= 3e+192:
		tmp = x + (z * (y_m * (math.tanh((t / y_m)) - (x / 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 <= 2.3e-100)
		tmp = x;
	elseif (y_m <= 3e+192)
		tmp = Float64(x + Float64(z * Float64(y_m * Float64(tanh(Float64(t / y_m)) - Float64(x / 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 <= 2.3e-100)
		tmp = x;
	elseif (y_m <= 3e+192)
		tmp = x + (z * (y_m * (tanh((t / y_m)) - (x / 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, 2.3e-100], x, If[LessEqual[y$95$m, 3e+192], N[(x + N[(z * N[(y$95$m * N[(N[Tanh[N[(t / y$95$m), $MachinePrecision]], $MachinePrecision] - N[(x / 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 2.3 \cdot 10^{-100}:\\
\;\;\;\;x\\

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

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


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

    1. Initial program 92.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.8%

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

      if 2.29999999999999994e-100 < y < 3e192

      1. Initial program 95.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. Step-by-step derivation
        1. *-commutativeN/A

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

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

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

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

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

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

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

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\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), y\right), z\right)\right) \]
        9. /-lowering-/.f6499.9%

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\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), y\right), z\right)\right) \]
      4. Applied egg-rr99.9%

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

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

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

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

      if 3e192 < y

      1. Initial program 70.2%

        \[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--.f6495.7%

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

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

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

    Alternative 5: 81.7% accurate, 1.7× speedup?

    \[\begin{array}{l} y_m = \left|y\right| \\ \begin{array}{l} \mathbf{if}\;y\_m \leq 5 \cdot 10^{-100}:\\ \;\;\;\;x\\ \mathbf{elif}\;y\_m \leq 1.5 \cdot 10^{+156}:\\ \;\;\;\;x + \left(y\_m \cdot z\right) \cdot \left(\tanh \left(\frac{t}{y\_m}\right) - \frac{x}{y\_m}\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 5e-100)
       x
       (if (<= y_m 1.5e+156)
         (+ x (* (* y_m z) (- (tanh (/ t y_m)) (/ x 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 <= 5e-100) {
    		tmp = x;
    	} else if (y_m <= 1.5e+156) {
    		tmp = x + ((y_m * z) * (tanh((t / y_m)) - (x / 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 <= 5d-100) then
            tmp = x
        else if (y_m <= 1.5d+156) then
            tmp = x + ((y_m * z) * (tanh((t / y_m)) - (x / 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 <= 5e-100) {
    		tmp = x;
    	} else if (y_m <= 1.5e+156) {
    		tmp = x + ((y_m * z) * (Math.tanh((t / y_m)) - (x / 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 <= 5e-100:
    		tmp = x
    	elif y_m <= 1.5e+156:
    		tmp = x + ((y_m * z) * (math.tanh((t / y_m)) - (x / 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 <= 5e-100)
    		tmp = x;
    	elseif (y_m <= 1.5e+156)
    		tmp = Float64(x + Float64(Float64(y_m * z) * Float64(tanh(Float64(t / y_m)) - Float64(x / 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 <= 5e-100)
    		tmp = x;
    	elseif (y_m <= 1.5e+156)
    		tmp = x + ((y_m * z) * (tanh((t / y_m)) - (x / 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, 5e-100], x, If[LessEqual[y$95$m, 1.5e+156], N[(x + N[(N[(y$95$m * z), $MachinePrecision] * N[(N[Tanh[N[(t / y$95$m), $MachinePrecision]], $MachinePrecision] - N[(x / y$95$m), $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 5 \cdot 10^{-100}:\\
    \;\;\;\;x\\
    
    \mathbf{elif}\;y\_m \leq 1.5 \cdot 10^{+156}:\\
    \;\;\;\;x + \left(y\_m \cdot z\right) \cdot \left(\tanh \left(\frac{t}{y\_m}\right) - \frac{x}{y\_m}\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;x + z \cdot \left(t - x\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if y < 5.0000000000000001e-100

      1. Initial program 92.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.8%

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

        if 5.0000000000000001e-100 < y < 1.5e156

        1. Initial program 98.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 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-/.f6481.1%

            \[\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. Simplified81.1%

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

        if 1.5e156 < y

        1. Initial program 72.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 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--.f6494.1%

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

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

      Alternative 6: 83.5% accurate, 1.8× speedup?

      \[\begin{array}{l} y_m = \left|y\right| \\ \begin{array}{l} \mathbf{if}\;y\_m \leq 4.4 \cdot 10^{-100}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \left(y\_m \cdot \tanh \left(\frac{t}{y\_m}\right) - x\right)\\ \end{array} \end{array} \]
      y_m = (fabs.f64 y)
      (FPCore (x y_m z t)
       :precision binary64
       (if (<= y_m 4.4e-100) x (+ x (* z (- (* y_m (tanh (/ t y_m))) x)))))
      y_m = fabs(y);
      double code(double x, double y_m, double z, double t) {
      	double tmp;
      	if (y_m <= 4.4e-100) {
      		tmp = x;
      	} else {
      		tmp = x + (z * ((y_m * tanh((t / y_m))) - 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 <= 4.4d-100) then
              tmp = x
          else
              tmp = x + (z * ((y_m * tanh((t / y_m))) - 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 <= 4.4e-100) {
      		tmp = x;
      	} else {
      		tmp = x + (z * ((y_m * Math.tanh((t / y_m))) - x));
      	}
      	return tmp;
      }
      
      y_m = math.fabs(y)
      def code(x, y_m, z, t):
      	tmp = 0
      	if y_m <= 4.4e-100:
      		tmp = x
      	else:
      		tmp = x + (z * ((y_m * math.tanh((t / y_m))) - x))
      	return tmp
      
      y_m = abs(y)
      function code(x, y_m, z, t)
      	tmp = 0.0
      	if (y_m <= 4.4e-100)
      		tmp = x;
      	else
      		tmp = Float64(x + Float64(z * Float64(Float64(y_m * tanh(Float64(t / y_m))) - x)));
      	end
      	return tmp
      end
      
      y_m = abs(y);
      function tmp_2 = code(x, y_m, z, t)
      	tmp = 0.0;
      	if (y_m <= 4.4e-100)
      		tmp = x;
      	else
      		tmp = x + (z * ((y_m * tanh((t / y_m))) - x));
      	end
      	tmp_2 = tmp;
      end
      
      y_m = N[Abs[y], $MachinePrecision]
      code[x_, y$95$m_, z_, t_] := If[LessEqual[y$95$m, 4.4e-100], x, N[(x + N[(z * N[(N[(y$95$m * N[Tanh[N[(t / y$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      y_m = \left|y\right|
      
      \\
      \begin{array}{l}
      \mathbf{if}\;y\_m \leq 4.4 \cdot 10^{-100}:\\
      \;\;\;\;x\\
      
      \mathbf{else}:\\
      \;\;\;\;x + z \cdot \left(y\_m \cdot \tanh \left(\frac{t}{y\_m}\right) - x\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if y < 4.39999999999999978e-100

        1. Initial program 92.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.8%

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

          if 4.39999999999999978e-100 < y

          1. Initial program 88.8%

            \[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. *-commutativeN/A

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

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

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

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

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

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

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

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\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), y\right), z\right)\right) \]
            9. /-lowering-/.f6497.7%

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\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), y\right), z\right)\right) \]
          4. Applied egg-rr97.7%

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

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

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

            \[\leadsto x + \left(\left(\tanh \left(\frac{t}{y}\right) - \color{blue}{\frac{x}{y}}\right) \cdot y\right) \cdot z \]
          8. Step-by-step derivation
            1. *-commutativeN/A

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

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\left(y \cdot \left(\tanh \left(\frac{t}{y}\right) + \left(\mathsf{neg}\left(\frac{x}{y}\right)\right)\right)\right), z\right)\right) \]
            3. distribute-rgt-inN/A

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

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

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

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

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

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{tanh.f64}\left(\mathsf{/.f64}\left(t, y\right)\right), y\right), \mathsf{*.f64}\left(\left(\mathsf{neg}\left(\frac{x}{y}\right)\right), y\right)\right), z\right)\right) \]
            9. distribute-neg-frac2N/A

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

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{tanh.f64}\left(\mathsf{/.f64}\left(t, y\right)\right), y\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, \left(\mathsf{neg}\left(y\right)\right)\right), y\right)\right), z\right)\right) \]
            11. neg-sub0N/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{tanh.f64}\left(\mathsf{/.f64}\left(t, y\right)\right), y\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, \left(0 - y\right)\right), y\right)\right), z\right)\right) \]
            12. --lowering--.f6485.7%

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

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

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{tanh.f64}\left(\mathsf{/.f64}\left(t, y\right)\right), y\right), \color{blue}{\left(-1 \cdot x\right)}\right), z\right)\right) \]
          11. Step-by-step derivation
            1. mul-1-negN/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{tanh.f64}\left(\mathsf{/.f64}\left(t, y\right)\right), y\right), \left(\mathsf{neg}\left(x\right)\right)\right), z\right)\right) \]
            2. neg-sub0N/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{tanh.f64}\left(\mathsf{/.f64}\left(t, y\right)\right), y\right), \left(0 - x\right)\right), z\right)\right) \]
            3. --lowering--.f6486.8%

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

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

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

        Alternative 7: 78.3% accurate, 17.7× speedup?

        \[\begin{array}{l} y_m = \left|y\right| \\ \begin{array}{l} \mathbf{if}\;y\_m \leq 5.6 \cdot 10^{+35}:\\ \;\;\;\;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 5.6e+35) 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 <= 5.6e+35) {
        		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 <= 5.6d+35) 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 <= 5.6e+35) {
        		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 <= 5.6e+35:
        		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 <= 5.6e+35)
        		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 <= 5.6e+35)
        		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, 5.6e+35], 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 5.6 \cdot 10^{+35}:\\
        \;\;\;\;x\\
        
        \mathbf{else}:\\
        \;\;\;\;x + z \cdot \left(t - x\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if y < 5.59999999999999997e35

          1. Initial program 93.4%

            \[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. Simplified63.0%

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

            if 5.59999999999999997e35 < y

            1. Initial program 81.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 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--.f6489.3%

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

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

          Alternative 8: 71.2% accurate, 21.3× speedup?

          \[\begin{array}{l} y_m = \left|y\right| \\ \begin{array}{l} \mathbf{if}\;y\_m \leq 1.86 \cdot 10^{+31}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot z\\ \end{array} \end{array} \]
          y_m = (fabs.f64 y)
          (FPCore (x y_m z t) :precision binary64 (if (<= y_m 1.86e+31) x (+ x (* t z))))
          y_m = fabs(y);
          double code(double x, double y_m, double z, double t) {
          	double tmp;
          	if (y_m <= 1.86e+31) {
          		tmp = x;
          	} else {
          		tmp = x + (t * 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 <= 1.86d+31) then
                  tmp = x
              else
                  tmp = x + (t * 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 <= 1.86e+31) {
          		tmp = x;
          	} else {
          		tmp = x + (t * z);
          	}
          	return tmp;
          }
          
          y_m = math.fabs(y)
          def code(x, y_m, z, t):
          	tmp = 0
          	if y_m <= 1.86e+31:
          		tmp = x
          	else:
          		tmp = x + (t * z)
          	return tmp
          
          y_m = abs(y)
          function code(x, y_m, z, t)
          	tmp = 0.0
          	if (y_m <= 1.86e+31)
          		tmp = x;
          	else
          		tmp = Float64(x + Float64(t * z));
          	end
          	return tmp
          end
          
          y_m = abs(y);
          function tmp_2 = code(x, y_m, z, t)
          	tmp = 0.0;
          	if (y_m <= 1.86e+31)
          		tmp = x;
          	else
          		tmp = x + (t * z);
          	end
          	tmp_2 = tmp;
          end
          
          y_m = N[Abs[y], $MachinePrecision]
          code[x_, y$95$m_, z_, t_] := If[LessEqual[y$95$m, 1.86e+31], x, N[(x + N[(t * z), $MachinePrecision]), $MachinePrecision]]
          
          \begin{array}{l}
          y_m = \left|y\right|
          
          \\
          \begin{array}{l}
          \mathbf{if}\;y\_m \leq 1.86 \cdot 10^{+31}:\\
          \;\;\;\;x\\
          
          \mathbf{else}:\\
          \;\;\;\;x + t \cdot z\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if y < 1.86000000000000008e31

            1. Initial program 93.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. Simplified62.9%

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

              if 1.86000000000000008e31 < y

              1. Initial program 82.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 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--.f6470.9%

                  \[\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. Simplified70.9%

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

                \[\leadsto \mathsf{+.f64}\left(x, \color{blue}{\left(t \cdot z\right)}\right) \]
              7. Step-by-step derivation
                1. *-commutativeN/A

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

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

                \[\leadsto x + \color{blue}{z \cdot t} \]
            5. Recombined 2 regimes into one program.
            6. Final simplification63.7%

              \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 1.86 \cdot 10^{+31}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot z\\ \end{array} \]
            7. Add Preprocessing

            Alternative 9: 64.9% accurate, 21.3× speedup?

            \[\begin{array}{l} y_m = \left|y\right| \\ \begin{array}{l} \mathbf{if}\;y\_m \leq 7 \cdot 10^{+125}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;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 7e+125) x (* z (- t x))))
            y_m = fabs(y);
            double code(double x, double y_m, double z, double t) {
            	double tmp;
            	if (y_m <= 7e+125) {
            		tmp = x;
            	} else {
            		tmp = 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 <= 7d+125) then
                    tmp = x
                else
                    tmp = 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 <= 7e+125) {
            		tmp = x;
            	} else {
            		tmp = z * (t - x);
            	}
            	return tmp;
            }
            
            y_m = math.fabs(y)
            def code(x, y_m, z, t):
            	tmp = 0
            	if y_m <= 7e+125:
            		tmp = x
            	else:
            		tmp = z * (t - x)
            	return tmp
            
            y_m = abs(y)
            function code(x, y_m, z, t)
            	tmp = 0.0
            	if (y_m <= 7e+125)
            		tmp = x;
            	else
            		tmp = 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 <= 7e+125)
            		tmp = x;
            	else
            		tmp = 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, 7e+125], x, N[(z * N[(t - x), $MachinePrecision]), $MachinePrecision]]
            
            \begin{array}{l}
            y_m = \left|y\right|
            
            \\
            \begin{array}{l}
            \mathbf{if}\;y\_m \leq 7 \cdot 10^{+125}:\\
            \;\;\;\;x\\
            
            \mathbf{else}:\\
            \;\;\;\;z \cdot \left(t - x\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if y < 7.00000000000000023e125

              1. Initial program 93.4%

                \[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.7%

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

                if 7.00000000000000023e125 < y

                1. Initial program 75.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 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--.f6467.7%

                    \[\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. Simplified67.7%

                  \[\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--.f6474.2%

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

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

              Alternative 10: 66.4% accurate, 21.3× speedup?

              \[\begin{array}{l} y_m = \left|y\right| \\ \begin{array}{l} \mathbf{if}\;y\_m \leq 49000:\\ \;\;\;\;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
               (if (<= y_m 49000.0) 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 <= 49000.0) {
              		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 <= 49000.0d0) 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 <= 49000.0) {
              		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 <= 49000.0:
              		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 <= 49000.0)
              		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 <= 49000.0)
              		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, 49000.0], 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 49000:\\
              \;\;\;\;x\\
              
              \mathbf{else}:\\
              \;\;\;\;x \cdot \left(1 - z\right)\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if y < 49000

                1. Initial program 93.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 x around inf

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

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

                  if 49000 < y

                  1. Initial program 84.8%

                    \[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--.f6471.7%

                      \[\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. Simplified71.7%

                    \[\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--.f6455.7%

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

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

                Alternative 11: 59.2% accurate, 26.6× speedup?

                \[\begin{array}{l} y_m = \left|y\right| \\ \begin{array}{l} \mathbf{if}\;y\_m \leq 3.2 \cdot 10^{+143}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot z\\ \end{array} \end{array} \]
                y_m = (fabs.f64 y)
                (FPCore (x y_m z t) :precision binary64 (if (<= y_m 3.2e+143) x (* t z)))
                y_m = fabs(y);
                double code(double x, double y_m, double z, double t) {
                	double tmp;
                	if (y_m <= 3.2e+143) {
                		tmp = x;
                	} else {
                		tmp = t * 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 <= 3.2d+143) then
                        tmp = x
                    else
                        tmp = t * 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 <= 3.2e+143) {
                		tmp = x;
                	} else {
                		tmp = t * z;
                	}
                	return tmp;
                }
                
                y_m = math.fabs(y)
                def code(x, y_m, z, t):
                	tmp = 0
                	if y_m <= 3.2e+143:
                		tmp = x
                	else:
                		tmp = t * z
                	return tmp
                
                y_m = abs(y)
                function code(x, y_m, z, t)
                	tmp = 0.0
                	if (y_m <= 3.2e+143)
                		tmp = x;
                	else
                		tmp = Float64(t * z);
                	end
                	return tmp
                end
                
                y_m = abs(y);
                function tmp_2 = code(x, y_m, z, t)
                	tmp = 0.0;
                	if (y_m <= 3.2e+143)
                		tmp = x;
                	else
                		tmp = t * z;
                	end
                	tmp_2 = tmp;
                end
                
                y_m = N[Abs[y], $MachinePrecision]
                code[x_, y$95$m_, z_, t_] := If[LessEqual[y$95$m, 3.2e+143], x, N[(t * z), $MachinePrecision]]
                
                \begin{array}{l}
                y_m = \left|y\right|
                
                \\
                \begin{array}{l}
                \mathbf{if}\;y\_m \leq 3.2 \cdot 10^{+143}:\\
                \;\;\;\;x\\
                
                \mathbf{else}:\\
                \;\;\;\;t \cdot z\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if y < 3.20000000000000016e143

                  1. Initial program 93.5%

                    \[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.2%

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

                    if 3.20000000000000016e143 < y

                    1. Initial program 74.2%

                      \[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--.f6465.8%

                        \[\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. Simplified65.8%

                      \[\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-*.f6447.8%

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

                      \[\leadsto \color{blue}{z \cdot t} \]
                  5. Recombined 2 regimes into one program.
                  6. Final simplification60.4%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 3.2 \cdot 10^{+143}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot z\\ \end{array} \]
                  7. Add Preprocessing

                  Alternative 12: 60.0% accurate, 213.0× speedup?

                  \[\begin{array}{l} y_m = \left|y\right| \\ x \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}
                  
                  Derivation
                  1. Initial program 91.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 x around inf

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

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

                    Developer Target 1: 96.8% 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 2024163 
                    (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))))))