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

Percentage Accurate: 90.2% → 93.3%
Time: 3.1s
Alternatives: 5
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 5 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.2% 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: 93.3% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 1.42000000000000002e184

    1. Initial program 90.2%

      \[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. sub-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.42000000000000002e184 < x

    1. Initial program 90.2%

      \[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. sub-flipN/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z \cdot z - t, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot y}, x \cdot x\right) \]
      12. metadata-eval91.3

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

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

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

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

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

Alternative 2: 67.3% accurate, 1.2× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ \mathsf{fma}\left(-1 \cdot t, -4 \cdot y, x\_m \cdot x\_m\right) \end{array} \]
x_m = (fabs.f64 x)
(FPCore (x_m y z t)
 :precision binary64
 (fma (* -1.0 t) (* -4.0 y) (* x_m x_m)))
x_m = fabs(x);
double code(double x_m, double y, double z, double t) {
	return fma((-1.0 * t), (-4.0 * y), (x_m * x_m));
}
x_m = abs(x)
function code(x_m, y, z, t)
	return fma(Float64(-1.0 * t), Float64(-4.0 * y), Float64(x_m * x_m))
end
x_m = N[Abs[x], $MachinePrecision]
code[x$95$m_, y_, z_, t_] := N[(N[(-1.0 * t), $MachinePrecision] * N[(-4.0 * y), $MachinePrecision] + N[(x$95$m * x$95$m), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|

\\
\mathsf{fma}\left(-1 \cdot t, -4 \cdot y, x\_m \cdot x\_m\right)
\end{array}
Derivation
  1. Initial program 90.2%

    \[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. sub-flipN/A

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(z \cdot z - t, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot y}, x \cdot x\right) \]
    12. metadata-eval91.3

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

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

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

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

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

Alternative 3: 66.9% accurate, 1.5× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ \mathsf{fma}\left(x\_m, x\_m, 4 \cdot \left(t \cdot y\right)\right) \end{array} \]
x_m = (fabs.f64 x)
(FPCore (x_m y z t) :precision binary64 (fma x_m x_m (* 4.0 (* t y))))
x_m = fabs(x);
double code(double x_m, double y, double z, double t) {
	return fma(x_m, x_m, (4.0 * (t * y)));
}
x_m = abs(x)
function code(x_m, y, z, t)
	return fma(x_m, x_m, Float64(4.0 * Float64(t * y)))
end
x_m = N[Abs[x], $MachinePrecision]
code[x$95$m_, y_, z_, t_] := N[(x$95$m * x$95$m + N[(4.0 * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|

\\
\mathsf{fma}\left(x\_m, x\_m, 4 \cdot \left(t \cdot y\right)\right)
\end{array}
Derivation
  1. Initial program 90.2%

    \[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. sub-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\frac{\left(z \cdot z\right) \cdot \left(z \cdot z\right) - t \cdot t}{z \cdot z + t}} \cdot \left(-4 \cdot y\right)\right) \]
    5. difference-of-squares-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 32.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x\_m \cdot x\_m - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \leq -5 \cdot 10^{-216}:\\
\;\;\;\;4 \cdot \left(t \cdot y\right)\\

\mathbf{else}:\\
\;\;\;\;\left|\frac{1}{\frac{0.25}{y \cdot t}}\right|\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (*.f64 x x) (*.f64 (*.f64 y #s(literal 4 binary64)) (-.f64 (*.f64 z z) t))) < -5.00000000000000021e-216

    1. Initial program 90.2%

      \[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. lower-*.f64N/A

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

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

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

    if -5.00000000000000021e-216 < (-.f64 (*.f64 x x) (*.f64 (*.f64 y #s(literal 4 binary64)) (-.f64 (*.f64 z z) t)))

    1. Initial program 90.2%

      \[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. flip--N/A

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

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

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

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

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

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

        \[\leadsto \frac{1}{\frac{\frac{1}{4}}{\color{blue}{t \cdot y}}} \]
      2. lower-*.f6431.5

        \[\leadsto \frac{1}{\frac{0.25}{t \cdot \color{blue}{y}}} \]
    6. Applied rewrites31.5%

      \[\leadsto \frac{1}{\color{blue}{\frac{0.25}{t \cdot y}}} \]
    7. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{1}{4}}{t \cdot y}}} \]
      2. inv-powN/A

        \[\leadsto \color{blue}{{\left(\frac{\frac{1}{4}}{t \cdot y}\right)}^{-1}} \]
      3. pow-to-expN/A

        \[\leadsto \color{blue}{e^{\log \left(\frac{\frac{1}{4}}{t \cdot y}\right) \cdot -1}} \]
      4. exp-fabsN/A

        \[\leadsto \color{blue}{\left|e^{\log \left(\frac{\frac{1}{4}}{t \cdot y}\right) \cdot -1}\right|} \]
      5. pow-to-expN/A

        \[\leadsto \left|\color{blue}{{\left(\frac{\frac{1}{4}}{t \cdot y}\right)}^{-1}}\right| \]
    8. Applied rewrites20.0%

      \[\leadsto \color{blue}{\left|\frac{1}{\frac{0.25}{y \cdot t}}\right|} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 5: 31.6% accurate, 2.6× speedup?

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

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

    \[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. lower-*.f64N/A

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

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

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

Reproduce

?
herbie shell --seed 2025150 
(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))))