Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, A

Percentage Accurate: 85.5% → 96.3%
Time: 2.9s
Alternatives: 9
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ x + \frac{\left(y - z\right) \cdot t}{a - z} \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) t) (- a z))))
double code(double x, double y, double z, double t, double a) {
	return x + (((y - z) * t) / (a - z));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
    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 - z))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + (((y - z) * t) / (a - z));
}
def code(x, y, z, t, a):
	return x + (((y - z) * t) / (a - z))
function code(x, y, z, t, a)
	return Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(a - z)))
end
function tmp = code(x, y, z, t, a)
	tmp = x + (((y - z) * t) / (a - z));
end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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: 85.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \frac{\left(y - z\right) \cdot t}{a - z} \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) t) (- a z))))
double code(double x, double y, double z, double t, double a) {
	return x + (((y - z) * t) / (a - z));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
    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 - z))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + (((y - z) * t) / (a - z));
}
def code(x, y, z, t, a):
	return x + (((y - z) * t) / (a - z))
function code(x, y, z, t, a)
	return Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(a - z)))
end
function tmp = code(x, y, z, t, a)
	tmp = x + (((y - z) * t) / (a - z));
end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 96.3% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 79.4% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.52 \cdot 10^{+116}:\\
\;\;\;\;x + t\\

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

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

\mathbf{else}:\\
\;\;\;\;x + t\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.52e116 or 5e19 < z

    1. Initial program 70.5%

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

      \[\leadsto x + \color{blue}{t} \]
    3. Step-by-step derivation
      1. Applied rewrites79.9%

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

      if -1.52e116 < z < -8.9999999999999997e-101

      1. Initial program 93.0%

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

        \[\leadsto \color{blue}{x + -1 \cdot \frac{t \cdot \left(y - z\right)}{z}} \]
      3. Step-by-step derivation
        1. fp-cancel-sign-sub-invN/A

          \[\leadsto x - \color{blue}{\left(\mathsf{neg}\left(-1\right)\right) \cdot \frac{t \cdot \left(y - z\right)}{z}} \]
        2. metadata-evalN/A

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

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

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

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

          \[\leadsto x - \frac{\mathsf{neg}\left(t \cdot \left(y - z\right)\right)}{\mathsf{neg}\left(z\right)} \]
        7. frac-2negN/A

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

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

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

          \[\leadsto x - \frac{\left(y - z\right) \cdot t}{z} \]
        11. lift--.f64N/A

          \[\leadsto x - \frac{\left(y - z\right) \cdot t}{z} \]
        12. lift-*.f6471.2

          \[\leadsto x - \frac{\left(y - z\right) \cdot t}{z} \]
      4. Applied rewrites71.2%

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

      if -8.9999999999999997e-101 < z < 5e19

      1. Initial program 95.9%

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

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

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

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

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

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

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

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

    Alternative 3: 78.1% accurate, 0.8× speedup?

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

      1. Initial program 75.3%

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

        \[\leadsto x + \color{blue}{t} \]
      3. Step-by-step derivation
        1. Applied rewrites75.7%

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

        if -5.1999999999999995e-32 < z < 5e19

        1. Initial program 95.9%

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

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

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

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

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

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

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

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

      Alternative 4: 76.0% accurate, 0.9× speedup?

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

        1. Initial program 77.4%

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

          \[\leadsto x + \color{blue}{t} \]
        3. Step-by-step derivation
          1. Applied rewrites73.3%

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

          if -9.49999999999999994e-101 < z < 9.6e19

          1. Initial program 95.9%

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

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

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

              \[\leadsto t \cdot \frac{y}{a} + x \]
            3. lower-fma.f64N/A

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

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

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

        Alternative 5: 63.1% accurate, 0.3× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\left(y - z\right) \cdot t}{a - z}\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-59}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;t\_1 \leq 10^{-8}:\\ \;\;\;\;x\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+251}:\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a} \cdot t\\ \end{array} \end{array} \]
        (FPCore (x y z t a)
         :precision binary64
         (let* ((t_1 (/ (* (- y z) t) (- a z))))
           (if (<= t_1 -2e-59)
             (+ x t)
             (if (<= t_1 1e-8) x (if (<= t_1 5e+251) (+ x t) (* (/ y a) t))))))
        double code(double x, double y, double z, double t, double a) {
        	double t_1 = ((y - z) * t) / (a - z);
        	double tmp;
        	if (t_1 <= -2e-59) {
        		tmp = x + t;
        	} else if (t_1 <= 1e-8) {
        		tmp = x;
        	} else if (t_1 <= 5e+251) {
        		tmp = x + t;
        	} else {
        		tmp = (y / a) * t;
        	}
        	return tmp;
        }
        
        module fmin_fmax_functions
            implicit none
            private
            public fmax
            public fmin
        
            interface fmax
                module procedure fmax88
                module procedure fmax44
                module procedure fmax84
                module procedure fmax48
            end interface
            interface fmin
                module procedure fmin88
                module procedure fmin44
                module procedure fmin84
                module procedure fmin48
            end interface
        contains
            real(8) function fmax88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(4) function fmax44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(8) function fmax84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmax48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
            end function
            real(8) function fmin88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(4) function fmin44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(8) function fmin84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmin48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
            end function
        end module
        
        real(8) function code(x, y, z, t, a)
        use fmin_fmax_functions
            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) :: t_1
            real(8) :: tmp
            t_1 = ((y - z) * t) / (a - z)
            if (t_1 <= (-2d-59)) then
                tmp = x + t
            else if (t_1 <= 1d-8) then
                tmp = x
            else if (t_1 <= 5d+251) then
                tmp = x + t
            else
                tmp = (y / a) * t
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z, double t, double a) {
        	double t_1 = ((y - z) * t) / (a - z);
        	double tmp;
        	if (t_1 <= -2e-59) {
        		tmp = x + t;
        	} else if (t_1 <= 1e-8) {
        		tmp = x;
        	} else if (t_1 <= 5e+251) {
        		tmp = x + t;
        	} else {
        		tmp = (y / a) * t;
        	}
        	return tmp;
        }
        
        def code(x, y, z, t, a):
        	t_1 = ((y - z) * t) / (a - z)
        	tmp = 0
        	if t_1 <= -2e-59:
        		tmp = x + t
        	elif t_1 <= 1e-8:
        		tmp = x
        	elif t_1 <= 5e+251:
        		tmp = x + t
        	else:
        		tmp = (y / a) * t
        	return tmp
        
        function code(x, y, z, t, a)
        	t_1 = Float64(Float64(Float64(y - z) * t) / Float64(a - z))
        	tmp = 0.0
        	if (t_1 <= -2e-59)
        		tmp = Float64(x + t);
        	elseif (t_1 <= 1e-8)
        		tmp = x;
        	elseif (t_1 <= 5e+251)
        		tmp = Float64(x + t);
        	else
        		tmp = Float64(Float64(y / a) * t);
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t, a)
        	t_1 = ((y - z) * t) / (a - z);
        	tmp = 0.0;
        	if (t_1 <= -2e-59)
        		tmp = x + t;
        	elseif (t_1 <= 1e-8)
        		tmp = x;
        	elseif (t_1 <= 5e+251)
        		tmp = x + t;
        	else
        		tmp = (y / a) * t;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-59], N[(x + t), $MachinePrecision], If[LessEqual[t$95$1, 1e-8], x, If[LessEqual[t$95$1, 5e+251], N[(x + t), $MachinePrecision], N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \frac{\left(y - z\right) \cdot t}{a - z}\\
        \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-59}:\\
        \;\;\;\;x + t\\
        
        \mathbf{elif}\;t\_1 \leq 10^{-8}:\\
        \;\;\;\;x\\
        
        \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+251}:\\
        \;\;\;\;x + t\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{y}{a} \cdot t\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < -2.0000000000000001e-59 or 1e-8 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 5.0000000000000005e251

          1. Initial program 84.0%

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

            \[\leadsto x + \color{blue}{t} \]
          3. Step-by-step derivation
            1. Applied rewrites49.0%

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

            if -2.0000000000000001e-59 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 1e-8

            1. Initial program 99.4%

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

              \[\leadsto \color{blue}{x} \]
            3. Step-by-step derivation
              1. Applied rewrites81.5%

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

              if 5.0000000000000005e251 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))

              1. Initial program 43.0%

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

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

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

                  \[\leadsto t \cdot \frac{y}{a} + x \]
                3. lower-fma.f64N/A

                  \[\leadsto \mathsf{fma}\left(t, \color{blue}{\frac{y}{a}}, x\right) \]
                4. lower-/.f6443.9

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

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

                \[\leadsto \frac{t \cdot y}{\color{blue}{a}} \]
              6. Step-by-step derivation
                1. associate-*r/N/A

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

                  \[\leadsto \frac{y}{a} \cdot t \]
                3. lower-*.f64N/A

                  \[\leadsto \frac{y}{a} \cdot t \]
                4. lift-/.f6436.6

                  \[\leadsto \frac{y}{a} \cdot t \]
              7. Applied rewrites36.6%

                \[\leadsto \frac{y}{a} \cdot \color{blue}{t} \]
            4. Recombined 3 regimes into one program.
            5. Add Preprocessing

            Alternative 6: 62.1% accurate, 0.3× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\left(y - z\right) \cdot t}{a - z}\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-59}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;t\_1 \leq 10^{-8}:\\ \;\;\;\;x\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+251}:\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;\frac{t \cdot y}{a}\\ \end{array} \end{array} \]
            (FPCore (x y z t a)
             :precision binary64
             (let* ((t_1 (/ (* (- y z) t) (- a z))))
               (if (<= t_1 -2e-59)
                 (+ x t)
                 (if (<= t_1 1e-8) x (if (<= t_1 5e+251) (+ x t) (/ (* t y) a))))))
            double code(double x, double y, double z, double t, double a) {
            	double t_1 = ((y - z) * t) / (a - z);
            	double tmp;
            	if (t_1 <= -2e-59) {
            		tmp = x + t;
            	} else if (t_1 <= 1e-8) {
            		tmp = x;
            	} else if (t_1 <= 5e+251) {
            		tmp = x + t;
            	} else {
            		tmp = (t * y) / a;
            	}
            	return tmp;
            }
            
            module fmin_fmax_functions
                implicit none
                private
                public fmax
                public fmin
            
                interface fmax
                    module procedure fmax88
                    module procedure fmax44
                    module procedure fmax84
                    module procedure fmax48
                end interface
                interface fmin
                    module procedure fmin88
                    module procedure fmin44
                    module procedure fmin84
                    module procedure fmin48
                end interface
            contains
                real(8) function fmax88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(4) function fmax44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(8) function fmax84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmax48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                end function
                real(8) function fmin88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(4) function fmin44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(8) function fmin84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmin48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                end function
            end module
            
            real(8) function code(x, y, z, t, a)
            use fmin_fmax_functions
                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) :: t_1
                real(8) :: tmp
                t_1 = ((y - z) * t) / (a - z)
                if (t_1 <= (-2d-59)) then
                    tmp = x + t
                else if (t_1 <= 1d-8) then
                    tmp = x
                else if (t_1 <= 5d+251) then
                    tmp = x + t
                else
                    tmp = (t * y) / a
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t, double a) {
            	double t_1 = ((y - z) * t) / (a - z);
            	double tmp;
            	if (t_1 <= -2e-59) {
            		tmp = x + t;
            	} else if (t_1 <= 1e-8) {
            		tmp = x;
            	} else if (t_1 <= 5e+251) {
            		tmp = x + t;
            	} else {
            		tmp = (t * y) / a;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t, a):
            	t_1 = ((y - z) * t) / (a - z)
            	tmp = 0
            	if t_1 <= -2e-59:
            		tmp = x + t
            	elif t_1 <= 1e-8:
            		tmp = x
            	elif t_1 <= 5e+251:
            		tmp = x + t
            	else:
            		tmp = (t * y) / a
            	return tmp
            
            function code(x, y, z, t, a)
            	t_1 = Float64(Float64(Float64(y - z) * t) / Float64(a - z))
            	tmp = 0.0
            	if (t_1 <= -2e-59)
            		tmp = Float64(x + t);
            	elseif (t_1 <= 1e-8)
            		tmp = x;
            	elseif (t_1 <= 5e+251)
            		tmp = Float64(x + t);
            	else
            		tmp = Float64(Float64(t * y) / a);
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t, a)
            	t_1 = ((y - z) * t) / (a - z);
            	tmp = 0.0;
            	if (t_1 <= -2e-59)
            		tmp = x + t;
            	elseif (t_1 <= 1e-8)
            		tmp = x;
            	elseif (t_1 <= 5e+251)
            		tmp = x + t;
            	else
            		tmp = (t * y) / a;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-59], N[(x + t), $MachinePrecision], If[LessEqual[t$95$1, 1e-8], x, If[LessEqual[t$95$1, 5e+251], N[(x + t), $MachinePrecision], N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \frac{\left(y - z\right) \cdot t}{a - z}\\
            \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-59}:\\
            \;\;\;\;x + t\\
            
            \mathbf{elif}\;t\_1 \leq 10^{-8}:\\
            \;\;\;\;x\\
            
            \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+251}:\\
            \;\;\;\;x + t\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{t \cdot y}{a}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < -2.0000000000000001e-59 or 1e-8 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 5.0000000000000005e251

              1. Initial program 84.0%

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

                \[\leadsto x + \color{blue}{t} \]
              3. Step-by-step derivation
                1. Applied rewrites49.0%

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

                if -2.0000000000000001e-59 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 1e-8

                1. Initial program 99.4%

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

                  \[\leadsto \color{blue}{x} \]
                3. Step-by-step derivation
                  1. Applied rewrites81.5%

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

                  if 5.0000000000000005e251 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))

                  1. Initial program 43.0%

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

                    \[\leadsto \color{blue}{\frac{t \cdot y}{a - z}} \]
                  3. Step-by-step derivation
                    1. associate-/l*N/A

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

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

                      \[\leadsto t \cdot \frac{y}{\color{blue}{a - z}} \]
                    4. lift--.f6450.9

                      \[\leadsto t \cdot \frac{y}{a - \color{blue}{z}} \]
                  4. Applied rewrites50.9%

                    \[\leadsto \color{blue}{t \cdot \frac{y}{a - z}} \]
                  5. Taylor expanded in z around 0

                    \[\leadsto \frac{t \cdot y}{\color{blue}{a}} \]
                  6. Step-by-step derivation
                    1. lower-/.f64N/A

                      \[\leadsto \frac{t \cdot y}{a} \]
                    2. lower-*.f6428.1

                      \[\leadsto \frac{t \cdot y}{a} \]
                  7. Applied rewrites28.1%

                    \[\leadsto \frac{t \cdot y}{\color{blue}{a}} \]
                4. Recombined 3 regimes into one program.
                5. Add Preprocessing

                Alternative 7: 61.0% accurate, 0.4× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\left(y - z\right) \cdot t}{a - z}\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-59}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;t\_1 \leq 10^{-8}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \end{array} \]
                (FPCore (x y z t a)
                 :precision binary64
                 (let* ((t_1 (/ (* (- y z) t) (- a z))))
                   (if (<= t_1 -2e-59) (+ x t) (if (<= t_1 1e-8) x (+ x t)))))
                double code(double x, double y, double z, double t, double a) {
                	double t_1 = ((y - z) * t) / (a - z);
                	double tmp;
                	if (t_1 <= -2e-59) {
                		tmp = x + t;
                	} else if (t_1 <= 1e-8) {
                		tmp = x;
                	} else {
                		tmp = x + t;
                	}
                	return tmp;
                }
                
                module fmin_fmax_functions
                    implicit none
                    private
                    public fmax
                    public fmin
                
                    interface fmax
                        module procedure fmax88
                        module procedure fmax44
                        module procedure fmax84
                        module procedure fmax48
                    end interface
                    interface fmin
                        module procedure fmin88
                        module procedure fmin44
                        module procedure fmin84
                        module procedure fmin48
                    end interface
                contains
                    real(8) function fmax88(x, y) result (res)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                    end function
                    real(4) function fmax44(x, y) result (res)
                        real(4), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                    end function
                    real(8) function fmax84(x, y) result(res)
                        real(8), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                    end function
                    real(8) function fmax48(x, y) result(res)
                        real(4), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                    end function
                    real(8) function fmin88(x, y) result (res)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                    end function
                    real(4) function fmin44(x, y) result (res)
                        real(4), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                    end function
                    real(8) function fmin84(x, y) result(res)
                        real(8), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                    end function
                    real(8) function fmin48(x, y) result(res)
                        real(4), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                    end function
                end module
                
                real(8) function code(x, y, z, t, a)
                use fmin_fmax_functions
                    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) :: t_1
                    real(8) :: tmp
                    t_1 = ((y - z) * t) / (a - z)
                    if (t_1 <= (-2d-59)) then
                        tmp = x + t
                    else if (t_1 <= 1d-8) then
                        tmp = x
                    else
                        tmp = x + t
                    end if
                    code = tmp
                end function
                
                public static double code(double x, double y, double z, double t, double a) {
                	double t_1 = ((y - z) * t) / (a - z);
                	double tmp;
                	if (t_1 <= -2e-59) {
                		tmp = x + t;
                	} else if (t_1 <= 1e-8) {
                		tmp = x;
                	} else {
                		tmp = x + t;
                	}
                	return tmp;
                }
                
                def code(x, y, z, t, a):
                	t_1 = ((y - z) * t) / (a - z)
                	tmp = 0
                	if t_1 <= -2e-59:
                		tmp = x + t
                	elif t_1 <= 1e-8:
                		tmp = x
                	else:
                		tmp = x + t
                	return tmp
                
                function code(x, y, z, t, a)
                	t_1 = Float64(Float64(Float64(y - z) * t) / Float64(a - z))
                	tmp = 0.0
                	if (t_1 <= -2e-59)
                		tmp = Float64(x + t);
                	elseif (t_1 <= 1e-8)
                		tmp = x;
                	else
                		tmp = Float64(x + t);
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, y, z, t, a)
                	t_1 = ((y - z) * t) / (a - z);
                	tmp = 0.0;
                	if (t_1 <= -2e-59)
                		tmp = x + t;
                	elseif (t_1 <= 1e-8)
                		tmp = x;
                	else
                		tmp = x + t;
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-59], N[(x + t), $MachinePrecision], If[LessEqual[t$95$1, 1e-8], x, N[(x + t), $MachinePrecision]]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_1 := \frac{\left(y - z\right) \cdot t}{a - z}\\
                \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-59}:\\
                \;\;\;\;x + t\\
                
                \mathbf{elif}\;t\_1 \leq 10^{-8}:\\
                \;\;\;\;x\\
                
                \mathbf{else}:\\
                \;\;\;\;x + t\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < -2.0000000000000001e-59 or 1e-8 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))

                  1. Initial program 74.1%

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

                    \[\leadsto x + \color{blue}{t} \]
                  3. Step-by-step derivation
                    1. Applied rewrites47.8%

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

                    if -2.0000000000000001e-59 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 1e-8

                    1. Initial program 99.4%

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

                      \[\leadsto \color{blue}{x} \]
                    3. Step-by-step derivation
                      1. Applied rewrites81.5%

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

                    Alternative 8: 53.1% accurate, 3.2× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.42 \cdot 10^{+169}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
                    (FPCore (x y z t a) :precision binary64 (if (<= t -1.42e+169) t x))
                    double code(double x, double y, double z, double t, double a) {
                    	double tmp;
                    	if (t <= -1.42e+169) {
                    		tmp = t;
                    	} else {
                    		tmp = x;
                    	}
                    	return tmp;
                    }
                    
                    module fmin_fmax_functions
                        implicit none
                        private
                        public fmax
                        public fmin
                    
                        interface fmax
                            module procedure fmax88
                            module procedure fmax44
                            module procedure fmax84
                            module procedure fmax48
                        end interface
                        interface fmin
                            module procedure fmin88
                            module procedure fmin44
                            module procedure fmin84
                            module procedure fmin48
                        end interface
                    contains
                        real(8) function fmax88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmax44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmax84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmax48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                        end function
                        real(8) function fmin88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmin44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmin84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmin48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                        end function
                    end module
                    
                    real(8) function code(x, y, z, t, a)
                    use fmin_fmax_functions
                        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 (t <= (-1.42d+169)) then
                            tmp = t
                        else
                            tmp = x
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double x, double y, double z, double t, double a) {
                    	double tmp;
                    	if (t <= -1.42e+169) {
                    		tmp = t;
                    	} else {
                    		tmp = x;
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y, z, t, a):
                    	tmp = 0
                    	if t <= -1.42e+169:
                    		tmp = t
                    	else:
                    		tmp = x
                    	return tmp
                    
                    function code(x, y, z, t, a)
                    	tmp = 0.0
                    	if (t <= -1.42e+169)
                    		tmp = t;
                    	else
                    		tmp = x;
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(x, y, z, t, a)
                    	tmp = 0.0;
                    	if (t <= -1.42e+169)
                    		tmp = t;
                    	else
                    		tmp = x;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.42e+169], t, x]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;t \leq -1.42 \cdot 10^{+169}:\\
                    \;\;\;\;t\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;x\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if t < -1.42000000000000002e169

                      1. Initial program 60.4%

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

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

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

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

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

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

                          \[\leadsto \left(y - z\right) \cdot \frac{t}{\color{blue}{a - z}} \]
                        6. lift--.f6480.5

                          \[\leadsto \left(y - z\right) \cdot \frac{t}{a - \color{blue}{z}} \]
                      4. Applied rewrites80.5%

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

                        \[\leadsto \left(y - z\right) \cdot \frac{t}{a} \]
                      6. Step-by-step derivation
                        1. Applied rewrites42.0%

                          \[\leadsto \left(y - z\right) \cdot \frac{t}{a} \]
                        2. Taylor expanded in y around 0

                          \[\leadsto \left(-1 \cdot z\right) \cdot \frac{\color{blue}{t}}{a} \]
                        3. Step-by-step derivation
                          1. mul-1-negN/A

                            \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \cdot \frac{t}{a} \]
                          2. lift-neg.f6418.7

                            \[\leadsto \left(-z\right) \cdot \frac{t}{a} \]
                        4. Applied rewrites18.7%

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

                          \[\leadsto t \]
                        6. Step-by-step derivation
                          1. Applied rewrites32.7%

                            \[\leadsto t \]

                          if -1.42000000000000002e169 < t

                          1. Initial program 88.5%

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

                            \[\leadsto \color{blue}{x} \]
                          3. Step-by-step derivation
                            1. Applied rewrites55.5%

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

                          Alternative 9: 51.4% accurate, 15.3× 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;
                          }
                          
                          module fmin_fmax_functions
                              implicit none
                              private
                              public fmax
                              public fmin
                          
                              interface fmax
                                  module procedure fmax88
                                  module procedure fmax44
                                  module procedure fmax84
                                  module procedure fmax48
                              end interface
                              interface fmin
                                  module procedure fmin88
                                  module procedure fmin44
                                  module procedure fmin84
                                  module procedure fmin48
                              end interface
                          contains
                              real(8) function fmax88(x, y) result (res)
                                  real(8), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                              end function
                              real(4) function fmax44(x, y) result (res)
                                  real(4), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                              end function
                              real(8) function fmax84(x, y) result(res)
                                  real(8), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                              end function
                              real(8) function fmax48(x, y) result(res)
                                  real(4), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                              end function
                              real(8) function fmin88(x, y) result (res)
                                  real(8), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                              end function
                              real(4) function fmin44(x, y) result (res)
                                  real(4), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                              end function
                              real(8) function fmin84(x, y) result(res)
                                  real(8), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                              end function
                              real(8) function fmin48(x, y) result(res)
                                  real(4), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                              end function
                          end module
                          
                          real(8) function code(x, y, z, t, a)
                          use fmin_fmax_functions
                              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 85.5%

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

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

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

                            Reproduce

                            ?
                            herbie shell --seed 2025106 
                            (FPCore (x y z t a)
                              :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, A"
                              :precision binary64
                              (+ x (/ (* (- y z) t) (- a z))))