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

Percentage Accurate: 83.7% → 97.1%
Time: 8.3s
Alternatives: 9
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 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: 83.7% accurate, 1.0× speedup?

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

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

Alternative 1: 97.1% accurate, 1.0× speedup?

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

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

    \[\frac{x \cdot \left(y - z\right)}{t - z} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-/.f64N/A

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

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

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

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

      \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
    6. lower-/.f6495.6

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

    \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
  5. Final simplification95.6%

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

Alternative 2: 74.8% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq -5.8 \cdot 10^{-275}:\\
\;\;\;\;\frac{x}{t - z} \cdot y\\

\mathbf{elif}\;z \leq 2.8 \cdot 10^{+68}:\\
\;\;\;\;\frac{x \cdot y}{t - z}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.2999999999999999e-21 or 2.8e68 < z

    1. Initial program 75.6%

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{x \cdot y - t \cdot x}{z}} \]
      7. unsub-negN/A

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

        \[\leadsto x + \color{blue}{-1 \cdot \frac{x \cdot y - t \cdot x}{z}} \]
      9. +-commutativeN/A

        \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y - t \cdot x}{z} + x} \]
      10. mul-1-negN/A

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

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

        \[\leadsto \frac{x \cdot y - \color{blue}{x \cdot t}}{\mathsf{neg}\left(z\right)} + x \]
      13. distribute-lft-out--N/A

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(x, -1 \cdot \color{blue}{\frac{y}{z}}, x\right) \]
    7. Step-by-step derivation
      1. Applied rewrites81.8%

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

      if -5.2999999999999999e-21 < z < -5.800000000000001e-275

      1. Initial program 88.9%

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

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

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

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

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

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

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

      if -5.800000000000001e-275 < z < 2.8e68

      1. Initial program 95.7%

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.3 \cdot 10^{-21}:\\ \;\;\;\;\mathsf{fma}\left(x, \frac{-y}{z}, x\right)\\ \mathbf{elif}\;z \leq -5.8 \cdot 10^{-275}:\\ \;\;\;\;\frac{x}{t - z} \cdot y\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{+68}:\\ \;\;\;\;\frac{x \cdot y}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x, \frac{-y}{z}, x\right)\\ \end{array} \]
    10. Add Preprocessing

    Alternative 3: 60.9% accurate, 0.7× speedup?

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

      1. Initial program 75.6%

        \[\frac{x \cdot \left(y - z\right)}{t - z} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. lift-/.f64N/A

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

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

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

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

          \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
        6. lower-/.f6499.8

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

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

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

          \[\leadsto \color{blue}{1} \cdot x \]

        if -2.3e14 < z < -1.55000000000000005e-40

        1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

          if -1.55000000000000005e-40 < z < 370

          1. Initial program 92.0%

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

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

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

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

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

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

              \[\leadsto \frac{x}{t} \cdot \color{blue}{y} \]
          7. Recombined 3 regimes into one program.
          8. Add Preprocessing

          Alternative 4: 60.7% accurate, 0.7× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{-22}:\\ \;\;\;\;1 \cdot x\\ \mathbf{elif}\;z \leq -1.55 \cdot 10^{-40}:\\ \;\;\;\;\frac{x}{-t} \cdot z\\ \mathbf{elif}\;z \leq 370:\\ \;\;\;\;\frac{x}{t} \cdot y\\ \mathbf{else}:\\ \;\;\;\;1 \cdot x\\ \end{array} \end{array} \]
          (FPCore (x y z t)
           :precision binary64
           (if (<= z -1.3e-22)
             (* 1.0 x)
             (if (<= z -1.55e-40)
               (* (/ x (- t)) z)
               (if (<= z 370.0) (* (/ x t) y) (* 1.0 x)))))
          double code(double x, double y, double z, double t) {
          	double tmp;
          	if (z <= -1.3e-22) {
          		tmp = 1.0 * x;
          	} else if (z <= -1.55e-40) {
          		tmp = (x / -t) * z;
          	} else if (z <= 370.0) {
          		tmp = (x / t) * y;
          	} else {
          		tmp = 1.0 * x;
          	}
          	return tmp;
          }
          
          real(8) function code(x, y, z, t)
              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.3d-22)) then
                  tmp = 1.0d0 * x
              else if (z <= (-1.55d-40)) then
                  tmp = (x / -t) * z
              else if (z <= 370.0d0) then
                  tmp = (x / t) * y
              else
                  tmp = 1.0d0 * x
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t) {
          	double tmp;
          	if (z <= -1.3e-22) {
          		tmp = 1.0 * x;
          	} else if (z <= -1.55e-40) {
          		tmp = (x / -t) * z;
          	} else if (z <= 370.0) {
          		tmp = (x / t) * y;
          	} else {
          		tmp = 1.0 * x;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t):
          	tmp = 0
          	if z <= -1.3e-22:
          		tmp = 1.0 * x
          	elif z <= -1.55e-40:
          		tmp = (x / -t) * z
          	elif z <= 370.0:
          		tmp = (x / t) * y
          	else:
          		tmp = 1.0 * x
          	return tmp
          
          function code(x, y, z, t)
          	tmp = 0.0
          	if (z <= -1.3e-22)
          		tmp = Float64(1.0 * x);
          	elseif (z <= -1.55e-40)
          		tmp = Float64(Float64(x / Float64(-t)) * z);
          	elseif (z <= 370.0)
          		tmp = Float64(Float64(x / t) * y);
          	else
          		tmp = Float64(1.0 * x);
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t)
          	tmp = 0.0;
          	if (z <= -1.3e-22)
          		tmp = 1.0 * x;
          	elseif (z <= -1.55e-40)
          		tmp = (x / -t) * z;
          	elseif (z <= 370.0)
          		tmp = (x / t) * y;
          	else
          		tmp = 1.0 * x;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_] := If[LessEqual[z, -1.3e-22], N[(1.0 * x), $MachinePrecision], If[LessEqual[z, -1.55e-40], N[(N[(x / (-t)), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[z, 370.0], N[(N[(x / t), $MachinePrecision] * y), $MachinePrecision], N[(1.0 * x), $MachinePrecision]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;z \leq -1.3 \cdot 10^{-22}:\\
          \;\;\;\;1 \cdot x\\
          
          \mathbf{elif}\;z \leq -1.55 \cdot 10^{-40}:\\
          \;\;\;\;\frac{x}{-t} \cdot z\\
          
          \mathbf{elif}\;z \leq 370:\\
          \;\;\;\;\frac{x}{t} \cdot y\\
          
          \mathbf{else}:\\
          \;\;\;\;1 \cdot x\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if z < -1.3e-22 or 370 < z

            1. Initial program 77.4%

              \[\frac{x \cdot \left(y - z\right)}{t - z} \]
            2. Add Preprocessing
            3. Step-by-step derivation
              1. lift-/.f64N/A

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

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

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

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

                \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
              6. lower-/.f6499.8

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

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

              \[\leadsto \color{blue}{1} \cdot x \]
            6. Step-by-step derivation
              1. Applied rewrites58.7%

                \[\leadsto \color{blue}{1} \cdot x \]

              if -1.3e-22 < z < -1.55000000000000005e-40

              1. Initial program 99.7%

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

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

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

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

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

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

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

                \[\leadsto -1 \cdot \color{blue}{\frac{x \cdot z}{t}} \]
              7. Step-by-step derivation
                1. Applied rewrites83.9%

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

                if -1.55000000000000005e-40 < z < 370

                1. Initial program 92.0%

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

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

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

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

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

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

                    \[\leadsto \frac{x}{t} \cdot \color{blue}{y} \]
                7. Recombined 3 regimes into one program.
                8. Add Preprocessing

                Alternative 5: 75.8% accurate, 0.7× speedup?

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

                  1. Initial program 77.2%

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

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

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

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

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

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

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

                      \[\leadsto x - \color{blue}{\frac{x \cdot y - t \cdot x}{z}} \]
                    7. unsub-negN/A

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

                      \[\leadsto x + \color{blue}{-1 \cdot \frac{x \cdot y - t \cdot x}{z}} \]
                    9. +-commutativeN/A

                      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y - t \cdot x}{z} + x} \]
                    10. mul-1-negN/A

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

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

                      \[\leadsto \frac{x \cdot y - \color{blue}{x \cdot t}}{\mathsf{neg}\left(z\right)} + x \]
                    13. distribute-lft-out--N/A

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(x, -1 \cdot \color{blue}{\frac{y}{z}}, x\right) \]
                  7. Step-by-step derivation
                    1. Applied rewrites79.8%

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

                    if -5.2999999999999999e-21 < z < 55

                    1. Initial program 92.4%

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

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

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

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

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

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

                      \[\leadsto \color{blue}{\frac{x}{t - z} \cdot y} \]
                  8. Recombined 2 regimes into one program.
                  9. Add Preprocessing

                  Alternative 6: 72.3% accurate, 0.7× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \frac{x \cdot y}{z}\\ \mathbf{if}\;z \leq -1.25 \cdot 10^{-26}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 55:\\ \;\;\;\;\frac{x}{t - z} \cdot y\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                  (FPCore (x y z t)
                   :precision binary64
                   (let* ((t_1 (- x (/ (* x y) z))))
                     (if (<= z -1.25e-26) t_1 (if (<= z 55.0) (* (/ x (- t z)) y) t_1))))
                  double code(double x, double y, double z, double t) {
                  	double t_1 = x - ((x * y) / z);
                  	double tmp;
                  	if (z <= -1.25e-26) {
                  		tmp = t_1;
                  	} else if (z <= 55.0) {
                  		tmp = (x / (t - z)) * y;
                  	} else {
                  		tmp = t_1;
                  	}
                  	return tmp;
                  }
                  
                  real(8) function code(x, y, z, t)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      real(8), intent (in) :: z
                      real(8), intent (in) :: t
                      real(8) :: t_1
                      real(8) :: tmp
                      t_1 = x - ((x * y) / z)
                      if (z <= (-1.25d-26)) then
                          tmp = t_1
                      else if (z <= 55.0d0) then
                          tmp = (x / (t - z)) * y
                      else
                          tmp = t_1
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double x, double y, double z, double t) {
                  	double t_1 = x - ((x * y) / z);
                  	double tmp;
                  	if (z <= -1.25e-26) {
                  		tmp = t_1;
                  	} else if (z <= 55.0) {
                  		tmp = (x / (t - z)) * y;
                  	} else {
                  		tmp = t_1;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z, t):
                  	t_1 = x - ((x * y) / z)
                  	tmp = 0
                  	if z <= -1.25e-26:
                  		tmp = t_1
                  	elif z <= 55.0:
                  		tmp = (x / (t - z)) * y
                  	else:
                  		tmp = t_1
                  	return tmp
                  
                  function code(x, y, z, t)
                  	t_1 = Float64(x - Float64(Float64(x * y) / z))
                  	tmp = 0.0
                  	if (z <= -1.25e-26)
                  		tmp = t_1;
                  	elseif (z <= 55.0)
                  		tmp = Float64(Float64(x / Float64(t - z)) * y);
                  	else
                  		tmp = t_1;
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y, z, t)
                  	t_1 = x - ((x * y) / z);
                  	tmp = 0.0;
                  	if (z <= -1.25e-26)
                  		tmp = t_1;
                  	elseif (z <= 55.0)
                  		tmp = (x / (t - z)) * y;
                  	else
                  		tmp = t_1;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x - N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.25e-26], t$95$1, If[LessEqual[z, 55.0], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_1 := x - \frac{x \cdot y}{z}\\
                  \mathbf{if}\;z \leq -1.25 \cdot 10^{-26}:\\
                  \;\;\;\;t\_1\\
                  
                  \mathbf{elif}\;z \leq 55:\\
                  \;\;\;\;\frac{x}{t - z} \cdot y\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_1\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if z < -1.25000000000000005e-26 or 55 < z

                    1. Initial program 77.7%

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

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

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

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

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

                        \[\leadsto 0 - x \cdot \color{blue}{\left(\frac{y}{z} - \frac{z}{z}\right)} \]
                      5. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \color{blue}{x + -1 \cdot \frac{x \cdot y}{z}} \]
                      17. mul-1-negN/A

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

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

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

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

                        \[\leadsto x - \frac{\color{blue}{y \cdot x}}{z} \]
                      22. lower-*.f6472.0

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

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

                    if -1.25000000000000005e-26 < z < 55

                    1. Initial program 92.2%

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

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

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

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

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

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

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.25 \cdot 10^{-26}:\\ \;\;\;\;x - \frac{x \cdot y}{z}\\ \mathbf{elif}\;z \leq 55:\\ \;\;\;\;\frac{x}{t - z} \cdot y\\ \mathbf{else}:\\ \;\;\;\;x - \frac{x \cdot y}{z}\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 7: 68.6% accurate, 0.7× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.65 \cdot 10^{+63}:\\ \;\;\;\;1 \cdot x\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+102}:\\ \;\;\;\;\frac{x}{t - z} \cdot y\\ \mathbf{else}:\\ \;\;\;\;1 \cdot x\\ \end{array} \end{array} \]
                  (FPCore (x y z t)
                   :precision binary64
                   (if (<= z -1.65e+63)
                     (* 1.0 x)
                     (if (<= z 8.5e+102) (* (/ x (- t z)) y) (* 1.0 x))))
                  double code(double x, double y, double z, double t) {
                  	double tmp;
                  	if (z <= -1.65e+63) {
                  		tmp = 1.0 * x;
                  	} else if (z <= 8.5e+102) {
                  		tmp = (x / (t - z)) * y;
                  	} else {
                  		tmp = 1.0 * x;
                  	}
                  	return tmp;
                  }
                  
                  real(8) function code(x, y, z, t)
                      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.65d+63)) then
                          tmp = 1.0d0 * x
                      else if (z <= 8.5d+102) then
                          tmp = (x / (t - z)) * y
                      else
                          tmp = 1.0d0 * x
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double x, double y, double z, double t) {
                  	double tmp;
                  	if (z <= -1.65e+63) {
                  		tmp = 1.0 * x;
                  	} else if (z <= 8.5e+102) {
                  		tmp = (x / (t - z)) * y;
                  	} else {
                  		tmp = 1.0 * x;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z, t):
                  	tmp = 0
                  	if z <= -1.65e+63:
                  		tmp = 1.0 * x
                  	elif z <= 8.5e+102:
                  		tmp = (x / (t - z)) * y
                  	else:
                  		tmp = 1.0 * x
                  	return tmp
                  
                  function code(x, y, z, t)
                  	tmp = 0.0
                  	if (z <= -1.65e+63)
                  		tmp = Float64(1.0 * x);
                  	elseif (z <= 8.5e+102)
                  		tmp = Float64(Float64(x / Float64(t - z)) * y);
                  	else
                  		tmp = Float64(1.0 * x);
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y, z, t)
                  	tmp = 0.0;
                  	if (z <= -1.65e+63)
                  		tmp = 1.0 * x;
                  	elseif (z <= 8.5e+102)
                  		tmp = (x / (t - z)) * y;
                  	else
                  		tmp = 1.0 * x;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_, t_] := If[LessEqual[z, -1.65e+63], N[(1.0 * x), $MachinePrecision], If[LessEqual[z, 8.5e+102], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], N[(1.0 * x), $MachinePrecision]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;z \leq -1.65 \cdot 10^{+63}:\\
                  \;\;\;\;1 \cdot x\\
                  
                  \mathbf{elif}\;z \leq 8.5 \cdot 10^{+102}:\\
                  \;\;\;\;\frac{x}{t - z} \cdot y\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;1 \cdot x\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if z < -1.6500000000000001e63 or 8.4999999999999996e102 < z

                    1. Initial program 71.7%

                      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
                    2. Add Preprocessing
                    3. Step-by-step derivation
                      1. lift-/.f64N/A

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

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

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

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

                        \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
                      6. lower-/.f6499.8

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

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

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

                        \[\leadsto \color{blue}{1} \cdot x \]

                      if -1.6500000000000001e63 < z < 8.4999999999999996e102

                      1. Initial program 92.6%

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

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

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

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

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

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

                        \[\leadsto \color{blue}{\frac{x}{t - z} \cdot y} \]
                    7. Recombined 2 regimes into one program.
                    8. Add Preprocessing

                    Alternative 8: 60.7% accurate, 0.8× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.7 \cdot 10^{-27}:\\ \;\;\;\;1 \cdot x\\ \mathbf{elif}\;z \leq 370:\\ \;\;\;\;\frac{x}{t} \cdot y\\ \mathbf{else}:\\ \;\;\;\;1 \cdot x\\ \end{array} \end{array} \]
                    (FPCore (x y z t)
                     :precision binary64
                     (if (<= z -2.7e-27) (* 1.0 x) (if (<= z 370.0) (* (/ x t) y) (* 1.0 x))))
                    double code(double x, double y, double z, double t) {
                    	double tmp;
                    	if (z <= -2.7e-27) {
                    		tmp = 1.0 * x;
                    	} else if (z <= 370.0) {
                    		tmp = (x / t) * y;
                    	} else {
                    		tmp = 1.0 * x;
                    	}
                    	return tmp;
                    }
                    
                    real(8) function code(x, y, z, t)
                        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 <= (-2.7d-27)) then
                            tmp = 1.0d0 * x
                        else if (z <= 370.0d0) then
                            tmp = (x / t) * y
                        else
                            tmp = 1.0d0 * x
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double x, double y, double z, double t) {
                    	double tmp;
                    	if (z <= -2.7e-27) {
                    		tmp = 1.0 * x;
                    	} else if (z <= 370.0) {
                    		tmp = (x / t) * y;
                    	} else {
                    		tmp = 1.0 * x;
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y, z, t):
                    	tmp = 0
                    	if z <= -2.7e-27:
                    		tmp = 1.0 * x
                    	elif z <= 370.0:
                    		tmp = (x / t) * y
                    	else:
                    		tmp = 1.0 * x
                    	return tmp
                    
                    function code(x, y, z, t)
                    	tmp = 0.0
                    	if (z <= -2.7e-27)
                    		tmp = Float64(1.0 * x);
                    	elseif (z <= 370.0)
                    		tmp = Float64(Float64(x / t) * y);
                    	else
                    		tmp = Float64(1.0 * x);
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(x, y, z, t)
                    	tmp = 0.0;
                    	if (z <= -2.7e-27)
                    		tmp = 1.0 * x;
                    	elseif (z <= 370.0)
                    		tmp = (x / t) * y;
                    	else
                    		tmp = 1.0 * x;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[x_, y_, z_, t_] := If[LessEqual[z, -2.7e-27], N[(1.0 * x), $MachinePrecision], If[LessEqual[z, 370.0], N[(N[(x / t), $MachinePrecision] * y), $MachinePrecision], N[(1.0 * x), $MachinePrecision]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;z \leq -2.7 \cdot 10^{-27}:\\
                    \;\;\;\;1 \cdot x\\
                    
                    \mathbf{elif}\;z \leq 370:\\
                    \;\;\;\;\frac{x}{t} \cdot y\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;1 \cdot x\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if z < -2.69999999999999989e-27 or 370 < z

                      1. Initial program 77.9%

                        \[\frac{x \cdot \left(y - z\right)}{t - z} \]
                      2. Add Preprocessing
                      3. Step-by-step derivation
                        1. lift-/.f64N/A

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

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

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

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

                          \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
                        6. lower-/.f6499.8

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

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

                        \[\leadsto \color{blue}{1} \cdot x \]
                      6. Step-by-step derivation
                        1. Applied rewrites57.4%

                          \[\leadsto \color{blue}{1} \cdot x \]

                        if -2.69999999999999989e-27 < z < 370

                        1. Initial program 92.1%

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

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

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

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

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

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

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

                        Alternative 9: 34.8% accurate, 3.8× speedup?

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

                          \[\frac{x \cdot \left(y - z\right)}{t - z} \]
                        2. Add Preprocessing
                        3. Step-by-step derivation
                          1. lift-/.f64N/A

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

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

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

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

                            \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
                          6. lower-/.f6495.6

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

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

                          \[\leadsto \color{blue}{1} \cdot x \]
                        6. Step-by-step derivation
                          1. Applied rewrites32.6%

                            \[\leadsto \color{blue}{1} \cdot x \]
                          2. Add Preprocessing

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

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

                          Reproduce

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