Optimisation.CirclePacking:place from circle-packing-0.1.0.4, D

Percentage Accurate: 93.0% → 97.7%
Time: 4.7s
Alternatives: 9
Speedup: 1.1×

Specification

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

\\
x + \frac{y \cdot \left(z - x\right)}{t}
\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: 93.0% accurate, 1.0× speedup?

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

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

Alternative 1: 97.7% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(\frac{y}{t}, z - x, x\right) \end{array} \]
(FPCore (x y z t) :precision binary64 (fma (/ y t) (- z x) x))
double code(double x, double y, double z, double t) {
	return fma((y / t), (z - x), x);
}
function code(x, y, z, t)
	return fma(Float64(y / t), Float64(z - x), x)
end
code[x_, y_, z_, t_] := N[(N[(y / t), $MachinePrecision] * N[(z - x), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(\frac{y}{t}, z - x, x\right)
\end{array}
Derivation
  1. Initial program 90.3%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{t}, z - x, x\right)} \]
    9. lower-/.f6498.4

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

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

Alternative 2: 84.0% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{-92} \lor \neg \left(t \leq 3500000000000\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{t}, y, x\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(z - x\right) \cdot y}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= t -1e-92) (not (<= t 3500000000000.0)))
   (fma (/ z t) y x)
   (/ (* (- z x) y) t)))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((t <= -1e-92) || !(t <= 3500000000000.0)) {
		tmp = fma((z / t), y, x);
	} else {
		tmp = ((z - x) * y) / t;
	}
	return tmp;
}
function code(x, y, z, t)
	tmp = 0.0
	if ((t <= -1e-92) || !(t <= 3500000000000.0))
		tmp = fma(Float64(z / t), y, x);
	else
		tmp = Float64(Float64(Float64(z - x) * y) / t);
	end
	return tmp
end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -1e-92], N[Not[LessEqual[t, 3500000000000.0]], $MachinePrecision]], N[(N[(z / t), $MachinePrecision] * y + x), $MachinePrecision], N[(N[(N[(z - x), $MachinePrecision] * y), $MachinePrecision] / t), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-92} \lor \neg \left(t \leq 3500000000000\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{t}, y, x\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{\left(z - x\right) \cdot y}{t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -9.99999999999999988e-93 or 3.5e12 < t

    1. Initial program 85.5%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - x}{t}, y, x\right)} \]
      8. lower-/.f6497.3

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

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

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

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

      if -9.99999999999999988e-93 < t < 3.5e12

      1. Initial program 97.2%

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

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

          \[\leadsto \color{blue}{\frac{\left(z - x\right) \cdot y}{t}} \]
      5. Recombined 2 regimes into one program.
      6. Final simplification87.8%

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

      Alternative 3: 82.1% accurate, 0.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.25 \cdot 10^{+160} \lor \neg \left(x \leq 2.05 \cdot 10^{-14}\right):\\ \;\;\;\;\left(1 - \frac{y}{t}\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{t}, y, x\right)\\ \end{array} \end{array} \]
      (FPCore (x y z t)
       :precision binary64
       (if (or (<= x -1.25e+160) (not (<= x 2.05e-14)))
         (* (- 1.0 (/ y t)) x)
         (fma (/ z t) y x)))
      double code(double x, double y, double z, double t) {
      	double tmp;
      	if ((x <= -1.25e+160) || !(x <= 2.05e-14)) {
      		tmp = (1.0 - (y / t)) * x;
      	} else {
      		tmp = fma((z / t), y, x);
      	}
      	return tmp;
      }
      
      function code(x, y, z, t)
      	tmp = 0.0
      	if ((x <= -1.25e+160) || !(x <= 2.05e-14))
      		tmp = Float64(Float64(1.0 - Float64(y / t)) * x);
      	else
      		tmp = fma(Float64(z / t), y, x);
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_] := If[Or[LessEqual[x, -1.25e+160], N[Not[LessEqual[x, 2.05e-14]], $MachinePrecision]], N[(N[(1.0 - N[(y / t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], N[(N[(z / t), $MachinePrecision] * y + x), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;x \leq -1.25 \cdot 10^{+160} \lor \neg \left(x \leq 2.05 \cdot 10^{-14}\right):\\
      \;\;\;\;\left(1 - \frac{y}{t}\right) \cdot x\\
      
      \mathbf{else}:\\
      \;\;\;\;\mathsf{fma}\left(\frac{z}{t}, y, x\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if x < -1.25e160 or 2.0500000000000001e-14 < x

        1. Initial program 90.0%

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

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

            \[\leadsto \color{blue}{\left(1 - \frac{y}{t}\right) \cdot x} \]

          if -1.25e160 < x < 2.0500000000000001e-14

          1. Initial program 90.6%

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - x}{t}, y, x\right)} \]
            8. lower-/.f6493.0

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

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

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

              \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{z}}{t}, y, x\right) \]
          7. Recombined 2 regimes into one program.
          8. Final simplification87.7%

            \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.25 \cdot 10^{+160} \lor \neg \left(x \leq 2.05 \cdot 10^{-14}\right):\\ \;\;\;\;\left(1 - \frac{y}{t}\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{t}, y, x\right)\\ \end{array} \]
          9. Add Preprocessing

          Alternative 4: 54.4% accurate, 0.8× speedup?

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

            1. Initial program 82.9%

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{t}, z - x, x\right)} \]
              9. lower-/.f6497.4

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

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

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

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

              if -7.19999999999999988e87 < y < 5.60000000000000021e-67

              1. Initial program 96.5%

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

                \[\leadsto \color{blue}{x} \]
              4. Step-by-step derivation
                1. Applied rewrites59.7%

                  \[\leadsto \color{blue}{x} \]
              5. Recombined 2 regimes into one program.
              6. Final simplification60.7%

                \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.2 \cdot 10^{+87} \lor \neg \left(y \leq 5.6 \cdot 10^{-67}\right):\\ \;\;\;\;\frac{y}{t} \cdot z\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
              7. Add Preprocessing

              Alternative 5: 53.7% accurate, 0.8× speedup?

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

                1. Initial program 82.9%

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

                  \[\leadsto \color{blue}{\frac{y \cdot z}{t}} \]
                4. Step-by-step derivation
                  1. Applied rewrites60.3%

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

                  if -7.19999999999999988e87 < y < 5.60000000000000021e-67

                  1. Initial program 96.5%

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

                    \[\leadsto \color{blue}{x} \]
                  4. Step-by-step derivation
                    1. Applied rewrites59.7%

                      \[\leadsto \color{blue}{x} \]
                  5. Recombined 2 regimes into one program.
                  6. Final simplification60.0%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.2 \cdot 10^{+87} \lor \neg \left(y \leq 5.6 \cdot 10^{-67}\right):\\ \;\;\;\;\frac{z}{t} \cdot y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
                  7. Add Preprocessing

                  Alternative 6: 72.9% accurate, 0.9× speedup?

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

                    1. Initial program 90.1%

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

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

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

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

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

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

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

                        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - x}{t}, y, x\right)} \]
                      8. lower-/.f6491.6

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

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

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

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

                      if 1.19999999999999992e278 < x

                      1. Initial program 100.0%

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

                        \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{y}{t}\right)} \]
                      4. Step-by-step derivation
                        1. Applied rewrites100.0%

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

                          \[\leadsto \left(-1 \cdot \frac{y}{t}\right) \cdot x \]
                        3. Step-by-step derivation
                          1. Applied rewrites85.8%

                            \[\leadsto \frac{-y}{t} \cdot x \]
                        4. Recombined 2 regimes into one program.
                        5. Final simplification77.3%

                          \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.2 \cdot 10^{+278}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{t}, y, x\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{-y}{t} \cdot x\\ \end{array} \]
                        6. Add Preprocessing

                        Alternative 7: 72.9% accurate, 0.9× speedup?

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

                          1. Initial program 90.1%

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

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

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

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

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

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

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

                              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - x}{t}, y, x\right)} \]
                            8. lower-/.f6491.6

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

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

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

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

                            if 5.40000000000000018e281 < x

                            1. Initial program 100.0%

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

                              \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{y}{t}\right)} \]
                            4. Step-by-step derivation
                              1. Applied rewrites100.0%

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

                                \[\leadsto -1 \cdot \color{blue}{\frac{x \cdot y}{t}} \]
                              3. Step-by-step derivation
                                1. Applied rewrites85.7%

                                  \[\leadsto \left(-y\right) \cdot \color{blue}{\frac{x}{t}} \]
                              4. Recombined 2 regimes into one program.
                              5. Final simplification77.3%

                                \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 5.4 \cdot 10^{+281}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{t}, y, x\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-y\right) \cdot \frac{x}{t}\\ \end{array} \]
                              6. Add Preprocessing

                              Alternative 8: 73.2% accurate, 1.3× speedup?

                              \[\begin{array}{l} \\ \mathsf{fma}\left(\frac{z}{t}, y, x\right) \end{array} \]
                              (FPCore (x y z t) :precision binary64 (fma (/ z t) y x))
                              double code(double x, double y, double z, double t) {
                              	return fma((z / t), y, x);
                              }
                              
                              function code(x, y, z, t)
                              	return fma(Float64(z / t), y, x)
                              end
                              
                              code[x_, y_, z_, t_] := N[(N[(z / t), $MachinePrecision] * y + x), $MachinePrecision]
                              
                              \begin{array}{l}
                              
                              \\
                              \mathsf{fma}\left(\frac{z}{t}, y, x\right)
                              \end{array}
                              
                              Derivation
                              1. Initial program 90.3%

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{z}}{t}, y, x\right) \]
                                2. Add Preprocessing

                                Alternative 9: 38.8% accurate, 23.0× speedup?

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

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

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

                                    \[\leadsto \color{blue}{x} \]
                                  2. Final simplification39.6%

                                    \[\leadsto x \]
                                  3. Add Preprocessing

                                  Developer Target 1: 90.6% accurate, 0.6× speedup?

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

                                  Reproduce

                                  ?
                                  herbie shell --seed 2025018 
                                  (FPCore (x y z t)
                                    :name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, D"
                                    :precision binary64
                                  
                                    :alt
                                    (! :herbie-platform default (- x (+ (* x (/ y t)) (* (- z) (/ y t)))))
                                  
                                    (+ x (/ (* y (- z x)) t)))