SynthBasics:moogVCF from YampaSynth-0.2

Percentage Accurate: 93.5% → 98.9%
Time: 9.7s
Alternatives: 9
Speedup: 0.5×

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 9 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.5% 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.9% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\\ \mathbf{if}\;t\_1 \cdot \left(z \cdot y\right) + x \leq 10^{+308}:\\ \;\;\;\;\mathsf{fma}\left(t\_1 \cdot y, z, x\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\frac{t}{x} - 1\right) \cdot x\right) \cdot z\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- (tanh (/ t y)) (tanh (/ x y)))))
   (if (<= (+ (* t_1 (* z y)) x) 1e+308)
     (fma (* t_1 y) z x)
     (* (* (- (/ t x) 1.0) x) z))))
double code(double x, double y, double z, double t) {
	double t_1 = tanh((t / y)) - tanh((x / y));
	double tmp;
	if (((t_1 * (z * y)) + x) <= 1e+308) {
		tmp = fma((t_1 * y), z, x);
	} else {
		tmp = (((t / x) - 1.0) * x) * z;
	}
	return tmp;
}
function code(x, y, z, t)
	t_1 = Float64(tanh(Float64(t / y)) - tanh(Float64(x / y)))
	tmp = 0.0
	if (Float64(Float64(t_1 * Float64(z * y)) + x) <= 1e+308)
		tmp = fma(Float64(t_1 * y), z, x);
	else
		tmp = Float64(Float64(Float64(Float64(t / x) - 1.0) * x) * z);
	end
	return tmp
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Tanh[N[(t / y), $MachinePrecision]], $MachinePrecision] - N[Tanh[N[(x / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(t$95$1 * N[(z * y), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], 1e+308], N[(N[(t$95$1 * y), $MachinePrecision] * z + x), $MachinePrecision], N[(N[(N[(N[(t / x), $MachinePrecision] - 1.0), $MachinePrecision] * x), $MachinePrecision] * z), $MachinePrecision]]]
\begin{array}{l}

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

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


\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))))) < 1e308

    1. Initial program 97.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. lift-+.f64N/A

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right) \cdot y\right) \cdot z} + x \]
      7. lower-fma.f64N/A

        \[\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)} \]
      8. lower-*.f6499.0

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right) \cdot y}, z, x\right) \]
    4. Applied rewrites99.0%

      \[\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 1e308 < (+.f64 x (*.f64 (*.f64 y z) (-.f64 (tanh.f64 (/.f64 t y)) (tanh.f64 (/.f64 x y)))))

    1. Initial program 32.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 y around inf

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

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

        \[\leadsto \color{blue}{\left(t - x\right) \cdot z} + x \]
      3. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, z, x\right)} \]
      4. lower--.f6499.9

        \[\leadsto \mathsf{fma}\left(\color{blue}{t - x}, z, x\right) \]
    5. Applied rewrites99.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, z, x\right)} \]
    6. Taylor expanded in z around inf

      \[\leadsto z \cdot \color{blue}{\left(t - x\right)} \]
    7. Step-by-step derivation
      1. Applied rewrites99.9%

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

        \[\leadsto \left(x \cdot \left(\frac{t}{x} - 1\right)\right) \cdot z \]
      3. Step-by-step derivation
        1. Applied rewrites100.0%

          \[\leadsto \left(\left(\frac{t}{x} - 1\right) \cdot x\right) \cdot z \]
      4. Recombined 2 regimes into one program.
      5. Final simplification99.1%

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

      Alternative 2: 71.5% accurate, 1.6× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\left(\frac{t}{y} - \tanh \left(\frac{x}{y}\right)\right) \cdot y, z, x\right)\\ \mathbf{if}\;z \leq -7 \cdot 10^{-35}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-18}:\\ \;\;\;\;\mathsf{fma}\left(-x, z, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t)
       :precision binary64
       (let* ((t_1 (fma (* (- (/ t y) (tanh (/ x y))) y) z x)))
         (if (<= z -7e-35) t_1 (if (<= z 2.4e-18) (fma (- x) z x) t_1))))
      double code(double x, double y, double z, double t) {
      	double t_1 = fma((((t / y) - tanh((x / y))) * y), z, x);
      	double tmp;
      	if (z <= -7e-35) {
      		tmp = t_1;
      	} else if (z <= 2.4e-18) {
      		tmp = fma(-x, z, x);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      function code(x, y, z, t)
      	t_1 = fma(Float64(Float64(Float64(t / y) - tanh(Float64(x / y))) * y), z, x)
      	tmp = 0.0
      	if (z <= -7e-35)
      		tmp = t_1;
      	elseif (z <= 2.4e-18)
      		tmp = fma(Float64(-x), z, x);
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(N[(N[(t / y), $MachinePrecision] - N[Tanh[N[(x / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision] * z + x), $MachinePrecision]}, If[LessEqual[z, -7e-35], t$95$1, If[LessEqual[z, 2.4e-18], N[((-x) * z + x), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \mathsf{fma}\left(\left(\frac{t}{y} - \tanh \left(\frac{x}{y}\right)\right) \cdot y, z, x\right)\\
      \mathbf{if}\;z \leq -7 \cdot 10^{-35}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;z \leq 2.4 \cdot 10^{-18}:\\
      \;\;\;\;\mathsf{fma}\left(-x, z, x\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if z < -6.99999999999999992e-35 or 2.39999999999999994e-18 < z

        1. Initial program 89.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. Step-by-step derivation
          1. lift-+.f64N/A

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

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

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

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

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

            \[\leadsto \color{blue}{\left(\left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right) \cdot y\right) \cdot z} + x \]
          7. lower-fma.f64N/A

            \[\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)} \]
          8. lower-*.f6495.4

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

          \[\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)} \]
        5. Taylor expanded in t around 0

          \[\leadsto \mathsf{fma}\left(\left(\color{blue}{\frac{t}{y}} - \tanh \left(\frac{x}{y}\right)\right) \cdot y, z, x\right) \]
        6. Step-by-step derivation
          1. lower-/.f6455.0

            \[\leadsto \mathsf{fma}\left(\left(\color{blue}{\frac{t}{y}} - \tanh \left(\frac{x}{y}\right)\right) \cdot y, z, x\right) \]
        7. Applied rewrites55.0%

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

        if -6.99999999999999992e-35 < z < 2.39999999999999994e-18

        1. Initial program 99.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. +-commutativeN/A

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

            \[\leadsto \color{blue}{\left(t - x\right) \cdot z} + x \]
          3. lower-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, z, x\right)} \]
          4. lower--.f6474.1

            \[\leadsto \mathsf{fma}\left(\color{blue}{t - x}, z, x\right) \]
        5. Applied rewrites74.1%

          \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, z, x\right)} \]
        6. Taylor expanded in t around 0

          \[\leadsto \mathsf{fma}\left(-1 \cdot x, z, x\right) \]
        7. Step-by-step derivation
          1. Applied rewrites79.9%

            \[\leadsto \mathsf{fma}\left(-x, z, x\right) \]
        8. Recombined 2 regimes into one program.
        9. Add Preprocessing

        Alternative 3: 64.9% accurate, 1.6× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 2.45 \cdot 10^{+160}:\\ \;\;\;\;\left(\frac{t}{y} - \tanh \left(\frac{x}{y}\right)\right) \cdot \left(z \cdot y\right) + x\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t - x, z, x\right)\\ \end{array} \end{array} \]
        (FPCore (x y z t)
         :precision binary64
         (if (<= y 2.45e+160)
           (+ (* (- (/ t y) (tanh (/ x y))) (* z y)) x)
           (fma (- t x) z x)))
        double code(double x, double y, double z, double t) {
        	double tmp;
        	if (y <= 2.45e+160) {
        		tmp = (((t / y) - tanh((x / y))) * (z * y)) + x;
        	} else {
        		tmp = fma((t - x), z, x);
        	}
        	return tmp;
        }
        
        function code(x, y, z, t)
        	tmp = 0.0
        	if (y <= 2.45e+160)
        		tmp = Float64(Float64(Float64(Float64(t / y) - tanh(Float64(x / y))) * Float64(z * y)) + x);
        	else
        		tmp = fma(Float64(t - x), z, x);
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_] := If[LessEqual[y, 2.45e+160], N[(N[(N[(N[(t / y), $MachinePrecision] - N[Tanh[N[(x / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(z * y), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(N[(t - x), $MachinePrecision] * z + x), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;y \leq 2.45 \cdot 10^{+160}:\\
        \;\;\;\;\left(\frac{t}{y} - \tanh \left(\frac{x}{y}\right)\right) \cdot \left(z \cdot y\right) + x\\
        
        \mathbf{else}:\\
        \;\;\;\;\mathsf{fma}\left(t - x, z, x\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if y < 2.4500000000000001e160

          1. Initial program 95.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 t around 0

            \[\leadsto x + \left(y \cdot z\right) \cdot \left(\color{blue}{\frac{t}{y}} - \tanh \left(\frac{x}{y}\right)\right) \]
          4. Step-by-step derivation
            1. lower-/.f6456.9

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

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

          if 2.4500000000000001e160 < y

          1. Initial program 83.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 \color{blue}{x + z \cdot \left(t - x\right)} \]
          4. Step-by-step derivation
            1. +-commutativeN/A

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

              \[\leadsto \color{blue}{\left(t - x\right) \cdot z} + x \]
            3. lower-fma.f64N/A

              \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, z, x\right)} \]
            4. lower--.f6486.0

              \[\leadsto \mathsf{fma}\left(\color{blue}{t - x}, z, x\right) \]
          5. Applied rewrites86.0%

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

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

        Alternative 4: 58.2% accurate, 8.2× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 8 \cdot 10^{-86}:\\ \;\;\;\;\mathsf{fma}\left(z \cdot y, \frac{t}{y}, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t - x, z, x\right)\\ \end{array} \end{array} \]
        (FPCore (x y z t)
         :precision binary64
         (if (<= y 8e-86) (fma (* z y) (/ t y) x) (fma (- t x) z x)))
        double code(double x, double y, double z, double t) {
        	double tmp;
        	if (y <= 8e-86) {
        		tmp = fma((z * y), (t / y), x);
        	} else {
        		tmp = fma((t - x), z, x);
        	}
        	return tmp;
        }
        
        function code(x, y, z, t)
        	tmp = 0.0
        	if (y <= 8e-86)
        		tmp = fma(Float64(z * y), Float64(t / y), x);
        	else
        		tmp = fma(Float64(t - x), z, x);
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_] := If[LessEqual[y, 8e-86], N[(N[(z * y), $MachinePrecision] * N[(t / y), $MachinePrecision] + x), $MachinePrecision], N[(N[(t - x), $MachinePrecision] * z + x), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;y \leq 8 \cdot 10^{-86}:\\
        \;\;\;\;\mathsf{fma}\left(z \cdot y, \frac{t}{y}, x\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;\mathsf{fma}\left(t - x, z, x\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if y < 8.00000000000000068e-86

          1. Initial program 94.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 x + \left(y \cdot z\right) \cdot \color{blue}{\frac{t - x}{y}} \]
          4. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto x + \left(y \cdot z\right) \cdot \color{blue}{\frac{t - x}{y}} \]
            2. lower--.f6438.0

              \[\leadsto x + \left(y \cdot z\right) \cdot \frac{\color{blue}{t - x}}{y} \]
          5. Applied rewrites38.0%

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

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

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

              \[\leadsto \color{blue}{\left(y \cdot z\right) \cdot \frac{t - x}{y}} + x \]
            4. lower-fma.f6438.0

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

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

              \[\leadsto \mathsf{fma}\left(\color{blue}{z \cdot y}, \frac{t - x}{y}, x\right) \]
            7. lower-*.f6438.0

              \[\leadsto \mathsf{fma}\left(\color{blue}{z \cdot y}, \frac{t - x}{y}, x\right) \]
          7. Applied rewrites38.0%

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

            \[\leadsto \mathsf{fma}\left(z \cdot y, \frac{t}{\color{blue}{y}}, x\right) \]
          9. Step-by-step derivation
            1. Applied rewrites48.9%

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

            if 8.00000000000000068e-86 < y

            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 y around inf

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

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

                \[\leadsto \color{blue}{\left(t - x\right) \cdot z} + x \]
              3. lower-fma.f64N/A

                \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, z, x\right)} \]
              4. lower--.f6469.1

                \[\leadsto \mathsf{fma}\left(\color{blue}{t - x}, z, x\right) \]
            5. Applied rewrites69.1%

              \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, z, x\right)} \]
          10. Recombined 2 regimes into one program.
          11. Add Preprocessing

          Alternative 5: 62.2% accurate, 11.4× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(t - x\right) \cdot z\\ \mathbf{if}\;z \leq -4.8 \cdot 10^{+72}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{-7}:\\ \;\;\;\;\mathsf{fma}\left(-x, z, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
          (FPCore (x y z t)
           :precision binary64
           (let* ((t_1 (* (- t x) z)))
             (if (<= z -4.8e+72) t_1 (if (<= z 4.3e-7) (fma (- x) z x) t_1))))
          double code(double x, double y, double z, double t) {
          	double t_1 = (t - x) * z;
          	double tmp;
          	if (z <= -4.8e+72) {
          		tmp = t_1;
          	} else if (z <= 4.3e-7) {
          		tmp = fma(-x, z, x);
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          function code(x, y, z, t)
          	t_1 = Float64(Float64(t - x) * z)
          	tmp = 0.0
          	if (z <= -4.8e+72)
          		tmp = t_1;
          	elseif (z <= 4.3e-7)
          		tmp = fma(Float64(-x), z, x);
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -4.8e+72], t$95$1, If[LessEqual[z, 4.3e-7], N[((-x) * z + x), $MachinePrecision], t$95$1]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := \left(t - x\right) \cdot z\\
          \mathbf{if}\;z \leq -4.8 \cdot 10^{+72}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;z \leq 4.3 \cdot 10^{-7}:\\
          \;\;\;\;\mathsf{fma}\left(-x, z, x\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if z < -4.8000000000000002e72 or 4.3000000000000001e-7 < z

            1. Initial program 87.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 \color{blue}{x + z \cdot \left(t - x\right)} \]
            4. Step-by-step derivation
              1. +-commutativeN/A

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

                \[\leadsto \color{blue}{\left(t - x\right) \cdot z} + x \]
              3. lower-fma.f64N/A

                \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, z, x\right)} \]
              4. lower--.f6442.5

                \[\leadsto \mathsf{fma}\left(\color{blue}{t - x}, z, x\right) \]
            5. Applied rewrites42.5%

              \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, z, x\right)} \]
            6. Taylor expanded in z around inf

              \[\leadsto z \cdot \color{blue}{\left(t - x\right)} \]
            7. Step-by-step derivation
              1. Applied rewrites42.3%

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

              if -4.8000000000000002e72 < z < 4.3000000000000001e-7

              1. Initial program 99.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. +-commutativeN/A

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

                  \[\leadsto \color{blue}{\left(t - x\right) \cdot z} + x \]
                3. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, z, x\right)} \]
                4. lower--.f6469.5

                  \[\leadsto \mathsf{fma}\left(\color{blue}{t - x}, z, x\right) \]
              5. Applied rewrites69.5%

                \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, z, x\right)} \]
              6. Taylor expanded in t around 0

                \[\leadsto \mathsf{fma}\left(-1 \cdot x, z, x\right) \]
              7. Step-by-step derivation
                1. Applied rewrites74.2%

                  \[\leadsto \mathsf{fma}\left(-x, z, x\right) \]
              8. Recombined 2 regimes into one program.
              9. Add Preprocessing

              Alternative 6: 21.4% accurate, 11.9× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(-x\right) \cdot z\\ \mathbf{if}\;x \leq -6.7 \cdot 10^{-136}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 1.9 \cdot 10^{-14}:\\ \;\;\;\;t \cdot z\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
              (FPCore (x y z t)
               :precision binary64
               (let* ((t_1 (* (- x) z)))
                 (if (<= x -6.7e-136) t_1 (if (<= x 1.9e-14) (* t z) t_1))))
              double code(double x, double y, double z, double t) {
              	double t_1 = -x * z;
              	double tmp;
              	if (x <= -6.7e-136) {
              		tmp = t_1;
              	} else if (x <= 1.9e-14) {
              		tmp = t * z;
              	} else {
              		tmp = t_1;
              	}
              	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 * z
                  if (x <= (-6.7d-136)) then
                      tmp = t_1
                  else if (x <= 1.9d-14) then
                      tmp = t * z
                  else
                      tmp = t_1
                  end if
                  code = tmp
              end function
              
              public static double code(double x, double y, double z, double t) {
              	double t_1 = -x * z;
              	double tmp;
              	if (x <= -6.7e-136) {
              		tmp = t_1;
              	} else if (x <= 1.9e-14) {
              		tmp = t * z;
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t):
              	t_1 = -x * z
              	tmp = 0
              	if x <= -6.7e-136:
              		tmp = t_1
              	elif x <= 1.9e-14:
              		tmp = t * z
              	else:
              		tmp = t_1
              	return tmp
              
              function code(x, y, z, t)
              	t_1 = Float64(Float64(-x) * z)
              	tmp = 0.0
              	if (x <= -6.7e-136)
              		tmp = t_1;
              	elseif (x <= 1.9e-14)
              		tmp = Float64(t * z);
              	else
              		tmp = t_1;
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t)
              	t_1 = -x * z;
              	tmp = 0.0;
              	if (x <= -6.7e-136)
              		tmp = t_1;
              	elseif (x <= 1.9e-14)
              		tmp = t * z;
              	else
              		tmp = t_1;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_] := Block[{t$95$1 = N[((-x) * z), $MachinePrecision]}, If[LessEqual[x, -6.7e-136], t$95$1, If[LessEqual[x, 1.9e-14], N[(t * z), $MachinePrecision], t$95$1]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := \left(-x\right) \cdot z\\
              \mathbf{if}\;x \leq -6.7 \cdot 10^{-136}:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;x \leq 1.9 \cdot 10^{-14}:\\
              \;\;\;\;t \cdot z\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if x < -6.6999999999999998e-136 or 1.9000000000000001e-14 < x

                1. Initial program 95.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 y around inf

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

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

                    \[\leadsto \color{blue}{\left(t - x\right) \cdot z} + x \]
                  3. lower-fma.f64N/A

                    \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, z, x\right)} \]
                  4. lower--.f6462.0

                    \[\leadsto \mathsf{fma}\left(\color{blue}{t - x}, z, x\right) \]
                5. Applied rewrites62.0%

                  \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, z, x\right)} \]
                6. Taylor expanded in z around inf

                  \[\leadsto z \cdot \color{blue}{\left(t - x\right)} \]
                7. Step-by-step derivation
                  1. Applied rewrites23.2%

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

                    \[\leadsto \left(-1 \cdot x\right) \cdot z \]
                  3. Step-by-step derivation
                    1. Applied rewrites19.7%

                      \[\leadsto \left(-x\right) \cdot z \]

                    if -6.6999999999999998e-136 < x < 1.9000000000000001e-14

                    1. Initial program 91.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 y around inf

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

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

                        \[\leadsto \color{blue}{\left(t - x\right) \cdot z} + x \]
                      3. lower-fma.f64N/A

                        \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, z, x\right)} \]
                      4. lower--.f6448.2

                        \[\leadsto \mathsf{fma}\left(\color{blue}{t - x}, z, x\right) \]
                    5. Applied rewrites48.2%

                      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, z, x\right)} \]
                    6. Taylor expanded in t around inf

                      \[\leadsto t \cdot \color{blue}{z} \]
                    7. Step-by-step derivation
                      1. Applied rewrites27.4%

                        \[\leadsto t \cdot \color{blue}{z} \]
                    8. Recombined 2 regimes into one program.
                    9. Add Preprocessing

                    Alternative 7: 59.4% accurate, 14.9× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 1660000000:\\ \;\;\;\;\mathsf{fma}\left(-x, z, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t - x, z, x\right)\\ \end{array} \end{array} \]
                    (FPCore (x y z t)
                     :precision binary64
                     (if (<= y 1660000000.0) (fma (- x) z x) (fma (- t x) z x)))
                    double code(double x, double y, double z, double t) {
                    	double tmp;
                    	if (y <= 1660000000.0) {
                    		tmp = fma(-x, z, x);
                    	} else {
                    		tmp = fma((t - x), z, x);
                    	}
                    	return tmp;
                    }
                    
                    function code(x, y, z, t)
                    	tmp = 0.0
                    	if (y <= 1660000000.0)
                    		tmp = fma(Float64(-x), z, x);
                    	else
                    		tmp = fma(Float64(t - x), z, x);
                    	end
                    	return tmp
                    end
                    
                    code[x_, y_, z_, t_] := If[LessEqual[y, 1660000000.0], N[((-x) * z + x), $MachinePrecision], N[(N[(t - x), $MachinePrecision] * z + x), $MachinePrecision]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;y \leq 1660000000:\\
                    \;\;\;\;\mathsf{fma}\left(-x, z, x\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\mathsf{fma}\left(t - x, z, x\right)\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if y < 1.66e9

                      1. Initial program 94.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 y around inf

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

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

                          \[\leadsto \color{blue}{\left(t - x\right) \cdot z} + x \]
                        3. lower-fma.f64N/A

                          \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, z, x\right)} \]
                        4. lower--.f6450.1

                          \[\leadsto \mathsf{fma}\left(\color{blue}{t - x}, z, x\right) \]
                      5. Applied rewrites50.1%

                        \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, z, x\right)} \]
                      6. Taylor expanded in t around 0

                        \[\leadsto \mathsf{fma}\left(-1 \cdot x, z, x\right) \]
                      7. Step-by-step derivation
                        1. Applied rewrites48.0%

                          \[\leadsto \mathsf{fma}\left(-x, z, x\right) \]

                        if 1.66e9 < y

                        1. Initial program 91.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. +-commutativeN/A

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

                            \[\leadsto \color{blue}{\left(t - x\right) \cdot z} + x \]
                          3. lower-fma.f64N/A

                            \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, z, x\right)} \]
                          4. lower--.f6475.7

                            \[\leadsto \mathsf{fma}\left(\color{blue}{t - x}, z, x\right) \]
                        5. Applied rewrites75.7%

                          \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, z, x\right)} \]
                      8. Recombined 2 regimes into one program.
                      9. Add Preprocessing

                      Alternative 8: 27.2% accurate, 26.6× speedup?

                      \[\begin{array}{l} \\ \left(t - x\right) \cdot z \end{array} \]
                      (FPCore (x y z t) :precision binary64 (* (- t x) z))
                      double code(double x, double y, double z, double t) {
                      	return (t - x) * z;
                      }
                      
                      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 = (t - x) * z
                      end function
                      
                      public static double code(double x, double y, double z, double t) {
                      	return (t - x) * z;
                      }
                      
                      def code(x, y, z, t):
                      	return (t - x) * z
                      
                      function code(x, y, z, t)
                      	return Float64(Float64(t - x) * z)
                      end
                      
                      function tmp = code(x, y, z, t)
                      	tmp = (t - x) * z;
                      end
                      
                      code[x_, y_, z_, t_] := N[(N[(t - x), $MachinePrecision] * z), $MachinePrecision]
                      
                      \begin{array}{l}
                      
                      \\
                      \left(t - x\right) \cdot z
                      \end{array}
                      
                      Derivation
                      1. Initial program 93.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 \color{blue}{x + z \cdot \left(t - x\right)} \]
                      4. Step-by-step derivation
                        1. +-commutativeN/A

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

                          \[\leadsto \color{blue}{\left(t - x\right) \cdot z} + x \]
                        3. lower-fma.f64N/A

                          \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, z, x\right)} \]
                        4. lower--.f6456.1

                          \[\leadsto \mathsf{fma}\left(\color{blue}{t - x}, z, x\right) \]
                      5. Applied rewrites56.1%

                        \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, z, x\right)} \]
                      6. Taylor expanded in z around inf

                        \[\leadsto z \cdot \color{blue}{\left(t - x\right)} \]
                      7. Step-by-step derivation
                        1. Applied rewrites27.1%

                          \[\leadsto \left(t - x\right) \cdot \color{blue}{z} \]
                        2. Add Preprocessing

                        Alternative 9: 17.8% accurate, 39.8× speedup?

                        \[\begin{array}{l} \\ t \cdot z \end{array} \]
                        (FPCore (x y z t) :precision binary64 (* t z))
                        double code(double x, double y, double z, double t) {
                        	return t * z;
                        }
                        
                        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 = t * z
                        end function
                        
                        public static double code(double x, double y, double z, double t) {
                        	return t * z;
                        }
                        
                        def code(x, y, z, t):
                        	return t * z
                        
                        function code(x, y, z, t)
                        	return Float64(t * z)
                        end
                        
                        function tmp = code(x, y, z, t)
                        	tmp = t * z;
                        end
                        
                        code[x_, y_, z_, t_] := N[(t * z), $MachinePrecision]
                        
                        \begin{array}{l}
                        
                        \\
                        t \cdot z
                        \end{array}
                        
                        Derivation
                        1. Initial program 93.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 \color{blue}{x + z \cdot \left(t - x\right)} \]
                        4. Step-by-step derivation
                          1. +-commutativeN/A

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

                            \[\leadsto \color{blue}{\left(t - x\right) \cdot z} + x \]
                          3. lower-fma.f64N/A

                            \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, z, x\right)} \]
                          4. lower--.f6456.1

                            \[\leadsto \mathsf{fma}\left(\color{blue}{t - x}, z, x\right) \]
                        5. Applied rewrites56.1%

                          \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, z, x\right)} \]
                        6. Taylor expanded in t around inf

                          \[\leadsto t \cdot \color{blue}{z} \]
                        7. Step-by-step derivation
                          1. Applied rewrites15.9%

                            \[\leadsto t \cdot \color{blue}{z} \]
                          2. Add Preprocessing

                          Developer Target 1: 96.9% 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 2024248 
                          (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))))))