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

Percentage Accurate: 90.8% → 94.2%
Time: 4.2s
Alternatives: 5
Speedup: 0.7×

Specification

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

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

real(8) function code(x, y, z, t)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = (x * x) - ((y * 4.0d0) * ((z * z) - t))
end function
public static double code(double x, double y, double z, double t) {
	return (x * x) - ((y * 4.0) * ((z * z) - t));
}
def code(x, y, z, t):
	return (x * x) - ((y * 4.0) * ((z * z) - t))
function code(x, y, z, t)
	return Float64(Float64(x * x) - Float64(Float64(y * 4.0) * Float64(Float64(z * z) - t)))
end
function tmp = code(x, y, z, t)
	tmp = (x * x) - ((y * 4.0) * ((z * z) - t));
end
code[x_, y_, z_, t_] := N[(N[(x * x), $MachinePrecision] - N[(N[(y * 4.0), $MachinePrecision] * N[(N[(z * z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 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.8% 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: 94.2% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \cdot z \leq 10^{+236}:\\ \;\;\;\;x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(y \cdot z\right) \cdot z\right) \cdot -4\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= (* z z) 1e+236)
   (- (* x x) (* (* y 4.0) (- (* z z) t)))
   (* (* (* y z) z) -4.0)))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z * z) <= 1e+236) {
		tmp = (x * x) - ((y * 4.0) * ((z * z) - t));
	} else {
		tmp = ((y * z) * z) * -4.0;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((z * z) <= 1d+236) then
        tmp = (x * x) - ((y * 4.0d0) * ((z * z) - t))
    else
        tmp = ((y * z) * z) * (-4.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((z * z) <= 1e+236) {
		tmp = (x * x) - ((y * 4.0) * ((z * z) - t));
	} else {
		tmp = ((y * z) * z) * -4.0;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (z * z) <= 1e+236:
		tmp = (x * x) - ((y * 4.0) * ((z * z) - t))
	else:
		tmp = ((y * z) * z) * -4.0
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (Float64(z * z) <= 1e+236)
		tmp = Float64(Float64(x * x) - Float64(Float64(y * 4.0) * Float64(Float64(z * z) - t)));
	else
		tmp = Float64(Float64(Float64(y * z) * z) * -4.0);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((z * z) <= 1e+236)
		tmp = (x * x) - ((y * 4.0) * ((z * z) - t));
	else
		tmp = ((y * z) * z) * -4.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * z), $MachinePrecision], 1e+236], N[(N[(x * x), $MachinePrecision] - N[(N[(y * 4.0), $MachinePrecision] * N[(N[(z * z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * z), $MachinePrecision] * z), $MachinePrecision] * -4.0), $MachinePrecision]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 z z) < 1.00000000000000005e236

    1. Initial program 98.4%

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

    if 1.00000000000000005e236 < (*.f64 z z)

    1. Initial program 81.0%

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

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

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

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

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

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

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

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

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

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

    Alternative 2: 88.7% accurate, 0.6× speedup?

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

      1. Initial program 98.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 9.9999999999999992e22 < (*.f64 z z) < 1.00000000000000005e236

        1. Initial program 98.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, \color{blue}{x \cdot x}\right) \]
          19. lower-*.f6487.3

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

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

        if 1.00000000000000005e236 < (*.f64 z z)

        1. Initial program 81.0%

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

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

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

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

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

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

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

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

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

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

        Alternative 3: 76.4% accurate, 1.2× speedup?

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

          1. Initial program 95.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 5.7999999999999997e69 < z

            1. Initial program 84.1%

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

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

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

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

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

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

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

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

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

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

            Alternative 4: 46.1% accurate, 1.2× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq 1.15 \cdot 10^{+15}:\\ \;\;\;\;\left(t \cdot y\right) \cdot 4\\ \mathbf{else}:\\ \;\;\;\;\left(\left(y \cdot z\right) \cdot z\right) \cdot -4\\ \end{array} \end{array} \]
            (FPCore (x y z t)
             :precision binary64
             (if (<= z 1.15e+15) (* (* t y) 4.0) (* (* (* y z) z) -4.0)))
            double code(double x, double y, double z, double t) {
            	double tmp;
            	if (z <= 1.15e+15) {
            		tmp = (t * y) * 4.0;
            	} else {
            		tmp = ((y * z) * z) * -4.0;
            	}
            	return tmp;
            }
            
            module fmin_fmax_functions
                implicit none
                private
                public fmax
                public fmin
            
                interface fmax
                    module procedure fmax88
                    module procedure fmax44
                    module procedure fmax84
                    module procedure fmax48
                end interface
                interface fmin
                    module procedure fmin88
                    module procedure fmin44
                    module procedure fmin84
                    module procedure fmin48
                end interface
            contains
                real(8) function fmax88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(4) function fmax44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(8) function fmax84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmax48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                end function
                real(8) function fmin88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(4) function fmin44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(8) function fmin84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmin48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                end function
            end module
            
            real(8) function code(x, y, z, t)
            use fmin_fmax_functions
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8), intent (in) :: t
                real(8) :: tmp
                if (z <= 1.15d+15) then
                    tmp = (t * y) * 4.0d0
                else
                    tmp = ((y * z) * z) * (-4.0d0)
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t) {
            	double tmp;
            	if (z <= 1.15e+15) {
            		tmp = (t * y) * 4.0;
            	} else {
            		tmp = ((y * z) * z) * -4.0;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t):
            	tmp = 0
            	if z <= 1.15e+15:
            		tmp = (t * y) * 4.0
            	else:
            		tmp = ((y * z) * z) * -4.0
            	return tmp
            
            function code(x, y, z, t)
            	tmp = 0.0
            	if (z <= 1.15e+15)
            		tmp = Float64(Float64(t * y) * 4.0);
            	else
            		tmp = Float64(Float64(Float64(y * z) * z) * -4.0);
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t)
            	tmp = 0.0;
            	if (z <= 1.15e+15)
            		tmp = (t * y) * 4.0;
            	else
            		tmp = ((y * z) * z) * -4.0;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_] := If[LessEqual[z, 1.15e+15], N[(N[(t * y), $MachinePrecision] * 4.0), $MachinePrecision], N[(N[(N[(y * z), $MachinePrecision] * z), $MachinePrecision] * -4.0), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;z \leq 1.15 \cdot 10^{+15}:\\
            \;\;\;\;\left(t \cdot y\right) \cdot 4\\
            
            \mathbf{else}:\\
            \;\;\;\;\left(\left(y \cdot z\right) \cdot z\right) \cdot -4\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if z < 1.15e15

              1. Initial program 95.5%

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

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

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

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

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

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

              if 1.15e15 < z

              1. Initial program 87.8%

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

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

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

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

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

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

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

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

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

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

              Alternative 5: 31.6% accurate, 2.5× speedup?

              \[\begin{array}{l} \\ \left(t \cdot y\right) \cdot 4 \end{array} \]
              (FPCore (x y z t) :precision binary64 (* (* t y) 4.0))
              double code(double x, double y, double z, double t) {
              	return (t * y) * 4.0;
              }
              
              module fmin_fmax_functions
                  implicit none
                  private
                  public fmax
                  public fmin
              
                  interface fmax
                      module procedure fmax88
                      module procedure fmax44
                      module procedure fmax84
                      module procedure fmax48
                  end interface
                  interface fmin
                      module procedure fmin88
                      module procedure fmin44
                      module procedure fmin84
                      module procedure fmin48
                  end interface
              contains
                  real(8) function fmax88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmax44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmax84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmax48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                  end function
                  real(8) function fmin88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmin44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmin84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmin48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                  end function
              end module
              
              real(8) function code(x, y, z, t)
              use fmin_fmax_functions
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  real(8), intent (in) :: z
                  real(8), intent (in) :: t
                  code = (t * y) * 4.0d0
              end function
              
              public static double code(double x, double y, double z, double t) {
              	return (t * y) * 4.0;
              }
              
              def code(x, y, z, t):
              	return (t * y) * 4.0
              
              function code(x, y, z, t)
              	return Float64(Float64(t * y) * 4.0)
              end
              
              function tmp = code(x, y, z, t)
              	tmp = (t * y) * 4.0;
              end
              
              code[x_, y_, z_, t_] := N[(N[(t * y), $MachinePrecision] * 4.0), $MachinePrecision]
              
              \begin{array}{l}
              
              \\
              \left(t \cdot y\right) \cdot 4
              \end{array}
              
              Derivation
              1. Initial program 93.5%

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

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

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

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

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

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

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

              \[\begin{array}{l} \\ x \cdot x - 4 \cdot \left(y \cdot \left(z \cdot z - t\right)\right) \end{array} \]
              (FPCore (x y z t) :precision binary64 (- (* x x) (* 4.0 (* y (- (* z z) t)))))
              double code(double x, double y, double z, double t) {
              	return (x * x) - (4.0 * (y * ((z * z) - t)));
              }
              
              module fmin_fmax_functions
                  implicit none
                  private
                  public fmax
                  public fmin
              
                  interface fmax
                      module procedure fmax88
                      module procedure fmax44
                      module procedure fmax84
                      module procedure fmax48
                  end interface
                  interface fmin
                      module procedure fmin88
                      module procedure fmin44
                      module procedure fmin84
                      module procedure fmin48
                  end interface
              contains
                  real(8) function fmax88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmax44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmax84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmax48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                  end function
                  real(8) function fmin88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmin44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmin84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmin48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                  end function
              end module
              
              real(8) function code(x, y, z, t)
              use fmin_fmax_functions
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  real(8), intent (in) :: z
                  real(8), intent (in) :: t
                  code = (x * x) - (4.0d0 * (y * ((z * z) - t)))
              end function
              
              public static double code(double x, double y, double z, double t) {
              	return (x * x) - (4.0 * (y * ((z * z) - t)));
              }
              
              def code(x, y, z, t):
              	return (x * x) - (4.0 * (y * ((z * z) - t)))
              
              function code(x, y, z, t)
              	return Float64(Float64(x * x) - Float64(4.0 * Float64(y * Float64(Float64(z * z) - t))))
              end
              
              function tmp = code(x, y, z, t)
              	tmp = (x * x) - (4.0 * (y * ((z * z) - t)));
              end
              
              code[x_, y_, z_, t_] := N[(N[(x * x), $MachinePrecision] - N[(4.0 * N[(y * N[(N[(z * z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
              
              \begin{array}{l}
              
              \\
              x \cdot x - 4 \cdot \left(y \cdot \left(z \cdot z - t\right)\right)
              \end{array}
              

              Reproduce

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