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

Percentage Accurate: 90.7% → 96.9%
Time: 3.6s
Alternatives: 9
Speedup: 0.8×

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}

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.7% 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: 96.9% accurate, 0.8× speedup?

\[\begin{array}{l} z_m = \left|z\right| \\ \begin{array}{l} \mathbf{if}\;z\_m \leq 7 \cdot 10^{+143}:\\ \;\;\;\;\mathsf{fma}\left(z\_m \cdot z\_m - t, -4 \cdot y, x \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(z\_m \cdot \left(z\_m \cdot y\right), -4, x \cdot x\right)\\ \end{array} \end{array} \]
z_m = (fabs.f64 z)
(FPCore (x y z_m t)
 :precision binary64
 (if (<= z_m 7e+143)
   (fma (- (* z_m z_m) t) (* -4.0 y) (* x x))
   (fma (* z_m (* z_m y)) -4.0 (* x x))))
z_m = fabs(z);
double code(double x, double y, double z_m, double t) {
	double tmp;
	if (z_m <= 7e+143) {
		tmp = fma(((z_m * z_m) - t), (-4.0 * y), (x * x));
	} else {
		tmp = fma((z_m * (z_m * y)), -4.0, (x * x));
	}
	return tmp;
}
z_m = abs(z)
function code(x, y, z_m, t)
	tmp = 0.0
	if (z_m <= 7e+143)
		tmp = fma(Float64(Float64(z_m * z_m) - t), Float64(-4.0 * y), Float64(x * x));
	else
		tmp = fma(Float64(z_m * Float64(z_m * y)), -4.0, Float64(x * x));
	end
	return tmp
end
z_m = N[Abs[z], $MachinePrecision]
code[x_, y_, z$95$m_, t_] := If[LessEqual[z$95$m, 7e+143], N[(N[(N[(z$95$m * z$95$m), $MachinePrecision] - t), $MachinePrecision] * N[(-4.0 * y), $MachinePrecision] + N[(x * x), $MachinePrecision]), $MachinePrecision], N[(N[(z$95$m * N[(z$95$m * y), $MachinePrecision]), $MachinePrecision] * -4.0 + N[(x * x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
z_m = \left|z\right|

\\
\begin{array}{l}
\mathbf{if}\;z\_m \leq 7 \cdot 10^{+143}:\\
\;\;\;\;\mathsf{fma}\left(z\_m \cdot z\_m - t, -4 \cdot y, x \cdot x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 7.00000000000000017e143

    1. Initial program 90.7%

      \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z \cdot z - t, -4 \cdot y, \color{blue}{x \cdot x}\right) \]
      22. lift-*.f6492.0

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

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

    if 7.00000000000000017e143 < z

    1. Initial program 90.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(y \cdot {z}^{2}\right) \cdot -4 + \left(\mathsf{neg}\left({x}^{2} \cdot -1\right)\right) \]
      9. distribute-rgt-neg-outN/A

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

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

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

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

        \[\leadsto \mathsf{fma}\left({z}^{2} \cdot y, -4, {x}^{2}\right) \]
      14. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left({z}^{2} \cdot y, -4, {x}^{2}\right) \]
      15. pow2N/A

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, {x}^{2}\right) \]
      16. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, {x}^{2}\right) \]
      17. pow2N/A

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, x \cdot x\right) \]
      18. lift-*.f6467.4

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, x \cdot x\right) \]
    4. Applied rewrites67.4%

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

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

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, x \cdot x\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(z \cdot \left(z \cdot y\right), -4, x \cdot x\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot \left(y \cdot z\right), -4, x \cdot x\right) \]
      5. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot \left(y \cdot z\right), -4, x \cdot x\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot \left(z \cdot y\right), -4, x \cdot x\right) \]
      7. lower-*.f6472.3

        \[\leadsto \mathsf{fma}\left(z \cdot \left(z \cdot y\right), -4, x \cdot x\right) \]
    6. Applied rewrites72.3%

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

Alternative 2: 96.2% accurate, 0.8× speedup?

\[\begin{array}{l} z_m = \left|z\right| \\ \begin{array}{l} \mathbf{if}\;z\_m \leq 6.8 \cdot 10^{+143}:\\ \;\;\;\;\mathsf{fma}\left(x, x, \left(t - z\_m \cdot z\_m\right) \cdot \left(4 \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(z\_m \cdot \left(z\_m \cdot y\right), -4, x \cdot x\right)\\ \end{array} \end{array} \]
z_m = (fabs.f64 z)
(FPCore (x y z_m t)
 :precision binary64
 (if (<= z_m 6.8e+143)
   (fma x x (* (- t (* z_m z_m)) (* 4.0 y)))
   (fma (* z_m (* z_m y)) -4.0 (* x x))))
z_m = fabs(z);
double code(double x, double y, double z_m, double t) {
	double tmp;
	if (z_m <= 6.8e+143) {
		tmp = fma(x, x, ((t - (z_m * z_m)) * (4.0 * y)));
	} else {
		tmp = fma((z_m * (z_m * y)), -4.0, (x * x));
	}
	return tmp;
}
z_m = abs(z)
function code(x, y, z_m, t)
	tmp = 0.0
	if (z_m <= 6.8e+143)
		tmp = fma(x, x, Float64(Float64(t - Float64(z_m * z_m)) * Float64(4.0 * y)));
	else
		tmp = fma(Float64(z_m * Float64(z_m * y)), -4.0, Float64(x * x));
	end
	return tmp
end
z_m = N[Abs[z], $MachinePrecision]
code[x_, y_, z$95$m_, t_] := If[LessEqual[z$95$m, 6.8e+143], N[(x * x + N[(N[(t - N[(z$95$m * z$95$m), $MachinePrecision]), $MachinePrecision] * N[(4.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z$95$m * N[(z$95$m * y), $MachinePrecision]), $MachinePrecision] * -4.0 + N[(x * x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
z_m = \left|z\right|

\\
\begin{array}{l}
\mathbf{if}\;z\_m \leq 6.8 \cdot 10^{+143}:\\
\;\;\;\;\mathsf{fma}\left(x, x, \left(t - z\_m \cdot z\_m\right) \cdot \left(4 \cdot y\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 6.79999999999999964e143

    1. Initial program 90.7%

      \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(z \cdot z - t\right) \cdot \left(-4 \cdot y\right)}\right) \]
      18. metadata-evalN/A

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

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

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

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

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

    if 6.79999999999999964e143 < z

    1. Initial program 90.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(y \cdot {z}^{2}\right) \cdot -4 + \left(\mathsf{neg}\left({x}^{2} \cdot -1\right)\right) \]
      9. distribute-rgt-neg-outN/A

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

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

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

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

        \[\leadsto \mathsf{fma}\left({z}^{2} \cdot y, -4, {x}^{2}\right) \]
      14. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left({z}^{2} \cdot y, -4, {x}^{2}\right) \]
      15. pow2N/A

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, {x}^{2}\right) \]
      16. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, {x}^{2}\right) \]
      17. pow2N/A

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, x \cdot x\right) \]
      18. lift-*.f6467.4

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, x \cdot x\right) \]
    4. Applied rewrites67.4%

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

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

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, x \cdot x\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(z \cdot \left(z \cdot y\right), -4, x \cdot x\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot \left(y \cdot z\right), -4, x \cdot x\right) \]
      5. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot \left(y \cdot z\right), -4, x \cdot x\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot \left(z \cdot y\right), -4, x \cdot x\right) \]
      7. lower-*.f6472.3

        \[\leadsto \mathsf{fma}\left(z \cdot \left(z \cdot y\right), -4, x \cdot x\right) \]
    6. Applied rewrites72.3%

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

Alternative 3: 90.7% accurate, 1.0× speedup?

\[\begin{array}{l} z_m = \left|z\right| \\ \begin{array}{l} \mathbf{if}\;z\_m \leq 6.8 \cdot 10^{+31}:\\ \;\;\;\;\mathsf{fma}\left(t \cdot 4, y, x \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(z\_m \cdot \left(z\_m \cdot y\right), -4, x \cdot x\right)\\ \end{array} \end{array} \]
z_m = (fabs.f64 z)
(FPCore (x y z_m t)
 :precision binary64
 (if (<= z_m 6.8e+31)
   (fma (* t 4.0) y (* x x))
   (fma (* z_m (* z_m y)) -4.0 (* x x))))
z_m = fabs(z);
double code(double x, double y, double z_m, double t) {
	double tmp;
	if (z_m <= 6.8e+31) {
		tmp = fma((t * 4.0), y, (x * x));
	} else {
		tmp = fma((z_m * (z_m * y)), -4.0, (x * x));
	}
	return tmp;
}
z_m = abs(z)
function code(x, y, z_m, t)
	tmp = 0.0
	if (z_m <= 6.8e+31)
		tmp = fma(Float64(t * 4.0), y, Float64(x * x));
	else
		tmp = fma(Float64(z_m * Float64(z_m * y)), -4.0, Float64(x * x));
	end
	return tmp
end
z_m = N[Abs[z], $MachinePrecision]
code[x_, y_, z$95$m_, t_] := If[LessEqual[z$95$m, 6.8e+31], N[(N[(t * 4.0), $MachinePrecision] * y + N[(x * x), $MachinePrecision]), $MachinePrecision], N[(N[(z$95$m * N[(z$95$m * y), $MachinePrecision]), $MachinePrecision] * -4.0 + N[(x * x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
z_m = \left|z\right|

\\
\begin{array}{l}
\mathbf{if}\;z\_m \leq 6.8 \cdot 10^{+31}:\\
\;\;\;\;\mathsf{fma}\left(t \cdot 4, y, x \cdot x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 6.7999999999999996e31

    1. Initial program 90.7%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(t \cdot y, 4, {x}^{2}\right) \]
      7. pow2N/A

        \[\leadsto \mathsf{fma}\left(t \cdot y, 4, x \cdot x\right) \]
      8. lift-*.f6466.0

        \[\leadsto \mathsf{fma}\left(t \cdot y, 4, x \cdot x\right) \]
    4. Applied rewrites66.0%

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

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

        \[\leadsto \mathsf{fma}\left(t \cdot y, 4, x \cdot x\right) \]
      3. lift-fma.f64N/A

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

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

        \[\leadsto \left(4 \cdot t\right) \cdot y + \color{blue}{x} \cdot x \]
      6. pow2N/A

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

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

        \[\leadsto \mathsf{fma}\left(t \cdot 4, y, {x}^{2}\right) \]
      9. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(t \cdot 4, y, {x}^{2}\right) \]
      10. pow2N/A

        \[\leadsto \mathsf{fma}\left(t \cdot 4, y, x \cdot x\right) \]
      11. lift-*.f6467.0

        \[\leadsto \mathsf{fma}\left(t \cdot 4, y, x \cdot x\right) \]
    6. Applied rewrites67.0%

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

    if 6.7999999999999996e31 < z

    1. Initial program 90.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(y \cdot {z}^{2}\right) \cdot -4 + \left(\mathsf{neg}\left({x}^{2} \cdot -1\right)\right) \]
      9. distribute-rgt-neg-outN/A

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

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

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

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

        \[\leadsto \mathsf{fma}\left({z}^{2} \cdot y, -4, {x}^{2}\right) \]
      14. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left({z}^{2} \cdot y, -4, {x}^{2}\right) \]
      15. pow2N/A

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, {x}^{2}\right) \]
      16. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, {x}^{2}\right) \]
      17. pow2N/A

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, x \cdot x\right) \]
      18. lift-*.f6467.4

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, x \cdot x\right) \]
    4. Applied rewrites67.4%

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

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

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, x \cdot x\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(z \cdot \left(z \cdot y\right), -4, x \cdot x\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot \left(y \cdot z\right), -4, x \cdot x\right) \]
      5. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot \left(y \cdot z\right), -4, x \cdot x\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot \left(z \cdot y\right), -4, x \cdot x\right) \]
      7. lower-*.f6472.3

        \[\leadsto \mathsf{fma}\left(z \cdot \left(z \cdot y\right), -4, x \cdot x\right) \]
    6. Applied rewrites72.3%

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

Alternative 4: 90.6% accurate, 0.8× speedup?

\[\begin{array}{l} z_m = \left|z\right| \\ \begin{array}{l} \mathbf{if}\;z\_m \leq 6.8 \cdot 10^{+31}:\\ \;\;\;\;\mathsf{fma}\left(t \cdot 4, y, x \cdot x\right)\\ \mathbf{elif}\;z\_m \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;\mathsf{fma}\left(x, x, \left(\left(z\_m \cdot z\_m\right) \cdot y\right) \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(z\_m \cdot y\right) \cdot z\_m\right) \cdot -4\\ \end{array} \end{array} \]
z_m = (fabs.f64 z)
(FPCore (x y z_m t)
 :precision binary64
 (if (<= z_m 6.8e+31)
   (fma (* t 4.0) y (* x x))
   (if (<= z_m 1.35e+154)
     (fma x x (* (* (* z_m z_m) y) -4.0))
     (* (* (* z_m y) z_m) -4.0))))
z_m = fabs(z);
double code(double x, double y, double z_m, double t) {
	double tmp;
	if (z_m <= 6.8e+31) {
		tmp = fma((t * 4.0), y, (x * x));
	} else if (z_m <= 1.35e+154) {
		tmp = fma(x, x, (((z_m * z_m) * y) * -4.0));
	} else {
		tmp = ((z_m * y) * z_m) * -4.0;
	}
	return tmp;
}
z_m = abs(z)
function code(x, y, z_m, t)
	tmp = 0.0
	if (z_m <= 6.8e+31)
		tmp = fma(Float64(t * 4.0), y, Float64(x * x));
	elseif (z_m <= 1.35e+154)
		tmp = fma(x, x, Float64(Float64(Float64(z_m * z_m) * y) * -4.0));
	else
		tmp = Float64(Float64(Float64(z_m * y) * z_m) * -4.0);
	end
	return tmp
end
z_m = N[Abs[z], $MachinePrecision]
code[x_, y_, z$95$m_, t_] := If[LessEqual[z$95$m, 6.8e+31], N[(N[(t * 4.0), $MachinePrecision] * y + N[(x * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z$95$m, 1.35e+154], N[(x * x + N[(N[(N[(z$95$m * z$95$m), $MachinePrecision] * y), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z$95$m * y), $MachinePrecision] * z$95$m), $MachinePrecision] * -4.0), $MachinePrecision]]]
\begin{array}{l}
z_m = \left|z\right|

\\
\begin{array}{l}
\mathbf{if}\;z\_m \leq 6.8 \cdot 10^{+31}:\\
\;\;\;\;\mathsf{fma}\left(t \cdot 4, y, x \cdot x\right)\\

\mathbf{elif}\;z\_m \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;\mathsf{fma}\left(x, x, \left(\left(z\_m \cdot z\_m\right) \cdot y\right) \cdot -4\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\left(z\_m \cdot y\right) \cdot z\_m\right) \cdot -4\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < 6.7999999999999996e31

    1. Initial program 90.7%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(t \cdot y, 4, {x}^{2}\right) \]
      7. pow2N/A

        \[\leadsto \mathsf{fma}\left(t \cdot y, 4, x \cdot x\right) \]
      8. lift-*.f6466.0

        \[\leadsto \mathsf{fma}\left(t \cdot y, 4, x \cdot x\right) \]
    4. Applied rewrites66.0%

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

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

        \[\leadsto \mathsf{fma}\left(t \cdot y, 4, x \cdot x\right) \]
      3. lift-fma.f64N/A

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

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

        \[\leadsto \left(4 \cdot t\right) \cdot y + \color{blue}{x} \cdot x \]
      6. pow2N/A

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

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

        \[\leadsto \mathsf{fma}\left(t \cdot 4, y, {x}^{2}\right) \]
      9. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(t \cdot 4, y, {x}^{2}\right) \]
      10. pow2N/A

        \[\leadsto \mathsf{fma}\left(t \cdot 4, y, x \cdot x\right) \]
      11. lift-*.f6467.0

        \[\leadsto \mathsf{fma}\left(t \cdot 4, y, x \cdot x\right) \]
    6. Applied rewrites67.0%

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

    if 6.7999999999999996e31 < z < 1.35000000000000003e154

    1. Initial program 90.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(y \cdot {z}^{2}\right) \cdot -4 + \left(\mathsf{neg}\left({x}^{2} \cdot -1\right)\right) \]
      9. distribute-rgt-neg-outN/A

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

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

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

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

        \[\leadsto \mathsf{fma}\left({z}^{2} \cdot y, -4, {x}^{2}\right) \]
      14. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left({z}^{2} \cdot y, -4, {x}^{2}\right) \]
      15. pow2N/A

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, {x}^{2}\right) \]
      16. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, {x}^{2}\right) \]
      17. pow2N/A

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, x \cdot x\right) \]
      18. lift-*.f6467.4

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, x \cdot x\right) \]
    4. Applied rewrites67.4%

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

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

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

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

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

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

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

        \[\leadsto x \cdot x + -4 \cdot \left(\left(z \cdot z\right) \cdot y\right) \]
      8. lift-*.f64N/A

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x, x, \left(y \cdot {z}^{2}\right) \cdot -4\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(x, x, \left({z}^{2} \cdot y\right) \cdot -4\right) \]
      15. pow2N/A

        \[\leadsto \mathsf{fma}\left(x, x, \left(\left(z \cdot z\right) \cdot y\right) \cdot -4\right) \]
      16. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(x, x, \left(\left(z \cdot z\right) \cdot y\right) \cdot -4\right) \]
      17. lift-*.f6469.5

        \[\leadsto \mathsf{fma}\left(x, x, \left(\left(z \cdot z\right) \cdot y\right) \cdot -4\right) \]
    6. Applied rewrites69.5%

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

    if 1.35000000000000003e154 < z

    1. Initial program 90.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(y \cdot {z}^{2}\right) \cdot -4 + \left(\mathsf{neg}\left({x}^{2} \cdot -1\right)\right) \]
      9. distribute-rgt-neg-outN/A

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

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

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

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

        \[\leadsto \mathsf{fma}\left({z}^{2} \cdot y, -4, {x}^{2}\right) \]
      14. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left({z}^{2} \cdot y, -4, {x}^{2}\right) \]
      15. pow2N/A

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, {x}^{2}\right) \]
      16. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, {x}^{2}\right) \]
      17. pow2N/A

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, x \cdot x\right) \]
      18. lift-*.f6467.4

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, x \cdot x\right) \]
    4. Applied rewrites67.4%

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

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

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, x \cdot x\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(z \cdot \left(z \cdot y\right), -4, x \cdot x\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot \left(y \cdot z\right), -4, x \cdot x\right) \]
      5. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot \left(y \cdot z\right), -4, x \cdot x\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot \left(z \cdot y\right), -4, x \cdot x\right) \]
      7. lower-*.f6472.3

        \[\leadsto \mathsf{fma}\left(z \cdot \left(z \cdot y\right), -4, x \cdot x\right) \]
    6. Applied rewrites72.3%

      \[\leadsto \mathsf{fma}\left(z \cdot \left(z \cdot y\right), -4, x \cdot x\right) \]
    7. Taylor expanded in x around 0

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

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

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

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

        \[\leadsto \left(\left(z \cdot z\right) \cdot y\right) \cdot -4 \]
      5. associate-*r*N/A

        \[\leadsto \left(z \cdot \left(z \cdot y\right)\right) \cdot -4 \]
      6. *-commutativeN/A

        \[\leadsto \left(\left(z \cdot y\right) \cdot z\right) \cdot -4 \]
      7. lower-*.f64N/A

        \[\leadsto \left(\left(z \cdot y\right) \cdot z\right) \cdot -4 \]
      8. lift-*.f6440.8

        \[\leadsto \left(\left(z \cdot y\right) \cdot z\right) \cdot -4 \]
    9. Applied rewrites40.8%

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

Alternative 5: 85.7% accurate, 0.6× speedup?

\[\begin{array}{l} z_m = \left|z\right| \\ \begin{array}{l} t_1 := z\_m \cdot z\_m - t\\ \mathbf{if}\;t\_1 \leq 10^{+93}:\\ \;\;\;\;\mathsf{fma}\left(t \cdot 4, y, x \cdot x\right)\\ \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+304}:\\ \;\;\;\;\left(t - z\_m \cdot z\_m\right) \cdot \left(4 \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(z\_m \cdot y\right) \cdot z\_m\right) \cdot -4\\ \end{array} \end{array} \]
z_m = (fabs.f64 z)
(FPCore (x y z_m t)
 :precision binary64
 (let* ((t_1 (- (* z_m z_m) t)))
   (if (<= t_1 1e+93)
     (fma (* t 4.0) y (* x x))
     (if (<= t_1 4e+304)
       (* (- t (* z_m z_m)) (* 4.0 y))
       (* (* (* z_m y) z_m) -4.0)))))
z_m = fabs(z);
double code(double x, double y, double z_m, double t) {
	double t_1 = (z_m * z_m) - t;
	double tmp;
	if (t_1 <= 1e+93) {
		tmp = fma((t * 4.0), y, (x * x));
	} else if (t_1 <= 4e+304) {
		tmp = (t - (z_m * z_m)) * (4.0 * y);
	} else {
		tmp = ((z_m * y) * z_m) * -4.0;
	}
	return tmp;
}
z_m = abs(z)
function code(x, y, z_m, t)
	t_1 = Float64(Float64(z_m * z_m) - t)
	tmp = 0.0
	if (t_1 <= 1e+93)
		tmp = fma(Float64(t * 4.0), y, Float64(x * x));
	elseif (t_1 <= 4e+304)
		tmp = Float64(Float64(t - Float64(z_m * z_m)) * Float64(4.0 * y));
	else
		tmp = Float64(Float64(Float64(z_m * y) * z_m) * -4.0);
	end
	return tmp
end
z_m = N[Abs[z], $MachinePrecision]
code[x_, y_, z$95$m_, t_] := Block[{t$95$1 = N[(N[(z$95$m * z$95$m), $MachinePrecision] - t), $MachinePrecision]}, If[LessEqual[t$95$1, 1e+93], N[(N[(t * 4.0), $MachinePrecision] * y + N[(x * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e+304], N[(N[(t - N[(z$95$m * z$95$m), $MachinePrecision]), $MachinePrecision] * N[(4.0 * y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z$95$m * y), $MachinePrecision] * z$95$m), $MachinePrecision] * -4.0), $MachinePrecision]]]]
\begin{array}{l}
z_m = \left|z\right|

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

\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+304}:\\
\;\;\;\;\left(t - z\_m \cdot z\_m\right) \cdot \left(4 \cdot y\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\left(z\_m \cdot y\right) \cdot z\_m\right) \cdot -4\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (-.f64 (*.f64 z z) t) < 1.00000000000000004e93

    1. Initial program 90.7%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(t \cdot y, 4, {x}^{2}\right) \]
      7. pow2N/A

        \[\leadsto \mathsf{fma}\left(t \cdot y, 4, x \cdot x\right) \]
      8. lift-*.f6466.0

        \[\leadsto \mathsf{fma}\left(t \cdot y, 4, x \cdot x\right) \]
    4. Applied rewrites66.0%

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

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

        \[\leadsto \mathsf{fma}\left(t \cdot y, 4, x \cdot x\right) \]
      3. lift-fma.f64N/A

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

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

        \[\leadsto \left(4 \cdot t\right) \cdot y + \color{blue}{x} \cdot x \]
      6. pow2N/A

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

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

        \[\leadsto \mathsf{fma}\left(t \cdot 4, y, {x}^{2}\right) \]
      9. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(t \cdot 4, y, {x}^{2}\right) \]
      10. pow2N/A

        \[\leadsto \mathsf{fma}\left(t \cdot 4, y, x \cdot x\right) \]
      11. lift-*.f6467.0

        \[\leadsto \mathsf{fma}\left(t \cdot 4, y, x \cdot x\right) \]
    6. Applied rewrites67.0%

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

    if 1.00000000000000004e93 < (-.f64 (*.f64 z z) t) < 3.9999999999999998e304

    1. Initial program 90.7%

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

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

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

        \[\leadsto \left(-4 \cdot y\right) \cdot \left(z \cdot z - t\right) \]
      3. *-commutativeN/A

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

        \[\leadsto \left(z \cdot z - t\right) \cdot \left(\left(\mathsf{neg}\left(4\right)\right) \cdot y\right) \]
      5. distribute-lft-neg-outN/A

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

        \[\leadsto \mathsf{neg}\left(\left(z \cdot z - t\right) \cdot \left(4 \cdot y\right)\right) \]
      7. distribute-lft-neg-inN/A

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

        \[\leadsto \left(\mathsf{neg}\left(\left({z}^{2} - t\right)\right)\right) \cdot \left(4 \cdot y\right) \]
      9. sub-negate-revN/A

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

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

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

        \[\leadsto \left(t - z \cdot z\right) \cdot \left(4 \cdot y\right) \]
      13. lift-*.f64N/A

        \[\leadsto \left(t - z \cdot z\right) \cdot \left(4 \cdot y\right) \]
      14. lower-*.f6462.8

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

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

    if 3.9999999999999998e304 < (-.f64 (*.f64 z z) t)

    1. Initial program 90.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(y \cdot {z}^{2}\right) \cdot -4 + \left(\mathsf{neg}\left({x}^{2} \cdot -1\right)\right) \]
      9. distribute-rgt-neg-outN/A

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

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

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

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

        \[\leadsto \mathsf{fma}\left({z}^{2} \cdot y, -4, {x}^{2}\right) \]
      14. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left({z}^{2} \cdot y, -4, {x}^{2}\right) \]
      15. pow2N/A

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, {x}^{2}\right) \]
      16. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, {x}^{2}\right) \]
      17. pow2N/A

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, x \cdot x\right) \]
      18. lift-*.f6467.4

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, x \cdot x\right) \]
    4. Applied rewrites67.4%

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

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

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, x \cdot x\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(z \cdot \left(z \cdot y\right), -4, x \cdot x\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot \left(y \cdot z\right), -4, x \cdot x\right) \]
      5. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot \left(y \cdot z\right), -4, x \cdot x\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot \left(z \cdot y\right), -4, x \cdot x\right) \]
      7. lower-*.f6472.3

        \[\leadsto \mathsf{fma}\left(z \cdot \left(z \cdot y\right), -4, x \cdot x\right) \]
    6. Applied rewrites72.3%

      \[\leadsto \mathsf{fma}\left(z \cdot \left(z \cdot y\right), -4, x \cdot x\right) \]
    7. Taylor expanded in x around 0

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

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

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

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

        \[\leadsto \left(\left(z \cdot z\right) \cdot y\right) \cdot -4 \]
      5. associate-*r*N/A

        \[\leadsto \left(z \cdot \left(z \cdot y\right)\right) \cdot -4 \]
      6. *-commutativeN/A

        \[\leadsto \left(\left(z \cdot y\right) \cdot z\right) \cdot -4 \]
      7. lower-*.f64N/A

        \[\leadsto \left(\left(z \cdot y\right) \cdot z\right) \cdot -4 \]
      8. lift-*.f6440.8

        \[\leadsto \left(\left(z \cdot y\right) \cdot z\right) \cdot -4 \]
    9. Applied rewrites40.8%

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

Alternative 6: 85.1% accurate, 1.2× speedup?

\[\begin{array}{l} z_m = \left|z\right| \\ \begin{array}{l} \mathbf{if}\;z\_m \leq 1.1 \cdot 10^{+57}:\\ \;\;\;\;\mathsf{fma}\left(t \cdot 4, y, x \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(z\_m \cdot y\right) \cdot z\_m\right) \cdot -4\\ \end{array} \end{array} \]
z_m = (fabs.f64 z)
(FPCore (x y z_m t)
 :precision binary64
 (if (<= z_m 1.1e+57) (fma (* t 4.0) y (* x x)) (* (* (* z_m y) z_m) -4.0)))
z_m = fabs(z);
double code(double x, double y, double z_m, double t) {
	double tmp;
	if (z_m <= 1.1e+57) {
		tmp = fma((t * 4.0), y, (x * x));
	} else {
		tmp = ((z_m * y) * z_m) * -4.0;
	}
	return tmp;
}
z_m = abs(z)
function code(x, y, z_m, t)
	tmp = 0.0
	if (z_m <= 1.1e+57)
		tmp = fma(Float64(t * 4.0), y, Float64(x * x));
	else
		tmp = Float64(Float64(Float64(z_m * y) * z_m) * -4.0);
	end
	return tmp
end
z_m = N[Abs[z], $MachinePrecision]
code[x_, y_, z$95$m_, t_] := If[LessEqual[z$95$m, 1.1e+57], N[(N[(t * 4.0), $MachinePrecision] * y + N[(x * x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z$95$m * y), $MachinePrecision] * z$95$m), $MachinePrecision] * -4.0), $MachinePrecision]]
\begin{array}{l}
z_m = \left|z\right|

\\
\begin{array}{l}
\mathbf{if}\;z\_m \leq 1.1 \cdot 10^{+57}:\\
\;\;\;\;\mathsf{fma}\left(t \cdot 4, y, x \cdot x\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\left(z\_m \cdot y\right) \cdot z\_m\right) \cdot -4\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 1.1e57

    1. Initial program 90.7%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(t \cdot y, 4, {x}^{2}\right) \]
      7. pow2N/A

        \[\leadsto \mathsf{fma}\left(t \cdot y, 4, x \cdot x\right) \]
      8. lift-*.f6466.0

        \[\leadsto \mathsf{fma}\left(t \cdot y, 4, x \cdot x\right) \]
    4. Applied rewrites66.0%

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

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

        \[\leadsto \mathsf{fma}\left(t \cdot y, 4, x \cdot x\right) \]
      3. lift-fma.f64N/A

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

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

        \[\leadsto \left(4 \cdot t\right) \cdot y + \color{blue}{x} \cdot x \]
      6. pow2N/A

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

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

        \[\leadsto \mathsf{fma}\left(t \cdot 4, y, {x}^{2}\right) \]
      9. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(t \cdot 4, y, {x}^{2}\right) \]
      10. pow2N/A

        \[\leadsto \mathsf{fma}\left(t \cdot 4, y, x \cdot x\right) \]
      11. lift-*.f6467.0

        \[\leadsto \mathsf{fma}\left(t \cdot 4, y, x \cdot x\right) \]
    6. Applied rewrites67.0%

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

    if 1.1e57 < z

    1. Initial program 90.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(y \cdot {z}^{2}\right) \cdot -4 + \left(\mathsf{neg}\left({x}^{2} \cdot -1\right)\right) \]
      9. distribute-rgt-neg-outN/A

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

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

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

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

        \[\leadsto \mathsf{fma}\left({z}^{2} \cdot y, -4, {x}^{2}\right) \]
      14. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left({z}^{2} \cdot y, -4, {x}^{2}\right) \]
      15. pow2N/A

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, {x}^{2}\right) \]
      16. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, {x}^{2}\right) \]
      17. pow2N/A

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, x \cdot x\right) \]
      18. lift-*.f6467.4

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, x \cdot x\right) \]
    4. Applied rewrites67.4%

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

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

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, x \cdot x\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(z \cdot \left(z \cdot y\right), -4, x \cdot x\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot \left(y \cdot z\right), -4, x \cdot x\right) \]
      5. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot \left(y \cdot z\right), -4, x \cdot x\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot \left(z \cdot y\right), -4, x \cdot x\right) \]
      7. lower-*.f6472.3

        \[\leadsto \mathsf{fma}\left(z \cdot \left(z \cdot y\right), -4, x \cdot x\right) \]
    6. Applied rewrites72.3%

      \[\leadsto \mathsf{fma}\left(z \cdot \left(z \cdot y\right), -4, x \cdot x\right) \]
    7. Taylor expanded in x around 0

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

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

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

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

        \[\leadsto \left(\left(z \cdot z\right) \cdot y\right) \cdot -4 \]
      5. associate-*r*N/A

        \[\leadsto \left(z \cdot \left(z \cdot y\right)\right) \cdot -4 \]
      6. *-commutativeN/A

        \[\leadsto \left(\left(z \cdot y\right) \cdot z\right) \cdot -4 \]
      7. lower-*.f64N/A

        \[\leadsto \left(\left(z \cdot y\right) \cdot z\right) \cdot -4 \]
      8. lift-*.f6440.8

        \[\leadsto \left(\left(z \cdot y\right) \cdot z\right) \cdot -4 \]
    9. Applied rewrites40.8%

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

Alternative 7: 84.8% accurate, 1.2× speedup?

\[\begin{array}{l} z_m = \left|z\right| \\ \begin{array}{l} \mathbf{if}\;z\_m \leq 4 \cdot 10^{+55}:\\ \;\;\;\;\mathsf{fma}\left(x, x, \left(t \cdot y\right) \cdot 4\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(z\_m \cdot y\right) \cdot z\_m\right) \cdot -4\\ \end{array} \end{array} \]
z_m = (fabs.f64 z)
(FPCore (x y z_m t)
 :precision binary64
 (if (<= z_m 4e+55) (fma x x (* (* t y) 4.0)) (* (* (* z_m y) z_m) -4.0)))
z_m = fabs(z);
double code(double x, double y, double z_m, double t) {
	double tmp;
	if (z_m <= 4e+55) {
		tmp = fma(x, x, ((t * y) * 4.0));
	} else {
		tmp = ((z_m * y) * z_m) * -4.0;
	}
	return tmp;
}
z_m = abs(z)
function code(x, y, z_m, t)
	tmp = 0.0
	if (z_m <= 4e+55)
		tmp = fma(x, x, Float64(Float64(t * y) * 4.0));
	else
		tmp = Float64(Float64(Float64(z_m * y) * z_m) * -4.0);
	end
	return tmp
end
z_m = N[Abs[z], $MachinePrecision]
code[x_, y_, z$95$m_, t_] := If[LessEqual[z$95$m, 4e+55], N[(x * x + N[(N[(t * y), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z$95$m * y), $MachinePrecision] * z$95$m), $MachinePrecision] * -4.0), $MachinePrecision]]
\begin{array}{l}
z_m = \left|z\right|

\\
\begin{array}{l}
\mathbf{if}\;z\_m \leq 4 \cdot 10^{+55}:\\
\;\;\;\;\mathsf{fma}\left(x, x, \left(t \cdot y\right) \cdot 4\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\left(z\_m \cdot y\right) \cdot z\_m\right) \cdot -4\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 4.00000000000000004e55

    1. Initial program 90.7%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(t \cdot y, 4, {x}^{2}\right) \]
      7. pow2N/A

        \[\leadsto \mathsf{fma}\left(t \cdot y, 4, x \cdot x\right) \]
      8. lift-*.f6466.0

        \[\leadsto \mathsf{fma}\left(t \cdot y, 4, x \cdot x\right) \]
    4. Applied rewrites66.0%

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

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

        \[\leadsto \mathsf{fma}\left(t \cdot y, 4, x \cdot x\right) \]
      3. lift-fma.f64N/A

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x, x, \left(t \cdot y\right) \cdot 4\right) \]
      10. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(x, x, \left(t \cdot y\right) \cdot 4\right) \]
      11. lift-*.f6466.5

        \[\leadsto \mathsf{fma}\left(x, x, \left(t \cdot y\right) \cdot 4\right) \]
    6. Applied rewrites66.5%

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

    if 4.00000000000000004e55 < z

    1. Initial program 90.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(y \cdot {z}^{2}\right) \cdot -4 + \left(\mathsf{neg}\left({x}^{2} \cdot -1\right)\right) \]
      9. distribute-rgt-neg-outN/A

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

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

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

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

        \[\leadsto \mathsf{fma}\left({z}^{2} \cdot y, -4, {x}^{2}\right) \]
      14. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left({z}^{2} \cdot y, -4, {x}^{2}\right) \]
      15. pow2N/A

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, {x}^{2}\right) \]
      16. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, {x}^{2}\right) \]
      17. pow2N/A

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, x \cdot x\right) \]
      18. lift-*.f6467.4

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, x \cdot x\right) \]
    4. Applied rewrites67.4%

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

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

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, x \cdot x\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(z \cdot \left(z \cdot y\right), -4, x \cdot x\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot \left(y \cdot z\right), -4, x \cdot x\right) \]
      5. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot \left(y \cdot z\right), -4, x \cdot x\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot \left(z \cdot y\right), -4, x \cdot x\right) \]
      7. lower-*.f6472.3

        \[\leadsto \mathsf{fma}\left(z \cdot \left(z \cdot y\right), -4, x \cdot x\right) \]
    6. Applied rewrites72.3%

      \[\leadsto \mathsf{fma}\left(z \cdot \left(z \cdot y\right), -4, x \cdot x\right) \]
    7. Taylor expanded in x around 0

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

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

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

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

        \[\leadsto \left(\left(z \cdot z\right) \cdot y\right) \cdot -4 \]
      5. associate-*r*N/A

        \[\leadsto \left(z \cdot \left(z \cdot y\right)\right) \cdot -4 \]
      6. *-commutativeN/A

        \[\leadsto \left(\left(z \cdot y\right) \cdot z\right) \cdot -4 \]
      7. lower-*.f64N/A

        \[\leadsto \left(\left(z \cdot y\right) \cdot z\right) \cdot -4 \]
      8. lift-*.f6440.8

        \[\leadsto \left(\left(z \cdot y\right) \cdot z\right) \cdot -4 \]
    9. Applied rewrites40.8%

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

Alternative 8: 60.0% accurate, 1.3× speedup?

\[\begin{array}{l} z_m = \left|z\right| \\ \begin{array}{l} \mathbf{if}\;z\_m \leq 6.8 \cdot 10^{+31}:\\ \;\;\;\;\left(t \cdot 4\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;\left(\left(z\_m \cdot y\right) \cdot z\_m\right) \cdot -4\\ \end{array} \end{array} \]
z_m = (fabs.f64 z)
(FPCore (x y z_m t)
 :precision binary64
 (if (<= z_m 6.8e+31) (* (* t 4.0) y) (* (* (* z_m y) z_m) -4.0)))
z_m = fabs(z);
double code(double x, double y, double z_m, double t) {
	double tmp;
	if (z_m <= 6.8e+31) {
		tmp = (t * 4.0) * y;
	} else {
		tmp = ((z_m * y) * z_m) * -4.0;
	}
	return tmp;
}
z_m =     private
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_m, t)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8) :: tmp
    if (z_m <= 6.8d+31) then
        tmp = (t * 4.0d0) * y
    else
        tmp = ((z_m * y) * z_m) * (-4.0d0)
    end if
    code = tmp
end function
z_m = Math.abs(z);
public static double code(double x, double y, double z_m, double t) {
	double tmp;
	if (z_m <= 6.8e+31) {
		tmp = (t * 4.0) * y;
	} else {
		tmp = ((z_m * y) * z_m) * -4.0;
	}
	return tmp;
}
z_m = math.fabs(z)
def code(x, y, z_m, t):
	tmp = 0
	if z_m <= 6.8e+31:
		tmp = (t * 4.0) * y
	else:
		tmp = ((z_m * y) * z_m) * -4.0
	return tmp
z_m = abs(z)
function code(x, y, z_m, t)
	tmp = 0.0
	if (z_m <= 6.8e+31)
		tmp = Float64(Float64(t * 4.0) * y);
	else
		tmp = Float64(Float64(Float64(z_m * y) * z_m) * -4.0);
	end
	return tmp
end
z_m = abs(z);
function tmp_2 = code(x, y, z_m, t)
	tmp = 0.0;
	if (z_m <= 6.8e+31)
		tmp = (t * 4.0) * y;
	else
		tmp = ((z_m * y) * z_m) * -4.0;
	end
	tmp_2 = tmp;
end
z_m = N[Abs[z], $MachinePrecision]
code[x_, y_, z$95$m_, t_] := If[LessEqual[z$95$m, 6.8e+31], N[(N[(t * 4.0), $MachinePrecision] * y), $MachinePrecision], N[(N[(N[(z$95$m * y), $MachinePrecision] * z$95$m), $MachinePrecision] * -4.0), $MachinePrecision]]
\begin{array}{l}
z_m = \left|z\right|

\\
\begin{array}{l}
\mathbf{if}\;z\_m \leq 6.8 \cdot 10^{+31}:\\
\;\;\;\;\left(t \cdot 4\right) \cdot y\\

\mathbf{else}:\\
\;\;\;\;\left(\left(z\_m \cdot y\right) \cdot z\_m\right) \cdot -4\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 6.7999999999999996e31

    1. Initial program 90.7%

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

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

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

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

        \[\leadsto \left(t \cdot y\right) \cdot 4 \]
    4. Applied rewrites30.7%

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

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

        \[\leadsto \left(t \cdot y\right) \cdot 4 \]
      3. *-commutativeN/A

        \[\leadsto 4 \cdot \color{blue}{\left(t \cdot y\right)} \]
      4. associate-*r*N/A

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

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

        \[\leadsto \left(t \cdot 4\right) \cdot y \]
      7. lower-*.f6430.7

        \[\leadsto \left(t \cdot 4\right) \cdot y \]
    6. Applied rewrites30.7%

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

    if 6.7999999999999996e31 < z

    1. Initial program 90.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(y \cdot {z}^{2}\right) \cdot -4 + \left(\mathsf{neg}\left({x}^{2} \cdot -1\right)\right) \]
      9. distribute-rgt-neg-outN/A

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

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

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

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

        \[\leadsto \mathsf{fma}\left({z}^{2} \cdot y, -4, {x}^{2}\right) \]
      14. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left({z}^{2} \cdot y, -4, {x}^{2}\right) \]
      15. pow2N/A

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, {x}^{2}\right) \]
      16. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, {x}^{2}\right) \]
      17. pow2N/A

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, x \cdot x\right) \]
      18. lift-*.f6467.4

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, x \cdot x\right) \]
    4. Applied rewrites67.4%

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

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

        \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, x \cdot x\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(z \cdot \left(z \cdot y\right), -4, x \cdot x\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot \left(y \cdot z\right), -4, x \cdot x\right) \]
      5. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot \left(y \cdot z\right), -4, x \cdot x\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot \left(z \cdot y\right), -4, x \cdot x\right) \]
      7. lower-*.f6472.3

        \[\leadsto \mathsf{fma}\left(z \cdot \left(z \cdot y\right), -4, x \cdot x\right) \]
    6. Applied rewrites72.3%

      \[\leadsto \mathsf{fma}\left(z \cdot \left(z \cdot y\right), -4, x \cdot x\right) \]
    7. Taylor expanded in x around 0

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

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

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

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

        \[\leadsto \left(\left(z \cdot z\right) \cdot y\right) \cdot -4 \]
      5. associate-*r*N/A

        \[\leadsto \left(z \cdot \left(z \cdot y\right)\right) \cdot -4 \]
      6. *-commutativeN/A

        \[\leadsto \left(\left(z \cdot y\right) \cdot z\right) \cdot -4 \]
      7. lower-*.f64N/A

        \[\leadsto \left(\left(z \cdot y\right) \cdot z\right) \cdot -4 \]
      8. lift-*.f6440.8

        \[\leadsto \left(\left(z \cdot y\right) \cdot z\right) \cdot -4 \]
    9. Applied rewrites40.8%

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

Alternative 9: 30.7% accurate, 2.6× speedup?

\[\begin{array}{l} z_m = \left|z\right| \\ \left(t \cdot 4\right) \cdot y \end{array} \]
z_m = (fabs.f64 z)
(FPCore (x y z_m t) :precision binary64 (* (* t 4.0) y))
z_m = fabs(z);
double code(double x, double y, double z_m, double t) {
	return (t * 4.0) * y;
}
z_m =     private
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_m, t)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    code = (t * 4.0d0) * y
end function
z_m = Math.abs(z);
public static double code(double x, double y, double z_m, double t) {
	return (t * 4.0) * y;
}
z_m = math.fabs(z)
def code(x, y, z_m, t):
	return (t * 4.0) * y
z_m = abs(z)
function code(x, y, z_m, t)
	return Float64(Float64(t * 4.0) * y)
end
z_m = abs(z);
function tmp = code(x, y, z_m, t)
	tmp = (t * 4.0) * y;
end
z_m = N[Abs[z], $MachinePrecision]
code[x_, y_, z$95$m_, t_] := N[(N[(t * 4.0), $MachinePrecision] * y), $MachinePrecision]
\begin{array}{l}
z_m = \left|z\right|

\\
\left(t \cdot 4\right) \cdot y
\end{array}
Derivation
  1. Initial program 90.7%

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

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

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

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

      \[\leadsto \left(t \cdot y\right) \cdot 4 \]
  4. Applied rewrites30.7%

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

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

      \[\leadsto \left(t \cdot y\right) \cdot 4 \]
    3. *-commutativeN/A

      \[\leadsto 4 \cdot \color{blue}{\left(t \cdot y\right)} \]
    4. associate-*r*N/A

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

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

      \[\leadsto \left(t \cdot 4\right) \cdot y \]
    7. lower-*.f6430.7

      \[\leadsto \left(t \cdot 4\right) \cdot y \]
  6. Applied rewrites30.7%

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

Reproduce

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