Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3

Percentage Accurate: 84.3% → 96.9%
Time: 8.9s
Alternatives: 15
Speedup: 1.0×

Specification

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

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

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

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

Alternative 1: 96.9% accurate, 1.0× speedup?

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

\\
\frac{y - z}{t - z} \cdot x
\end{array}
Derivation
  1. Initial program 84.7%

    \[\frac{x \cdot \left(y - z\right)}{t - z} \]
  2. Add Preprocessing
  3. Applied rewrites97.2%

    \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
  4. Add Preprocessing

Alternative 2: 59.7% accurate, 0.2× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < -5.00000000000000022e92

    1. Initial program 65.4%

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{t - z}} \cdot y \]
      4. lower--.f6456.9

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

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

    if -5.00000000000000022e92 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < -1.9999999999999998e-308

    1. Initial program 99.6%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Add Preprocessing
    3. Applied rewrites97.1%

      \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
    4. Taylor expanded in t around inf

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

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

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

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

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

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

    if -1.9999999999999998e-308 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < 1

    1. Initial program 92.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z}{t - z} \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)} \]
      10. lower-neg.f6474.8

        \[\leadsto \frac{z}{t - z} \cdot \color{blue}{\left(-x\right)} \]
    5. Applied rewrites74.8%

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

    if 1 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z))

    1. Initial program 69.7%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(y - z\right)\right)}{z}} \cdot x \]
      8. *-lft-identityN/A

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

        \[\leadsto \frac{\mathsf{neg}\left(\left(y - \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot z\right)\right)}{z} \cdot x \]
      10. fp-cancel-sign-sub-invN/A

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

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

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

        \[\leadsto \frac{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}{z} \cdot x \]
      14. remove-double-negN/A

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

        \[\leadsto \frac{z + \color{blue}{-1 \cdot y}}{z} \cdot x \]
      16. metadata-evalN/A

        \[\leadsto \frac{z + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)} \cdot y}{z} \cdot x \]
      17. fp-cancel-sub-sign-invN/A

        \[\leadsto \frac{\color{blue}{z - 1 \cdot y}}{z} \cdot x \]
      18. *-lft-identityN/A

        \[\leadsto \frac{z - \color{blue}{y}}{z} \cdot x \]
      19. lower--.f6475.0

        \[\leadsto \frac{\color{blue}{z - y}}{z} \cdot x \]
    5. Applied rewrites75.0%

      \[\leadsto \color{blue}{\frac{z - y}{z} \cdot x} \]
    6. Taylor expanded in y around 0

      \[\leadsto 1 \cdot x \]
    7. Step-by-step derivation
      1. Applied rewrites33.5%

        \[\leadsto 1 \cdot x \]
      2. Taylor expanded in z around inf

        \[\leadsto \color{blue}{\left(x + -1 \cdot \frac{x \cdot y}{z}\right) - -1 \cdot \frac{t \cdot x}{z}} \]
      3. Applied rewrites75.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(x, \frac{t - y}{z}, x\right)} \]
    8. Recombined 4 regimes into one program.
    9. Final simplification65.9%

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

    Alternative 3: 56.0% accurate, 0.2× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x \cdot \left(y - z\right)}{t - z}\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+77}:\\ \;\;\;\;\frac{x}{t - z} \cdot y\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\frac{y - z}{t} \cdot x\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-48}:\\ \;\;\;\;1 \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot \left(z - y\right)\\ \end{array} \end{array} \]
    (FPCore (x y z t)
     :precision binary64
     (let* ((t_1 (/ (* x (- y z)) (- t z))))
       (if (<= t_1 -2e+77)
         (* (/ x (- t z)) y)
         (if (<= t_1 0.0)
           (* (/ (- y z) t) x)
           (if (<= t_1 5e-48) (* 1.0 x) (* (/ x z) (- z y)))))))
    double code(double x, double y, double z, double t) {
    	double t_1 = (x * (y - z)) / (t - z);
    	double tmp;
    	if (t_1 <= -2e+77) {
    		tmp = (x / (t - z)) * y;
    	} else if (t_1 <= 0.0) {
    		tmp = ((y - z) / t) * x;
    	} else if (t_1 <= 5e-48) {
    		tmp = 1.0 * x;
    	} else {
    		tmp = (x / z) * (z - y);
    	}
    	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)
    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) :: t_1
        real(8) :: tmp
        t_1 = (x * (y - z)) / (t - z)
        if (t_1 <= (-2d+77)) then
            tmp = (x / (t - z)) * y
        else if (t_1 <= 0.0d0) then
            tmp = ((y - z) / t) * x
        else if (t_1 <= 5d-48) then
            tmp = 1.0d0 * x
        else
            tmp = (x / z) * (z - y)
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t) {
    	double t_1 = (x * (y - z)) / (t - z);
    	double tmp;
    	if (t_1 <= -2e+77) {
    		tmp = (x / (t - z)) * y;
    	} else if (t_1 <= 0.0) {
    		tmp = ((y - z) / t) * x;
    	} else if (t_1 <= 5e-48) {
    		tmp = 1.0 * x;
    	} else {
    		tmp = (x / z) * (z - y);
    	}
    	return tmp;
    }
    
    def code(x, y, z, t):
    	t_1 = (x * (y - z)) / (t - z)
    	tmp = 0
    	if t_1 <= -2e+77:
    		tmp = (x / (t - z)) * y
    	elif t_1 <= 0.0:
    		tmp = ((y - z) / t) * x
    	elif t_1 <= 5e-48:
    		tmp = 1.0 * x
    	else:
    		tmp = (x / z) * (z - y)
    	return tmp
    
    function code(x, y, z, t)
    	t_1 = Float64(Float64(x * Float64(y - z)) / Float64(t - z))
    	tmp = 0.0
    	if (t_1 <= -2e+77)
    		tmp = Float64(Float64(x / Float64(t - z)) * y);
    	elseif (t_1 <= 0.0)
    		tmp = Float64(Float64(Float64(y - z) / t) * x);
    	elseif (t_1 <= 5e-48)
    		tmp = Float64(1.0 * x);
    	else
    		tmp = Float64(Float64(x / z) * Float64(z - y));
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t)
    	t_1 = (x * (y - z)) / (t - z);
    	tmp = 0.0;
    	if (t_1 <= -2e+77)
    		tmp = (x / (t - z)) * y;
    	elseif (t_1 <= 0.0)
    		tmp = ((y - z) / t) * x;
    	elseif (t_1 <= 5e-48)
    		tmp = 1.0 * x;
    	else
    		tmp = (x / z) * (z - y);
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+77], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t$95$1, 5e-48], N[(1.0 * x), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \frac{x \cdot \left(y - z\right)}{t - z}\\
    \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+77}:\\
    \;\;\;\;\frac{x}{t - z} \cdot y\\
    
    \mathbf{elif}\;t\_1 \leq 0:\\
    \;\;\;\;\frac{y - z}{t} \cdot x\\
    
    \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-48}:\\
    \;\;\;\;1 \cdot x\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{x}{z} \cdot \left(z - y\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < -1.99999999999999997e77

      1. Initial program 67.3%

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

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

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

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

          \[\leadsto \color{blue}{\frac{x}{t - z}} \cdot y \]
        4. lower--.f6459.4

          \[\leadsto \frac{x}{\color{blue}{t - z}} \cdot y \]
      5. Applied rewrites59.4%

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

      if -1.99999999999999997e77 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < 0.0

      1. Initial program 94.2%

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

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

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

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

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

          \[\leadsto \color{blue}{\frac{y - z}{t}} \cdot x \]
        5. lower--.f6461.5

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

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

      if 0.0 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < 4.9999999999999999e-48

      1. Initial program 99.4%

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(y - z\right)\right)}{z}} \cdot x \]
        8. *-lft-identityN/A

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

          \[\leadsto \frac{\mathsf{neg}\left(\left(y - \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot z\right)\right)}{z} \cdot x \]
        10. fp-cancel-sign-sub-invN/A

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

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

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

          \[\leadsto \frac{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}{z} \cdot x \]
        14. remove-double-negN/A

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

          \[\leadsto \frac{z + \color{blue}{-1 \cdot y}}{z} \cdot x \]
        16. metadata-evalN/A

          \[\leadsto \frac{z + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)} \cdot y}{z} \cdot x \]
        17. fp-cancel-sub-sign-invN/A

          \[\leadsto \frac{\color{blue}{z - 1 \cdot y}}{z} \cdot x \]
        18. *-lft-identityN/A

          \[\leadsto \frac{z - \color{blue}{y}}{z} \cdot x \]
        19. lower--.f6450.8

          \[\leadsto \frac{\color{blue}{z - y}}{z} \cdot x \]
      5. Applied rewrites50.8%

        \[\leadsto \color{blue}{\frac{z - y}{z} \cdot x} \]
      6. Taylor expanded in y around 0

        \[\leadsto 1 \cdot x \]
      7. Step-by-step derivation
        1. Applied rewrites45.0%

          \[\leadsto 1 \cdot x \]

        if 4.9999999999999999e-48 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z))

        1. Initial program 73.2%

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(y - z\right)\right)}{z}} \cdot x \]
          8. *-lft-identityN/A

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

            \[\leadsto \frac{\mathsf{neg}\left(\left(y - \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot z\right)\right)}{z} \cdot x \]
          10. fp-cancel-sign-sub-invN/A

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

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

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

            \[\leadsto \frac{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}{z} \cdot x \]
          14. remove-double-negN/A

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

            \[\leadsto \frac{z + \color{blue}{-1 \cdot y}}{z} \cdot x \]
          16. metadata-evalN/A

            \[\leadsto \frac{z + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)} \cdot y}{z} \cdot x \]
          17. fp-cancel-sub-sign-invN/A

            \[\leadsto \frac{\color{blue}{z - 1 \cdot y}}{z} \cdot x \]
          18. *-lft-identityN/A

            \[\leadsto \frac{z - \color{blue}{y}}{z} \cdot x \]
          19. lower--.f6473.1

            \[\leadsto \frac{\color{blue}{z - y}}{z} \cdot x \]
        5. Applied rewrites73.1%

          \[\leadsto \color{blue}{\frac{z - y}{z} \cdot x} \]
        6. Step-by-step derivation
          1. Applied rewrites74.5%

            \[\leadsto \frac{x}{z} \cdot \color{blue}{\left(z - y\right)} \]
        7. Recombined 4 regimes into one program.
        8. Final simplification61.2%

          \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x \cdot \left(y - z\right)}{t - z} \leq -2 \cdot 10^{+77}:\\ \;\;\;\;\frac{x}{t - z} \cdot y\\ \mathbf{elif}\;\frac{x \cdot \left(y - z\right)}{t - z} \leq 0:\\ \;\;\;\;\frac{y - z}{t} \cdot x\\ \mathbf{elif}\;\frac{x \cdot \left(y - z\right)}{t - z} \leq 5 \cdot 10^{-48}:\\ \;\;\;\;1 \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot \left(z - y\right)\\ \end{array} \]
        9. Add Preprocessing

        Alternative 4: 55.8% accurate, 0.2× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x \cdot \left(y - z\right)}{t - z}\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+92}:\\ \;\;\;\;\frac{x}{t - z} \cdot y\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\frac{\left(y - z\right) \cdot x}{t}\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-48}:\\ \;\;\;\;1 \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot \left(z - y\right)\\ \end{array} \end{array} \]
        (FPCore (x y z t)
         :precision binary64
         (let* ((t_1 (/ (* x (- y z)) (- t z))))
           (if (<= t_1 -5e+92)
             (* (/ x (- t z)) y)
             (if (<= t_1 0.0)
               (/ (* (- y z) x) t)
               (if (<= t_1 5e-48) (* 1.0 x) (* (/ x z) (- z y)))))))
        double code(double x, double y, double z, double t) {
        	double t_1 = (x * (y - z)) / (t - z);
        	double tmp;
        	if (t_1 <= -5e+92) {
        		tmp = (x / (t - z)) * y;
        	} else if (t_1 <= 0.0) {
        		tmp = ((y - z) * x) / t;
        	} else if (t_1 <= 5e-48) {
        		tmp = 1.0 * x;
        	} else {
        		tmp = (x / z) * (z - y);
        	}
        	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)
        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) :: t_1
            real(8) :: tmp
            t_1 = (x * (y - z)) / (t - z)
            if (t_1 <= (-5d+92)) then
                tmp = (x / (t - z)) * y
            else if (t_1 <= 0.0d0) then
                tmp = ((y - z) * x) / t
            else if (t_1 <= 5d-48) then
                tmp = 1.0d0 * x
            else
                tmp = (x / z) * (z - y)
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z, double t) {
        	double t_1 = (x * (y - z)) / (t - z);
        	double tmp;
        	if (t_1 <= -5e+92) {
        		tmp = (x / (t - z)) * y;
        	} else if (t_1 <= 0.0) {
        		tmp = ((y - z) * x) / t;
        	} else if (t_1 <= 5e-48) {
        		tmp = 1.0 * x;
        	} else {
        		tmp = (x / z) * (z - y);
        	}
        	return tmp;
        }
        
        def code(x, y, z, t):
        	t_1 = (x * (y - z)) / (t - z)
        	tmp = 0
        	if t_1 <= -5e+92:
        		tmp = (x / (t - z)) * y
        	elif t_1 <= 0.0:
        		tmp = ((y - z) * x) / t
        	elif t_1 <= 5e-48:
        		tmp = 1.0 * x
        	else:
        		tmp = (x / z) * (z - y)
        	return tmp
        
        function code(x, y, z, t)
        	t_1 = Float64(Float64(x * Float64(y - z)) / Float64(t - z))
        	tmp = 0.0
        	if (t_1 <= -5e+92)
        		tmp = Float64(Float64(x / Float64(t - z)) * y);
        	elseif (t_1 <= 0.0)
        		tmp = Float64(Float64(Float64(y - z) * x) / t);
        	elseif (t_1 <= 5e-48)
        		tmp = Float64(1.0 * x);
        	else
        		tmp = Float64(Float64(x / z) * Float64(z - y));
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t)
        	t_1 = (x * (y - z)) / (t - z);
        	tmp = 0.0;
        	if (t_1 <= -5e+92)
        		tmp = (x / (t - z)) * y;
        	elseif (t_1 <= 0.0)
        		tmp = ((y - z) * x) / t;
        	elseif (t_1 <= 5e-48)
        		tmp = 1.0 * x;
        	else
        		tmp = (x / z) * (z - y);
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+92], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(N[(N[(y - z), $MachinePrecision] * x), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t$95$1, 5e-48], N[(1.0 * x), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \frac{x \cdot \left(y - z\right)}{t - z}\\
        \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+92}:\\
        \;\;\;\;\frac{x}{t - z} \cdot y\\
        
        \mathbf{elif}\;t\_1 \leq 0:\\
        \;\;\;\;\frac{\left(y - z\right) \cdot x}{t}\\
        
        \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-48}:\\
        \;\;\;\;1 \cdot x\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{x}{z} \cdot \left(z - y\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 4 regimes
        2. if (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < -5.00000000000000022e92

          1. Initial program 65.4%

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

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

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

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

              \[\leadsto \color{blue}{\frac{x}{t - z}} \cdot y \]
            4. lower--.f6456.9

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

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

          if -5.00000000000000022e92 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < 0.0

          1. Initial program 94.3%

            \[\frac{x \cdot \left(y - z\right)}{t - z} \]
          2. Add Preprocessing
          3. Applied rewrites97.8%

            \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
          4. Taylor expanded in t around inf

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

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

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

              \[\leadsto \frac{\color{blue}{\left(y - z\right) \cdot x}}{t} \]
            4. lower--.f6461.1

              \[\leadsto \frac{\color{blue}{\left(y - z\right)} \cdot x}{t} \]
          6. Applied rewrites61.1%

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

          if 0.0 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < 4.9999999999999999e-48

          1. Initial program 99.4%

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(y - z\right)\right)}{z}} \cdot x \]
            8. *-lft-identityN/A

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

              \[\leadsto \frac{\mathsf{neg}\left(\left(y - \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot z\right)\right)}{z} \cdot x \]
            10. fp-cancel-sign-sub-invN/A

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

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

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

              \[\leadsto \frac{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}{z} \cdot x \]
            14. remove-double-negN/A

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

              \[\leadsto \frac{z + \color{blue}{-1 \cdot y}}{z} \cdot x \]
            16. metadata-evalN/A

              \[\leadsto \frac{z + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)} \cdot y}{z} \cdot x \]
            17. fp-cancel-sub-sign-invN/A

              \[\leadsto \frac{\color{blue}{z - 1 \cdot y}}{z} \cdot x \]
            18. *-lft-identityN/A

              \[\leadsto \frac{z - \color{blue}{y}}{z} \cdot x \]
            19. lower--.f6450.8

              \[\leadsto \frac{\color{blue}{z - y}}{z} \cdot x \]
          5. Applied rewrites50.8%

            \[\leadsto \color{blue}{\frac{z - y}{z} \cdot x} \]
          6. Taylor expanded in y around 0

            \[\leadsto 1 \cdot x \]
          7. Step-by-step derivation
            1. Applied rewrites45.0%

              \[\leadsto 1 \cdot x \]

            if 4.9999999999999999e-48 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z))

            1. Initial program 73.2%

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(y - z\right)\right)}{z}} \cdot x \]
              8. *-lft-identityN/A

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

                \[\leadsto \frac{\mathsf{neg}\left(\left(y - \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot z\right)\right)}{z} \cdot x \]
              10. fp-cancel-sign-sub-invN/A

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

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

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

                \[\leadsto \frac{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}{z} \cdot x \]
              14. remove-double-negN/A

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

                \[\leadsto \frac{z + \color{blue}{-1 \cdot y}}{z} \cdot x \]
              16. metadata-evalN/A

                \[\leadsto \frac{z + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)} \cdot y}{z} \cdot x \]
              17. fp-cancel-sub-sign-invN/A

                \[\leadsto \frac{\color{blue}{z - 1 \cdot y}}{z} \cdot x \]
              18. *-lft-identityN/A

                \[\leadsto \frac{z - \color{blue}{y}}{z} \cdot x \]
              19. lower--.f6473.1

                \[\leadsto \frac{\color{blue}{z - y}}{z} \cdot x \]
            5. Applied rewrites73.1%

              \[\leadsto \color{blue}{\frac{z - y}{z} \cdot x} \]
            6. Step-by-step derivation
              1. Applied rewrites74.5%

                \[\leadsto \frac{x}{z} \cdot \color{blue}{\left(z - y\right)} \]
            7. Recombined 4 regimes into one program.
            8. Final simplification60.6%

              \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x \cdot \left(y - z\right)}{t - z} \leq -5 \cdot 10^{+92}:\\ \;\;\;\;\frac{x}{t - z} \cdot y\\ \mathbf{elif}\;\frac{x \cdot \left(y - z\right)}{t - z} \leq 0:\\ \;\;\;\;\frac{\left(y - z\right) \cdot x}{t}\\ \mathbf{elif}\;\frac{x \cdot \left(y - z\right)}{t - z} \leq 5 \cdot 10^{-48}:\\ \;\;\;\;1 \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot \left(z - y\right)\\ \end{array} \]
            9. Add Preprocessing

            Alternative 5: 56.4% accurate, 0.2× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x \cdot \left(y - z\right)}{t - z}\\ t_2 := \frac{x}{z} \cdot \left(z - y\right)\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+114}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\frac{\left(y - z\right) \cdot x}{t}\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-48}:\\ \;\;\;\;1 \cdot x\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
            (FPCore (x y z t)
             :precision binary64
             (let* ((t_1 (/ (* x (- y z)) (- t z))) (t_2 (* (/ x z) (- z y))))
               (if (<= t_1 -1e+114)
                 t_2
                 (if (<= t_1 0.0) (/ (* (- y z) x) t) (if (<= t_1 5e-48) (* 1.0 x) t_2)))))
            double code(double x, double y, double z, double t) {
            	double t_1 = (x * (y - z)) / (t - z);
            	double t_2 = (x / z) * (z - y);
            	double tmp;
            	if (t_1 <= -1e+114) {
            		tmp = t_2;
            	} else if (t_1 <= 0.0) {
            		tmp = ((y - z) * x) / t;
            	} else if (t_1 <= 5e-48) {
            		tmp = 1.0 * x;
            	} else {
            		tmp = t_2;
            	}
            	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)
            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) :: t_1
                real(8) :: t_2
                real(8) :: tmp
                t_1 = (x * (y - z)) / (t - z)
                t_2 = (x / z) * (z - y)
                if (t_1 <= (-1d+114)) then
                    tmp = t_2
                else if (t_1 <= 0.0d0) then
                    tmp = ((y - z) * x) / t
                else if (t_1 <= 5d-48) then
                    tmp = 1.0d0 * x
                else
                    tmp = t_2
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t) {
            	double t_1 = (x * (y - z)) / (t - z);
            	double t_2 = (x / z) * (z - y);
            	double tmp;
            	if (t_1 <= -1e+114) {
            		tmp = t_2;
            	} else if (t_1 <= 0.0) {
            		tmp = ((y - z) * x) / t;
            	} else if (t_1 <= 5e-48) {
            		tmp = 1.0 * x;
            	} else {
            		tmp = t_2;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t):
            	t_1 = (x * (y - z)) / (t - z)
            	t_2 = (x / z) * (z - y)
            	tmp = 0
            	if t_1 <= -1e+114:
            		tmp = t_2
            	elif t_1 <= 0.0:
            		tmp = ((y - z) * x) / t
            	elif t_1 <= 5e-48:
            		tmp = 1.0 * x
            	else:
            		tmp = t_2
            	return tmp
            
            function code(x, y, z, t)
            	t_1 = Float64(Float64(x * Float64(y - z)) / Float64(t - z))
            	t_2 = Float64(Float64(x / z) * Float64(z - y))
            	tmp = 0.0
            	if (t_1 <= -1e+114)
            		tmp = t_2;
            	elseif (t_1 <= 0.0)
            		tmp = Float64(Float64(Float64(y - z) * x) / t);
            	elseif (t_1 <= 5e-48)
            		tmp = Float64(1.0 * x);
            	else
            		tmp = t_2;
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t)
            	t_1 = (x * (y - z)) / (t - z);
            	t_2 = (x / z) * (z - y);
            	tmp = 0.0;
            	if (t_1 <= -1e+114)
            		tmp = t_2;
            	elseif (t_1 <= 0.0)
            		tmp = ((y - z) * x) / t;
            	elseif (t_1 <= 5e-48)
            		tmp = 1.0 * x;
            	else
            		tmp = t_2;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / z), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+114], t$95$2, If[LessEqual[t$95$1, 0.0], N[(N[(N[(y - z), $MachinePrecision] * x), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t$95$1, 5e-48], N[(1.0 * x), $MachinePrecision], t$95$2]]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \frac{x \cdot \left(y - z\right)}{t - z}\\
            t_2 := \frac{x}{z} \cdot \left(z - y\right)\\
            \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+114}:\\
            \;\;\;\;t\_2\\
            
            \mathbf{elif}\;t\_1 \leq 0:\\
            \;\;\;\;\frac{\left(y - z\right) \cdot x}{t}\\
            
            \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-48}:\\
            \;\;\;\;1 \cdot x\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_2\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < -1e114 or 4.9999999999999999e-48 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z))

              1. Initial program 67.9%

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

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

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

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

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

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

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

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

                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(y - z\right)\right)}{z}} \cdot x \]
                8. *-lft-identityN/A

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

                  \[\leadsto \frac{\mathsf{neg}\left(\left(y - \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot z\right)\right)}{z} \cdot x \]
                10. fp-cancel-sign-sub-invN/A

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

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

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

                  \[\leadsto \frac{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}{z} \cdot x \]
                14. remove-double-negN/A

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

                  \[\leadsto \frac{z + \color{blue}{-1 \cdot y}}{z} \cdot x \]
                16. metadata-evalN/A

                  \[\leadsto \frac{z + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)} \cdot y}{z} \cdot x \]
                17. fp-cancel-sub-sign-invN/A

                  \[\leadsto \frac{\color{blue}{z - 1 \cdot y}}{z} \cdot x \]
                18. *-lft-identityN/A

                  \[\leadsto \frac{z - \color{blue}{y}}{z} \cdot x \]
                19. lower--.f6475.6

                  \[\leadsto \frac{\color{blue}{z - y}}{z} \cdot x \]
              5. Applied rewrites75.6%

                \[\leadsto \color{blue}{\frac{z - y}{z} \cdot x} \]
              6. Step-by-step derivation
                1. Applied rewrites77.3%

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

                if -1e114 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < 0.0

                1. Initial program 94.6%

                  \[\frac{x \cdot \left(y - z\right)}{t - z} \]
                2. Add Preprocessing
                3. Applied rewrites97.9%

                  \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
                4. Taylor expanded in t around inf

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

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

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

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

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

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

                if 0.0 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < 4.9999999999999999e-48

                1. Initial program 99.4%

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

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

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

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

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

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

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

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

                    \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(y - z\right)\right)}{z}} \cdot x \]
                  8. *-lft-identityN/A

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

                    \[\leadsto \frac{\mathsf{neg}\left(\left(y - \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot z\right)\right)}{z} \cdot x \]
                  10. fp-cancel-sign-sub-invN/A

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

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

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

                    \[\leadsto \frac{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}{z} \cdot x \]
                  14. remove-double-negN/A

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

                    \[\leadsto \frac{z + \color{blue}{-1 \cdot y}}{z} \cdot x \]
                  16. metadata-evalN/A

                    \[\leadsto \frac{z + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)} \cdot y}{z} \cdot x \]
                  17. fp-cancel-sub-sign-invN/A

                    \[\leadsto \frac{\color{blue}{z - 1 \cdot y}}{z} \cdot x \]
                  18. *-lft-identityN/A

                    \[\leadsto \frac{z - \color{blue}{y}}{z} \cdot x \]
                  19. lower--.f6450.8

                    \[\leadsto \frac{\color{blue}{z - y}}{z} \cdot x \]
                5. Applied rewrites50.8%

                  \[\leadsto \color{blue}{\frac{z - y}{z} \cdot x} \]
                6. Taylor expanded in y around 0

                  \[\leadsto 1 \cdot x \]
                7. Step-by-step derivation
                  1. Applied rewrites45.0%

                    \[\leadsto 1 \cdot x \]
                8. Recombined 3 regimes into one program.
                9. Final simplification65.0%

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

                Alternative 6: 57.4% accurate, 0.3× speedup?

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

                  1. Initial program 67.3%

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

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

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

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

                      \[\leadsto \color{blue}{\frac{x}{t - z}} \cdot y \]
                    4. lower--.f6459.4

                      \[\leadsto \frac{x}{\color{blue}{t - z}} \cdot y \]
                  5. Applied rewrites59.4%

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

                  if -1.99999999999999997e77 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < 0.0

                  1. Initial program 94.2%

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

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

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

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

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

                      \[\leadsto \color{blue}{\frac{y - z}{t}} \cdot x \]
                    5. lower--.f6461.5

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

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

                  if 0.0 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z))

                  1. Initial program 84.4%

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

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

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

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

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

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

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

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

                      \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(y - z\right)\right)}{z}} \cdot x \]
                    8. *-lft-identityN/A

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

                      \[\leadsto \frac{\mathsf{neg}\left(\left(y - \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot z\right)\right)}{z} \cdot x \]
                    10. fp-cancel-sign-sub-invN/A

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

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

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

                      \[\leadsto \frac{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}{z} \cdot x \]
                    14. remove-double-negN/A

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

                      \[\leadsto \frac{z + \color{blue}{-1 \cdot y}}{z} \cdot x \]
                    16. metadata-evalN/A

                      \[\leadsto \frac{z + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)} \cdot y}{z} \cdot x \]
                    17. fp-cancel-sub-sign-invN/A

                      \[\leadsto \frac{\color{blue}{z - 1 \cdot y}}{z} \cdot x \]
                    18. *-lft-identityN/A

                      \[\leadsto \frac{z - \color{blue}{y}}{z} \cdot x \]
                    19. lower--.f6463.5

                      \[\leadsto \frac{\color{blue}{z - y}}{z} \cdot x \]
                  5. Applied rewrites63.5%

                    \[\leadsto \color{blue}{\frac{z - y}{z} \cdot x} \]
                3. Recombined 3 regimes into one program.
                4. Final simplification61.9%

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

                Alternative 7: 59.5% accurate, 0.6× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.4 \cdot 10^{+104}:\\ \;\;\;\;1 \cdot x\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{+68}:\\ \;\;\;\;\frac{-y}{z} \cdot x\\ \mathbf{elif}\;z \leq -1.12 \cdot 10^{-16}:\\ \;\;\;\;\frac{\left(-z\right) \cdot x}{t}\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-15}:\\ \;\;\;\;\frac{y \cdot x}{t}\\ \mathbf{else}:\\ \;\;\;\;1 \cdot x\\ \end{array} \end{array} \]
                (FPCore (x y z t)
                 :precision binary64
                 (if (<= z -4.4e+104)
                   (* 1.0 x)
                   (if (<= z -1.6e+68)
                     (* (/ (- y) z) x)
                     (if (<= z -1.12e-16)
                       (/ (* (- z) x) t)
                       (if (<= z 3.8e-15) (/ (* y x) t) (* 1.0 x))))))
                double code(double x, double y, double z, double t) {
                	double tmp;
                	if (z <= -4.4e+104) {
                		tmp = 1.0 * x;
                	} else if (z <= -1.6e+68) {
                		tmp = (-y / z) * x;
                	} else if (z <= -1.12e-16) {
                		tmp = (-z * x) / t;
                	} else if (z <= 3.8e-15) {
                		tmp = (y * x) / t;
                	} else {
                		tmp = 1.0 * 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)
                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) :: tmp
                    if (z <= (-4.4d+104)) then
                        tmp = 1.0d0 * x
                    else if (z <= (-1.6d+68)) then
                        tmp = (-y / z) * x
                    else if (z <= (-1.12d-16)) then
                        tmp = (-z * x) / t
                    else if (z <= 3.8d-15) then
                        tmp = (y * x) / t
                    else
                        tmp = 1.0d0 * x
                    end if
                    code = tmp
                end function
                
                public static double code(double x, double y, double z, double t) {
                	double tmp;
                	if (z <= -4.4e+104) {
                		tmp = 1.0 * x;
                	} else if (z <= -1.6e+68) {
                		tmp = (-y / z) * x;
                	} else if (z <= -1.12e-16) {
                		tmp = (-z * x) / t;
                	} else if (z <= 3.8e-15) {
                		tmp = (y * x) / t;
                	} else {
                		tmp = 1.0 * x;
                	}
                	return tmp;
                }
                
                def code(x, y, z, t):
                	tmp = 0
                	if z <= -4.4e+104:
                		tmp = 1.0 * x
                	elif z <= -1.6e+68:
                		tmp = (-y / z) * x
                	elif z <= -1.12e-16:
                		tmp = (-z * x) / t
                	elif z <= 3.8e-15:
                		tmp = (y * x) / t
                	else:
                		tmp = 1.0 * x
                	return tmp
                
                function code(x, y, z, t)
                	tmp = 0.0
                	if (z <= -4.4e+104)
                		tmp = Float64(1.0 * x);
                	elseif (z <= -1.6e+68)
                		tmp = Float64(Float64(Float64(-y) / z) * x);
                	elseif (z <= -1.12e-16)
                		tmp = Float64(Float64(Float64(-z) * x) / t);
                	elseif (z <= 3.8e-15)
                		tmp = Float64(Float64(y * x) / t);
                	else
                		tmp = Float64(1.0 * x);
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, y, z, t)
                	tmp = 0.0;
                	if (z <= -4.4e+104)
                		tmp = 1.0 * x;
                	elseif (z <= -1.6e+68)
                		tmp = (-y / z) * x;
                	elseif (z <= -1.12e-16)
                		tmp = (-z * x) / t;
                	elseif (z <= 3.8e-15)
                		tmp = (y * x) / t;
                	else
                		tmp = 1.0 * x;
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_, z_, t_] := If[LessEqual[z, -4.4e+104], N[(1.0 * x), $MachinePrecision], If[LessEqual[z, -1.6e+68], N[(N[((-y) / z), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[z, -1.12e-16], N[(N[((-z) * x), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 3.8e-15], N[(N[(y * x), $MachinePrecision] / t), $MachinePrecision], N[(1.0 * x), $MachinePrecision]]]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;z \leq -4.4 \cdot 10^{+104}:\\
                \;\;\;\;1 \cdot x\\
                
                \mathbf{elif}\;z \leq -1.6 \cdot 10^{+68}:\\
                \;\;\;\;\frac{-y}{z} \cdot x\\
                
                \mathbf{elif}\;z \leq -1.12 \cdot 10^{-16}:\\
                \;\;\;\;\frac{\left(-z\right) \cdot x}{t}\\
                
                \mathbf{elif}\;z \leq 3.8 \cdot 10^{-15}:\\
                \;\;\;\;\frac{y \cdot x}{t}\\
                
                \mathbf{else}:\\
                \;\;\;\;1 \cdot x\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 4 regimes
                2. if z < -4.40000000000000001e104 or 3.8000000000000002e-15 < z

                  1. Initial program 70.0%

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

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

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

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

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

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

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

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

                      \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(y - z\right)\right)}{z}} \cdot x \]
                    8. *-lft-identityN/A

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

                      \[\leadsto \frac{\mathsf{neg}\left(\left(y - \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot z\right)\right)}{z} \cdot x \]
                    10. fp-cancel-sign-sub-invN/A

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

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

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

                      \[\leadsto \frac{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}{z} \cdot x \]
                    14. remove-double-negN/A

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

                      \[\leadsto \frac{z + \color{blue}{-1 \cdot y}}{z} \cdot x \]
                    16. metadata-evalN/A

                      \[\leadsto \frac{z + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)} \cdot y}{z} \cdot x \]
                    17. fp-cancel-sub-sign-invN/A

                      \[\leadsto \frac{\color{blue}{z - 1 \cdot y}}{z} \cdot x \]
                    18. *-lft-identityN/A

                      \[\leadsto \frac{z - \color{blue}{y}}{z} \cdot x \]
                    19. lower--.f6484.4

                      \[\leadsto \frac{\color{blue}{z - y}}{z} \cdot x \]
                  5. Applied rewrites84.4%

                    \[\leadsto \color{blue}{\frac{z - y}{z} \cdot x} \]
                  6. Taylor expanded in y around 0

                    \[\leadsto 1 \cdot x \]
                  7. Step-by-step derivation
                    1. Applied rewrites67.2%

                      \[\leadsto 1 \cdot x \]

                    if -4.40000000000000001e104 < z < -1.59999999999999997e68

                    1. Initial program 91.2%

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

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

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

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

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

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

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

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

                        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(y - z\right)\right)}{z}} \cdot x \]
                      8. *-lft-identityN/A

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

                        \[\leadsto \frac{\mathsf{neg}\left(\left(y - \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot z\right)\right)}{z} \cdot x \]
                      10. fp-cancel-sign-sub-invN/A

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

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

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

                        \[\leadsto \frac{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}{z} \cdot x \]
                      14. remove-double-negN/A

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

                        \[\leadsto \frac{z + \color{blue}{-1 \cdot y}}{z} \cdot x \]
                      16. metadata-evalN/A

                        \[\leadsto \frac{z + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)} \cdot y}{z} \cdot x \]
                      17. fp-cancel-sub-sign-invN/A

                        \[\leadsto \frac{\color{blue}{z - 1 \cdot y}}{z} \cdot x \]
                      18. *-lft-identityN/A

                        \[\leadsto \frac{z - \color{blue}{y}}{z} \cdot x \]
                      19. lower--.f6482.2

                        \[\leadsto \frac{\color{blue}{z - y}}{z} \cdot x \]
                    5. Applied rewrites82.2%

                      \[\leadsto \color{blue}{\frac{z - y}{z} \cdot x} \]
                    6. Taylor expanded in y around inf

                      \[\leadsto \frac{-1 \cdot y}{z} \cdot x \]
                    7. Step-by-step derivation
                      1. Applied rewrites65.1%

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

                      if -1.59999999999999997e68 < z < -1.12e-16

                      1. Initial program 95.0%

                        \[\frac{x \cdot \left(y - z\right)}{t - z} \]
                      2. Add Preprocessing
                      3. Applied rewrites99.5%

                        \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
                      4. Taylor expanded in t around inf

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

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

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

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

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

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

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

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

                        if -1.12e-16 < z < 3.8000000000000002e-15

                        1. Initial program 95.1%

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

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

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

                            \[\leadsto \frac{\color{blue}{y \cdot x}}{t} \]
                          3. lower-*.f6460.4

                            \[\leadsto \frac{\color{blue}{y \cdot x}}{t} \]
                        5. Applied rewrites60.4%

                          \[\leadsto \color{blue}{\frac{y \cdot x}{t}} \]
                      9. Recombined 4 regimes into one program.
                      10. Final simplification62.8%

                        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.4 \cdot 10^{+104}:\\ \;\;\;\;1 \cdot x\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{+68}:\\ \;\;\;\;\frac{-y}{z} \cdot x\\ \mathbf{elif}\;z \leq -1.12 \cdot 10^{-16}:\\ \;\;\;\;\frac{\left(-z\right) \cdot x}{t}\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-15}:\\ \;\;\;\;\frac{y \cdot x}{t}\\ \mathbf{else}:\\ \;\;\;\;1 \cdot x\\ \end{array} \]
                      11. Add Preprocessing

                      Alternative 8: 74.2% accurate, 0.6× speedup?

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

                        1. Initial program 72.2%

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

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

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

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

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

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

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

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

                            \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(y - z\right)\right)}{z}} \cdot x \]
                          8. *-lft-identityN/A

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

                            \[\leadsto \frac{\mathsf{neg}\left(\left(y - \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot z\right)\right)}{z} \cdot x \]
                          10. fp-cancel-sign-sub-invN/A

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

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

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

                            \[\leadsto \frac{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}{z} \cdot x \]
                          14. remove-double-negN/A

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

                            \[\leadsto \frac{z + \color{blue}{-1 \cdot y}}{z} \cdot x \]
                          16. metadata-evalN/A

                            \[\leadsto \frac{z + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)} \cdot y}{z} \cdot x \]
                          17. fp-cancel-sub-sign-invN/A

                            \[\leadsto \frac{\color{blue}{z - 1 \cdot y}}{z} \cdot x \]
                          18. *-lft-identityN/A

                            \[\leadsto \frac{z - \color{blue}{y}}{z} \cdot x \]
                          19. lower--.f6484.7

                            \[\leadsto \frac{\color{blue}{z - y}}{z} \cdot x \]
                        5. Applied rewrites84.7%

                          \[\leadsto \color{blue}{\frac{z - y}{z} \cdot x} \]
                        6. Taylor expanded in y around 0

                          \[\leadsto 1 \cdot x \]
                        7. Step-by-step derivation
                          1. Applied rewrites62.3%

                            \[\leadsto 1 \cdot x \]
                          2. Taylor expanded in z around inf

                            \[\leadsto \color{blue}{\left(x + -1 \cdot \frac{x \cdot y}{z}\right) - -1 \cdot \frac{t \cdot x}{z}} \]
                          3. Applied rewrites85.2%

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

                          if -7.0000000000000004e60 < z < -2.1000000000000002e-30

                          1. Initial program 99.5%

                            \[\frac{x \cdot \left(y - z\right)}{t - z} \]
                          2. Add Preprocessing
                          3. Applied rewrites99.5%

                            \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
                          4. Taylor expanded in t around inf

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

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

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

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

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

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

                          if -2.1000000000000002e-30 < z < 1.3999999999999999e-28

                          1. Initial program 94.8%

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

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

                              \[\leadsto \frac{\color{blue}{y \cdot x}}{t - z} \]
                            2. lower-*.f6478.2

                              \[\leadsto \frac{\color{blue}{y \cdot x}}{t - z} \]
                          5. Applied rewrites78.2%

                            \[\leadsto \frac{\color{blue}{y \cdot x}}{t - z} \]
                        8. Recombined 3 regimes into one program.
                        9. Final simplification80.9%

                          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7 \cdot 10^{+60}:\\ \;\;\;\;\mathsf{fma}\left(x, \frac{t - y}{z}, x\right)\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{-30}:\\ \;\;\;\;\frac{\left(y - z\right) \cdot x}{t}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-28}:\\ \;\;\;\;\frac{y \cdot x}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x, \frac{t - y}{z}, x\right)\\ \end{array} \]
                        10. Add Preprocessing

                        Alternative 9: 74.3% accurate, 0.6× speedup?

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

                          1. Initial program 72.2%

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

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

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

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

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

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

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

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

                              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(y - z\right)\right)}{z}} \cdot x \]
                            8. *-lft-identityN/A

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

                              \[\leadsto \frac{\mathsf{neg}\left(\left(y - \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot z\right)\right)}{z} \cdot x \]
                            10. fp-cancel-sign-sub-invN/A

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

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

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

                              \[\leadsto \frac{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}{z} \cdot x \]
                            14. remove-double-negN/A

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

                              \[\leadsto \frac{z + \color{blue}{-1 \cdot y}}{z} \cdot x \]
                            16. metadata-evalN/A

                              \[\leadsto \frac{z + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)} \cdot y}{z} \cdot x \]
                            17. fp-cancel-sub-sign-invN/A

                              \[\leadsto \frac{\color{blue}{z - 1 \cdot y}}{z} \cdot x \]
                            18. *-lft-identityN/A

                              \[\leadsto \frac{z - \color{blue}{y}}{z} \cdot x \]
                            19. lower--.f6484.7

                              \[\leadsto \frac{\color{blue}{z - y}}{z} \cdot x \]
                          5. Applied rewrites84.7%

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

                          if -7.0000000000000004e60 < z < -2.1000000000000002e-30

                          1. Initial program 99.5%

                            \[\frac{x \cdot \left(y - z\right)}{t - z} \]
                          2. Add Preprocessing
                          3. Applied rewrites99.5%

                            \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
                          4. Taylor expanded in t around inf

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

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

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

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

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

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

                          if -2.1000000000000002e-30 < z < 1.3999999999999999e-28

                          1. Initial program 94.8%

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

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

                              \[\leadsto \frac{\color{blue}{y \cdot x}}{t - z} \]
                            2. lower-*.f6478.2

                              \[\leadsto \frac{\color{blue}{y \cdot x}}{t - z} \]
                          5. Applied rewrites78.2%

                            \[\leadsto \frac{\color{blue}{y \cdot x}}{t - z} \]
                        3. Recombined 3 regimes into one program.
                        4. Final simplification80.6%

                          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7 \cdot 10^{+60}:\\ \;\;\;\;\frac{z - y}{z} \cdot x\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{-30}:\\ \;\;\;\;\frac{\left(y - z\right) \cdot x}{t}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-28}:\\ \;\;\;\;\frac{y \cdot x}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{z - y}{z} \cdot x\\ \end{array} \]
                        5. Add Preprocessing

                        Alternative 10: 59.9% accurate, 0.7× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.5 \cdot 10^{+87}:\\ \;\;\;\;1 \cdot x\\ \mathbf{elif}\;z \leq -1.12 \cdot 10^{-16}:\\ \;\;\;\;\frac{\left(-z\right) \cdot x}{t}\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-15}:\\ \;\;\;\;\frac{y \cdot x}{t}\\ \mathbf{else}:\\ \;\;\;\;1 \cdot x\\ \end{array} \end{array} \]
                        (FPCore (x y z t)
                         :precision binary64
                         (if (<= z -3.5e+87)
                           (* 1.0 x)
                           (if (<= z -1.12e-16)
                             (/ (* (- z) x) t)
                             (if (<= z 3.8e-15) (/ (* y x) t) (* 1.0 x)))))
                        double code(double x, double y, double z, double t) {
                        	double tmp;
                        	if (z <= -3.5e+87) {
                        		tmp = 1.0 * x;
                        	} else if (z <= -1.12e-16) {
                        		tmp = (-z * x) / t;
                        	} else if (z <= 3.8e-15) {
                        		tmp = (y * x) / t;
                        	} else {
                        		tmp = 1.0 * 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)
                        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) :: tmp
                            if (z <= (-3.5d+87)) then
                                tmp = 1.0d0 * x
                            else if (z <= (-1.12d-16)) then
                                tmp = (-z * x) / t
                            else if (z <= 3.8d-15) then
                                tmp = (y * x) / t
                            else
                                tmp = 1.0d0 * x
                            end if
                            code = tmp
                        end function
                        
                        public static double code(double x, double y, double z, double t) {
                        	double tmp;
                        	if (z <= -3.5e+87) {
                        		tmp = 1.0 * x;
                        	} else if (z <= -1.12e-16) {
                        		tmp = (-z * x) / t;
                        	} else if (z <= 3.8e-15) {
                        		tmp = (y * x) / t;
                        	} else {
                        		tmp = 1.0 * x;
                        	}
                        	return tmp;
                        }
                        
                        def code(x, y, z, t):
                        	tmp = 0
                        	if z <= -3.5e+87:
                        		tmp = 1.0 * x
                        	elif z <= -1.12e-16:
                        		tmp = (-z * x) / t
                        	elif z <= 3.8e-15:
                        		tmp = (y * x) / t
                        	else:
                        		tmp = 1.0 * x
                        	return tmp
                        
                        function code(x, y, z, t)
                        	tmp = 0.0
                        	if (z <= -3.5e+87)
                        		tmp = Float64(1.0 * x);
                        	elseif (z <= -1.12e-16)
                        		tmp = Float64(Float64(Float64(-z) * x) / t);
                        	elseif (z <= 3.8e-15)
                        		tmp = Float64(Float64(y * x) / t);
                        	else
                        		tmp = Float64(1.0 * x);
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(x, y, z, t)
                        	tmp = 0.0;
                        	if (z <= -3.5e+87)
                        		tmp = 1.0 * x;
                        	elseif (z <= -1.12e-16)
                        		tmp = (-z * x) / t;
                        	elseif (z <= 3.8e-15)
                        		tmp = (y * x) / t;
                        	else
                        		tmp = 1.0 * x;
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[x_, y_, z_, t_] := If[LessEqual[z, -3.5e+87], N[(1.0 * x), $MachinePrecision], If[LessEqual[z, -1.12e-16], N[(N[((-z) * x), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 3.8e-15], N[(N[(y * x), $MachinePrecision] / t), $MachinePrecision], N[(1.0 * x), $MachinePrecision]]]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;z \leq -3.5 \cdot 10^{+87}:\\
                        \;\;\;\;1 \cdot x\\
                        
                        \mathbf{elif}\;z \leq -1.12 \cdot 10^{-16}:\\
                        \;\;\;\;\frac{\left(-z\right) \cdot x}{t}\\
                        
                        \mathbf{elif}\;z \leq 3.8 \cdot 10^{-15}:\\
                        \;\;\;\;\frac{y \cdot x}{t}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;1 \cdot x\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 3 regimes
                        2. if z < -3.49999999999999986e87 or 3.8000000000000002e-15 < z

                          1. Initial program 71.1%

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

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

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

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

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

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

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

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

                              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(y - z\right)\right)}{z}} \cdot x \]
                            8. *-lft-identityN/A

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

                              \[\leadsto \frac{\mathsf{neg}\left(\left(y - \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot z\right)\right)}{z} \cdot x \]
                            10. fp-cancel-sign-sub-invN/A

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

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

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

                              \[\leadsto \frac{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}{z} \cdot x \]
                            14. remove-double-negN/A

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

                              \[\leadsto \frac{z + \color{blue}{-1 \cdot y}}{z} \cdot x \]
                            16. metadata-evalN/A

                              \[\leadsto \frac{z + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)} \cdot y}{z} \cdot x \]
                            17. fp-cancel-sub-sign-invN/A

                              \[\leadsto \frac{\color{blue}{z - 1 \cdot y}}{z} \cdot x \]
                            18. *-lft-identityN/A

                              \[\leadsto \frac{z - \color{blue}{y}}{z} \cdot x \]
                            19. lower--.f6484.9

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

                            \[\leadsto \color{blue}{\frac{z - y}{z} \cdot x} \]
                          6. Taylor expanded in y around 0

                            \[\leadsto 1 \cdot x \]
                          7. Step-by-step derivation
                            1. Applied rewrites66.6%

                              \[\leadsto 1 \cdot x \]

                            if -3.49999999999999986e87 < z < -1.12e-16

                            1. Initial program 92.8%

                              \[\frac{x \cdot \left(y - z\right)}{t - z} \]
                            2. Add Preprocessing
                            3. Applied rewrites99.6%

                              \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
                            4. Taylor expanded in t around inf

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

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

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

                                \[\leadsto \frac{\color{blue}{\left(y - z\right) \cdot x}}{t} \]
                              4. lower--.f6462.1

                                \[\leadsto \frac{\color{blue}{\left(y - z\right)} \cdot x}{t} \]
                            6. Applied rewrites62.1%

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

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

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

                              if -1.12e-16 < z < 3.8000000000000002e-15

                              1. Initial program 95.1%

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

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

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

                                  \[\leadsto \frac{\color{blue}{y \cdot x}}{t} \]
                                3. lower-*.f6460.4

                                  \[\leadsto \frac{\color{blue}{y \cdot x}}{t} \]
                              5. Applied rewrites60.4%

                                \[\leadsto \color{blue}{\frac{y \cdot x}{t}} \]
                            9. Recombined 3 regimes into one program.
                            10. Final simplification61.2%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.5 \cdot 10^{+87}:\\ \;\;\;\;1 \cdot x\\ \mathbf{elif}\;z \leq -1.12 \cdot 10^{-16}:\\ \;\;\;\;\frac{\left(-z\right) \cdot x}{t}\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-15}:\\ \;\;\;\;\frac{y \cdot x}{t}\\ \mathbf{else}:\\ \;\;\;\;1 \cdot x\\ \end{array} \]
                            11. Add Preprocessing

                            Alternative 11: 89.5% accurate, 0.7× speedup?

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

                              1. Initial program 63.8%

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

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

                                  \[\leadsto \color{blue}{\left(x + -1 \cdot \frac{x \cdot y}{z}\right) + \left(\mathsf{neg}\left(-1\right)\right) \cdot \frac{t \cdot x}{z}} \]
                                2. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto x - \left(y \cdot \frac{x}{z} - \color{blue}{t \cdot \frac{x}{z}}\right) \]
                                14. distribute-rgt-out--N/A

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

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

                                  \[\leadsto x - \color{blue}{\frac{x}{z}} \cdot \left(y - t\right) \]
                                17. lower--.f6494.1

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

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

                              if -2.9000000000000001e98 < z < 3.30000000000000025e151

                              1. Initial program 94.5%

                                \[\frac{x \cdot \left(y - z\right)}{t - z} \]
                              2. Add Preprocessing
                              3. Applied rewrites93.7%

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

                              if 3.30000000000000025e151 < z

                              1. Initial program 60.2%

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

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

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

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

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

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

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

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

                                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(y - z\right)\right)}{z}} \cdot x \]
                                8. *-lft-identityN/A

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

                                  \[\leadsto \frac{\mathsf{neg}\left(\left(y - \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot z\right)\right)}{z} \cdot x \]
                                10. fp-cancel-sign-sub-invN/A

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

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

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

                                  \[\leadsto \frac{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}{z} \cdot x \]
                                14. remove-double-negN/A

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

                                  \[\leadsto \frac{z + \color{blue}{-1 \cdot y}}{z} \cdot x \]
                                16. metadata-evalN/A

                                  \[\leadsto \frac{z + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)} \cdot y}{z} \cdot x \]
                                17. fp-cancel-sub-sign-invN/A

                                  \[\leadsto \frac{\color{blue}{z - 1 \cdot y}}{z} \cdot x \]
                                18. *-lft-identityN/A

                                  \[\leadsto \frac{z - \color{blue}{y}}{z} \cdot x \]
                                19. lower--.f6493.4

                                  \[\leadsto \frac{\color{blue}{z - y}}{z} \cdot x \]
                              5. Applied rewrites93.4%

                                \[\leadsto \color{blue}{\frac{z - y}{z} \cdot x} \]
                              6. Taylor expanded in y around 0

                                \[\leadsto 1 \cdot x \]
                              7. Step-by-step derivation
                                1. Applied rewrites69.3%

                                  \[\leadsto 1 \cdot x \]
                                2. Taylor expanded in z around inf

                                  \[\leadsto \color{blue}{\left(x + -1 \cdot \frac{x \cdot y}{z}\right) - -1 \cdot \frac{t \cdot x}{z}} \]
                                3. Applied rewrites93.8%

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

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

                              Alternative 12: 66.3% accurate, 0.7× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.5 \cdot 10^{+87} \lor \neg \left(z \leq 6.8 \cdot 10^{+143}\right):\\ \;\;\;\;1 \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(y - z\right) \cdot x}{t}\\ \end{array} \end{array} \]
                              (FPCore (x y z t)
                               :precision binary64
                               (if (or (<= z -3.5e+87) (not (<= z 6.8e+143))) (* 1.0 x) (/ (* (- y z) x) t)))
                              double code(double x, double y, double z, double t) {
                              	double tmp;
                              	if ((z <= -3.5e+87) || !(z <= 6.8e+143)) {
                              		tmp = 1.0 * x;
                              	} else {
                              		tmp = ((y - z) * 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)
                              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) :: tmp
                                  if ((z <= (-3.5d+87)) .or. (.not. (z <= 6.8d+143))) then
                                      tmp = 1.0d0 * x
                                  else
                                      tmp = ((y - z) * x) / t
                                  end if
                                  code = tmp
                              end function
                              
                              public static double code(double x, double y, double z, double t) {
                              	double tmp;
                              	if ((z <= -3.5e+87) || !(z <= 6.8e+143)) {
                              		tmp = 1.0 * x;
                              	} else {
                              		tmp = ((y - z) * x) / t;
                              	}
                              	return tmp;
                              }
                              
                              def code(x, y, z, t):
                              	tmp = 0
                              	if (z <= -3.5e+87) or not (z <= 6.8e+143):
                              		tmp = 1.0 * x
                              	else:
                              		tmp = ((y - z) * x) / t
                              	return tmp
                              
                              function code(x, y, z, t)
                              	tmp = 0.0
                              	if ((z <= -3.5e+87) || !(z <= 6.8e+143))
                              		tmp = Float64(1.0 * x);
                              	else
                              		tmp = Float64(Float64(Float64(y - z) * x) / t);
                              	end
                              	return tmp
                              end
                              
                              function tmp_2 = code(x, y, z, t)
                              	tmp = 0.0;
                              	if ((z <= -3.5e+87) || ~((z <= 6.8e+143)))
                              		tmp = 1.0 * x;
                              	else
                              		tmp = ((y - z) * x) / t;
                              	end
                              	tmp_2 = tmp;
                              end
                              
                              code[x_, y_, z_, t_] := If[Or[LessEqual[z, -3.5e+87], N[Not[LessEqual[z, 6.8e+143]], $MachinePrecision]], N[(1.0 * x), $MachinePrecision], N[(N[(N[(y - z), $MachinePrecision] * x), $MachinePrecision] / t), $MachinePrecision]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;z \leq -3.5 \cdot 10^{+87} \lor \neg \left(z \leq 6.8 \cdot 10^{+143}\right):\\
                              \;\;\;\;1 \cdot x\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\frac{\left(y - z\right) \cdot x}{t}\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if z < -3.49999999999999986e87 or 6.79999999999999964e143 < z

                                1. Initial program 63.1%

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

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

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

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

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

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

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

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

                                    \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(y - z\right)\right)}{z}} \cdot x \]
                                  8. *-lft-identityN/A

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

                                    \[\leadsto \frac{\mathsf{neg}\left(\left(y - \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot z\right)\right)}{z} \cdot x \]
                                  10. fp-cancel-sign-sub-invN/A

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

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

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

                                    \[\leadsto \frac{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}{z} \cdot x \]
                                  14. remove-double-negN/A

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

                                    \[\leadsto \frac{z + \color{blue}{-1 \cdot y}}{z} \cdot x \]
                                  16. metadata-evalN/A

                                    \[\leadsto \frac{z + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)} \cdot y}{z} \cdot x \]
                                  17. fp-cancel-sub-sign-invN/A

                                    \[\leadsto \frac{\color{blue}{z - 1 \cdot y}}{z} \cdot x \]
                                  18. *-lft-identityN/A

                                    \[\leadsto \frac{z - \color{blue}{y}}{z} \cdot x \]
                                  19. lower--.f6492.5

                                    \[\leadsto \frac{\color{blue}{z - y}}{z} \cdot x \]
                                5. Applied rewrites92.5%

                                  \[\leadsto \color{blue}{\frac{z - y}{z} \cdot x} \]
                                6. Taylor expanded in y around 0

                                  \[\leadsto 1 \cdot x \]
                                7. Step-by-step derivation
                                  1. Applied rewrites76.4%

                                    \[\leadsto 1 \cdot x \]

                                  if -3.49999999999999986e87 < z < 6.79999999999999964e143

                                  1. Initial program 94.9%

                                    \[\frac{x \cdot \left(y - z\right)}{t - z} \]
                                  2. Add Preprocessing
                                  3. Applied rewrites95.9%

                                    \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
                                  4. Taylor expanded in t around inf

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

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

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

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

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

                                    \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot x}{t}} \]
                                8. Recombined 2 regimes into one program.
                                9. Final simplification69.0%

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.5 \cdot 10^{+87} \lor \neg \left(z \leq 6.8 \cdot 10^{+143}\right):\\ \;\;\;\;1 \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(y - z\right) \cdot x}{t}\\ \end{array} \]
                                10. Add Preprocessing

                                Alternative 13: 60.3% accurate, 0.8× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6.4 \cdot 10^{-17} \lor \neg \left(z \leq 3.8 \cdot 10^{-15}\right):\\ \;\;\;\;1 \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot x}{t}\\ \end{array} \end{array} \]
                                (FPCore (x y z t)
                                 :precision binary64
                                 (if (or (<= z -6.4e-17) (not (<= z 3.8e-15))) (* 1.0 x) (/ (* y x) t)))
                                double code(double x, double y, double z, double t) {
                                	double tmp;
                                	if ((z <= -6.4e-17) || !(z <= 3.8e-15)) {
                                		tmp = 1.0 * x;
                                	} else {
                                		tmp = (y * 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)
                                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) :: tmp
                                    if ((z <= (-6.4d-17)) .or. (.not. (z <= 3.8d-15))) then
                                        tmp = 1.0d0 * x
                                    else
                                        tmp = (y * x) / t
                                    end if
                                    code = tmp
                                end function
                                
                                public static double code(double x, double y, double z, double t) {
                                	double tmp;
                                	if ((z <= -6.4e-17) || !(z <= 3.8e-15)) {
                                		tmp = 1.0 * x;
                                	} else {
                                		tmp = (y * x) / t;
                                	}
                                	return tmp;
                                }
                                
                                def code(x, y, z, t):
                                	tmp = 0
                                	if (z <= -6.4e-17) or not (z <= 3.8e-15):
                                		tmp = 1.0 * x
                                	else:
                                		tmp = (y * x) / t
                                	return tmp
                                
                                function code(x, y, z, t)
                                	tmp = 0.0
                                	if ((z <= -6.4e-17) || !(z <= 3.8e-15))
                                		tmp = Float64(1.0 * x);
                                	else
                                		tmp = Float64(Float64(y * x) / t);
                                	end
                                	return tmp
                                end
                                
                                function tmp_2 = code(x, y, z, t)
                                	tmp = 0.0;
                                	if ((z <= -6.4e-17) || ~((z <= 3.8e-15)))
                                		tmp = 1.0 * x;
                                	else
                                		tmp = (y * x) / t;
                                	end
                                	tmp_2 = tmp;
                                end
                                
                                code[x_, y_, z_, t_] := If[Or[LessEqual[z, -6.4e-17], N[Not[LessEqual[z, 3.8e-15]], $MachinePrecision]], N[(1.0 * x), $MachinePrecision], N[(N[(y * x), $MachinePrecision] / t), $MachinePrecision]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                \mathbf{if}\;z \leq -6.4 \cdot 10^{-17} \lor \neg \left(z \leq 3.8 \cdot 10^{-15}\right):\\
                                \;\;\;\;1 \cdot x\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;\frac{y \cdot x}{t}\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if z < -6.4000000000000005e-17 or 3.8000000000000002e-15 < z

                                  1. Initial program 75.6%

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

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

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

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

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

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

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

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

                                      \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(y - z\right)\right)}{z}} \cdot x \]
                                    8. *-lft-identityN/A

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

                                      \[\leadsto \frac{\mathsf{neg}\left(\left(y - \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot z\right)\right)}{z} \cdot x \]
                                    10. fp-cancel-sign-sub-invN/A

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

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

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

                                      \[\leadsto \frac{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}{z} \cdot x \]
                                    14. remove-double-negN/A

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

                                      \[\leadsto \frac{z + \color{blue}{-1 \cdot y}}{z} \cdot x \]
                                    16. metadata-evalN/A

                                      \[\leadsto \frac{z + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)} \cdot y}{z} \cdot x \]
                                    17. fp-cancel-sub-sign-invN/A

                                      \[\leadsto \frac{\color{blue}{z - 1 \cdot y}}{z} \cdot x \]
                                    18. *-lft-identityN/A

                                      \[\leadsto \frac{z - \color{blue}{y}}{z} \cdot x \]
                                    19. lower--.f6476.4

                                      \[\leadsto \frac{\color{blue}{z - y}}{z} \cdot x \]
                                  5. Applied rewrites76.4%

                                    \[\leadsto \color{blue}{\frac{z - y}{z} \cdot x} \]
                                  6. Taylor expanded in y around 0

                                    \[\leadsto 1 \cdot x \]
                                  7. Step-by-step derivation
                                    1. Applied rewrites57.5%

                                      \[\leadsto 1 \cdot x \]

                                    if -6.4000000000000005e-17 < z < 3.8000000000000002e-15

                                    1. Initial program 95.1%

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

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

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

                                        \[\leadsto \frac{\color{blue}{y \cdot x}}{t} \]
                                      3. lower-*.f6460.9

                                        \[\leadsto \frac{\color{blue}{y \cdot x}}{t} \]
                                    5. Applied rewrites60.9%

                                      \[\leadsto \color{blue}{\frac{y \cdot x}{t}} \]
                                  8. Recombined 2 regimes into one program.
                                  9. Final simplification59.1%

                                    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.4 \cdot 10^{-17} \lor \neg \left(z \leq 3.8 \cdot 10^{-15}\right):\\ \;\;\;\;1 \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot x}{t}\\ \end{array} \]
                                  10. Add Preprocessing

                                  Alternative 14: 60.0% accurate, 0.8× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{-52} \lor \neg \left(z \leq 3.8 \cdot 10^{-15}\right):\\ \;\;\;\;1 \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t} \cdot y\\ \end{array} \end{array} \]
                                  (FPCore (x y z t)
                                   :precision binary64
                                   (if (or (<= z -4.2e-52) (not (<= z 3.8e-15))) (* 1.0 x) (* (/ x t) y)))
                                  double code(double x, double y, double z, double t) {
                                  	double tmp;
                                  	if ((z <= -4.2e-52) || !(z <= 3.8e-15)) {
                                  		tmp = 1.0 * x;
                                  	} else {
                                  		tmp = (x / t) * y;
                                  	}
                                  	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)
                                  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) :: tmp
                                      if ((z <= (-4.2d-52)) .or. (.not. (z <= 3.8d-15))) then
                                          tmp = 1.0d0 * x
                                      else
                                          tmp = (x / t) * y
                                      end if
                                      code = tmp
                                  end function
                                  
                                  public static double code(double x, double y, double z, double t) {
                                  	double tmp;
                                  	if ((z <= -4.2e-52) || !(z <= 3.8e-15)) {
                                  		tmp = 1.0 * x;
                                  	} else {
                                  		tmp = (x / t) * y;
                                  	}
                                  	return tmp;
                                  }
                                  
                                  def code(x, y, z, t):
                                  	tmp = 0
                                  	if (z <= -4.2e-52) or not (z <= 3.8e-15):
                                  		tmp = 1.0 * x
                                  	else:
                                  		tmp = (x / t) * y
                                  	return tmp
                                  
                                  function code(x, y, z, t)
                                  	tmp = 0.0
                                  	if ((z <= -4.2e-52) || !(z <= 3.8e-15))
                                  		tmp = Float64(1.0 * x);
                                  	else
                                  		tmp = Float64(Float64(x / t) * y);
                                  	end
                                  	return tmp
                                  end
                                  
                                  function tmp_2 = code(x, y, z, t)
                                  	tmp = 0.0;
                                  	if ((z <= -4.2e-52) || ~((z <= 3.8e-15)))
                                  		tmp = 1.0 * x;
                                  	else
                                  		tmp = (x / t) * y;
                                  	end
                                  	tmp_2 = tmp;
                                  end
                                  
                                  code[x_, y_, z_, t_] := If[Or[LessEqual[z, -4.2e-52], N[Not[LessEqual[z, 3.8e-15]], $MachinePrecision]], N[(1.0 * x), $MachinePrecision], N[(N[(x / t), $MachinePrecision] * y), $MachinePrecision]]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \begin{array}{l}
                                  \mathbf{if}\;z \leq -4.2 \cdot 10^{-52} \lor \neg \left(z \leq 3.8 \cdot 10^{-15}\right):\\
                                  \;\;\;\;1 \cdot x\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;\frac{x}{t} \cdot y\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 2 regimes
                                  2. if z < -4.1999999999999997e-52 or 3.8000000000000002e-15 < z

                                    1. Initial program 77.5%

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

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

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

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

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

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

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

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

                                        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(y - z\right)\right)}{z}} \cdot x \]
                                      8. *-lft-identityN/A

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

                                        \[\leadsto \frac{\mathsf{neg}\left(\left(y - \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot z\right)\right)}{z} \cdot x \]
                                      10. fp-cancel-sign-sub-invN/A

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

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

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

                                        \[\leadsto \frac{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}{z} \cdot x \]
                                      14. remove-double-negN/A

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

                                        \[\leadsto \frac{z + \color{blue}{-1 \cdot y}}{z} \cdot x \]
                                      16. metadata-evalN/A

                                        \[\leadsto \frac{z + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)} \cdot y}{z} \cdot x \]
                                      17. fp-cancel-sub-sign-invN/A

                                        \[\leadsto \frac{\color{blue}{z - 1 \cdot y}}{z} \cdot x \]
                                      18. *-lft-identityN/A

                                        \[\leadsto \frac{z - \color{blue}{y}}{z} \cdot x \]
                                      19. lower--.f6474.3

                                        \[\leadsto \frac{\color{blue}{z - y}}{z} \cdot x \]
                                    5. Applied rewrites74.3%

                                      \[\leadsto \color{blue}{\frac{z - y}{z} \cdot x} \]
                                    6. Taylor expanded in y around 0

                                      \[\leadsto 1 \cdot x \]
                                    7. Step-by-step derivation
                                      1. Applied rewrites54.5%

                                        \[\leadsto 1 \cdot x \]

                                      if -4.1999999999999997e-52 < z < 3.8000000000000002e-15

                                      1. Initial program 94.6%

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

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

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

                                          \[\leadsto \frac{\color{blue}{y \cdot x}}{t} \]
                                        3. lower-*.f6463.7

                                          \[\leadsto \frac{\color{blue}{y \cdot x}}{t} \]
                                      5. Applied rewrites63.7%

                                        \[\leadsto \color{blue}{\frac{y \cdot x}{t}} \]
                                      6. Step-by-step derivation
                                        1. Applied rewrites60.0%

                                          \[\leadsto \frac{x}{t} \cdot \color{blue}{y} \]
                                      7. Recombined 2 regimes into one program.
                                      8. Final simplification56.8%

                                        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{-52} \lor \neg \left(z \leq 3.8 \cdot 10^{-15}\right):\\ \;\;\;\;1 \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t} \cdot y\\ \end{array} \]
                                      9. Add Preprocessing

                                      Alternative 15: 35.3% accurate, 3.8× speedup?

                                      \[\begin{array}{l} \\ 1 \cdot x \end{array} \]
                                      (FPCore (x y z t) :precision binary64 (* 1.0 x))
                                      double code(double x, double y, double z, double t) {
                                      	return 1.0 * 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)
                                      use fmin_fmax_functions
                                          real(8), intent (in) :: x
                                          real(8), intent (in) :: y
                                          real(8), intent (in) :: z
                                          real(8), intent (in) :: t
                                          code = 1.0d0 * x
                                      end function
                                      
                                      public static double code(double x, double y, double z, double t) {
                                      	return 1.0 * x;
                                      }
                                      
                                      def code(x, y, z, t):
                                      	return 1.0 * x
                                      
                                      function code(x, y, z, t)
                                      	return Float64(1.0 * x)
                                      end
                                      
                                      function tmp = code(x, y, z, t)
                                      	tmp = 1.0 * x;
                                      end
                                      
                                      code[x_, y_, z_, t_] := N[(1.0 * x), $MachinePrecision]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      1 \cdot x
                                      \end{array}
                                      
                                      Derivation
                                      1. Initial program 84.7%

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

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

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

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

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

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

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

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

                                          \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(y - z\right)\right)}{z}} \cdot x \]
                                        8. *-lft-identityN/A

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

                                          \[\leadsto \frac{\mathsf{neg}\left(\left(y - \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot z\right)\right)}{z} \cdot x \]
                                        10. fp-cancel-sign-sub-invN/A

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

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

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

                                          \[\leadsto \frac{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}{z} \cdot x \]
                                        14. remove-double-negN/A

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

                                          \[\leadsto \frac{z + \color{blue}{-1 \cdot y}}{z} \cdot x \]
                                        16. metadata-evalN/A

                                          \[\leadsto \frac{z + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)} \cdot y}{z} \cdot x \]
                                        17. fp-cancel-sub-sign-invN/A

                                          \[\leadsto \frac{\color{blue}{z - 1 \cdot y}}{z} \cdot x \]
                                        18. *-lft-identityN/A

                                          \[\leadsto \frac{z - \color{blue}{y}}{z} \cdot x \]
                                        19. lower--.f6455.4

                                          \[\leadsto \frac{\color{blue}{z - y}}{z} \cdot x \]
                                      5. Applied rewrites55.4%

                                        \[\leadsto \color{blue}{\frac{z - y}{z} \cdot x} \]
                                      6. Taylor expanded in y around 0

                                        \[\leadsto 1 \cdot x \]
                                      7. Step-by-step derivation
                                        1. Applied rewrites35.2%

                                          \[\leadsto 1 \cdot x \]
                                        2. Final simplification35.2%

                                          \[\leadsto 1 \cdot x \]
                                        3. Add Preprocessing

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

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

                                        Reproduce

                                        ?
                                        herbie shell --seed 2025017 
                                        (FPCore (x y z t)
                                          :name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
                                          :precision binary64
                                        
                                          :alt
                                          (! :herbie-platform default (/ x (/ (- t z) (- y z))))
                                        
                                          (/ (* x (- y z)) (- t z)))