Numeric.Histogram:binBounds from Chart-1.5.3

Percentage Accurate: 92.7% → 97.5%
Time: 9.8s
Alternatives: 9
Speedup: 1.1×

Specification

?
\[\begin{array}{l} \\ x + \frac{\left(y - x\right) \cdot z}{t} \end{array} \]
(FPCore (x y z t) :precision binary64 (+ x (/ (* (- y x) z) t)))
double code(double x, double y, double z, double t) {
	return x + (((y - x) * z) / t);
}
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 - x) * z) / t)
end function
public static double code(double x, double y, double z, double t) {
	return x + (((y - x) * z) / t);
}
def code(x, y, z, t):
	return x + (((y - x) * z) / t)
function code(x, y, z, t)
	return Float64(x + Float64(Float64(Float64(y - x) * z) / t))
end
function tmp = code(x, y, z, t)
	tmp = x + (((y - x) * z) / t);
end
code[x_, y_, z_, t_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{\left(y - x\right) \cdot z}{t}
\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: 92.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \frac{\left(y - x\right) \cdot z}{t} \end{array} \]
(FPCore (x y z t) :precision binary64 (+ x (/ (* (- y x) z) t)))
double code(double x, double y, double z, double t) {
	return x + (((y - x) * z) / t);
}
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 - x) * z) / t)
end function
public static double code(double x, double y, double z, double t) {
	return x + (((y - x) * z) / t);
}
def code(x, y, z, t):
	return x + (((y - x) * z) / t)
function code(x, y, z, t)
	return Float64(x + Float64(Float64(Float64(y - x) * z) / t))
end
function tmp = code(x, y, z, t)
	tmp = x + (((y - x) * z) / t);
end
code[x_, y_, z_, t_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{\left(y - x\right) \cdot z}{t}
\end{array}

Alternative 1: 97.5% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(\frac{z}{t}, y - x, x\right) \end{array} \]
(FPCore (x y z t) :precision binary64 (fma (/ z t) (- y x) x))
double code(double x, double y, double z, double t) {
	return fma((z / t), (y - x), x);
}
function code(x, y, z, t)
	return fma(Float64(z / t), Float64(y - x), x)
end
code[x_, y_, z_, t_] := N[(N[(z / t), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(\frac{z}{t}, y - x, x\right)
\end{array}
Derivation
  1. Initial program 93.0%

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{z}{t}}, y - x, x\right) \]
    6. --lowering--.f6497.8

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{t}, y - x, x\right)} \]
  5. Add Preprocessing

Alternative 2: 83.4% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;t \leq 3.05 \cdot 10^{-52}:\\
\;\;\;\;\frac{z \cdot \left(y - x\right)}{t}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -7.5e60 or 3.04999999999999995e-52 < t

    1. Initial program 85.9%

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

      \[\leadsto x + \frac{\color{blue}{y} \cdot z}{t} \]
    4. Step-by-step derivation
      1. Simplified81.3%

        \[\leadsto x + \frac{\color{blue}{y} \cdot z}{t} \]
      2. Step-by-step derivation
        1. +-commutativeN/A

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

          \[\leadsto \frac{\color{blue}{z \cdot y}}{t} + x \]
        3. associate-/l*N/A

          \[\leadsto \color{blue}{z \cdot \frac{y}{t}} + x \]
        4. accelerator-lowering-fma.f64N/A

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

          \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{y}{t}}, x\right) \]
      3. Applied egg-rr89.5%

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

      if -7.5e60 < t < 3.04999999999999995e-52

      1. Initial program 99.3%

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{z}{t}}, y - x, x\right) \]
        6. --lowering--.f6497.2

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

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

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

          \[\leadsto z \cdot \color{blue}{\frac{y - x}{t}} \]
        2. associate-/l*N/A

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

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

          \[\leadsto \frac{\color{blue}{z \cdot \left(y - x\right)}}{t} \]
        5. --lowering--.f6486.4

          \[\leadsto \frac{z \cdot \color{blue}{\left(y - x\right)}}{t} \]
      7. Simplified86.4%

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

    Alternative 3: 84.2% accurate, 0.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \frac{y - x}{t}\\ \mathbf{if}\;z \leq -1.16 \cdot 10^{+40}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{-30}:\\ \;\;\;\;x + \frac{z \cdot y}{t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t)
     :precision binary64
     (let* ((t_1 (* z (/ (- y x) t))))
       (if (<= z -1.16e+40) t_1 (if (<= z 6.2e-30) (+ x (/ (* z y) t)) t_1))))
    double code(double x, double y, double z, double t) {
    	double t_1 = z * ((y - x) / t);
    	double tmp;
    	if (z <= -1.16e+40) {
    		tmp = t_1;
    	} else if (z <= 6.2e-30) {
    		tmp = x + ((z * y) / t);
    	} 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 = z * ((y - x) / t)
        if (z <= (-1.16d+40)) then
            tmp = t_1
        else if (z <= 6.2d-30) then
            tmp = x + ((z * y) / t)
        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 = z * ((y - x) / t);
    	double tmp;
    	if (z <= -1.16e+40) {
    		tmp = t_1;
    	} else if (z <= 6.2e-30) {
    		tmp = x + ((z * y) / t);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t):
    	t_1 = z * ((y - x) / t)
    	tmp = 0
    	if z <= -1.16e+40:
    		tmp = t_1
    	elif z <= 6.2e-30:
    		tmp = x + ((z * y) / t)
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z, t)
    	t_1 = Float64(z * Float64(Float64(y - x) / t))
    	tmp = 0.0
    	if (z <= -1.16e+40)
    		tmp = t_1;
    	elseif (z <= 6.2e-30)
    		tmp = Float64(x + Float64(Float64(z * y) / t));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t)
    	t_1 = z * ((y - x) / t);
    	tmp = 0.0;
    	if (z <= -1.16e+40)
    		tmp = t_1;
    	elseif (z <= 6.2e-30)
    		tmp = x + ((z * y) / t);
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.16e+40], t$95$1, If[LessEqual[z, 6.2e-30], N[(x + N[(N[(z * y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := z \cdot \frac{y - x}{t}\\
    \mathbf{if}\;z \leq -1.16 \cdot 10^{+40}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;z \leq 6.2 \cdot 10^{-30}:\\
    \;\;\;\;x + \frac{z \cdot y}{t}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if z < -1.16000000000000012e40 or 6.19999999999999982e-30 < z

      1. Initial program 87.2%

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{z}{t}}, y - x, x\right) \]
        6. --lowering--.f6497.1

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

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

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

          \[\leadsto z \cdot \color{blue}{\frac{y - x}{t}} \]
        2. associate-/l*N/A

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

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

          \[\leadsto \frac{\color{blue}{z \cdot \left(y - x\right)}}{t} \]
        5. --lowering--.f6477.2

          \[\leadsto \frac{z \cdot \color{blue}{\left(y - x\right)}}{t} \]
      7. Simplified77.2%

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

          \[\leadsto \color{blue}{z \cdot \frac{y - x}{t}} \]
        2. *-commutativeN/A

          \[\leadsto \color{blue}{\frac{y - x}{t} \cdot z} \]
        3. div-invN/A

          \[\leadsto \color{blue}{\left(\left(y - x\right) \cdot \frac{1}{t}\right)} \cdot z \]
        4. remove-double-divN/A

          \[\leadsto \left(\color{blue}{\frac{1}{\frac{1}{y - x}}} \cdot \frac{1}{t}\right) \cdot z \]
        5. inv-powN/A

          \[\leadsto \left(\color{blue}{{\left(\frac{1}{y - x}\right)}^{-1}} \cdot \frac{1}{t}\right) \cdot z \]
        6. inv-powN/A

          \[\leadsto \left({\left(\frac{1}{y - x}\right)}^{-1} \cdot \color{blue}{{t}^{-1}}\right) \cdot z \]
        7. pow-prod-downN/A

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

          \[\leadsto {\color{blue}{\left(t \cdot \frac{1}{y - x}\right)}}^{-1} \cdot z \]
        9. pow-prod-downN/A

          \[\leadsto \color{blue}{\left({t}^{-1} \cdot {\left(\frac{1}{y - x}\right)}^{-1}\right)} \cdot z \]
        10. inv-powN/A

          \[\leadsto \left(\color{blue}{\frac{1}{t}} \cdot {\left(\frac{1}{y - x}\right)}^{-1}\right) \cdot z \]
        11. inv-powN/A

          \[\leadsto \left(\frac{1}{t} \cdot \color{blue}{\frac{1}{\frac{1}{y - x}}}\right) \cdot z \]
        12. remove-double-divN/A

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

          \[\leadsto \color{blue}{\left(\frac{1}{t} \cdot \left(y - x\right)\right) \cdot z} \]
        14. inv-powN/A

          \[\leadsto \left(\color{blue}{{t}^{-1}} \cdot \left(y - x\right)\right) \cdot z \]
        15. remove-double-divN/A

          \[\leadsto \left({t}^{-1} \cdot \color{blue}{\frac{1}{\frac{1}{y - x}}}\right) \cdot z \]
        16. inv-powN/A

          \[\leadsto \left({t}^{-1} \cdot \color{blue}{{\left(\frac{1}{y - x}\right)}^{-1}}\right) \cdot z \]
        17. pow-prod-downN/A

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

          \[\leadsto {\color{blue}{\left(\frac{1}{y - x} \cdot t\right)}}^{-1} \cdot z \]
        19. pow-prod-downN/A

          \[\leadsto \color{blue}{\left({\left(\frac{1}{y - x}\right)}^{-1} \cdot {t}^{-1}\right)} \cdot z \]
        20. inv-powN/A

          \[\leadsto \left(\color{blue}{\frac{1}{\frac{1}{y - x}}} \cdot {t}^{-1}\right) \cdot z \]
        21. remove-double-divN/A

          \[\leadsto \left(\color{blue}{\left(y - x\right)} \cdot {t}^{-1}\right) \cdot z \]
        22. inv-powN/A

          \[\leadsto \left(\left(y - x\right) \cdot \color{blue}{\frac{1}{t}}\right) \cdot z \]
        23. div-invN/A

          \[\leadsto \color{blue}{\frac{y - x}{t}} \cdot z \]
        24. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{y - x}{t}} \cdot z \]
        25. --lowering--.f6486.5

          \[\leadsto \frac{\color{blue}{y - x}}{t} \cdot z \]
      9. Applied egg-rr86.5%

        \[\leadsto \color{blue}{\frac{y - x}{t} \cdot z} \]

      if -1.16000000000000012e40 < z < 6.19999999999999982e-30

      1. Initial program 99.2%

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

        \[\leadsto x + \frac{\color{blue}{y} \cdot z}{t} \]
      4. Step-by-step derivation
        1. Simplified88.7%

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.16 \cdot 10^{+40}:\\ \;\;\;\;z \cdot \frac{y - x}{t}\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{-30}:\\ \;\;\;\;x + \frac{z \cdot y}{t}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y - x}{t}\\ \end{array} \]
      7. Add Preprocessing

      Alternative 4: 85.5% accurate, 0.7× speedup?

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

        1. Initial program 92.0%

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

          \[\leadsto x + \frac{\color{blue}{y} \cdot z}{t} \]
        4. Step-by-step derivation
          1. Simplified80.9%

            \[\leadsto x + \frac{\color{blue}{y} \cdot z}{t} \]
          2. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \color{blue}{\frac{y \cdot z}{t} + x} \]
            2. associate-/l*N/A

              \[\leadsto \color{blue}{y \cdot \frac{z}{t}} + x \]
            3. *-commutativeN/A

              \[\leadsto \color{blue}{\frac{z}{t} \cdot y} + x \]
            4. accelerator-lowering-fma.f64N/A

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

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

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

          if -1.1e-64 < y < 2.1e-135

          1. Initial program 95.2%

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{z}{t}}, y - x, x\right) \]
            6. --lowering--.f6497.6

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

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

            \[\leadsto \color{blue}{x + -1 \cdot \frac{x \cdot z}{t}} \]
          6. Step-by-step derivation
            1. mul-1-negN/A

              \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(\frac{x \cdot z}{t}\right)\right)} \]
            2. *-rgt-identityN/A

              \[\leadsto \color{blue}{x \cdot 1} + \left(\mathsf{neg}\left(\frac{x \cdot z}{t}\right)\right) \]
            3. associate-/l*N/A

              \[\leadsto x \cdot 1 + \left(\mathsf{neg}\left(\color{blue}{x \cdot \frac{z}{t}}\right)\right) \]
            4. distribute-rgt-neg-inN/A

              \[\leadsto x \cdot 1 + \color{blue}{x \cdot \left(\mathsf{neg}\left(\frac{z}{t}\right)\right)} \]
            5. mul-1-negN/A

              \[\leadsto x \cdot 1 + x \cdot \color{blue}{\left(-1 \cdot \frac{z}{t}\right)} \]
            6. distribute-lft-inN/A

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

              \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z}{t}\right)} \]
            8. mul-1-negN/A

              \[\leadsto x \cdot \left(1 + \color{blue}{\left(\mathsf{neg}\left(\frac{z}{t}\right)\right)}\right) \]
            9. unsub-negN/A

              \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z}{t}\right)} \]
            10. --lowering--.f64N/A

              \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z}{t}\right)} \]
            11. /-lowering-/.f6493.2

              \[\leadsto x \cdot \left(1 - \color{blue}{\frac{z}{t}}\right) \]
          7. Simplified93.2%

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

        Alternative 5: 74.5% accurate, 0.8× speedup?

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

          1. Initial program 91.0%

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

            \[\leadsto x + \frac{\color{blue}{y} \cdot z}{t} \]
          4. Step-by-step derivation
            1. Simplified74.2%

              \[\leadsto x + \frac{\color{blue}{y} \cdot z}{t} \]
            2. Step-by-step derivation
              1. +-commutativeN/A

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

                \[\leadsto \frac{\color{blue}{z \cdot y}}{t} + x \]
              3. associate-/l*N/A

                \[\leadsto \color{blue}{z \cdot \frac{y}{t}} + x \]
              4. accelerator-lowering-fma.f64N/A

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

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

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

            if -2.7000000000000001e-200 < t < 7.5000000000000001e-101

            1. Initial program 98.7%

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

              \[\leadsto \color{blue}{\frac{y \cdot z}{t}} \]
            4. Step-by-step derivation
              1. +-rgt-identityN/A

                \[\leadsto \color{blue}{\frac{y \cdot z}{t} + 0} \]
              2. *-commutativeN/A

                \[\leadsto \frac{\color{blue}{z \cdot y}}{t} + 0 \]
              3. associate-/l*N/A

                \[\leadsto \color{blue}{z \cdot \frac{y}{t}} + 0 \]
              4. accelerator-lowering-fma.f64N/A

                \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{y}{t}, 0\right)} \]
              5. /-lowering-/.f6451.3

                \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{y}{t}}, 0\right) \]
            5. Simplified51.3%

              \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{y}{t}, 0\right)} \]
            6. Step-by-step derivation
              1. +-rgt-identityN/A

                \[\leadsto \color{blue}{z \cdot \frac{y}{t}} \]
              2. associate-*r/N/A

                \[\leadsto \color{blue}{\frac{z \cdot y}{t}} \]
              3. associate-*l/N/A

                \[\leadsto \color{blue}{\frac{z}{t} \cdot y} \]
              4. *-lowering-*.f64N/A

                \[\leadsto \color{blue}{\frac{z}{t} \cdot y} \]
              5. /-lowering-/.f6470.2

                \[\leadsto \color{blue}{\frac{z}{t}} \cdot y \]
            7. Applied egg-rr70.2%

              \[\leadsto \color{blue}{\frac{z}{t} \cdot y} \]
          5. Recombined 2 regimes into one program.
          6. Add Preprocessing

          Alternative 6: 55.7% accurate, 0.8× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.65 \cdot 10^{+45}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{+52}:\\ \;\;\;\;\frac{z}{t} \cdot y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
          (FPCore (x y z t)
           :precision binary64
           (if (<= t -2.65e+45) x (if (<= t 1.55e+52) (* (/ z t) y) x)))
          double code(double x, double y, double z, double t) {
          	double tmp;
          	if (t <= -2.65e+45) {
          		tmp = x;
          	} else if (t <= 1.55e+52) {
          		tmp = (z / t) * y;
          	} else {
          		tmp = x;
          	}
          	return tmp;
          }
          
          real(8) function code(x, y, z, t)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              real(8), intent (in) :: t
              real(8) :: tmp
              if (t <= (-2.65d+45)) then
                  tmp = x
              else if (t <= 1.55d+52) then
                  tmp = (z / t) * y
              else
                  tmp = x
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t) {
          	double tmp;
          	if (t <= -2.65e+45) {
          		tmp = x;
          	} else if (t <= 1.55e+52) {
          		tmp = (z / t) * y;
          	} else {
          		tmp = x;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t):
          	tmp = 0
          	if t <= -2.65e+45:
          		tmp = x
          	elif t <= 1.55e+52:
          		tmp = (z / t) * y
          	else:
          		tmp = x
          	return tmp
          
          function code(x, y, z, t)
          	tmp = 0.0
          	if (t <= -2.65e+45)
          		tmp = x;
          	elseif (t <= 1.55e+52)
          		tmp = Float64(Float64(z / t) * y);
          	else
          		tmp = x;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t)
          	tmp = 0.0;
          	if (t <= -2.65e+45)
          		tmp = x;
          	elseif (t <= 1.55e+52)
          		tmp = (z / t) * y;
          	else
          		tmp = x;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_] := If[LessEqual[t, -2.65e+45], x, If[LessEqual[t, 1.55e+52], N[(N[(z / t), $MachinePrecision] * y), $MachinePrecision], x]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;t \leq -2.65 \cdot 10^{+45}:\\
          \;\;\;\;x\\
          
          \mathbf{elif}\;t \leq 1.55 \cdot 10^{+52}:\\
          \;\;\;\;\frac{z}{t} \cdot y\\
          
          \mathbf{else}:\\
          \;\;\;\;x\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if t < -2.64999999999999996e45 or 1.55e52 < t

            1. Initial program 84.0%

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

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

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

              if -2.64999999999999996e45 < t < 1.55e52

              1. Initial program 98.7%

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

                \[\leadsto \color{blue}{\frac{y \cdot z}{t}} \]
              4. Step-by-step derivation
                1. +-rgt-identityN/A

                  \[\leadsto \color{blue}{\frac{y \cdot z}{t} + 0} \]
                2. *-commutativeN/A

                  \[\leadsto \frac{\color{blue}{z \cdot y}}{t} + 0 \]
                3. associate-/l*N/A

                  \[\leadsto \color{blue}{z \cdot \frac{y}{t}} + 0 \]
                4. accelerator-lowering-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{y}{t}, 0\right)} \]
                5. /-lowering-/.f6445.9

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{y}{t}}, 0\right) \]
              5. Simplified45.9%

                \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{y}{t}, 0\right)} \]
              6. Step-by-step derivation
                1. +-rgt-identityN/A

                  \[\leadsto \color{blue}{z \cdot \frac{y}{t}} \]
                2. associate-*r/N/A

                  \[\leadsto \color{blue}{\frac{z \cdot y}{t}} \]
                3. associate-*l/N/A

                  \[\leadsto \color{blue}{\frac{z}{t} \cdot y} \]
                4. *-lowering-*.f64N/A

                  \[\leadsto \color{blue}{\frac{z}{t} \cdot y} \]
                5. /-lowering-/.f6454.3

                  \[\leadsto \color{blue}{\frac{z}{t}} \cdot y \]
              7. Applied egg-rr54.3%

                \[\leadsto \color{blue}{\frac{z}{t} \cdot y} \]
            5. Recombined 2 regimes into one program.
            6. Add Preprocessing

            Alternative 7: 54.9% accurate, 0.8× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \frac{y}{t}\\ \mathbf{if}\;z \leq -1.2 \cdot 10^{-30}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 8200000000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
            (FPCore (x y z t)
             :precision binary64
             (let* ((t_1 (* z (/ y t))))
               (if (<= z -1.2e-30) t_1 (if (<= z 8200000000.0) x t_1))))
            double code(double x, double y, double z, double t) {
            	double t_1 = z * (y / t);
            	double tmp;
            	if (z <= -1.2e-30) {
            		tmp = t_1;
            	} else if (z <= 8200000000.0) {
            		tmp = x;
            	} 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 = z * (y / t)
                if (z <= (-1.2d-30)) then
                    tmp = t_1
                else if (z <= 8200000000.0d0) then
                    tmp = x
                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 = z * (y / t);
            	double tmp;
            	if (z <= -1.2e-30) {
            		tmp = t_1;
            	} else if (z <= 8200000000.0) {
            		tmp = x;
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t):
            	t_1 = z * (y / t)
            	tmp = 0
            	if z <= -1.2e-30:
            		tmp = t_1
            	elif z <= 8200000000.0:
            		tmp = x
            	else:
            		tmp = t_1
            	return tmp
            
            function code(x, y, z, t)
            	t_1 = Float64(z * Float64(y / t))
            	tmp = 0.0
            	if (z <= -1.2e-30)
            		tmp = t_1;
            	elseif (z <= 8200000000.0)
            		tmp = x;
            	else
            		tmp = t_1;
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t)
            	t_1 = z * (y / t);
            	tmp = 0.0;
            	if (z <= -1.2e-30)
            		tmp = t_1;
            	elseif (z <= 8200000000.0)
            		tmp = x;
            	else
            		tmp = t_1;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.2e-30], t$95$1, If[LessEqual[z, 8200000000.0], x, t$95$1]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := z \cdot \frac{y}{t}\\
            \mathbf{if}\;z \leq -1.2 \cdot 10^{-30}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;z \leq 8200000000:\\
            \;\;\;\;x\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if z < -1.19999999999999992e-30 or 8.2e9 < z

              1. Initial program 87.7%

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

                \[\leadsto \color{blue}{\frac{y \cdot z}{t}} \]
              4. Step-by-step derivation
                1. +-rgt-identityN/A

                  \[\leadsto \color{blue}{\frac{y \cdot z}{t} + 0} \]
                2. *-commutativeN/A

                  \[\leadsto \frac{\color{blue}{z \cdot y}}{t} + 0 \]
                3. associate-/l*N/A

                  \[\leadsto \color{blue}{z \cdot \frac{y}{t}} + 0 \]
                4. accelerator-lowering-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{y}{t}, 0\right)} \]
                5. /-lowering-/.f6454.3

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{y}{t}}, 0\right) \]
              5. Simplified54.3%

                \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{y}{t}, 0\right)} \]
              6. Step-by-step derivation
                1. +-rgt-identityN/A

                  \[\leadsto \color{blue}{z \cdot \frac{y}{t}} \]
                2. *-commutativeN/A

                  \[\leadsto \color{blue}{\frac{y}{t} \cdot z} \]
                3. *-lowering-*.f64N/A

                  \[\leadsto \color{blue}{\frac{y}{t} \cdot z} \]
                4. /-lowering-/.f6454.3

                  \[\leadsto \color{blue}{\frac{y}{t}} \cdot z \]
              7. Applied egg-rr54.3%

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

              if -1.19999999999999992e-30 < z < 8.2e9

              1. Initial program 99.3%

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

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

                  \[\leadsto \color{blue}{x} \]
              5. Recombined 2 regimes into one program.
              6. Final simplification57.3%

                \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{-30}:\\ \;\;\;\;z \cdot \frac{y}{t}\\ \mathbf{elif}\;z \leq 8200000000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y}{t}\\ \end{array} \]
              7. Add Preprocessing

              Alternative 8: 77.5% accurate, 1.3× speedup?

              \[\begin{array}{l} \\ \mathsf{fma}\left(\frac{z}{t}, y, x\right) \end{array} \]
              (FPCore (x y z t) :precision binary64 (fma (/ z t) y x))
              double code(double x, double y, double z, double t) {
              	return fma((z / t), y, x);
              }
              
              function code(x, y, z, t)
              	return fma(Float64(z / t), y, x)
              end
              
              code[x_, y_, z_, t_] := N[(N[(z / t), $MachinePrecision] * y + x), $MachinePrecision]
              
              \begin{array}{l}
              
              \\
              \mathsf{fma}\left(\frac{z}{t}, y, x\right)
              \end{array}
              
              Derivation
              1. Initial program 93.0%

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

                \[\leadsto x + \frac{\color{blue}{y} \cdot z}{t} \]
              4. Step-by-step derivation
                1. Simplified72.4%

                  \[\leadsto x + \frac{\color{blue}{y} \cdot z}{t} \]
                2. Step-by-step derivation
                  1. +-commutativeN/A

                    \[\leadsto \color{blue}{\frac{y \cdot z}{t} + x} \]
                  2. associate-/l*N/A

                    \[\leadsto \color{blue}{y \cdot \frac{z}{t}} + x \]
                  3. *-commutativeN/A

                    \[\leadsto \color{blue}{\frac{z}{t} \cdot y} + x \]
                  4. accelerator-lowering-fma.f64N/A

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

                    \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{z}{t}}, y, x\right) \]
                3. Applied egg-rr77.1%

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

                Alternative 9: 38.8% accurate, 23.0× speedup?

                \[\begin{array}{l} \\ x \end{array} \]
                (FPCore (x y z t) :precision binary64 x)
                double code(double x, double y, double z, double t) {
                	return x;
                }
                
                real(8) function code(x, y, z, t)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    real(8), intent (in) :: z
                    real(8), intent (in) :: t
                    code = x
                end function
                
                public static double code(double x, double y, double z, double t) {
                	return x;
                }
                
                def code(x, y, z, t):
                	return x
                
                function code(x, y, z, t)
                	return x
                end
                
                function tmp = code(x, y, z, t)
                	tmp = x;
                end
                
                code[x_, y_, z_, t_] := x
                
                \begin{array}{l}
                
                \\
                x
                \end{array}
                
                Derivation
                1. Initial program 93.0%

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

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

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

                  Developer Target 1: 97.3% accurate, 0.6× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x < -9.025511195533005 \cdot 10^{-135}:\\ \;\;\;\;x - \frac{z}{t} \cdot \left(x - y\right)\\ \mathbf{elif}\;x < 4.275032163700715 \cdot 10^{-250}:\\ \;\;\;\;x + \frac{y - x}{t} \cdot z\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - x}{\frac{t}{z}}\\ \end{array} \end{array} \]
                  (FPCore (x y z t)
                   :precision binary64
                   (if (< x -9.025511195533005e-135)
                     (- x (* (/ z t) (- x y)))
                     (if (< x 4.275032163700715e-250)
                       (+ x (* (/ (- y x) t) z))
                       (+ x (/ (- y x) (/ t z))))))
                  double code(double x, double y, double z, double t) {
                  	double tmp;
                  	if (x < -9.025511195533005e-135) {
                  		tmp = x - ((z / t) * (x - y));
                  	} else if (x < 4.275032163700715e-250) {
                  		tmp = x + (((y - x) / t) * z);
                  	} else {
                  		tmp = x + ((y - x) / (t / z));
                  	}
                  	return tmp;
                  }
                  
                  real(8) function code(x, y, z, t)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      real(8), intent (in) :: z
                      real(8), intent (in) :: t
                      real(8) :: tmp
                      if (x < (-9.025511195533005d-135)) then
                          tmp = x - ((z / t) * (x - y))
                      else if (x < 4.275032163700715d-250) then
                          tmp = x + (((y - x) / t) * z)
                      else
                          tmp = x + ((y - x) / (t / z))
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double x, double y, double z, double t) {
                  	double tmp;
                  	if (x < -9.025511195533005e-135) {
                  		tmp = x - ((z / t) * (x - y));
                  	} else if (x < 4.275032163700715e-250) {
                  		tmp = x + (((y - x) / t) * z);
                  	} else {
                  		tmp = x + ((y - x) / (t / z));
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z, t):
                  	tmp = 0
                  	if x < -9.025511195533005e-135:
                  		tmp = x - ((z / t) * (x - y))
                  	elif x < 4.275032163700715e-250:
                  		tmp = x + (((y - x) / t) * z)
                  	else:
                  		tmp = x + ((y - x) / (t / z))
                  	return tmp
                  
                  function code(x, y, z, t)
                  	tmp = 0.0
                  	if (x < -9.025511195533005e-135)
                  		tmp = Float64(x - Float64(Float64(z / t) * Float64(x - y)));
                  	elseif (x < 4.275032163700715e-250)
                  		tmp = Float64(x + Float64(Float64(Float64(y - x) / t) * z));
                  	else
                  		tmp = Float64(x + Float64(Float64(y - x) / Float64(t / z)));
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y, z, t)
                  	tmp = 0.0;
                  	if (x < -9.025511195533005e-135)
                  		tmp = x - ((z / t) * (x - y));
                  	elseif (x < 4.275032163700715e-250)
                  		tmp = x + (((y - x) / t) * z);
                  	else
                  		tmp = x + ((y - x) / (t / z));
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_, t_] := If[Less[x, -9.025511195533005e-135], N[(x - N[(N[(z / t), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Less[x, 4.275032163700715e-250], N[(x + N[(N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;x < -9.025511195533005 \cdot 10^{-135}:\\
                  \;\;\;\;x - \frac{z}{t} \cdot \left(x - y\right)\\
                  
                  \mathbf{elif}\;x < 4.275032163700715 \cdot 10^{-250}:\\
                  \;\;\;\;x + \frac{y - x}{t} \cdot z\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;x + \frac{y - x}{\frac{t}{z}}\\
                  
                  
                  \end{array}
                  \end{array}
                  

                  Reproduce

                  ?
                  herbie shell --seed 2024198 
                  (FPCore (x y z t)
                    :name "Numeric.Histogram:binBounds from Chart-1.5.3"
                    :precision binary64
                  
                    :alt
                    (! :herbie-platform default (if (< x -1805102239106601/200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- x (* (/ z t) (- x y))) (if (< x 855006432740143/2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ x (* (/ (- y x) t) z)) (+ x (/ (- y x) (/ t z))))))
                  
                    (+ x (/ (* (- y x) z) t)))