Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B

Percentage Accurate: 85.3% → 98.4%
Time: 10.7s
Alternatives: 13
Speedup: 1.1×

Specification

?
\[\begin{array}{l} \\ x + \frac{y \cdot \left(z - t\right)}{a - t} \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
	return x + ((y * (z - t)) / (a - t));
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x + ((y * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + ((y * (z - t)) / (a - t));
}
def code(x, y, z, t, a):
	return x + ((y * (z - t)) / (a - t))
function code(x, y, z, t, a)
	return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(a - t)))
end
function tmp = code(x, y, z, t, a)
	tmp = x + ((y * (z - t)) / (a - t));
end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

\[\begin{array}{l} \\ x + \frac{y \cdot \left(z - t\right)}{a - t} \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
	return x + ((y * (z - t)) / (a - t));
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x + ((y * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + ((y * (z - t)) / (a - t));
}
def code(x, y, z, t, a):
	return x + ((y * (z - t)) / (a - t))
function code(x, y, z, t, a)
	return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(a - t)))
end
function tmp = code(x, y, z, t, a)
	tmp = x + ((y * (z - t)) / (a - t));
end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 98.4% accurate, 0.8× speedup?

\[\begin{array}{l} \\ x + \frac{y}{\frac{a - t}{z - t}} \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- a t) (- z t)))))
double code(double x, double y, double z, double t, double a) {
	return x + (y / ((a - t) / (z - t)));
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x + (y / ((a - t) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + (y / ((a - t) / (z - t)));
}
def code(x, y, z, t, a):
	return x + (y / ((a - t) / (z - t)))
function code(x, y, z, t, a)
	return Float64(x + Float64(y / Float64(Float64(a - t) / Float64(z - t))))
end
function tmp = code(x, y, z, t, a)
	tmp = x + (y / ((a - t) / (z - t)));
end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{y}{\frac{a - t}{z - t}}
\end{array}
Derivation
  1. Initial program 80.8%

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
    5. /-lowering-/.f64N/A

      \[\leadsto x + \frac{y}{\color{blue}{\frac{a - t}{z - t}}} \]
    6. --lowering--.f64N/A

      \[\leadsto x + \frac{y}{\frac{\color{blue}{a - t}}{z - t}} \]
    7. --lowering--.f6499.2

      \[\leadsto x + \frac{y}{\frac{a - t}{\color{blue}{z - t}}} \]
  4. Applied egg-rr99.2%

    \[\leadsto x + \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
  5. Add Preprocessing

Alternative 2: 82.5% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.06 \cdot 10^{-106}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t - z}{t}, y, x\right)\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{+24}:\\ \;\;\;\;\mathsf{fma}\left(z - t, \frac{y}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, 1 - \frac{z}{t}, x\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -1.06e-106)
   (fma (/ (- t z) t) y x)
   (if (<= t 2.9e+24) (fma (- z t) (/ y a) x) (fma y (- 1.0 (/ z t)) x))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -1.06e-106) {
		tmp = fma(((t - z) / t), y, x);
	} else if (t <= 2.9e+24) {
		tmp = fma((z - t), (y / a), x);
	} else {
		tmp = fma(y, (1.0 - (z / t)), x);
	}
	return tmp;
}
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -1.06e-106)
		tmp = fma(Float64(Float64(t - z) / t), y, x);
	elseif (t <= 2.9e+24)
		tmp = fma(Float64(z - t), Float64(y / a), x);
	else
		tmp = fma(y, Float64(1.0 - Float64(z / t)), x);
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.06e-106], N[(N[(N[(t - z), $MachinePrecision] / t), $MachinePrecision] * y + x), $MachinePrecision], If[LessEqual[t, 2.9e+24], N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.06 \cdot 10^{-106}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - z}{t}, y, x\right)\\

\mathbf{elif}\;t \leq 2.9 \cdot 10^{+24}:\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{y}{a}, x\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, 1 - \frac{z}{t}, x\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.06e-106

    1. Initial program 75.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.06e-106 < t < 2.89999999999999979e24

    1. Initial program 92.6%

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

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

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

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

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

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

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

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

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

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

      if 2.89999999999999979e24 < t

      1. Initial program 69.7%

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(y, \color{blue}{0 - \frac{z - t}{t}}, x\right) \]
        7. div-subN/A

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

          \[\leadsto \mathsf{fma}\left(y, 0 - \left(\frac{z}{t} - \color{blue}{1}\right), x\right) \]
        9. associate-+l-N/A

          \[\leadsto \mathsf{fma}\left(y, \color{blue}{\left(0 - \frac{z}{t}\right) + 1}, x\right) \]
        10. neg-sub0N/A

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, 1 - \frac{z}{t}, x\right)} \]
    5. Recombined 3 regimes into one program.
    6. Final simplification86.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.06 \cdot 10^{-106}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t - z}{t}, y, x\right)\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{+24}:\\ \;\;\;\;\mathsf{fma}\left(z - t, \frac{y}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, 1 - \frac{z}{t}, x\right)\\ \end{array} \]
    7. Add Preprocessing

    Alternative 3: 82.5% accurate, 0.8× speedup?

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

      1. Initial program 73.0%

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(y, \color{blue}{0 - \frac{z - t}{t}}, x\right) \]
        7. div-subN/A

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

          \[\leadsto \mathsf{fma}\left(y, 0 - \left(\frac{z}{t} - \color{blue}{1}\right), x\right) \]
        9. associate-+l-N/A

          \[\leadsto \mathsf{fma}\left(y, \color{blue}{\left(0 - \frac{z}{t}\right) + 1}, x\right) \]
        10. neg-sub0N/A

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

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

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

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

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

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

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

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

      if -9.4999999999999999e-107 < t < 2e24

      1. Initial program 92.6%

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

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

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

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

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

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

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

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

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

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

      Alternative 4: 82.2% accurate, 0.8× speedup?

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

        1. Initial program 73.0%

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(y, \color{blue}{0 - \frac{z - t}{t}}, x\right) \]
          7. div-subN/A

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

            \[\leadsto \mathsf{fma}\left(y, 0 - \left(\frac{z}{t} - \color{blue}{1}\right), x\right) \]
          9. associate-+l-N/A

            \[\leadsto \mathsf{fma}\left(y, \color{blue}{\left(0 - \frac{z}{t}\right) + 1}, x\right) \]
          10. neg-sub0N/A

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

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

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

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

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

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

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

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

        if -1.08e-106 < t < 6.0000000000000002e23

        1. Initial program 92.6%

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(y, \frac{\color{blue}{z - t}}{a}, x\right) \]
        5. Simplified84.7%

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

      Alternative 5: 81.1% accurate, 0.8× speedup?

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

        1. Initial program 74.0%

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(y, \color{blue}{0 - \frac{z - t}{t}}, x\right) \]
          7. div-subN/A

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

            \[\leadsto \mathsf{fma}\left(y, 0 - \left(\frac{z}{t} - \color{blue}{1}\right), x\right) \]
          9. associate-+l-N/A

            \[\leadsto \mathsf{fma}\left(y, \color{blue}{\left(0 - \frac{z}{t}\right) + 1}, x\right) \]
          10. neg-sub0N/A

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

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

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

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

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

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

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

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

        if -6.99999999999999995e-125 < t < 1.34000000000000007e26

        1. Initial program 92.1%

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

          \[\leadsto x + \color{blue}{\frac{y \cdot z}{a}} \]
        4. Step-by-step derivation
          1. /-lowering-/.f64N/A

            \[\leadsto x + \color{blue}{\frac{y \cdot z}{a}} \]
          2. *-lowering-*.f6477.5

            \[\leadsto x + \frac{\color{blue}{y \cdot z}}{a} \]
        5. Simplified77.5%

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

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

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

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

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

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

          \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{y}{a}, x\right)} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 6: 74.9% accurate, 0.8× speedup?

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

        1. Initial program 76.9%

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

          \[\leadsto \color{blue}{x + y} \]
        4. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \color{blue}{y + x} \]
          2. +-lowering-+.f6470.3

            \[\leadsto \color{blue}{y + x} \]
        5. Simplified70.3%

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

        if -1.60000000000000002e-118 < t < 6.5e12

        1. Initial program 91.9%

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

          \[\leadsto x + \color{blue}{\frac{y \cdot z}{a}} \]
        4. Step-by-step derivation
          1. /-lowering-/.f64N/A

            \[\leadsto x + \color{blue}{\frac{y \cdot z}{a}} \]
          2. *-lowering-*.f6477.8

            \[\leadsto x + \frac{\color{blue}{y \cdot z}}{a} \]
        5. Simplified77.8%

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

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

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

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

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

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

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

        if 6.5e12 < t

        1. Initial program 71.0%

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{z - t}}{a - t}, y, x\right) \]
          7. --lowering--.f6499.9

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

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

          \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{-1 \cdot t}}{a - t}, y, x\right) \]
        6. Step-by-step derivation
          1. mul-1-negN/A

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

            \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{-t}}{a - t}, y, x\right) \]
        7. Simplified82.6%

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

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

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

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

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

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

            \[\leadsto x + \mathsf{fma}\left(a, \color{blue}{\frac{y}{t}}, y\right) \]
        10. Simplified77.7%

          \[\leadsto \color{blue}{x + \mathsf{fma}\left(a, \frac{y}{t}, y\right)} \]
      3. Recombined 3 regimes into one program.
      4. Final simplification76.7%

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

      Alternative 7: 75.6% accurate, 0.9× speedup?

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

        1. Initial program 74.5%

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

          \[\leadsto \color{blue}{x + y} \]
        4. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \color{blue}{y + x} \]
          2. +-lowering-+.f6473.4

            \[\leadsto \color{blue}{y + x} \]
        5. Simplified73.4%

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

        if -1.4499999999999999e-118 < t < 8.6e13

        1. Initial program 91.9%

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

          \[\leadsto x + \color{blue}{\frac{y \cdot z}{a}} \]
        4. Step-by-step derivation
          1. /-lowering-/.f64N/A

            \[\leadsto x + \color{blue}{\frac{y \cdot z}{a}} \]
          2. *-lowering-*.f6477.8

            \[\leadsto x + \frac{\color{blue}{y \cdot z}}{a} \]
        5. Simplified77.8%

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

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

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

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

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

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

          \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{y}{a}, x\right)} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification76.7%

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

      Alternative 8: 75.4% accurate, 0.9× speedup?

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

        1. Initial program 74.5%

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

          \[\leadsto \color{blue}{x + y} \]
        4. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \color{blue}{y + x} \]
          2. +-lowering-+.f6473.4

            \[\leadsto \color{blue}{y + x} \]
        5. Simplified73.4%

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

        if -1.60000000000000002e-118 < t < 2.5e14

        1. Initial program 91.9%

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{z}{a}}, x\right) \]
        5. Simplified82.5%

          \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z}{a}, x\right)} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification76.7%

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

      Alternative 9: 98.2% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

      Alternative 10: 96.3% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

      Alternative 11: 54.1% accurate, 2.0× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -7.5 \cdot 10^{+118}:\\ \;\;\;\;y\\ \mathbf{elif}\;y \leq 2.6 \cdot 10^{+152}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
      (FPCore (x y z t a)
       :precision binary64
       (if (<= y -7.5e+118) y (if (<= y 2.6e+152) x y)))
      double code(double x, double y, double z, double t, double a) {
      	double tmp;
      	if (y <= -7.5e+118) {
      		tmp = y;
      	} else if (y <= 2.6e+152) {
      		tmp = x;
      	} else {
      		tmp = y;
      	}
      	return tmp;
      }
      
      real(8) function code(x, y, z, t, a)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8) :: tmp
          if (y <= (-7.5d+118)) then
              tmp = y
          else if (y <= 2.6d+152) then
              tmp = x
          else
              tmp = y
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a) {
      	double tmp;
      	if (y <= -7.5e+118) {
      		tmp = y;
      	} else if (y <= 2.6e+152) {
      		tmp = x;
      	} else {
      		tmp = y;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a):
      	tmp = 0
      	if y <= -7.5e+118:
      		tmp = y
      	elif y <= 2.6e+152:
      		tmp = x
      	else:
      		tmp = y
      	return tmp
      
      function code(x, y, z, t, a)
      	tmp = 0.0
      	if (y <= -7.5e+118)
      		tmp = y;
      	elseif (y <= 2.6e+152)
      		tmp = x;
      	else
      		tmp = y;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a)
      	tmp = 0.0;
      	if (y <= -7.5e+118)
      		tmp = y;
      	elseif (y <= 2.6e+152)
      		tmp = x;
      	else
      		tmp = y;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_] := If[LessEqual[y, -7.5e+118], y, If[LessEqual[y, 2.6e+152], x, y]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;y \leq -7.5 \cdot 10^{+118}:\\
      \;\;\;\;y\\
      
      \mathbf{elif}\;y \leq 2.6 \cdot 10^{+152}:\\
      \;\;\;\;x\\
      
      \mathbf{else}:\\
      \;\;\;\;y\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if y < -7.50000000000000003e118 or 2.6000000000000001e152 < y

        1. Initial program 50.4%

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

          \[\leadsto \color{blue}{x + y} \]
        4. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \color{blue}{y + x} \]
          2. +-lowering-+.f6447.6

            \[\leadsto \color{blue}{y + x} \]
        5. Simplified47.6%

          \[\leadsto \color{blue}{y + x} \]
        6. Taylor expanded in y around inf

          \[\leadsto \color{blue}{y} \]
        7. Step-by-step derivation
          1. Simplified40.5%

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

          if -7.50000000000000003e118 < y < 2.6000000000000001e152

          1. Initial program 93.9%

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

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

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

          Alternative 12: 61.7% accurate, 2.6× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.15 \cdot 10^{+207}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \end{array} \]
          (FPCore (x y z t a) :precision binary64 (if (<= a -1.15e+207) x (+ x y)))
          double code(double x, double y, double z, double t, double a) {
          	double tmp;
          	if (a <= -1.15e+207) {
          		tmp = x;
          	} else {
          		tmp = x + y;
          	}
          	return tmp;
          }
          
          real(8) function code(x, y, z, t, a)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              real(8), intent (in) :: t
              real(8), intent (in) :: a
              real(8) :: tmp
              if (a <= (-1.15d+207)) then
                  tmp = x
              else
                  tmp = x + y
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t, double a) {
          	double tmp;
          	if (a <= -1.15e+207) {
          		tmp = x;
          	} else {
          		tmp = x + y;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t, a):
          	tmp = 0
          	if a <= -1.15e+207:
          		tmp = x
          	else:
          		tmp = x + y
          	return tmp
          
          function code(x, y, z, t, a)
          	tmp = 0.0
          	if (a <= -1.15e+207)
          		tmp = x;
          	else
          		tmp = Float64(x + y);
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t, a)
          	tmp = 0.0;
          	if (a <= -1.15e+207)
          		tmp = x;
          	else
          		tmp = x + y;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.15e+207], x, N[(x + y), $MachinePrecision]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;a \leq -1.15 \cdot 10^{+207}:\\
          \;\;\;\;x\\
          
          \mathbf{else}:\\
          \;\;\;\;x + y\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if a < -1.14999999999999997e207

            1. Initial program 69.2%

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

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

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

              if -1.14999999999999997e207 < a

              1. Initial program 81.9%

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

                \[\leadsto \color{blue}{x + y} \]
              4. Step-by-step derivation
                1. +-commutativeN/A

                  \[\leadsto \color{blue}{y + x} \]
                2. +-lowering-+.f6464.4

                  \[\leadsto \color{blue}{y + x} \]
              5. Simplified64.4%

                \[\leadsto \color{blue}{y + x} \]
            5. Recombined 2 regimes into one program.
            6. Final simplification65.9%

              \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.15 \cdot 10^{+207}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
            7. Add Preprocessing

            Alternative 13: 51.1% accurate, 26.0× speedup?

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

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

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

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

              Developer Target 1: 98.4% accurate, 0.8× speedup?

              \[\begin{array}{l} \\ x + \frac{y}{\frac{a - t}{z - t}} \end{array} \]
              (FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- a t) (- z t)))))
              double code(double x, double y, double z, double t, double a) {
              	return x + (y / ((a - t) / (z - t)));
              }
              
              real(8) function code(x, y, z, t, a)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  real(8), intent (in) :: z
                  real(8), intent (in) :: t
                  real(8), intent (in) :: a
                  code = x + (y / ((a - t) / (z - t)))
              end function
              
              public static double code(double x, double y, double z, double t, double a) {
              	return x + (y / ((a - t) / (z - t)));
              }
              
              def code(x, y, z, t, a):
              	return x + (y / ((a - t) / (z - t)))
              
              function code(x, y, z, t, a)
              	return Float64(x + Float64(y / Float64(Float64(a - t) / Float64(z - t))))
              end
              
              function tmp = code(x, y, z, t, a)
              	tmp = x + (y / ((a - t) / (z - t)));
              end
              
              code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
              
              \begin{array}{l}
              
              \\
              x + \frac{y}{\frac{a - t}{z - t}}
              \end{array}
              

              Reproduce

              ?
              herbie shell --seed 2024204 
              (FPCore (x y z t a)
                :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
                :precision binary64
              
                :alt
                (! :herbie-platform default (+ x (/ y (/ (- a t) (- z t)))))
              
                (+ x (/ (* y (- z t)) (- a t))))