Graphics.Rasterific.Shading:$sradialGradientWithFocusShader from Rasterific-0.6.1, B

Percentage Accurate: 90.0% → 95.3%
Time: 6.7s
Alternatives: 9
Speedup: 0.7×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 9 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 90.0% accurate, 1.0× speedup?

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

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

Alternative 1: 95.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.3 \cdot 10^{-21}:\\
\;\;\;\;\mathsf{fma}\left(\left(-4 \cdot y\right) \cdot z, z, \mathsf{fma}\left(\left(t \cdot y\right) \cdot 4, 1, x \cdot x\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 1.30000000000000009e-21

    1. Initial program 90.9%

      \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. unpow1N/A

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

        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({z}^{\color{blue}{\left(\frac{2}{2}\right)}} \cdot z - t\right) \]
      3. sqrt-pow1N/A

        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{\sqrt{{z}^{2}}} \cdot z - t\right) \]
      4. pow2N/A

        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\sqrt{\color{blue}{z \cdot z}} \cdot z - t\right) \]
      5. sqr-neg-revN/A

        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\sqrt{\color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot \left(\mathsf{neg}\left(z\right)\right)}} \cdot z - t\right) \]
      6. sqrt-prodN/A

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

        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{\left(\sqrt{\mathsf{neg}\left(z\right)} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right)} \cdot z - t\right) \]
      8. pow1/2N/A

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

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

        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left(\mathsf{neg}\left(z\right)\right)}^{\left(\color{blue}{\frac{2}{2}} \cdot \frac{1}{2}\right)} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
      11. pow-powN/A

        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left(\color{blue}{{\left({\left(\mathsf{neg}\left(z\right)\right)}^{\left(\frac{2}{2}\right)}\right)}^{\frac{1}{2}}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
      12. sqrt-pow1N/A

        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\color{blue}{\left(\sqrt{{\left(\mathsf{neg}\left(z\right)\right)}^{2}}\right)}}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
      13. pow2N/A

        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left(\sqrt{\color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot \left(\mathsf{neg}\left(z\right)\right)}}\right)}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
      14. sqr-neg-revN/A

        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left(\sqrt{\color{blue}{z \cdot z}}\right)}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
      15. pow2N/A

        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left(\sqrt{\color{blue}{{z}^{2}}}\right)}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
      16. sqrt-pow1N/A

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

        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left({z}^{\color{blue}{1}}\right)}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
      18. unpow1N/A

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

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

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

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

        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({z}^{\color{blue}{\frac{1}{2}}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
      23. pow1/2N/A

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

        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left(\color{blue}{\sqrt{z}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
      25. pow1/2N/A

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

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

        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left(\sqrt{z} \cdot {\left(\mathsf{neg}\left(z\right)\right)}^{\left(\color{blue}{\frac{2}{2}} \cdot \frac{1}{2}\right)}\right) \cdot z - t\right) \]
      28. pow-powN/A

        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left(\sqrt{z} \cdot \color{blue}{{\left({\left(\mathsf{neg}\left(z\right)\right)}^{\left(\frac{2}{2}\right)}\right)}^{\frac{1}{2}}}\right) \cdot z - t\right) \]
    4. Applied rewrites43.4%

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

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

        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)} \cdot z - t\right) \]
      3. pow2N/A

        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{{\left(\sqrt{z}\right)}^{2}} \cdot z - t\right) \]
      4. rem-square-sqrtN/A

        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{2} \cdot \color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)} - t\right) \]
      5. lift-sqrt.f64N/A

        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{2} \cdot \left(\color{blue}{\sqrt{z}} \cdot \sqrt{z}\right) - t\right) \]
      6. lift-sqrt.f64N/A

        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{2} \cdot \left(\sqrt{z} \cdot \color{blue}{\sqrt{z}}\right) - t\right) \]
      7. pow2N/A

        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{2} \cdot \color{blue}{{\left(\sqrt{z}\right)}^{2}} - t\right) \]
      8. pow-sqrN/A

        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{{\left(\sqrt{z}\right)}^{\left(2 \cdot 2\right)}} - t\right) \]
      9. metadata-evalN/A

        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{\color{blue}{4}} - t\right) \]
      10. lower-pow.f6443.4

        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{{\left(\sqrt{z}\right)}^{4}} - t\right) \]
    6. Applied rewrites43.4%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left({z}^{2} - t\right) \cdot -4}}{x}, \frac{y}{x}, 1\right) \cdot {x}^{2} \]
      12. lower-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left({z}^{2} - t\right)} \cdot -4}{x}, \frac{y}{x}, 1\right) \cdot {x}^{2} \]
      14. unpow2N/A

        \[\leadsto \mathsf{fma}\left(\frac{\left(\color{blue}{z \cdot z} - t\right) \cdot -4}{x}, \frac{y}{x}, 1\right) \cdot {x}^{2} \]
      15. lower-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\frac{\left(z \cdot z - t\right) \cdot -4}{x}, \color{blue}{\frac{y}{x}}, 1\right) \cdot {x}^{2} \]
      17. unpow2N/A

        \[\leadsto \mathsf{fma}\left(\frac{\left(z \cdot z - t\right) \cdot -4}{x}, \frac{y}{x}, 1\right) \cdot \color{blue}{\left(x \cdot x\right)} \]
      18. lower-*.f6466.8

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

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

      \[\leadsto {z}^{2} \cdot \color{blue}{\left(-4 \cdot y + \frac{{x}^{2} \cdot \left(1 + 4 \cdot \frac{t \cdot y}{{x}^{2}}\right)}{{z}^{2}}\right)} \]
    11. Step-by-step derivation
      1. Applied rewrites97.7%

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

      if 1.30000000000000009e-21 < t

      1. Initial program 93.5%

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

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

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

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

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

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

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

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

          \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left(\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(\frac{{z}^{2}}{t}\right)\right)}\right)\right) + \left(\mathsf{neg}\left(1\right)\right)\right) \cdot t\right) \]
        8. remove-double-negN/A

          \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left(\color{blue}{\frac{{z}^{2}}{t}} + \left(\mathsf{neg}\left(1\right)\right)\right) \cdot t\right) \]
        9. unpow2N/A

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

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

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

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

          \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{\mathsf{fma}\left(\frac{z}{t}, z, -1\right)} \cdot t\right) \]
        14. lower-/.f6493.5

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot y}, \mathsf{fma}\left(\frac{z}{t}, z, -1\right) \cdot t, x \cdot x\right) \]
        10. metadata-eval97.5

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(-4 \cdot y, \mathsf{fma}\left(\frac{z}{t}, z, -1\right) \cdot t, x \cdot x\right)} \]
    12. Recombined 2 regimes into one program.
    13. Final simplification97.6%

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

    Alternative 2: 89.6% accurate, 0.6× speedup?

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

      1. Initial program 98.4%

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

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

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

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

          \[\leadsto \color{blue}{4 \cdot \left(t \cdot y\right) + {x}^{2}} \]
        4. *-rgt-identityN/A

          \[\leadsto 4 \cdot \left(t \cdot y\right) + \color{blue}{{x}^{2} \cdot 1} \]
        5. unpow2N/A

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

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

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

          \[\leadsto 4 \cdot \left(t \cdot y\right) - \color{blue}{\left(\mathsf{neg}\left(x \cdot \left(x \cdot 1\right)\right)\right)} \]
        9. associate-*l*N/A

          \[\leadsto 4 \cdot \left(t \cdot y\right) - \left(\mathsf{neg}\left(\color{blue}{\left(x \cdot x\right) \cdot 1}\right)\right) \]
        10. unpow2N/A

          \[\leadsto 4 \cdot \left(t \cdot y\right) - \left(\mathsf{neg}\left(\color{blue}{{x}^{2}} \cdot 1\right)\right) \]
        11. *-rgt-identityN/A

          \[\leadsto 4 \cdot \left(t \cdot y\right) - \left(\mathsf{neg}\left(\color{blue}{{x}^{2}}\right)\right) \]
        12. mul-1-negN/A

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

          \[\leadsto 4 \cdot \left(t \cdot y\right) - \color{blue}{{x}^{2} \cdot -1} \]
        14. unpow2N/A

          \[\leadsto 4 \cdot \left(t \cdot y\right) - \color{blue}{\left(x \cdot x\right)} \cdot -1 \]
        15. sqr-neg-revN/A

          \[\leadsto 4 \cdot \left(t \cdot y\right) - \color{blue}{\left(\left(\mathsf{neg}\left(x\right)\right) \cdot \left(\mathsf{neg}\left(x\right)\right)\right)} \cdot -1 \]
        16. distribute-lft-neg-outN/A

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

          \[\leadsto 4 \cdot \left(t \cdot y\right) - \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(x \cdot x\right)\right)}\right)\right) \cdot -1 \]
        18. unpow2N/A

          \[\leadsto 4 \cdot \left(t \cdot y\right) - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\color{blue}{{x}^{2}}\right)\right)\right)\right) \cdot -1 \]
        19. mul-1-negN/A

          \[\leadsto 4 \cdot \left(t \cdot y\right) - \left(\mathsf{neg}\left(\color{blue}{-1 \cdot {x}^{2}}\right)\right) \cdot -1 \]
        20. fp-cancel-sign-subN/A

          \[\leadsto \color{blue}{4 \cdot \left(t \cdot y\right) + \left(-1 \cdot {x}^{2}\right) \cdot -1} \]
        21. *-commutativeN/A

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

          \[\leadsto \left(t \cdot y\right) \cdot 4 + \color{blue}{\left(\mathsf{neg}\left({x}^{2}\right)\right)} \cdot -1 \]
        23. distribute-lft-neg-outN/A

          \[\leadsto \left(t \cdot y\right) \cdot 4 + \color{blue}{\left(\mathsf{neg}\left({x}^{2} \cdot -1\right)\right)} \]
        24. *-commutativeN/A

          \[\leadsto \left(t \cdot y\right) \cdot 4 + \left(\mathsf{neg}\left(\color{blue}{-1 \cdot {x}^{2}}\right)\right) \]
      5. Applied rewrites91.9%

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

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

        if 4.9999999999999997e59 < (*.f64 z z) < 1.99999999999999996e296

        1. Initial program 95.3%

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

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

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

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

            \[\leadsto \color{blue}{-4 \cdot \left(y \cdot {z}^{2}\right) + {x}^{2}} \]
          4. *-rgt-identityN/A

            \[\leadsto -4 \cdot \left(y \cdot {z}^{2}\right) + \color{blue}{{x}^{2} \cdot 1} \]
          5. unpow2N/A

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

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

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

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

            \[\leadsto -4 \cdot \left(y \cdot {z}^{2}\right) - \left(\mathsf{neg}\left(\color{blue}{\left(x \cdot x\right) \cdot 1}\right)\right) \]
          10. unpow2N/A

            \[\leadsto -4 \cdot \left(y \cdot {z}^{2}\right) - \left(\mathsf{neg}\left(\color{blue}{{x}^{2}} \cdot 1\right)\right) \]
          11. *-rgt-identityN/A

            \[\leadsto -4 \cdot \left(y \cdot {z}^{2}\right) - \left(\mathsf{neg}\left(\color{blue}{{x}^{2}}\right)\right) \]
          12. mul-1-negN/A

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

            \[\leadsto -4 \cdot \left(y \cdot {z}^{2}\right) - \color{blue}{{x}^{2} \cdot -1} \]
          14. unpow2N/A

            \[\leadsto -4 \cdot \left(y \cdot {z}^{2}\right) - \color{blue}{\left(x \cdot x\right)} \cdot -1 \]
          15. sqr-neg-revN/A

            \[\leadsto -4 \cdot \left(y \cdot {z}^{2}\right) - \color{blue}{\left(\left(\mathsf{neg}\left(x\right)\right) \cdot \left(\mathsf{neg}\left(x\right)\right)\right)} \cdot -1 \]
          16. distribute-lft-neg-outN/A

            \[\leadsto -4 \cdot \left(y \cdot {z}^{2}\right) - \color{blue}{\left(\mathsf{neg}\left(x \cdot \left(\mathsf{neg}\left(x\right)\right)\right)\right)} \cdot -1 \]
          17. distribute-rgt-neg-inN/A

            \[\leadsto -4 \cdot \left(y \cdot {z}^{2}\right) - \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(x \cdot x\right)\right)}\right)\right) \cdot -1 \]
          18. unpow2N/A

            \[\leadsto -4 \cdot \left(y \cdot {z}^{2}\right) - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\color{blue}{{x}^{2}}\right)\right)\right)\right) \cdot -1 \]
          19. mul-1-negN/A

            \[\leadsto -4 \cdot \left(y \cdot {z}^{2}\right) - \left(\mathsf{neg}\left(\color{blue}{-1 \cdot {x}^{2}}\right)\right) \cdot -1 \]
          20. fp-cancel-sign-subN/A

            \[\leadsto \color{blue}{-4 \cdot \left(y \cdot {z}^{2}\right) + \left(-1 \cdot {x}^{2}\right) \cdot -1} \]
          21. *-commutativeN/A

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

            \[\leadsto \left(y \cdot {z}^{2}\right) \cdot -4 + \color{blue}{\left(\mathsf{neg}\left({x}^{2}\right)\right)} \cdot -1 \]
        5. Applied rewrites81.7%

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

        if 1.99999999999999996e296 < (*.f64 z z)

        1. Initial program 73.4%

          \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. unpow1N/A

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

            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({z}^{\color{blue}{\left(\frac{2}{2}\right)}} \cdot z - t\right) \]
          3. sqrt-pow1N/A

            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{\sqrt{{z}^{2}}} \cdot z - t\right) \]
          4. pow2N/A

            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\sqrt{\color{blue}{z \cdot z}} \cdot z - t\right) \]
          5. sqr-neg-revN/A

            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\sqrt{\color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot \left(\mathsf{neg}\left(z\right)\right)}} \cdot z - t\right) \]
          6. sqrt-prodN/A

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

            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{\left(\sqrt{\mathsf{neg}\left(z\right)} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right)} \cdot z - t\right) \]
          8. pow1/2N/A

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

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

            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left(\mathsf{neg}\left(z\right)\right)}^{\left(\color{blue}{\frac{2}{2}} \cdot \frac{1}{2}\right)} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
          11. pow-powN/A

            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left(\color{blue}{{\left({\left(\mathsf{neg}\left(z\right)\right)}^{\left(\frac{2}{2}\right)}\right)}^{\frac{1}{2}}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
          12. sqrt-pow1N/A

            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\color{blue}{\left(\sqrt{{\left(\mathsf{neg}\left(z\right)\right)}^{2}}\right)}}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
          13. pow2N/A

            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left(\sqrt{\color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot \left(\mathsf{neg}\left(z\right)\right)}}\right)}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
          14. sqr-neg-revN/A

            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left(\sqrt{\color{blue}{z \cdot z}}\right)}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
          15. pow2N/A

            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left(\sqrt{\color{blue}{{z}^{2}}}\right)}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
          16. sqrt-pow1N/A

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

            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left({z}^{\color{blue}{1}}\right)}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
          18. unpow1N/A

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

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

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

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

            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({z}^{\color{blue}{\frac{1}{2}}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
          23. pow1/2N/A

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

            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left(\color{blue}{\sqrt{z}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
          25. pow1/2N/A

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

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

            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left(\sqrt{z} \cdot {\left(\mathsf{neg}\left(z\right)\right)}^{\left(\color{blue}{\frac{2}{2}} \cdot \frac{1}{2}\right)}\right) \cdot z - t\right) \]
          28. pow-powN/A

            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left(\sqrt{z} \cdot \color{blue}{{\left({\left(\mathsf{neg}\left(z\right)\right)}^{\left(\frac{2}{2}\right)}\right)}^{\frac{1}{2}}}\right) \cdot z - t\right) \]
        4. Applied rewrites36.4%

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

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

            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)} \cdot z - t\right) \]
          3. pow2N/A

            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{{\left(\sqrt{z}\right)}^{2}} \cdot z - t\right) \]
          4. rem-square-sqrtN/A

            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{2} \cdot \color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)} - t\right) \]
          5. lift-sqrt.f64N/A

            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{2} \cdot \left(\color{blue}{\sqrt{z}} \cdot \sqrt{z}\right) - t\right) \]
          6. lift-sqrt.f64N/A

            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{2} \cdot \left(\sqrt{z} \cdot \color{blue}{\sqrt{z}}\right) - t\right) \]
          7. pow2N/A

            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{2} \cdot \color{blue}{{\left(\sqrt{z}\right)}^{2}} - t\right) \]
          8. pow-sqrN/A

            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{{\left(\sqrt{z}\right)}^{\left(2 \cdot 2\right)}} - t\right) \]
          9. metadata-evalN/A

            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{\color{blue}{4}} - t\right) \]
          10. lower-pow.f6436.4

            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{{\left(\sqrt{z}\right)}^{4}} - t\right) \]
        6. Applied rewrites36.4%

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

          \[\leadsto \color{blue}{-4 \cdot \left(y \cdot {z}^{2}\right)} \]
        8. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \color{blue}{\left(y \cdot {z}^{2}\right) \cdot -4} \]
          2. lower-*.f64N/A

            \[\leadsto \color{blue}{\left(y \cdot {z}^{2}\right) \cdot -4} \]
          3. *-commutativeN/A

            \[\leadsto \color{blue}{\left({z}^{2} \cdot y\right)} \cdot -4 \]
          4. lower-*.f64N/A

            \[\leadsto \color{blue}{\left({z}^{2} \cdot y\right)} \cdot -4 \]
          5. unpow2N/A

            \[\leadsto \left(\color{blue}{\left(z \cdot z\right)} \cdot y\right) \cdot -4 \]
          6. lower-*.f6479.9

            \[\leadsto \left(\color{blue}{\left(z \cdot z\right)} \cdot y\right) \cdot -4 \]
        9. Applied rewrites79.9%

          \[\leadsto \color{blue}{\left(\left(z \cdot z\right) \cdot y\right) \cdot -4} \]
        10. Step-by-step derivation
          1. Applied rewrites94.0%

            \[\leadsto \left(\left(z \cdot y\right) \cdot z\right) \cdot -4 \]
        11. Recombined 3 regimes into one program.
        12. Add Preprocessing

        Alternative 3: 95.0% accurate, 0.7× speedup?

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

          1. Initial program 97.4%

            \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
          2. Add Preprocessing

          if 5e307 < (-.f64 (*.f64 z z) t)

          1. Initial program 72.4%

            \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
          2. Add Preprocessing
          3. Step-by-step derivation
            1. unpow1N/A

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

              \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({z}^{\color{blue}{\left(\frac{2}{2}\right)}} \cdot z - t\right) \]
            3. sqrt-pow1N/A

              \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{\sqrt{{z}^{2}}} \cdot z - t\right) \]
            4. pow2N/A

              \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\sqrt{\color{blue}{z \cdot z}} \cdot z - t\right) \]
            5. sqr-neg-revN/A

              \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\sqrt{\color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot \left(\mathsf{neg}\left(z\right)\right)}} \cdot z - t\right) \]
            6. sqrt-prodN/A

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

              \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{\left(\sqrt{\mathsf{neg}\left(z\right)} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right)} \cdot z - t\right) \]
            8. pow1/2N/A

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

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

              \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left(\mathsf{neg}\left(z\right)\right)}^{\left(\color{blue}{\frac{2}{2}} \cdot \frac{1}{2}\right)} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
            11. pow-powN/A

              \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left(\color{blue}{{\left({\left(\mathsf{neg}\left(z\right)\right)}^{\left(\frac{2}{2}\right)}\right)}^{\frac{1}{2}}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
            12. sqrt-pow1N/A

              \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\color{blue}{\left(\sqrt{{\left(\mathsf{neg}\left(z\right)\right)}^{2}}\right)}}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
            13. pow2N/A

              \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left(\sqrt{\color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot \left(\mathsf{neg}\left(z\right)\right)}}\right)}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
            14. sqr-neg-revN/A

              \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left(\sqrt{\color{blue}{z \cdot z}}\right)}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
            15. pow2N/A

              \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left(\sqrt{\color{blue}{{z}^{2}}}\right)}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
            16. sqrt-pow1N/A

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

              \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left({z}^{\color{blue}{1}}\right)}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
            18. unpow1N/A

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

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

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

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

              \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({z}^{\color{blue}{\frac{1}{2}}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
            23. pow1/2N/A

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

              \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left(\color{blue}{\sqrt{z}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
            25. pow1/2N/A

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

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

              \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left(\sqrt{z} \cdot {\left(\mathsf{neg}\left(z\right)\right)}^{\left(\color{blue}{\frac{2}{2}} \cdot \frac{1}{2}\right)}\right) \cdot z - t\right) \]
            28. pow-powN/A

              \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left(\sqrt{z} \cdot \color{blue}{{\left({\left(\mathsf{neg}\left(z\right)\right)}^{\left(\frac{2}{2}\right)}\right)}^{\frac{1}{2}}}\right) \cdot z - t\right) \]
          4. Applied rewrites35.9%

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

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

              \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)} \cdot z - t\right) \]
            3. pow2N/A

              \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{{\left(\sqrt{z}\right)}^{2}} \cdot z - t\right) \]
            4. rem-square-sqrtN/A

              \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{2} \cdot \color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)} - t\right) \]
            5. lift-sqrt.f64N/A

              \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{2} \cdot \left(\color{blue}{\sqrt{z}} \cdot \sqrt{z}\right) - t\right) \]
            6. lift-sqrt.f64N/A

              \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{2} \cdot \left(\sqrt{z} \cdot \color{blue}{\sqrt{z}}\right) - t\right) \]
            7. pow2N/A

              \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{2} \cdot \color{blue}{{\left(\sqrt{z}\right)}^{2}} - t\right) \]
            8. pow-sqrN/A

              \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{{\left(\sqrt{z}\right)}^{\left(2 \cdot 2\right)}} - t\right) \]
            9. metadata-evalN/A

              \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{\color{blue}{4}} - t\right) \]
            10. lower-pow.f6435.9

              \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{{\left(\sqrt{z}\right)}^{4}} - t\right) \]
          6. Applied rewrites35.9%

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

            \[\leadsto \color{blue}{-4 \cdot \left(y \cdot {z}^{2}\right)} \]
          8. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \color{blue}{\left(y \cdot {z}^{2}\right) \cdot -4} \]
            2. lower-*.f64N/A

              \[\leadsto \color{blue}{\left(y \cdot {z}^{2}\right) \cdot -4} \]
            3. *-commutativeN/A

              \[\leadsto \color{blue}{\left({z}^{2} \cdot y\right)} \cdot -4 \]
            4. lower-*.f64N/A

              \[\leadsto \color{blue}{\left({z}^{2} \cdot y\right)} \cdot -4 \]
            5. unpow2N/A

              \[\leadsto \left(\color{blue}{\left(z \cdot z\right)} \cdot y\right) \cdot -4 \]
            6. lower-*.f6479.2

              \[\leadsto \left(\color{blue}{\left(z \cdot z\right)} \cdot y\right) \cdot -4 \]
          9. Applied rewrites79.2%

            \[\leadsto \color{blue}{\left(\left(z \cdot z\right) \cdot y\right) \cdot -4} \]
          10. Step-by-step derivation
            1. Applied rewrites93.8%

              \[\leadsto \left(\left(z \cdot y\right) \cdot z\right) \cdot -4 \]
          11. Recombined 2 regimes into one program.
          12. Add Preprocessing

          Alternative 4: 46.5% accurate, 1.0× speedup?

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

            1. Initial program 92.5%

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

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

                \[\leadsto \color{blue}{\left(t \cdot y\right) \cdot 4} \]
              2. lower-*.f64N/A

                \[\leadsto \color{blue}{\left(t \cdot y\right) \cdot 4} \]
              3. lower-*.f6440.6

                \[\leadsto \color{blue}{\left(t \cdot y\right)} \cdot 4 \]
            5. Applied rewrites40.6%

              \[\leadsto \color{blue}{\left(t \cdot y\right) \cdot 4} \]
            6. Step-by-step derivation
              1. Applied rewrites40.6%

                \[\leadsto \left(t \cdot 4\right) \cdot \color{blue}{y} \]

              if 4.3999999999999999e-131 < z < 1.40000000000000006e75

              1. Initial program 97.3%

                \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
              2. Add Preprocessing
              3. Step-by-step derivation
                1. unpow1N/A

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

                  \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({z}^{\color{blue}{\left(\frac{2}{2}\right)}} \cdot z - t\right) \]
                3. sqrt-pow1N/A

                  \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{\sqrt{{z}^{2}}} \cdot z - t\right) \]
                4. pow2N/A

                  \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\sqrt{\color{blue}{z \cdot z}} \cdot z - t\right) \]
                5. sqr-neg-revN/A

                  \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\sqrt{\color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot \left(\mathsf{neg}\left(z\right)\right)}} \cdot z - t\right) \]
                6. sqrt-prodN/A

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

                  \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{\left(\sqrt{\mathsf{neg}\left(z\right)} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right)} \cdot z - t\right) \]
                8. pow1/2N/A

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

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

                  \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left(\mathsf{neg}\left(z\right)\right)}^{\left(\color{blue}{\frac{2}{2}} \cdot \frac{1}{2}\right)} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                11. pow-powN/A

                  \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left(\color{blue}{{\left({\left(\mathsf{neg}\left(z\right)\right)}^{\left(\frac{2}{2}\right)}\right)}^{\frac{1}{2}}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                12. sqrt-pow1N/A

                  \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\color{blue}{\left(\sqrt{{\left(\mathsf{neg}\left(z\right)\right)}^{2}}\right)}}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                13. pow2N/A

                  \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left(\sqrt{\color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot \left(\mathsf{neg}\left(z\right)\right)}}\right)}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                14. sqr-neg-revN/A

                  \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left(\sqrt{\color{blue}{z \cdot z}}\right)}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                15. pow2N/A

                  \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left(\sqrt{\color{blue}{{z}^{2}}}\right)}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                16. sqrt-pow1N/A

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

                  \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left({z}^{\color{blue}{1}}\right)}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                18. unpow1N/A

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

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

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

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

                  \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({z}^{\color{blue}{\frac{1}{2}}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                23. pow1/2N/A

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

                  \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left(\color{blue}{\sqrt{z}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                25. pow1/2N/A

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

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

                  \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left(\sqrt{z} \cdot {\left(\mathsf{neg}\left(z\right)\right)}^{\left(\color{blue}{\frac{2}{2}} \cdot \frac{1}{2}\right)}\right) \cdot z - t\right) \]
                28. pow-powN/A

                  \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left(\sqrt{z} \cdot \color{blue}{{\left({\left(\mathsf{neg}\left(z\right)\right)}^{\left(\frac{2}{2}\right)}\right)}^{\frac{1}{2}}}\right) \cdot z - t\right) \]
              4. Applied rewrites97.3%

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

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

                  \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)} \cdot z - t\right) \]
                3. pow2N/A

                  \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{{\left(\sqrt{z}\right)}^{2}} \cdot z - t\right) \]
                4. rem-square-sqrtN/A

                  \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{2} \cdot \color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)} - t\right) \]
                5. lift-sqrt.f64N/A

                  \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{2} \cdot \left(\color{blue}{\sqrt{z}} \cdot \sqrt{z}\right) - t\right) \]
                6. lift-sqrt.f64N/A

                  \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{2} \cdot \left(\sqrt{z} \cdot \color{blue}{\sqrt{z}}\right) - t\right) \]
                7. pow2N/A

                  \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{2} \cdot \color{blue}{{\left(\sqrt{z}\right)}^{2}} - t\right) \]
                8. pow-sqrN/A

                  \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{{\left(\sqrt{z}\right)}^{\left(2 \cdot 2\right)}} - t\right) \]
                9. metadata-evalN/A

                  \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{\color{blue}{4}} - t\right) \]
                10. lower-pow.f6497.2

                  \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{{\left(\sqrt{z}\right)}^{4}} - t\right) \]
              6. Applied rewrites97.2%

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left({z}^{2} - t\right) \cdot -4}}{x}, \frac{y}{x}, 1\right) \cdot {x}^{2} \]
                12. lower-*.f64N/A

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

                  \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left({z}^{2} - t\right)} \cdot -4}{x}, \frac{y}{x}, 1\right) \cdot {x}^{2} \]
                14. unpow2N/A

                  \[\leadsto \mathsf{fma}\left(\frac{\left(\color{blue}{z \cdot z} - t\right) \cdot -4}{x}, \frac{y}{x}, 1\right) \cdot {x}^{2} \]
                15. lower-*.f64N/A

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

                  \[\leadsto \mathsf{fma}\left(\frac{\left(z \cdot z - t\right) \cdot -4}{x}, \color{blue}{\frac{y}{x}}, 1\right) \cdot {x}^{2} \]
                17. unpow2N/A

                  \[\leadsto \mathsf{fma}\left(\frac{\left(z \cdot z - t\right) \cdot -4}{x}, \frac{y}{x}, 1\right) \cdot \color{blue}{\left(x \cdot x\right)} \]
                18. lower-*.f6491.8

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

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

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

                  \[\leadsto 1 \cdot \left(\color{blue}{x} \cdot x\right) \]

                if 1.40000000000000006e75 < z

                1. Initial program 85.0%

                  \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
                2. Add Preprocessing
                3. Step-by-step derivation
                  1. unpow1N/A

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

                    \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({z}^{\color{blue}{\left(\frac{2}{2}\right)}} \cdot z - t\right) \]
                  3. sqrt-pow1N/A

                    \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{\sqrt{{z}^{2}}} \cdot z - t\right) \]
                  4. pow2N/A

                    \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\sqrt{\color{blue}{z \cdot z}} \cdot z - t\right) \]
                  5. sqr-neg-revN/A

                    \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\sqrt{\color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot \left(\mathsf{neg}\left(z\right)\right)}} \cdot z - t\right) \]
                  6. sqrt-prodN/A

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

                    \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{\left(\sqrt{\mathsf{neg}\left(z\right)} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right)} \cdot z - t\right) \]
                  8. pow1/2N/A

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

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

                    \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left(\mathsf{neg}\left(z\right)\right)}^{\left(\color{blue}{\frac{2}{2}} \cdot \frac{1}{2}\right)} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                  11. pow-powN/A

                    \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left(\color{blue}{{\left({\left(\mathsf{neg}\left(z\right)\right)}^{\left(\frac{2}{2}\right)}\right)}^{\frac{1}{2}}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                  12. sqrt-pow1N/A

                    \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\color{blue}{\left(\sqrt{{\left(\mathsf{neg}\left(z\right)\right)}^{2}}\right)}}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                  13. pow2N/A

                    \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left(\sqrt{\color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot \left(\mathsf{neg}\left(z\right)\right)}}\right)}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                  14. sqr-neg-revN/A

                    \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left(\sqrt{\color{blue}{z \cdot z}}\right)}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                  15. pow2N/A

                    \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left(\sqrt{\color{blue}{{z}^{2}}}\right)}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                  16. sqrt-pow1N/A

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

                    \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left({z}^{\color{blue}{1}}\right)}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                  18. unpow1N/A

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

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

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

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

                    \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({z}^{\color{blue}{\frac{1}{2}}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                  23. pow1/2N/A

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

                    \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left(\color{blue}{\sqrt{z}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                  25. pow1/2N/A

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

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

                    \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left(\sqrt{z} \cdot {\left(\mathsf{neg}\left(z\right)\right)}^{\left(\color{blue}{\frac{2}{2}} \cdot \frac{1}{2}\right)}\right) \cdot z - t\right) \]
                  28. pow-powN/A

                    \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left(\sqrt{z} \cdot \color{blue}{{\left({\left(\mathsf{neg}\left(z\right)\right)}^{\left(\frac{2}{2}\right)}\right)}^{\frac{1}{2}}}\right) \cdot z - t\right) \]
                4. Applied rewrites85.0%

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

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

                    \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)} \cdot z - t\right) \]
                  3. pow2N/A

                    \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{{\left(\sqrt{z}\right)}^{2}} \cdot z - t\right) \]
                  4. rem-square-sqrtN/A

                    \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{2} \cdot \color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)} - t\right) \]
                  5. lift-sqrt.f64N/A

                    \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{2} \cdot \left(\color{blue}{\sqrt{z}} \cdot \sqrt{z}\right) - t\right) \]
                  6. lift-sqrt.f64N/A

                    \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{2} \cdot \left(\sqrt{z} \cdot \color{blue}{\sqrt{z}}\right) - t\right) \]
                  7. pow2N/A

                    \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{2} \cdot \color{blue}{{\left(\sqrt{z}\right)}^{2}} - t\right) \]
                  8. pow-sqrN/A

                    \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{{\left(\sqrt{z}\right)}^{\left(2 \cdot 2\right)}} - t\right) \]
                  9. metadata-evalN/A

                    \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{\color{blue}{4}} - t\right) \]
                  10. lower-pow.f6484.9

                    \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{{\left(\sqrt{z}\right)}^{4}} - t\right) \]
                6. Applied rewrites84.9%

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

                  \[\leadsto \color{blue}{-4 \cdot \left(y \cdot {z}^{2}\right)} \]
                8. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \color{blue}{\left(y \cdot {z}^{2}\right) \cdot -4} \]
                  2. lower-*.f64N/A

                    \[\leadsto \color{blue}{\left(y \cdot {z}^{2}\right) \cdot -4} \]
                  3. *-commutativeN/A

                    \[\leadsto \color{blue}{\left({z}^{2} \cdot y\right)} \cdot -4 \]
                  4. lower-*.f64N/A

                    \[\leadsto \color{blue}{\left({z}^{2} \cdot y\right)} \cdot -4 \]
                  5. unpow2N/A

                    \[\leadsto \left(\color{blue}{\left(z \cdot z\right)} \cdot y\right) \cdot -4 \]
                  6. lower-*.f6466.5

                    \[\leadsto \left(\color{blue}{\left(z \cdot z\right)} \cdot y\right) \cdot -4 \]
                9. Applied rewrites66.5%

                  \[\leadsto \color{blue}{\left(\left(z \cdot z\right) \cdot y\right) \cdot -4} \]
                10. Step-by-step derivation
                  1. Applied rewrites73.8%

                    \[\leadsto \left(\left(z \cdot y\right) \cdot z\right) \cdot -4 \]
                11. Recombined 3 regimes into one program.
                12. Add Preprocessing

                Alternative 5: 44.8% accurate, 1.0× speedup?

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

                  1. Initial program 92.5%

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

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

                      \[\leadsto \color{blue}{\left(t \cdot y\right) \cdot 4} \]
                    2. lower-*.f64N/A

                      \[\leadsto \color{blue}{\left(t \cdot y\right) \cdot 4} \]
                    3. lower-*.f6440.6

                      \[\leadsto \color{blue}{\left(t \cdot y\right)} \cdot 4 \]
                  5. Applied rewrites40.6%

                    \[\leadsto \color{blue}{\left(t \cdot y\right) \cdot 4} \]
                  6. Step-by-step derivation
                    1. Applied rewrites40.6%

                      \[\leadsto \left(t \cdot 4\right) \cdot \color{blue}{y} \]

                    if 4.3999999999999999e-131 < z < 1.40000000000000006e75

                    1. Initial program 97.3%

                      \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
                    2. Add Preprocessing
                    3. Step-by-step derivation
                      1. unpow1N/A

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

                        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({z}^{\color{blue}{\left(\frac{2}{2}\right)}} \cdot z - t\right) \]
                      3. sqrt-pow1N/A

                        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{\sqrt{{z}^{2}}} \cdot z - t\right) \]
                      4. pow2N/A

                        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\sqrt{\color{blue}{z \cdot z}} \cdot z - t\right) \]
                      5. sqr-neg-revN/A

                        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\sqrt{\color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot \left(\mathsf{neg}\left(z\right)\right)}} \cdot z - t\right) \]
                      6. sqrt-prodN/A

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

                        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{\left(\sqrt{\mathsf{neg}\left(z\right)} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right)} \cdot z - t\right) \]
                      8. pow1/2N/A

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

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

                        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left(\mathsf{neg}\left(z\right)\right)}^{\left(\color{blue}{\frac{2}{2}} \cdot \frac{1}{2}\right)} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                      11. pow-powN/A

                        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left(\color{blue}{{\left({\left(\mathsf{neg}\left(z\right)\right)}^{\left(\frac{2}{2}\right)}\right)}^{\frac{1}{2}}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                      12. sqrt-pow1N/A

                        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\color{blue}{\left(\sqrt{{\left(\mathsf{neg}\left(z\right)\right)}^{2}}\right)}}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                      13. pow2N/A

                        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left(\sqrt{\color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot \left(\mathsf{neg}\left(z\right)\right)}}\right)}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                      14. sqr-neg-revN/A

                        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left(\sqrt{\color{blue}{z \cdot z}}\right)}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                      15. pow2N/A

                        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left(\sqrt{\color{blue}{{z}^{2}}}\right)}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                      16. sqrt-pow1N/A

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

                        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left({z}^{\color{blue}{1}}\right)}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                      18. unpow1N/A

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

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

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

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

                        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({z}^{\color{blue}{\frac{1}{2}}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                      23. pow1/2N/A

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

                        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left(\color{blue}{\sqrt{z}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                      25. pow1/2N/A

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

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

                        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left(\sqrt{z} \cdot {\left(\mathsf{neg}\left(z\right)\right)}^{\left(\color{blue}{\frac{2}{2}} \cdot \frac{1}{2}\right)}\right) \cdot z - t\right) \]
                      28. pow-powN/A

                        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left(\sqrt{z} \cdot \color{blue}{{\left({\left(\mathsf{neg}\left(z\right)\right)}^{\left(\frac{2}{2}\right)}\right)}^{\frac{1}{2}}}\right) \cdot z - t\right) \]
                    4. Applied rewrites97.3%

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

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

                        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)} \cdot z - t\right) \]
                      3. pow2N/A

                        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{{\left(\sqrt{z}\right)}^{2}} \cdot z - t\right) \]
                      4. rem-square-sqrtN/A

                        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{2} \cdot \color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)} - t\right) \]
                      5. lift-sqrt.f64N/A

                        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{2} \cdot \left(\color{blue}{\sqrt{z}} \cdot \sqrt{z}\right) - t\right) \]
                      6. lift-sqrt.f64N/A

                        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{2} \cdot \left(\sqrt{z} \cdot \color{blue}{\sqrt{z}}\right) - t\right) \]
                      7. pow2N/A

                        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{2} \cdot \color{blue}{{\left(\sqrt{z}\right)}^{2}} - t\right) \]
                      8. pow-sqrN/A

                        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{{\left(\sqrt{z}\right)}^{\left(2 \cdot 2\right)}} - t\right) \]
                      9. metadata-evalN/A

                        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{\color{blue}{4}} - t\right) \]
                      10. lower-pow.f6497.2

                        \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{{\left(\sqrt{z}\right)}^{4}} - t\right) \]
                    6. Applied rewrites97.2%

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left({z}^{2} - t\right) \cdot -4}}{x}, \frac{y}{x}, 1\right) \cdot {x}^{2} \]
                      12. lower-*.f64N/A

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

                        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left({z}^{2} - t\right)} \cdot -4}{x}, \frac{y}{x}, 1\right) \cdot {x}^{2} \]
                      14. unpow2N/A

                        \[\leadsto \mathsf{fma}\left(\frac{\left(\color{blue}{z \cdot z} - t\right) \cdot -4}{x}, \frac{y}{x}, 1\right) \cdot {x}^{2} \]
                      15. lower-*.f64N/A

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

                        \[\leadsto \mathsf{fma}\left(\frac{\left(z \cdot z - t\right) \cdot -4}{x}, \color{blue}{\frac{y}{x}}, 1\right) \cdot {x}^{2} \]
                      17. unpow2N/A

                        \[\leadsto \mathsf{fma}\left(\frac{\left(z \cdot z - t\right) \cdot -4}{x}, \frac{y}{x}, 1\right) \cdot \color{blue}{\left(x \cdot x\right)} \]
                      18. lower-*.f6491.8

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

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

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

                        \[\leadsto 1 \cdot \left(\color{blue}{x} \cdot x\right) \]

                      if 1.40000000000000006e75 < z

                      1. Initial program 85.0%

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

                        \[\leadsto \color{blue}{-4 \cdot \left(y \cdot {z}^{2}\right)} \]
                      4. Step-by-step derivation
                        1. *-commutativeN/A

                          \[\leadsto \color{blue}{\left(y \cdot {z}^{2}\right) \cdot -4} \]
                        2. lower-*.f64N/A

                          \[\leadsto \color{blue}{\left(y \cdot {z}^{2}\right) \cdot -4} \]
                        3. *-commutativeN/A

                          \[\leadsto \color{blue}{\left({z}^{2} \cdot y\right)} \cdot -4 \]
                        4. lower-*.f64N/A

                          \[\leadsto \color{blue}{\left({z}^{2} \cdot y\right)} \cdot -4 \]
                        5. unpow2N/A

                          \[\leadsto \left(\color{blue}{\left(z \cdot z\right)} \cdot y\right) \cdot -4 \]
                        6. lower-*.f6466.5

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

                        \[\leadsto \color{blue}{\left(\left(z \cdot z\right) \cdot y\right) \cdot -4} \]
                    12. Recombined 3 regimes into one program.
                    13. Add Preprocessing

                    Alternative 6: 76.3% accurate, 1.2× speedup?

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

                      1. Initial program 93.9%

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

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

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

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

                          \[\leadsto \color{blue}{4 \cdot \left(t \cdot y\right) + {x}^{2}} \]
                        4. *-rgt-identityN/A

                          \[\leadsto 4 \cdot \left(t \cdot y\right) + \color{blue}{{x}^{2} \cdot 1} \]
                        5. unpow2N/A

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

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

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

                          \[\leadsto 4 \cdot \left(t \cdot y\right) - \color{blue}{\left(\mathsf{neg}\left(x \cdot \left(x \cdot 1\right)\right)\right)} \]
                        9. associate-*l*N/A

                          \[\leadsto 4 \cdot \left(t \cdot y\right) - \left(\mathsf{neg}\left(\color{blue}{\left(x \cdot x\right) \cdot 1}\right)\right) \]
                        10. unpow2N/A

                          \[\leadsto 4 \cdot \left(t \cdot y\right) - \left(\mathsf{neg}\left(\color{blue}{{x}^{2}} \cdot 1\right)\right) \]
                        11. *-rgt-identityN/A

                          \[\leadsto 4 \cdot \left(t \cdot y\right) - \left(\mathsf{neg}\left(\color{blue}{{x}^{2}}\right)\right) \]
                        12. mul-1-negN/A

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

                          \[\leadsto 4 \cdot \left(t \cdot y\right) - \color{blue}{{x}^{2} \cdot -1} \]
                        14. unpow2N/A

                          \[\leadsto 4 \cdot \left(t \cdot y\right) - \color{blue}{\left(x \cdot x\right)} \cdot -1 \]
                        15. sqr-neg-revN/A

                          \[\leadsto 4 \cdot \left(t \cdot y\right) - \color{blue}{\left(\left(\mathsf{neg}\left(x\right)\right) \cdot \left(\mathsf{neg}\left(x\right)\right)\right)} \cdot -1 \]
                        16. distribute-lft-neg-outN/A

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

                          \[\leadsto 4 \cdot \left(t \cdot y\right) - \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(x \cdot x\right)\right)}\right)\right) \cdot -1 \]
                        18. unpow2N/A

                          \[\leadsto 4 \cdot \left(t \cdot y\right) - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\color{blue}{{x}^{2}}\right)\right)\right)\right) \cdot -1 \]
                        19. mul-1-negN/A

                          \[\leadsto 4 \cdot \left(t \cdot y\right) - \left(\mathsf{neg}\left(\color{blue}{-1 \cdot {x}^{2}}\right)\right) \cdot -1 \]
                        20. fp-cancel-sign-subN/A

                          \[\leadsto \color{blue}{4 \cdot \left(t \cdot y\right) + \left(-1 \cdot {x}^{2}\right) \cdot -1} \]
                        21. *-commutativeN/A

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

                          \[\leadsto \left(t \cdot y\right) \cdot 4 + \color{blue}{\left(\mathsf{neg}\left({x}^{2}\right)\right)} \cdot -1 \]
                        23. distribute-lft-neg-outN/A

                          \[\leadsto \left(t \cdot y\right) \cdot 4 + \color{blue}{\left(\mathsf{neg}\left({x}^{2} \cdot -1\right)\right)} \]
                        24. *-commutativeN/A

                          \[\leadsto \left(t \cdot y\right) \cdot 4 + \left(\mathsf{neg}\left(\color{blue}{-1 \cdot {x}^{2}}\right)\right) \]
                      5. Applied rewrites74.4%

                        \[\leadsto \color{blue}{\mathsf{fma}\left(t \cdot y, 4, x \cdot x\right)} \]
                      6. Step-by-step derivation
                        1. Applied rewrites75.3%

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

                        if 6.79999999999999973e137 < z

                        1. Initial program 77.1%

                          \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
                        2. Add Preprocessing
                        3. Step-by-step derivation
                          1. unpow1N/A

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

                            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({z}^{\color{blue}{\left(\frac{2}{2}\right)}} \cdot z - t\right) \]
                          3. sqrt-pow1N/A

                            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{\sqrt{{z}^{2}}} \cdot z - t\right) \]
                          4. pow2N/A

                            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\sqrt{\color{blue}{z \cdot z}} \cdot z - t\right) \]
                          5. sqr-neg-revN/A

                            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\sqrt{\color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot \left(\mathsf{neg}\left(z\right)\right)}} \cdot z - t\right) \]
                          6. sqrt-prodN/A

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

                            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{\left(\sqrt{\mathsf{neg}\left(z\right)} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right)} \cdot z - t\right) \]
                          8. pow1/2N/A

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

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

                            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left(\mathsf{neg}\left(z\right)\right)}^{\left(\color{blue}{\frac{2}{2}} \cdot \frac{1}{2}\right)} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                          11. pow-powN/A

                            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left(\color{blue}{{\left({\left(\mathsf{neg}\left(z\right)\right)}^{\left(\frac{2}{2}\right)}\right)}^{\frac{1}{2}}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                          12. sqrt-pow1N/A

                            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\color{blue}{\left(\sqrt{{\left(\mathsf{neg}\left(z\right)\right)}^{2}}\right)}}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                          13. pow2N/A

                            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left(\sqrt{\color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot \left(\mathsf{neg}\left(z\right)\right)}}\right)}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                          14. sqr-neg-revN/A

                            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left(\sqrt{\color{blue}{z \cdot z}}\right)}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                          15. pow2N/A

                            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left(\sqrt{\color{blue}{{z}^{2}}}\right)}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                          16. sqrt-pow1N/A

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

                            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left({z}^{\color{blue}{1}}\right)}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                          18. unpow1N/A

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

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

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

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

                            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({z}^{\color{blue}{\frac{1}{2}}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                          23. pow1/2N/A

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

                            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left(\color{blue}{\sqrt{z}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                          25. pow1/2N/A

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

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

                            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left(\sqrt{z} \cdot {\left(\mathsf{neg}\left(z\right)\right)}^{\left(\color{blue}{\frac{2}{2}} \cdot \frac{1}{2}\right)}\right) \cdot z - t\right) \]
                          28. pow-powN/A

                            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left(\sqrt{z} \cdot \color{blue}{{\left({\left(\mathsf{neg}\left(z\right)\right)}^{\left(\frac{2}{2}\right)}\right)}^{\frac{1}{2}}}\right) \cdot z - t\right) \]
                        4. Applied rewrites77.1%

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

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

                            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)} \cdot z - t\right) \]
                          3. pow2N/A

                            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{{\left(\sqrt{z}\right)}^{2}} \cdot z - t\right) \]
                          4. rem-square-sqrtN/A

                            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{2} \cdot \color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)} - t\right) \]
                          5. lift-sqrt.f64N/A

                            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{2} \cdot \left(\color{blue}{\sqrt{z}} \cdot \sqrt{z}\right) - t\right) \]
                          6. lift-sqrt.f64N/A

                            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{2} \cdot \left(\sqrt{z} \cdot \color{blue}{\sqrt{z}}\right) - t\right) \]
                          7. pow2N/A

                            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{2} \cdot \color{blue}{{\left(\sqrt{z}\right)}^{2}} - t\right) \]
                          8. pow-sqrN/A

                            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{{\left(\sqrt{z}\right)}^{\left(2 \cdot 2\right)}} - t\right) \]
                          9. metadata-evalN/A

                            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{\color{blue}{4}} - t\right) \]
                          10. lower-pow.f6477.0

                            \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{{\left(\sqrt{z}\right)}^{4}} - t\right) \]
                        6. Applied rewrites77.0%

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

                          \[\leadsto \color{blue}{-4 \cdot \left(y \cdot {z}^{2}\right)} \]
                        8. Step-by-step derivation
                          1. *-commutativeN/A

                            \[\leadsto \color{blue}{\left(y \cdot {z}^{2}\right) \cdot -4} \]
                          2. lower-*.f64N/A

                            \[\leadsto \color{blue}{\left(y \cdot {z}^{2}\right) \cdot -4} \]
                          3. *-commutativeN/A

                            \[\leadsto \color{blue}{\left({z}^{2} \cdot y\right)} \cdot -4 \]
                          4. lower-*.f64N/A

                            \[\leadsto \color{blue}{\left({z}^{2} \cdot y\right)} \cdot -4 \]
                          5. unpow2N/A

                            \[\leadsto \left(\color{blue}{\left(z \cdot z\right)} \cdot y\right) \cdot -4 \]
                          6. lower-*.f6480.1

                            \[\leadsto \left(\color{blue}{\left(z \cdot z\right)} \cdot y\right) \cdot -4 \]
                        9. Applied rewrites80.1%

                          \[\leadsto \color{blue}{\left(\left(z \cdot z\right) \cdot y\right) \cdot -4} \]
                        10. Step-by-step derivation
                          1. Applied rewrites91.3%

                            \[\leadsto \left(\left(z \cdot y\right) \cdot z\right) \cdot -4 \]
                        11. Recombined 2 regimes into one program.
                        12. Add Preprocessing

                        Alternative 7: 45.3% accurate, 1.6× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 7.5 \cdot 10^{-48}:\\ \;\;\;\;\left(t \cdot 4\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;1 \cdot \left(x \cdot x\right)\\ \end{array} \end{array} \]
                        (FPCore (x y z t)
                         :precision binary64
                         (if (<= x 7.5e-48) (* (* t 4.0) y) (* 1.0 (* x x))))
                        double code(double x, double y, double z, double t) {
                        	double tmp;
                        	if (x <= 7.5e-48) {
                        		tmp = (t * 4.0) * y;
                        	} else {
                        		tmp = 1.0 * (x * 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 (x <= 7.5d-48) then
                                tmp = (t * 4.0d0) * y
                            else
                                tmp = 1.0d0 * (x * x)
                            end if
                            code = tmp
                        end function
                        
                        public static double code(double x, double y, double z, double t) {
                        	double tmp;
                        	if (x <= 7.5e-48) {
                        		tmp = (t * 4.0) * y;
                        	} else {
                        		tmp = 1.0 * (x * x);
                        	}
                        	return tmp;
                        }
                        
                        def code(x, y, z, t):
                        	tmp = 0
                        	if x <= 7.5e-48:
                        		tmp = (t * 4.0) * y
                        	else:
                        		tmp = 1.0 * (x * x)
                        	return tmp
                        
                        function code(x, y, z, t)
                        	tmp = 0.0
                        	if (x <= 7.5e-48)
                        		tmp = Float64(Float64(t * 4.0) * y);
                        	else
                        		tmp = Float64(1.0 * Float64(x * x));
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(x, y, z, t)
                        	tmp = 0.0;
                        	if (x <= 7.5e-48)
                        		tmp = (t * 4.0) * y;
                        	else
                        		tmp = 1.0 * (x * x);
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[x_, y_, z_, t_] := If[LessEqual[x, 7.5e-48], N[(N[(t * 4.0), $MachinePrecision] * y), $MachinePrecision], N[(1.0 * N[(x * x), $MachinePrecision]), $MachinePrecision]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;x \leq 7.5 \cdot 10^{-48}:\\
                        \;\;\;\;\left(t \cdot 4\right) \cdot y\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;1 \cdot \left(x \cdot x\right)\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if x < 7.50000000000000042e-48

                          1. Initial program 91.3%

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

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

                              \[\leadsto \color{blue}{\left(t \cdot y\right) \cdot 4} \]
                            2. lower-*.f64N/A

                              \[\leadsto \color{blue}{\left(t \cdot y\right) \cdot 4} \]
                            3. lower-*.f6438.8

                              \[\leadsto \color{blue}{\left(t \cdot y\right)} \cdot 4 \]
                          5. Applied rewrites38.8%

                            \[\leadsto \color{blue}{\left(t \cdot y\right) \cdot 4} \]
                          6. Step-by-step derivation
                            1. Applied rewrites38.9%

                              \[\leadsto \left(t \cdot 4\right) \cdot \color{blue}{y} \]

                            if 7.50000000000000042e-48 < x

                            1. Initial program 92.8%

                              \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
                            2. Add Preprocessing
                            3. Step-by-step derivation
                              1. unpow1N/A

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

                                \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({z}^{\color{blue}{\left(\frac{2}{2}\right)}} \cdot z - t\right) \]
                              3. sqrt-pow1N/A

                                \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{\sqrt{{z}^{2}}} \cdot z - t\right) \]
                              4. pow2N/A

                                \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\sqrt{\color{blue}{z \cdot z}} \cdot z - t\right) \]
                              5. sqr-neg-revN/A

                                \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\sqrt{\color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot \left(\mathsf{neg}\left(z\right)\right)}} \cdot z - t\right) \]
                              6. sqrt-prodN/A

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

                                \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{\left(\sqrt{\mathsf{neg}\left(z\right)} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right)} \cdot z - t\right) \]
                              8. pow1/2N/A

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

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

                                \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left(\mathsf{neg}\left(z\right)\right)}^{\left(\color{blue}{\frac{2}{2}} \cdot \frac{1}{2}\right)} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                              11. pow-powN/A

                                \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left(\color{blue}{{\left({\left(\mathsf{neg}\left(z\right)\right)}^{\left(\frac{2}{2}\right)}\right)}^{\frac{1}{2}}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                              12. sqrt-pow1N/A

                                \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\color{blue}{\left(\sqrt{{\left(\mathsf{neg}\left(z\right)\right)}^{2}}\right)}}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                              13. pow2N/A

                                \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left(\sqrt{\color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot \left(\mathsf{neg}\left(z\right)\right)}}\right)}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                              14. sqr-neg-revN/A

                                \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left(\sqrt{\color{blue}{z \cdot z}}\right)}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                              15. pow2N/A

                                \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left(\sqrt{\color{blue}{{z}^{2}}}\right)}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                              16. sqrt-pow1N/A

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

                                \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({\left({z}^{\color{blue}{1}}\right)}^{\frac{1}{2}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                              18. unpow1N/A

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

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

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

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

                                \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left({z}^{\color{blue}{\frac{1}{2}}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                              23. pow1/2N/A

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

                                \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left(\color{blue}{\sqrt{z}} \cdot \sqrt{\mathsf{neg}\left(z\right)}\right) \cdot z - t\right) \]
                              25. pow1/2N/A

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

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

                                \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left(\sqrt{z} \cdot {\left(\mathsf{neg}\left(z\right)\right)}^{\left(\color{blue}{\frac{2}{2}} \cdot \frac{1}{2}\right)}\right) \cdot z - t\right) \]
                              28. pow-powN/A

                                \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\left(\sqrt{z} \cdot \color{blue}{{\left({\left(\mathsf{neg}\left(z\right)\right)}^{\left(\frac{2}{2}\right)}\right)}^{\frac{1}{2}}}\right) \cdot z - t\right) \]
                            4. Applied rewrites47.7%

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

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

                                \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)} \cdot z - t\right) \]
                              3. pow2N/A

                                \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{{\left(\sqrt{z}\right)}^{2}} \cdot z - t\right) \]
                              4. rem-square-sqrtN/A

                                \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{2} \cdot \color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)} - t\right) \]
                              5. lift-sqrt.f64N/A

                                \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{2} \cdot \left(\color{blue}{\sqrt{z}} \cdot \sqrt{z}\right) - t\right) \]
                              6. lift-sqrt.f64N/A

                                \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{2} \cdot \left(\sqrt{z} \cdot \color{blue}{\sqrt{z}}\right) - t\right) \]
                              7. pow2N/A

                                \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{2} \cdot \color{blue}{{\left(\sqrt{z}\right)}^{2}} - t\right) \]
                              8. pow-sqrN/A

                                \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{{\left(\sqrt{z}\right)}^{\left(2 \cdot 2\right)}} - t\right) \]
                              9. metadata-evalN/A

                                \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left({\left(\sqrt{z}\right)}^{\color{blue}{4}} - t\right) \]
                              10. lower-pow.f6447.7

                                \[\leadsto x \cdot x - \left(y \cdot 4\right) \cdot \left(\color{blue}{{\left(\sqrt{z}\right)}^{4}} - t\right) \]
                            6. Applied rewrites47.7%

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left({z}^{2} - t\right) \cdot -4}}{x}, \frac{y}{x}, 1\right) \cdot {x}^{2} \]
                              12. lower-*.f64N/A

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

                                \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left({z}^{2} - t\right)} \cdot -4}{x}, \frac{y}{x}, 1\right) \cdot {x}^{2} \]
                              14. unpow2N/A

                                \[\leadsto \mathsf{fma}\left(\frac{\left(\color{blue}{z \cdot z} - t\right) \cdot -4}{x}, \frac{y}{x}, 1\right) \cdot {x}^{2} \]
                              15. lower-*.f64N/A

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

                                \[\leadsto \mathsf{fma}\left(\frac{\left(z \cdot z - t\right) \cdot -4}{x}, \color{blue}{\frac{y}{x}}, 1\right) \cdot {x}^{2} \]
                              17. unpow2N/A

                                \[\leadsto \mathsf{fma}\left(\frac{\left(z \cdot z - t\right) \cdot -4}{x}, \frac{y}{x}, 1\right) \cdot \color{blue}{\left(x \cdot x\right)} \]
                              18. lower-*.f6494.2

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

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

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

                                \[\leadsto 1 \cdot \left(\color{blue}{x} \cdot x\right) \]
                            12. Recombined 2 regimes into one program.
                            13. Add Preprocessing

                            Alternative 8: 31.9% accurate, 2.5× speedup?

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

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

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

                                \[\leadsto \color{blue}{\left(t \cdot y\right) \cdot 4} \]
                              2. lower-*.f64N/A

                                \[\leadsto \color{blue}{\left(t \cdot y\right) \cdot 4} \]
                              3. lower-*.f6434.6

                                \[\leadsto \color{blue}{\left(t \cdot y\right)} \cdot 4 \]
                            5. Applied rewrites34.6%

                              \[\leadsto \color{blue}{\left(t \cdot y\right) \cdot 4} \]
                            6. Step-by-step derivation
                              1. Applied rewrites34.6%

                                \[\leadsto \left(t \cdot 4\right) \cdot \color{blue}{y} \]
                              2. Add Preprocessing

                              Alternative 9: 5.3% accurate, 3.4× speedup?

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

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

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

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

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

                                  \[\leadsto \color{blue}{4 \cdot \left(t \cdot y\right) + {x}^{2}} \]
                                4. *-rgt-identityN/A

                                  \[\leadsto 4 \cdot \left(t \cdot y\right) + \color{blue}{{x}^{2} \cdot 1} \]
                                5. unpow2N/A

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

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

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

                                  \[\leadsto 4 \cdot \left(t \cdot y\right) - \color{blue}{\left(\mathsf{neg}\left(x \cdot \left(x \cdot 1\right)\right)\right)} \]
                                9. associate-*l*N/A

                                  \[\leadsto 4 \cdot \left(t \cdot y\right) - \left(\mathsf{neg}\left(\color{blue}{\left(x \cdot x\right) \cdot 1}\right)\right) \]
                                10. unpow2N/A

                                  \[\leadsto 4 \cdot \left(t \cdot y\right) - \left(\mathsf{neg}\left(\color{blue}{{x}^{2}} \cdot 1\right)\right) \]
                                11. *-rgt-identityN/A

                                  \[\leadsto 4 \cdot \left(t \cdot y\right) - \left(\mathsf{neg}\left(\color{blue}{{x}^{2}}\right)\right) \]
                                12. mul-1-negN/A

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

                                  \[\leadsto 4 \cdot \left(t \cdot y\right) - \color{blue}{{x}^{2} \cdot -1} \]
                                14. unpow2N/A

                                  \[\leadsto 4 \cdot \left(t \cdot y\right) - \color{blue}{\left(x \cdot x\right)} \cdot -1 \]
                                15. sqr-neg-revN/A

                                  \[\leadsto 4 \cdot \left(t \cdot y\right) - \color{blue}{\left(\left(\mathsf{neg}\left(x\right)\right) \cdot \left(\mathsf{neg}\left(x\right)\right)\right)} \cdot -1 \]
                                16. distribute-lft-neg-outN/A

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

                                  \[\leadsto 4 \cdot \left(t \cdot y\right) - \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(x \cdot x\right)\right)}\right)\right) \cdot -1 \]
                                18. unpow2N/A

                                  \[\leadsto 4 \cdot \left(t \cdot y\right) - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\color{blue}{{x}^{2}}\right)\right)\right)\right) \cdot -1 \]
                                19. mul-1-negN/A

                                  \[\leadsto 4 \cdot \left(t \cdot y\right) - \left(\mathsf{neg}\left(\color{blue}{-1 \cdot {x}^{2}}\right)\right) \cdot -1 \]
                                20. fp-cancel-sign-subN/A

                                  \[\leadsto \color{blue}{4 \cdot \left(t \cdot y\right) + \left(-1 \cdot {x}^{2}\right) \cdot -1} \]
                                21. *-commutativeN/A

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

                                  \[\leadsto \left(t \cdot y\right) \cdot 4 + \color{blue}{\left(\mathsf{neg}\left({x}^{2}\right)\right)} \cdot -1 \]
                                23. distribute-lft-neg-outN/A

                                  \[\leadsto \left(t \cdot y\right) \cdot 4 + \color{blue}{\left(\mathsf{neg}\left({x}^{2} \cdot -1\right)\right)} \]
                                24. *-commutativeN/A

                                  \[\leadsto \left(t \cdot y\right) \cdot 4 + \left(\mathsf{neg}\left(\color{blue}{-1 \cdot {x}^{2}}\right)\right) \]
                              5. Applied rewrites68.2%

                                \[\leadsto \color{blue}{\mathsf{fma}\left(t \cdot y, 4, x \cdot x\right)} \]
                              6. Step-by-step derivation
                                1. Applied rewrites69.0%

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

                                    \[\leadsto \mathsf{fma}\left(t \cdot 4, y, \left(\sqrt{x} \cdot \left(-\sqrt{x}\right)\right) \cdot x\right) \]
                                  2. Taylor expanded in x around -inf

                                    \[\leadsto {x}^{2} \cdot \color{blue}{{\left(\sqrt{-1}\right)}^{2}} \]
                                  3. Step-by-step derivation
                                    1. Applied rewrites4.8%

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

                                    Developer Target 1: 90.0% accurate, 1.0× speedup?

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

                                    Reproduce

                                    ?
                                    herbie shell --seed 2024354 
                                    (FPCore (x y z t)
                                      :name "Graphics.Rasterific.Shading:$sradialGradientWithFocusShader from Rasterific-0.6.1, B"
                                      :precision binary64
                                    
                                      :alt
                                      (! :herbie-platform default (- (* x x) (* 4 (* y (- (* z z) t)))))
                                    
                                      (- (* x x) (* (* y 4.0) (- (* z z) t))))