Rosa's DopplerBench

Percentage Accurate: 73.3% → 96.8%
Time: 5.4s
Alternatives: 12
Speedup: 0.8×

Specification

?
\[\begin{array}{l} \\ \frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \end{array} \]
(FPCore (u v t1) :precision binary64 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))
double code(double u, double v, double t1) {
	return (-t1 * v) / ((t1 + u) * (t1 + u));
}
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(u, v, t1)
use fmin_fmax_functions
    real(8), intent (in) :: u
    real(8), intent (in) :: v
    real(8), intent (in) :: t1
    code = (-t1 * v) / ((t1 + u) * (t1 + u))
end function
public static double code(double u, double v, double t1) {
	return (-t1 * v) / ((t1 + u) * (t1 + u));
}
def code(u, v, t1):
	return (-t1 * v) / ((t1 + u) * (t1 + u))
function code(u, v, t1)
	return Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u)))
end
function tmp = code(u, v, t1)
	tmp = (-t1 * v) / ((t1 + u) * (t1 + u));
end
code[u_, v_, t1_] := N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

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

\[\begin{array}{l} \\ \frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \end{array} \]
(FPCore (u v t1) :precision binary64 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))
double code(double u, double v, double t1) {
	return (-t1 * v) / ((t1 + u) * (t1 + u));
}
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(u, v, t1)
use fmin_fmax_functions
    real(8), intent (in) :: u
    real(8), intent (in) :: v
    real(8), intent (in) :: t1
    code = (-t1 * v) / ((t1 + u) * (t1 + u))
end function
public static double code(double u, double v, double t1) {
	return (-t1 * v) / ((t1 + u) * (t1 + u));
}
def code(u, v, t1):
	return (-t1 * v) / ((t1 + u) * (t1 + u))
function code(u, v, t1)
	return Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u)))
end
function tmp = code(u, v, t1)
	tmp = (-t1 * v) / ((t1 + u) * (t1 + u));
end
code[u_, v_, t1_] := N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}
\end{array}

Alternative 1: 96.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \frac{\frac{t1}{u - t1} \cdot v}{\left(-u\right) + t1} \end{array} \]
(FPCore (u v t1) :precision binary64 (/ (* (/ t1 (- u t1)) v) (+ (- u) t1)))
double code(double u, double v, double t1) {
	return ((t1 / (u - t1)) * v) / (-u + t1);
}
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(u, v, t1)
use fmin_fmax_functions
    real(8), intent (in) :: u
    real(8), intent (in) :: v
    real(8), intent (in) :: t1
    code = ((t1 / (u - t1)) * v) / (-u + t1)
end function
public static double code(double u, double v, double t1) {
	return ((t1 / (u - t1)) * v) / (-u + t1);
}
def code(u, v, t1):
	return ((t1 / (u - t1)) * v) / (-u + t1)
function code(u, v, t1)
	return Float64(Float64(Float64(t1 / Float64(u - t1)) * v) / Float64(Float64(-u) + t1))
end
function tmp = code(u, v, t1)
	tmp = ((t1 / (u - t1)) * v) / (-u + t1);
end
code[u_, v_, t1_] := N[(N[(N[(t1 / N[(u - t1), $MachinePrecision]), $MachinePrecision] * v), $MachinePrecision] / N[((-u) + t1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\frac{t1}{u - t1} \cdot v}{\left(-u\right) + t1}
\end{array}
Derivation
  1. Initial program 72.7%

    \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
  2. Add Preprocessing
  3. Applied rewrites96.9%

    \[\leadsto \color{blue}{\frac{\frac{t1}{u - t1} \cdot \left(-v\right)}{u - t1}} \]
  4. Final simplification96.9%

    \[\leadsto \frac{\frac{t1}{u - t1} \cdot v}{\left(-u\right) + t1} \]
  5. Add Preprocessing

Alternative 2: 88.0% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t1 \leq -1.25 \cdot 10^{+154}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{v}{t1} \cdot u, 2, -v\right)}{t1}\\ \mathbf{elif}\;t1 \leq 2 \cdot 10^{+151}:\\ \;\;\;\;v \cdot \frac{-t1}{\mathsf{fma}\left(\mathsf{fma}\left(t1, 2, u\right), u, t1 \cdot t1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1 \cdot v}{\left(-u\right) + t1}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (if (<= t1 -1.25e+154)
   (/ (fma (* (/ v t1) u) 2.0 (- v)) t1)
   (if (<= t1 2e+151)
     (* v (/ (- t1) (fma (fma t1 2.0 u) u (* t1 t1))))
     (/ (* -1.0 v) (+ (- u) t1)))))
double code(double u, double v, double t1) {
	double tmp;
	if (t1 <= -1.25e+154) {
		tmp = fma(((v / t1) * u), 2.0, -v) / t1;
	} else if (t1 <= 2e+151) {
		tmp = v * (-t1 / fma(fma(t1, 2.0, u), u, (t1 * t1)));
	} else {
		tmp = (-1.0 * v) / (-u + t1);
	}
	return tmp;
}
function code(u, v, t1)
	tmp = 0.0
	if (t1 <= -1.25e+154)
		tmp = Float64(fma(Float64(Float64(v / t1) * u), 2.0, Float64(-v)) / t1);
	elseif (t1 <= 2e+151)
		tmp = Float64(v * Float64(Float64(-t1) / fma(fma(t1, 2.0, u), u, Float64(t1 * t1))));
	else
		tmp = Float64(Float64(-1.0 * v) / Float64(Float64(-u) + t1));
	end
	return tmp
end
code[u_, v_, t1_] := If[LessEqual[t1, -1.25e+154], N[(N[(N[(N[(v / t1), $MachinePrecision] * u), $MachinePrecision] * 2.0 + (-v)), $MachinePrecision] / t1), $MachinePrecision], If[LessEqual[t1, 2e+151], N[(v * N[((-t1) / N[(N[(t1 * 2.0 + u), $MachinePrecision] * u + N[(t1 * t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 * v), $MachinePrecision] / N[((-u) + t1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.25 \cdot 10^{+154}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{v}{t1} \cdot u, 2, -v\right)}{t1}\\

\mathbf{elif}\;t1 \leq 2 \cdot 10^{+151}:\\
\;\;\;\;v \cdot \frac{-t1}{\mathsf{fma}\left(\mathsf{fma}\left(t1, 2, u\right), u, t1 \cdot t1\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{-1 \cdot v}{\left(-u\right) + t1}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t1 < -1.25000000000000001e154

    1. Initial program 28.4%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in u around 0

      \[\leadsto \color{blue}{-1 \cdot \frac{v}{t1} + 2 \cdot \frac{u \cdot v}{{t1}^{2}}} \]
    4. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \color{blue}{\frac{-1 \cdot v}{t1}} + 2 \cdot \frac{u \cdot v}{{t1}^{2}} \]
      2. unpow2N/A

        \[\leadsto \frac{-1 \cdot v}{t1} + 2 \cdot \frac{u \cdot v}{\color{blue}{t1 \cdot t1}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{-1 \cdot v}{t1} + 2 \cdot \color{blue}{\frac{\frac{u \cdot v}{t1}}{t1}} \]
      4. associate-/l*N/A

        \[\leadsto \frac{-1 \cdot v}{t1} + \color{blue}{\frac{2 \cdot \frac{u \cdot v}{t1}}{t1}} \]
      5. div-addN/A

        \[\leadsto \color{blue}{\frac{-1 \cdot v + 2 \cdot \frac{u \cdot v}{t1}}{t1}} \]
      6. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{-1 \cdot v + 2 \cdot \frac{u \cdot v}{t1}}{t1}} \]
      7. +-commutativeN/A

        \[\leadsto \frac{\color{blue}{2 \cdot \frac{u \cdot v}{t1} + -1 \cdot v}}{t1} \]
      8. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{\frac{u \cdot v}{t1} \cdot 2} + -1 \cdot v}{t1} \]
      9. lower-fma.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{u \cdot v}{t1}, 2, -1 \cdot v\right)}}{t1} \]
      10. associate-/l*N/A

        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{u \cdot \frac{v}{t1}}, 2, -1 \cdot v\right)}{t1} \]
      11. *-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\frac{v}{t1} \cdot u}, 2, -1 \cdot v\right)}{t1} \]
      12. lower-*.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\frac{v}{t1} \cdot u}, 2, -1 \cdot v\right)}{t1} \]
      13. lower-/.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\frac{v}{t1}} \cdot u, 2, -1 \cdot v\right)}{t1} \]
      14. mul-1-negN/A

        \[\leadsto \frac{\mathsf{fma}\left(\frac{v}{t1} \cdot u, 2, \color{blue}{\mathsf{neg}\left(v\right)}\right)}{t1} \]
      15. lower-neg.f64100.0

        \[\leadsto \frac{\mathsf{fma}\left(\frac{v}{t1} \cdot u, 2, \color{blue}{-v}\right)}{t1} \]
    5. Applied rewrites100.0%

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\frac{v}{t1} \cdot u, 2, -v\right)}{t1}} \]

    if -1.25000000000000001e154 < t1 < 2.00000000000000003e151

    1. Initial program 86.8%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in u around 0

      \[\leadsto \frac{\left(-t1\right) \cdot v}{\color{blue}{u \cdot \left(u + 2 \cdot t1\right) + {t1}^{2}}} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\left(-t1\right) \cdot v}{\color{blue}{\left(u + 2 \cdot t1\right) \cdot u} + {t1}^{2}} \]
      2. lower-fma.f64N/A

        \[\leadsto \frac{\left(-t1\right) \cdot v}{\color{blue}{\mathsf{fma}\left(u + 2 \cdot t1, u, {t1}^{2}\right)}} \]
      3. +-commutativeN/A

        \[\leadsto \frac{\left(-t1\right) \cdot v}{\mathsf{fma}\left(\color{blue}{2 \cdot t1 + u}, u, {t1}^{2}\right)} \]
      4. lower-fma.f64N/A

        \[\leadsto \frac{\left(-t1\right) \cdot v}{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(2, t1, u\right)}, u, {t1}^{2}\right)} \]
      5. unpow2N/A

        \[\leadsto \frac{\left(-t1\right) \cdot v}{\mathsf{fma}\left(\mathsf{fma}\left(2, t1, u\right), u, \color{blue}{t1 \cdot t1}\right)} \]
      6. lower-*.f6486.8

        \[\leadsto \frac{\left(-t1\right) \cdot v}{\mathsf{fma}\left(\mathsf{fma}\left(2, t1, u\right), u, \color{blue}{t1 \cdot t1}\right)} \]
    5. Applied rewrites86.8%

      \[\leadsto \frac{\left(-t1\right) \cdot v}{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(2, t1, u\right), u, t1 \cdot t1\right)}} \]
    6. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{\left(-t1\right) \cdot v}{\mathsf{fma}\left(\mathsf{fma}\left(2, t1, u\right), u, t1 \cdot t1\right)}} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{\left(-t1\right) \cdot v}}{\mathsf{fma}\left(\mathsf{fma}\left(2, t1, u\right), u, t1 \cdot t1\right)} \]
      3. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{v \cdot \left(-t1\right)}}{\mathsf{fma}\left(\mathsf{fma}\left(2, t1, u\right), u, t1 \cdot t1\right)} \]
      4. associate-/l*N/A

        \[\leadsto \color{blue}{v \cdot \frac{-t1}{\mathsf{fma}\left(\mathsf{fma}\left(2, t1, u\right), u, t1 \cdot t1\right)}} \]
      5. lower-*.f64N/A

        \[\leadsto \color{blue}{v \cdot \frac{-t1}{\mathsf{fma}\left(\mathsf{fma}\left(2, t1, u\right), u, t1 \cdot t1\right)}} \]
      6. lower-/.f6491.9

        \[\leadsto v \cdot \color{blue}{\frac{-t1}{\mathsf{fma}\left(\mathsf{fma}\left(2, t1, u\right), u, t1 \cdot t1\right)}} \]
    7. Applied rewrites91.9%

      \[\leadsto \color{blue}{v \cdot \frac{-t1}{\mathsf{fma}\left(\mathsf{fma}\left(t1, 2, u\right), u, t1 \cdot t1\right)}} \]

    if 2.00000000000000003e151 < t1

    1. Initial program 36.6%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Add Preprocessing
    3. Applied rewrites98.7%

      \[\leadsto \color{blue}{\frac{\frac{t1}{u - t1} \cdot \left(-v\right)}{u - t1}} \]
    4. Taylor expanded in u around 0

      \[\leadsto \frac{\color{blue}{-1} \cdot \left(-v\right)}{u - t1} \]
    5. Step-by-step derivation
      1. Applied rewrites92.6%

        \[\leadsto \frac{\color{blue}{-1} \cdot \left(-v\right)}{u - t1} \]
    6. Recombined 3 regimes into one program.
    7. Final simplification93.2%

      \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -1.25 \cdot 10^{+154}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{v}{t1} \cdot u, 2, -v\right)}{t1}\\ \mathbf{elif}\;t1 \leq 2 \cdot 10^{+151}:\\ \;\;\;\;v \cdot \frac{-t1}{\mathsf{fma}\left(\mathsf{fma}\left(t1, 2, u\right), u, t1 \cdot t1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1 \cdot v}{\left(-u\right) + t1}\\ \end{array} \]
    8. Add Preprocessing

    Alternative 3: 86.5% accurate, 0.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t1 \leq -7 \cdot 10^{+82} \lor \neg \left(t1 \leq 7 \cdot 10^{+132}\right):\\ \;\;\;\;\frac{-1 \cdot v}{\left(-u\right) + t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\ \end{array} \end{array} \]
    (FPCore (u v t1)
     :precision binary64
     (if (or (<= t1 -7e+82) (not (<= t1 7e+132)))
       (/ (* -1.0 v) (+ (- u) t1))
       (/ (* (- t1) v) (* (+ t1 u) (+ t1 u)))))
    double code(double u, double v, double t1) {
    	double tmp;
    	if ((t1 <= -7e+82) || !(t1 <= 7e+132)) {
    		tmp = (-1.0 * v) / (-u + t1);
    	} else {
    		tmp = (-t1 * v) / ((t1 + u) * (t1 + u));
    	}
    	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(u, v, t1)
    use fmin_fmax_functions
        real(8), intent (in) :: u
        real(8), intent (in) :: v
        real(8), intent (in) :: t1
        real(8) :: tmp
        if ((t1 <= (-7d+82)) .or. (.not. (t1 <= 7d+132))) then
            tmp = ((-1.0d0) * v) / (-u + t1)
        else
            tmp = (-t1 * v) / ((t1 + u) * (t1 + u))
        end if
        code = tmp
    end function
    
    public static double code(double u, double v, double t1) {
    	double tmp;
    	if ((t1 <= -7e+82) || !(t1 <= 7e+132)) {
    		tmp = (-1.0 * v) / (-u + t1);
    	} else {
    		tmp = (-t1 * v) / ((t1 + u) * (t1 + u));
    	}
    	return tmp;
    }
    
    def code(u, v, t1):
    	tmp = 0
    	if (t1 <= -7e+82) or not (t1 <= 7e+132):
    		tmp = (-1.0 * v) / (-u + t1)
    	else:
    		tmp = (-t1 * v) / ((t1 + u) * (t1 + u))
    	return tmp
    
    function code(u, v, t1)
    	tmp = 0.0
    	if ((t1 <= -7e+82) || !(t1 <= 7e+132))
    		tmp = Float64(Float64(-1.0 * v) / Float64(Float64(-u) + t1));
    	else
    		tmp = Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u)));
    	end
    	return tmp
    end
    
    function tmp_2 = code(u, v, t1)
    	tmp = 0.0;
    	if ((t1 <= -7e+82) || ~((t1 <= 7e+132)))
    		tmp = (-1.0 * v) / (-u + t1);
    	else
    		tmp = (-t1 * v) / ((t1 + u) * (t1 + u));
    	end
    	tmp_2 = tmp;
    end
    
    code[u_, v_, t1_] := If[Or[LessEqual[t1, -7e+82], N[Not[LessEqual[t1, 7e+132]], $MachinePrecision]], N[(N[(-1.0 * v), $MachinePrecision] / N[((-u) + t1), $MachinePrecision]), $MachinePrecision], N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;t1 \leq -7 \cdot 10^{+82} \lor \neg \left(t1 \leq 7 \cdot 10^{+132}\right):\\
    \;\;\;\;\frac{-1 \cdot v}{\left(-u\right) + t1}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if t1 < -7.0000000000000001e82 or 7.00000000000000041e132 < t1

      1. Initial program 39.9%

        \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
      2. Add Preprocessing
      3. Applied rewrites96.9%

        \[\leadsto \color{blue}{\frac{\frac{t1}{u - t1} \cdot \left(-v\right)}{u - t1}} \]
      4. Taylor expanded in u around 0

        \[\leadsto \frac{\color{blue}{-1} \cdot \left(-v\right)}{u - t1} \]
      5. Step-by-step derivation
        1. Applied rewrites94.1%

          \[\leadsto \frac{\color{blue}{-1} \cdot \left(-v\right)}{u - t1} \]

        if -7.0000000000000001e82 < t1 < 7.00000000000000041e132

        1. Initial program 90.2%

          \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
        2. Add Preprocessing
      6. Recombined 2 regimes into one program.
      7. Final simplification91.6%

        \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -7 \cdot 10^{+82} \lor \neg \left(t1 \leq 7 \cdot 10^{+132}\right):\\ \;\;\;\;\frac{-1 \cdot v}{\left(-u\right) + t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\ \end{array} \]
      8. Add Preprocessing

      Alternative 4: 78.9% accurate, 0.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t1 \leq -1.3 \cdot 10^{-118} \lor \neg \left(t1 \leq 1.8 \cdot 10^{-56}\right):\\ \;\;\;\;\frac{-1 \cdot v}{\left(-u\right) + t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{-t1}{u} \cdot v}{u}\\ \end{array} \end{array} \]
      (FPCore (u v t1)
       :precision binary64
       (if (or (<= t1 -1.3e-118) (not (<= t1 1.8e-56)))
         (/ (* -1.0 v) (+ (- u) t1))
         (/ (* (/ (- t1) u) v) u)))
      double code(double u, double v, double t1) {
      	double tmp;
      	if ((t1 <= -1.3e-118) || !(t1 <= 1.8e-56)) {
      		tmp = (-1.0 * v) / (-u + t1);
      	} else {
      		tmp = ((-t1 / u) * v) / u;
      	}
      	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(u, v, t1)
      use fmin_fmax_functions
          real(8), intent (in) :: u
          real(8), intent (in) :: v
          real(8), intent (in) :: t1
          real(8) :: tmp
          if ((t1 <= (-1.3d-118)) .or. (.not. (t1 <= 1.8d-56))) then
              tmp = ((-1.0d0) * v) / (-u + t1)
          else
              tmp = ((-t1 / u) * v) / u
          end if
          code = tmp
      end function
      
      public static double code(double u, double v, double t1) {
      	double tmp;
      	if ((t1 <= -1.3e-118) || !(t1 <= 1.8e-56)) {
      		tmp = (-1.0 * v) / (-u + t1);
      	} else {
      		tmp = ((-t1 / u) * v) / u;
      	}
      	return tmp;
      }
      
      def code(u, v, t1):
      	tmp = 0
      	if (t1 <= -1.3e-118) or not (t1 <= 1.8e-56):
      		tmp = (-1.0 * v) / (-u + t1)
      	else:
      		tmp = ((-t1 / u) * v) / u
      	return tmp
      
      function code(u, v, t1)
      	tmp = 0.0
      	if ((t1 <= -1.3e-118) || !(t1 <= 1.8e-56))
      		tmp = Float64(Float64(-1.0 * v) / Float64(Float64(-u) + t1));
      	else
      		tmp = Float64(Float64(Float64(Float64(-t1) / u) * v) / u);
      	end
      	return tmp
      end
      
      function tmp_2 = code(u, v, t1)
      	tmp = 0.0;
      	if ((t1 <= -1.3e-118) || ~((t1 <= 1.8e-56)))
      		tmp = (-1.0 * v) / (-u + t1);
      	else
      		tmp = ((-t1 / u) * v) / u;
      	end
      	tmp_2 = tmp;
      end
      
      code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.3e-118], N[Not[LessEqual[t1, 1.8e-56]], $MachinePrecision]], N[(N[(-1.0 * v), $MachinePrecision] / N[((-u) + t1), $MachinePrecision]), $MachinePrecision], N[(N[(N[((-t1) / u), $MachinePrecision] * v), $MachinePrecision] / u), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;t1 \leq -1.3 \cdot 10^{-118} \lor \neg \left(t1 \leq 1.8 \cdot 10^{-56}\right):\\
      \;\;\;\;\frac{-1 \cdot v}{\left(-u\right) + t1}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{\frac{-t1}{u} \cdot v}{u}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if t1 < -1.3e-118 or 1.79999999999999989e-56 < t1

        1. Initial program 66.5%

          \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
        2. Add Preprocessing
        3. Applied rewrites96.5%

          \[\leadsto \color{blue}{\frac{\frac{t1}{u - t1} \cdot \left(-v\right)}{u - t1}} \]
        4. Taylor expanded in u around 0

          \[\leadsto \frac{\color{blue}{-1} \cdot \left(-v\right)}{u - t1} \]
        5. Step-by-step derivation
          1. Applied rewrites82.1%

            \[\leadsto \frac{\color{blue}{-1} \cdot \left(-v\right)}{u - t1} \]

          if -1.3e-118 < t1 < 1.79999999999999989e-56

          1. Initial program 86.2%

            \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
          2. Add Preprocessing
          3. Taylor expanded in u around inf

            \[\leadsto \color{blue}{-1 \cdot \frac{t1 \cdot v}{{u}^{2}}} \]
          4. Step-by-step derivation
            1. associate-*r/N/A

              \[\leadsto \color{blue}{\frac{-1 \cdot \left(t1 \cdot v\right)}{{u}^{2}}} \]
            2. associate-*r*N/A

              \[\leadsto \frac{\color{blue}{\left(-1 \cdot t1\right) \cdot v}}{{u}^{2}} \]
            3. mul-1-negN/A

              \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(t1\right)\right)} \cdot v}{{u}^{2}} \]
            4. unpow2N/A

              \[\leadsto \frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{\color{blue}{u \cdot u}} \]
            5. times-fracN/A

              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(t1\right)}{u} \cdot \frac{v}{u}} \]
            6. lower-*.f64N/A

              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(t1\right)}{u} \cdot \frac{v}{u}} \]
            7. lower-/.f64N/A

              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(t1\right)}{u}} \cdot \frac{v}{u} \]
            8. lower-neg.f64N/A

              \[\leadsto \frac{\color{blue}{-t1}}{u} \cdot \frac{v}{u} \]
            9. lower-/.f6478.4

              \[\leadsto \frac{-t1}{u} \cdot \color{blue}{\frac{v}{u}} \]
          5. Applied rewrites78.4%

            \[\leadsto \color{blue}{\frac{-t1}{u} \cdot \frac{v}{u}} \]
          6. Step-by-step derivation
            1. Applied rewrites83.7%

              \[\leadsto \frac{\frac{-t1}{u} \cdot v}{\color{blue}{u}} \]
          7. Recombined 2 regimes into one program.
          8. Final simplification82.6%

            \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -1.3 \cdot 10^{-118} \lor \neg \left(t1 \leq 1.8 \cdot 10^{-56}\right):\\ \;\;\;\;\frac{-1 \cdot v}{\left(-u\right) + t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{-t1}{u} \cdot v}{u}\\ \end{array} \]
          9. Add Preprocessing

          Alternative 5: 78.0% accurate, 0.7× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t1 \leq -1.2 \cdot 10^{-108} \lor \neg \left(t1 \leq 1.8 \cdot 10^{-56}\right):\\ \;\;\;\;\frac{-1 \cdot v}{\left(-u\right) + t1}\\ \mathbf{else}:\\ \;\;\;\;\left(-t1\right) \cdot \frac{\frac{v}{u}}{u}\\ \end{array} \end{array} \]
          (FPCore (u v t1)
           :precision binary64
           (if (or (<= t1 -1.2e-108) (not (<= t1 1.8e-56)))
             (/ (* -1.0 v) (+ (- u) t1))
             (* (- t1) (/ (/ v u) u))))
          double code(double u, double v, double t1) {
          	double tmp;
          	if ((t1 <= -1.2e-108) || !(t1 <= 1.8e-56)) {
          		tmp = (-1.0 * v) / (-u + t1);
          	} else {
          		tmp = -t1 * ((v / u) / u);
          	}
          	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(u, v, t1)
          use fmin_fmax_functions
              real(8), intent (in) :: u
              real(8), intent (in) :: v
              real(8), intent (in) :: t1
              real(8) :: tmp
              if ((t1 <= (-1.2d-108)) .or. (.not. (t1 <= 1.8d-56))) then
                  tmp = ((-1.0d0) * v) / (-u + t1)
              else
                  tmp = -t1 * ((v / u) / u)
              end if
              code = tmp
          end function
          
          public static double code(double u, double v, double t1) {
          	double tmp;
          	if ((t1 <= -1.2e-108) || !(t1 <= 1.8e-56)) {
          		tmp = (-1.0 * v) / (-u + t1);
          	} else {
          		tmp = -t1 * ((v / u) / u);
          	}
          	return tmp;
          }
          
          def code(u, v, t1):
          	tmp = 0
          	if (t1 <= -1.2e-108) or not (t1 <= 1.8e-56):
          		tmp = (-1.0 * v) / (-u + t1)
          	else:
          		tmp = -t1 * ((v / u) / u)
          	return tmp
          
          function code(u, v, t1)
          	tmp = 0.0
          	if ((t1 <= -1.2e-108) || !(t1 <= 1.8e-56))
          		tmp = Float64(Float64(-1.0 * v) / Float64(Float64(-u) + t1));
          	else
          		tmp = Float64(Float64(-t1) * Float64(Float64(v / u) / u));
          	end
          	return tmp
          end
          
          function tmp_2 = code(u, v, t1)
          	tmp = 0.0;
          	if ((t1 <= -1.2e-108) || ~((t1 <= 1.8e-56)))
          		tmp = (-1.0 * v) / (-u + t1);
          	else
          		tmp = -t1 * ((v / u) / u);
          	end
          	tmp_2 = tmp;
          end
          
          code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.2e-108], N[Not[LessEqual[t1, 1.8e-56]], $MachinePrecision]], N[(N[(-1.0 * v), $MachinePrecision] / N[((-u) + t1), $MachinePrecision]), $MachinePrecision], N[((-t1) * N[(N[(v / u), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;t1 \leq -1.2 \cdot 10^{-108} \lor \neg \left(t1 \leq 1.8 \cdot 10^{-56}\right):\\
          \;\;\;\;\frac{-1 \cdot v}{\left(-u\right) + t1}\\
          
          \mathbf{else}:\\
          \;\;\;\;\left(-t1\right) \cdot \frac{\frac{v}{u}}{u}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if t1 < -1.20000000000000009e-108 or 1.79999999999999989e-56 < t1

            1. Initial program 65.9%

              \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
            2. Add Preprocessing
            3. Applied rewrites96.5%

              \[\leadsto \color{blue}{\frac{\frac{t1}{u - t1} \cdot \left(-v\right)}{u - t1}} \]
            4. Taylor expanded in u around 0

              \[\leadsto \frac{\color{blue}{-1} \cdot \left(-v\right)}{u - t1} \]
            5. Step-by-step derivation
              1. Applied rewrites82.4%

                \[\leadsto \frac{\color{blue}{-1} \cdot \left(-v\right)}{u - t1} \]

              if -1.20000000000000009e-108 < t1 < 1.79999999999999989e-56

              1. Initial program 86.7%

                \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
              2. Add Preprocessing
              3. Taylor expanded in u around inf

                \[\leadsto \color{blue}{-1 \cdot \frac{t1 \cdot v}{{u}^{2}}} \]
              4. Step-by-step derivation
                1. associate-*r/N/A

                  \[\leadsto \color{blue}{\frac{-1 \cdot \left(t1 \cdot v\right)}{{u}^{2}}} \]
                2. associate-*r*N/A

                  \[\leadsto \frac{\color{blue}{\left(-1 \cdot t1\right) \cdot v}}{{u}^{2}} \]
                3. mul-1-negN/A

                  \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(t1\right)\right)} \cdot v}{{u}^{2}} \]
                4. unpow2N/A

                  \[\leadsto \frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{\color{blue}{u \cdot u}} \]
                5. times-fracN/A

                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(t1\right)}{u} \cdot \frac{v}{u}} \]
                6. lower-*.f64N/A

                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(t1\right)}{u} \cdot \frac{v}{u}} \]
                7. lower-/.f64N/A

                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(t1\right)}{u}} \cdot \frac{v}{u} \]
                8. lower-neg.f64N/A

                  \[\leadsto \frac{\color{blue}{-t1}}{u} \cdot \frac{v}{u} \]
                9. lower-/.f6478.0

                  \[\leadsto \frac{-t1}{u} \cdot \color{blue}{\frac{v}{u}} \]
              5. Applied rewrites78.0%

                \[\leadsto \color{blue}{\frac{-t1}{u} \cdot \frac{v}{u}} \]
              6. Step-by-step derivation
                1. Applied rewrites78.9%

                  \[\leadsto \left(-t1\right) \cdot \color{blue}{\frac{\frac{v}{u}}{u}} \]
              7. Recombined 2 regimes into one program.
              8. Final simplification81.2%

                \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -1.2 \cdot 10^{-108} \lor \neg \left(t1 \leq 1.8 \cdot 10^{-56}\right):\\ \;\;\;\;\frac{-1 \cdot v}{\left(-u\right) + t1}\\ \mathbf{else}:\\ \;\;\;\;\left(-t1\right) \cdot \frac{\frac{v}{u}}{u}\\ \end{array} \]
              9. Add Preprocessing

              Alternative 6: 86.0% accurate, 0.7× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t1 \leq -7 \cdot 10^{+82}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{v}{t1} \cdot u, 2, -v\right)}{t1}\\ \mathbf{elif}\;t1 \leq 7 \cdot 10^{+132}:\\ \;\;\;\;\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1 \cdot v}{\left(-u\right) + t1}\\ \end{array} \end{array} \]
              (FPCore (u v t1)
               :precision binary64
               (if (<= t1 -7e+82)
                 (/ (fma (* (/ v t1) u) 2.0 (- v)) t1)
                 (if (<= t1 7e+132)
                   (/ (* (- t1) v) (* (+ t1 u) (+ t1 u)))
                   (/ (* -1.0 v) (+ (- u) t1)))))
              double code(double u, double v, double t1) {
              	double tmp;
              	if (t1 <= -7e+82) {
              		tmp = fma(((v / t1) * u), 2.0, -v) / t1;
              	} else if (t1 <= 7e+132) {
              		tmp = (-t1 * v) / ((t1 + u) * (t1 + u));
              	} else {
              		tmp = (-1.0 * v) / (-u + t1);
              	}
              	return tmp;
              }
              
              function code(u, v, t1)
              	tmp = 0.0
              	if (t1 <= -7e+82)
              		tmp = Float64(fma(Float64(Float64(v / t1) * u), 2.0, Float64(-v)) / t1);
              	elseif (t1 <= 7e+132)
              		tmp = Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u)));
              	else
              		tmp = Float64(Float64(-1.0 * v) / Float64(Float64(-u) + t1));
              	end
              	return tmp
              end
              
              code[u_, v_, t1_] := If[LessEqual[t1, -7e+82], N[(N[(N[(N[(v / t1), $MachinePrecision] * u), $MachinePrecision] * 2.0 + (-v)), $MachinePrecision] / t1), $MachinePrecision], If[LessEqual[t1, 7e+132], N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 * v), $MachinePrecision] / N[((-u) + t1), $MachinePrecision]), $MachinePrecision]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;t1 \leq -7 \cdot 10^{+82}:\\
              \;\;\;\;\frac{\mathsf{fma}\left(\frac{v}{t1} \cdot u, 2, -v\right)}{t1}\\
              
              \mathbf{elif}\;t1 \leq 7 \cdot 10^{+132}:\\
              \;\;\;\;\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{-1 \cdot v}{\left(-u\right) + t1}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if t1 < -7.0000000000000001e82

                1. Initial program 42.5%

                  \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                2. Add Preprocessing
                3. Taylor expanded in u around 0

                  \[\leadsto \color{blue}{-1 \cdot \frac{v}{t1} + 2 \cdot \frac{u \cdot v}{{t1}^{2}}} \]
                4. Step-by-step derivation
                  1. associate-*r/N/A

                    \[\leadsto \color{blue}{\frac{-1 \cdot v}{t1}} + 2 \cdot \frac{u \cdot v}{{t1}^{2}} \]
                  2. unpow2N/A

                    \[\leadsto \frac{-1 \cdot v}{t1} + 2 \cdot \frac{u \cdot v}{\color{blue}{t1 \cdot t1}} \]
                  3. associate-/r*N/A

                    \[\leadsto \frac{-1 \cdot v}{t1} + 2 \cdot \color{blue}{\frac{\frac{u \cdot v}{t1}}{t1}} \]
                  4. associate-/l*N/A

                    \[\leadsto \frac{-1 \cdot v}{t1} + \color{blue}{\frac{2 \cdot \frac{u \cdot v}{t1}}{t1}} \]
                  5. div-addN/A

                    \[\leadsto \color{blue}{\frac{-1 \cdot v + 2 \cdot \frac{u \cdot v}{t1}}{t1}} \]
                  6. lower-/.f64N/A

                    \[\leadsto \color{blue}{\frac{-1 \cdot v + 2 \cdot \frac{u \cdot v}{t1}}{t1}} \]
                  7. +-commutativeN/A

                    \[\leadsto \frac{\color{blue}{2 \cdot \frac{u \cdot v}{t1} + -1 \cdot v}}{t1} \]
                  8. *-commutativeN/A

                    \[\leadsto \frac{\color{blue}{\frac{u \cdot v}{t1} \cdot 2} + -1 \cdot v}{t1} \]
                  9. lower-fma.f64N/A

                    \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{u \cdot v}{t1}, 2, -1 \cdot v\right)}}{t1} \]
                  10. associate-/l*N/A

                    \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{u \cdot \frac{v}{t1}}, 2, -1 \cdot v\right)}{t1} \]
                  11. *-commutativeN/A

                    \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\frac{v}{t1} \cdot u}, 2, -1 \cdot v\right)}{t1} \]
                  12. lower-*.f64N/A

                    \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\frac{v}{t1} \cdot u}, 2, -1 \cdot v\right)}{t1} \]
                  13. lower-/.f64N/A

                    \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\frac{v}{t1}} \cdot u, 2, -1 \cdot v\right)}{t1} \]
                  14. mul-1-negN/A

                    \[\leadsto \frac{\mathsf{fma}\left(\frac{v}{t1} \cdot u, 2, \color{blue}{\mathsf{neg}\left(v\right)}\right)}{t1} \]
                  15. lower-neg.f6496.2

                    \[\leadsto \frac{\mathsf{fma}\left(\frac{v}{t1} \cdot u, 2, \color{blue}{-v}\right)}{t1} \]
                5. Applied rewrites96.2%

                  \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\frac{v}{t1} \cdot u, 2, -v\right)}{t1}} \]

                if -7.0000000000000001e82 < t1 < 7.00000000000000041e132

                1. Initial program 90.2%

                  \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                2. Add Preprocessing

                if 7.00000000000000041e132 < t1

                1. Initial program 35.6%

                  \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                2. Add Preprocessing
                3. Applied rewrites98.1%

                  \[\leadsto \color{blue}{\frac{\frac{t1}{u - t1} \cdot \left(-v\right)}{u - t1}} \]
                4. Taylor expanded in u around 0

                  \[\leadsto \frac{\color{blue}{-1} \cdot \left(-v\right)}{u - t1} \]
                5. Step-by-step derivation
                  1. Applied rewrites90.7%

                    \[\leadsto \frac{\color{blue}{-1} \cdot \left(-v\right)}{u - t1} \]
                6. Recombined 3 regimes into one program.
                7. Final simplification91.6%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -7 \cdot 10^{+82}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{v}{t1} \cdot u, 2, -v\right)}{t1}\\ \mathbf{elif}\;t1 \leq 7 \cdot 10^{+132}:\\ \;\;\;\;\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1 \cdot v}{\left(-u\right) + t1}\\ \end{array} \]
                8. Add Preprocessing

                Alternative 7: 76.6% accurate, 0.8× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t1 \leq -1.3 \cdot 10^{-118} \lor \neg \left(t1 \leq 1.8 \cdot 10^{-56}\right):\\ \;\;\;\;\frac{-1 \cdot v}{\left(-u\right) + t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-t1\right) \cdot v}{u \cdot u}\\ \end{array} \end{array} \]
                (FPCore (u v t1)
                 :precision binary64
                 (if (or (<= t1 -1.3e-118) (not (<= t1 1.8e-56)))
                   (/ (* -1.0 v) (+ (- u) t1))
                   (/ (* (- t1) v) (* u u))))
                double code(double u, double v, double t1) {
                	double tmp;
                	if ((t1 <= -1.3e-118) || !(t1 <= 1.8e-56)) {
                		tmp = (-1.0 * v) / (-u + t1);
                	} else {
                		tmp = (-t1 * v) / (u * u);
                	}
                	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(u, v, t1)
                use fmin_fmax_functions
                    real(8), intent (in) :: u
                    real(8), intent (in) :: v
                    real(8), intent (in) :: t1
                    real(8) :: tmp
                    if ((t1 <= (-1.3d-118)) .or. (.not. (t1 <= 1.8d-56))) then
                        tmp = ((-1.0d0) * v) / (-u + t1)
                    else
                        tmp = (-t1 * v) / (u * u)
                    end if
                    code = tmp
                end function
                
                public static double code(double u, double v, double t1) {
                	double tmp;
                	if ((t1 <= -1.3e-118) || !(t1 <= 1.8e-56)) {
                		tmp = (-1.0 * v) / (-u + t1);
                	} else {
                		tmp = (-t1 * v) / (u * u);
                	}
                	return tmp;
                }
                
                def code(u, v, t1):
                	tmp = 0
                	if (t1 <= -1.3e-118) or not (t1 <= 1.8e-56):
                		tmp = (-1.0 * v) / (-u + t1)
                	else:
                		tmp = (-t1 * v) / (u * u)
                	return tmp
                
                function code(u, v, t1)
                	tmp = 0.0
                	if ((t1 <= -1.3e-118) || !(t1 <= 1.8e-56))
                		tmp = Float64(Float64(-1.0 * v) / Float64(Float64(-u) + t1));
                	else
                		tmp = Float64(Float64(Float64(-t1) * v) / Float64(u * u));
                	end
                	return tmp
                end
                
                function tmp_2 = code(u, v, t1)
                	tmp = 0.0;
                	if ((t1 <= -1.3e-118) || ~((t1 <= 1.8e-56)))
                		tmp = (-1.0 * v) / (-u + t1);
                	else
                		tmp = (-t1 * v) / (u * u);
                	end
                	tmp_2 = tmp;
                end
                
                code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.3e-118], N[Not[LessEqual[t1, 1.8e-56]], $MachinePrecision]], N[(N[(-1.0 * v), $MachinePrecision] / N[((-u) + t1), $MachinePrecision]), $MachinePrecision], N[(N[((-t1) * v), $MachinePrecision] / N[(u * u), $MachinePrecision]), $MachinePrecision]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;t1 \leq -1.3 \cdot 10^{-118} \lor \neg \left(t1 \leq 1.8 \cdot 10^{-56}\right):\\
                \;\;\;\;\frac{-1 \cdot v}{\left(-u\right) + t1}\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{\left(-t1\right) \cdot v}{u \cdot u}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if t1 < -1.3e-118 or 1.79999999999999989e-56 < t1

                  1. Initial program 66.5%

                    \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                  2. Add Preprocessing
                  3. Applied rewrites96.5%

                    \[\leadsto \color{blue}{\frac{\frac{t1}{u - t1} \cdot \left(-v\right)}{u - t1}} \]
                  4. Taylor expanded in u around 0

                    \[\leadsto \frac{\color{blue}{-1} \cdot \left(-v\right)}{u - t1} \]
                  5. Step-by-step derivation
                    1. Applied rewrites82.1%

                      \[\leadsto \frac{\color{blue}{-1} \cdot \left(-v\right)}{u - t1} \]

                    if -1.3e-118 < t1 < 1.79999999999999989e-56

                    1. Initial program 86.2%

                      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                    2. Add Preprocessing
                    3. Taylor expanded in u around inf

                      \[\leadsto \frac{\left(-t1\right) \cdot v}{\color{blue}{{u}^{2}}} \]
                    4. Step-by-step derivation
                      1. unpow2N/A

                        \[\leadsto \frac{\left(-t1\right) \cdot v}{\color{blue}{u \cdot u}} \]
                      2. lower-*.f6477.0

                        \[\leadsto \frac{\left(-t1\right) \cdot v}{\color{blue}{u \cdot u}} \]
                    5. Applied rewrites77.0%

                      \[\leadsto \frac{\left(-t1\right) \cdot v}{\color{blue}{u \cdot u}} \]
                  6. Recombined 2 regimes into one program.
                  7. Final simplification80.5%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -1.3 \cdot 10^{-118} \lor \neg \left(t1 \leq 1.8 \cdot 10^{-56}\right):\\ \;\;\;\;\frac{-1 \cdot v}{\left(-u\right) + t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-t1\right) \cdot v}{u \cdot u}\\ \end{array} \]
                  8. Add Preprocessing

                  Alternative 8: 76.4% accurate, 0.8× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t1 \leq -1.3 \cdot 10^{-118} \lor \neg \left(t1 \leq 1.8 \cdot 10^{-56}\right):\\ \;\;\;\;\frac{-1 \cdot v}{\left(-u\right) + t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{u \cdot u} \cdot t1\\ \end{array} \end{array} \]
                  (FPCore (u v t1)
                   :precision binary64
                   (if (or (<= t1 -1.3e-118) (not (<= t1 1.8e-56)))
                     (/ (* -1.0 v) (+ (- u) t1))
                     (* (/ (- v) (* u u)) t1)))
                  double code(double u, double v, double t1) {
                  	double tmp;
                  	if ((t1 <= -1.3e-118) || !(t1 <= 1.8e-56)) {
                  		tmp = (-1.0 * v) / (-u + t1);
                  	} else {
                  		tmp = (-v / (u * u)) * t1;
                  	}
                  	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(u, v, t1)
                  use fmin_fmax_functions
                      real(8), intent (in) :: u
                      real(8), intent (in) :: v
                      real(8), intent (in) :: t1
                      real(8) :: tmp
                      if ((t1 <= (-1.3d-118)) .or. (.not. (t1 <= 1.8d-56))) then
                          tmp = ((-1.0d0) * v) / (-u + t1)
                      else
                          tmp = (-v / (u * u)) * t1
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double u, double v, double t1) {
                  	double tmp;
                  	if ((t1 <= -1.3e-118) || !(t1 <= 1.8e-56)) {
                  		tmp = (-1.0 * v) / (-u + t1);
                  	} else {
                  		tmp = (-v / (u * u)) * t1;
                  	}
                  	return tmp;
                  }
                  
                  def code(u, v, t1):
                  	tmp = 0
                  	if (t1 <= -1.3e-118) or not (t1 <= 1.8e-56):
                  		tmp = (-1.0 * v) / (-u + t1)
                  	else:
                  		tmp = (-v / (u * u)) * t1
                  	return tmp
                  
                  function code(u, v, t1)
                  	tmp = 0.0
                  	if ((t1 <= -1.3e-118) || !(t1 <= 1.8e-56))
                  		tmp = Float64(Float64(-1.0 * v) / Float64(Float64(-u) + t1));
                  	else
                  		tmp = Float64(Float64(Float64(-v) / Float64(u * u)) * t1);
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(u, v, t1)
                  	tmp = 0.0;
                  	if ((t1 <= -1.3e-118) || ~((t1 <= 1.8e-56)))
                  		tmp = (-1.0 * v) / (-u + t1);
                  	else
                  		tmp = (-v / (u * u)) * t1;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.3e-118], N[Not[LessEqual[t1, 1.8e-56]], $MachinePrecision]], N[(N[(-1.0 * v), $MachinePrecision] / N[((-u) + t1), $MachinePrecision]), $MachinePrecision], N[(N[((-v) / N[(u * u), $MachinePrecision]), $MachinePrecision] * t1), $MachinePrecision]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;t1 \leq -1.3 \cdot 10^{-118} \lor \neg \left(t1 \leq 1.8 \cdot 10^{-56}\right):\\
                  \;\;\;\;\frac{-1 \cdot v}{\left(-u\right) + t1}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\frac{-v}{u \cdot u} \cdot t1\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if t1 < -1.3e-118 or 1.79999999999999989e-56 < t1

                    1. Initial program 66.5%

                      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                    2. Add Preprocessing
                    3. Applied rewrites96.5%

                      \[\leadsto \color{blue}{\frac{\frac{t1}{u - t1} \cdot \left(-v\right)}{u - t1}} \]
                    4. Taylor expanded in u around 0

                      \[\leadsto \frac{\color{blue}{-1} \cdot \left(-v\right)}{u - t1} \]
                    5. Step-by-step derivation
                      1. Applied rewrites82.1%

                        \[\leadsto \frac{\color{blue}{-1} \cdot \left(-v\right)}{u - t1} \]

                      if -1.3e-118 < t1 < 1.79999999999999989e-56

                      1. Initial program 86.2%

                        \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                      2. Add Preprocessing
                      3. Taylor expanded in t1 around 0

                        \[\leadsto \color{blue}{t1 \cdot \left(-1 \cdot \frac{v}{{u}^{2}} + 2 \cdot \frac{t1 \cdot v}{{u}^{3}}\right)} \]
                      4. Step-by-step derivation
                        1. *-commutativeN/A

                          \[\leadsto \color{blue}{\left(-1 \cdot \frac{v}{{u}^{2}} + 2 \cdot \frac{t1 \cdot v}{{u}^{3}}\right) \cdot t1} \]
                        2. lower-*.f64N/A

                          \[\leadsto \color{blue}{\left(-1 \cdot \frac{v}{{u}^{2}} + 2 \cdot \frac{t1 \cdot v}{{u}^{3}}\right) \cdot t1} \]
                        3. associate-*r/N/A

                          \[\leadsto \left(\color{blue}{\frac{-1 \cdot v}{{u}^{2}}} + 2 \cdot \frac{t1 \cdot v}{{u}^{3}}\right) \cdot t1 \]
                        4. associate-*r/N/A

                          \[\leadsto \left(\frac{-1 \cdot v}{{u}^{2}} + \color{blue}{\frac{2 \cdot \left(t1 \cdot v\right)}{{u}^{3}}}\right) \cdot t1 \]
                        5. cube-multN/A

                          \[\leadsto \left(\frac{-1 \cdot v}{{u}^{2}} + \frac{2 \cdot \left(t1 \cdot v\right)}{\color{blue}{u \cdot \left(u \cdot u\right)}}\right) \cdot t1 \]
                        6. unpow2N/A

                          \[\leadsto \left(\frac{-1 \cdot v}{{u}^{2}} + \frac{2 \cdot \left(t1 \cdot v\right)}{u \cdot \color{blue}{{u}^{2}}}\right) \cdot t1 \]
                        7. associate-/r*N/A

                          \[\leadsto \left(\frac{-1 \cdot v}{{u}^{2}} + \color{blue}{\frac{\frac{2 \cdot \left(t1 \cdot v\right)}{u}}{{u}^{2}}}\right) \cdot t1 \]
                        8. div-add-revN/A

                          \[\leadsto \color{blue}{\frac{-1 \cdot v + \frac{2 \cdot \left(t1 \cdot v\right)}{u}}{{u}^{2}}} \cdot t1 \]
                        9. lower-/.f64N/A

                          \[\leadsto \color{blue}{\frac{-1 \cdot v + \frac{2 \cdot \left(t1 \cdot v\right)}{u}}{{u}^{2}}} \cdot t1 \]
                        10. lower-fma.f64N/A

                          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(-1, v, \frac{2 \cdot \left(t1 \cdot v\right)}{u}\right)}}{{u}^{2}} \cdot t1 \]
                        11. lower-/.f64N/A

                          \[\leadsto \frac{\mathsf{fma}\left(-1, v, \color{blue}{\frac{2 \cdot \left(t1 \cdot v\right)}{u}}\right)}{{u}^{2}} \cdot t1 \]
                        12. *-commutativeN/A

                          \[\leadsto \frac{\mathsf{fma}\left(-1, v, \frac{\color{blue}{\left(t1 \cdot v\right) \cdot 2}}{u}\right)}{{u}^{2}} \cdot t1 \]
                        13. lower-*.f64N/A

                          \[\leadsto \frac{\mathsf{fma}\left(-1, v, \frac{\color{blue}{\left(t1 \cdot v\right) \cdot 2}}{u}\right)}{{u}^{2}} \cdot t1 \]
                        14. *-commutativeN/A

                          \[\leadsto \frac{\mathsf{fma}\left(-1, v, \frac{\color{blue}{\left(v \cdot t1\right)} \cdot 2}{u}\right)}{{u}^{2}} \cdot t1 \]
                        15. lower-*.f64N/A

                          \[\leadsto \frac{\mathsf{fma}\left(-1, v, \frac{\color{blue}{\left(v \cdot t1\right)} \cdot 2}{u}\right)}{{u}^{2}} \cdot t1 \]
                        16. unpow2N/A

                          \[\leadsto \frac{\mathsf{fma}\left(-1, v, \frac{\left(v \cdot t1\right) \cdot 2}{u}\right)}{\color{blue}{u \cdot u}} \cdot t1 \]
                        17. lower-*.f6475.3

                          \[\leadsto \frac{\mathsf{fma}\left(-1, v, \frac{\left(v \cdot t1\right) \cdot 2}{u}\right)}{\color{blue}{u \cdot u}} \cdot t1 \]
                      5. Applied rewrites75.3%

                        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(-1, v, \frac{\left(v \cdot t1\right) \cdot 2}{u}\right)}{u \cdot u} \cdot t1} \]
                      6. Taylor expanded in u around inf

                        \[\leadsto \frac{-1 \cdot v}{u \cdot u} \cdot t1 \]
                      7. Step-by-step derivation
                        1. Applied rewrites76.8%

                          \[\leadsto \frac{-v}{u \cdot u} \cdot t1 \]
                      8. Recombined 2 regimes into one program.
                      9. Final simplification80.5%

                        \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -1.3 \cdot 10^{-118} \lor \neg \left(t1 \leq 1.8 \cdot 10^{-56}\right):\\ \;\;\;\;\frac{-1 \cdot v}{\left(-u\right) + t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{u \cdot u} \cdot t1\\ \end{array} \]
                      10. Add Preprocessing

                      Alternative 9: 93.6% accurate, 0.8× speedup?

                      \[\begin{array}{l} \\ \left(-v\right) \cdot \frac{\frac{t1}{u - t1}}{u - t1} \end{array} \]
                      (FPCore (u v t1) :precision binary64 (* (- v) (/ (/ t1 (- u t1)) (- u t1))))
                      double code(double u, double v, double t1) {
                      	return -v * ((t1 / (u - t1)) / (u - t1));
                      }
                      
                      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(u, v, t1)
                      use fmin_fmax_functions
                          real(8), intent (in) :: u
                          real(8), intent (in) :: v
                          real(8), intent (in) :: t1
                          code = -v * ((t1 / (u - t1)) / (u - t1))
                      end function
                      
                      public static double code(double u, double v, double t1) {
                      	return -v * ((t1 / (u - t1)) / (u - t1));
                      }
                      
                      def code(u, v, t1):
                      	return -v * ((t1 / (u - t1)) / (u - t1))
                      
                      function code(u, v, t1)
                      	return Float64(Float64(-v) * Float64(Float64(t1 / Float64(u - t1)) / Float64(u - t1)))
                      end
                      
                      function tmp = code(u, v, t1)
                      	tmp = -v * ((t1 / (u - t1)) / (u - t1));
                      end
                      
                      code[u_, v_, t1_] := N[((-v) * N[(N[(t1 / N[(u - t1), $MachinePrecision]), $MachinePrecision] / N[(u - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                      
                      \begin{array}{l}
                      
                      \\
                      \left(-v\right) \cdot \frac{\frac{t1}{u - t1}}{u - t1}
                      \end{array}
                      
                      Derivation
                      1. Initial program 72.7%

                        \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                      2. Add Preprocessing
                      3. Applied rewrites96.9%

                        \[\leadsto \color{blue}{\frac{\frac{t1}{u - t1} \cdot \left(-v\right)}{u - t1}} \]
                      4. Step-by-step derivation
                        1. lift-/.f64N/A

                          \[\leadsto \color{blue}{\frac{\frac{t1}{u - t1} \cdot \left(-v\right)}{u - t1}} \]
                        2. lift-*.f64N/A

                          \[\leadsto \frac{\color{blue}{\frac{t1}{u - t1} \cdot \left(-v\right)}}{u - t1} \]
                        3. lift-neg.f64N/A

                          \[\leadsto \frac{\frac{t1}{u - t1} \cdot \color{blue}{\left(\mathsf{neg}\left(v\right)\right)}}{u - t1} \]
                        4. mul-1-negN/A

                          \[\leadsto \frac{\frac{t1}{u - t1} \cdot \color{blue}{\left(-1 \cdot v\right)}}{u - t1} \]
                        5. *-commutativeN/A

                          \[\leadsto \frac{\color{blue}{\left(-1 \cdot v\right) \cdot \frac{t1}{u - t1}}}{u - t1} \]
                        6. associate-/l*N/A

                          \[\leadsto \color{blue}{\left(-1 \cdot v\right) \cdot \frac{\frac{t1}{u - t1}}{u - t1}} \]
                        7. lower-*.f64N/A

                          \[\leadsto \color{blue}{\left(-1 \cdot v\right) \cdot \frac{\frac{t1}{u - t1}}{u - t1}} \]
                        8. mul-1-negN/A

                          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(v\right)\right)} \cdot \frac{\frac{t1}{u - t1}}{u - t1} \]
                        9. lift-neg.f64N/A

                          \[\leadsto \color{blue}{\left(-v\right)} \cdot \frac{\frac{t1}{u - t1}}{u - t1} \]
                        10. lower-/.f6495.3

                          \[\leadsto \left(-v\right) \cdot \color{blue}{\frac{\frac{t1}{u - t1}}{u - t1}} \]
                      5. Applied rewrites95.3%

                        \[\leadsto \color{blue}{\left(-v\right) \cdot \frac{\frac{t1}{u - t1}}{u - t1}} \]
                      6. Add Preprocessing

                      Alternative 10: 62.3% accurate, 1.4× speedup?

                      \[\begin{array}{l} \\ \frac{-1 \cdot v}{\left(-u\right) + t1} \end{array} \]
                      (FPCore (u v t1) :precision binary64 (/ (* -1.0 v) (+ (- u) t1)))
                      double code(double u, double v, double t1) {
                      	return (-1.0 * v) / (-u + t1);
                      }
                      
                      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(u, v, t1)
                      use fmin_fmax_functions
                          real(8), intent (in) :: u
                          real(8), intent (in) :: v
                          real(8), intent (in) :: t1
                          code = ((-1.0d0) * v) / (-u + t1)
                      end function
                      
                      public static double code(double u, double v, double t1) {
                      	return (-1.0 * v) / (-u + t1);
                      }
                      
                      def code(u, v, t1):
                      	return (-1.0 * v) / (-u + t1)
                      
                      function code(u, v, t1)
                      	return Float64(Float64(-1.0 * v) / Float64(Float64(-u) + t1))
                      end
                      
                      function tmp = code(u, v, t1)
                      	tmp = (-1.0 * v) / (-u + t1);
                      end
                      
                      code[u_, v_, t1_] := N[(N[(-1.0 * v), $MachinePrecision] / N[((-u) + t1), $MachinePrecision]), $MachinePrecision]
                      
                      \begin{array}{l}
                      
                      \\
                      \frac{-1 \cdot v}{\left(-u\right) + t1}
                      \end{array}
                      
                      Derivation
                      1. Initial program 72.7%

                        \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                      2. Add Preprocessing
                      3. Applied rewrites96.9%

                        \[\leadsto \color{blue}{\frac{\frac{t1}{u - t1} \cdot \left(-v\right)}{u - t1}} \]
                      4. Taylor expanded in u around 0

                        \[\leadsto \frac{\color{blue}{-1} \cdot \left(-v\right)}{u - t1} \]
                      5. Step-by-step derivation
                        1. Applied rewrites65.5%

                          \[\leadsto \frac{\color{blue}{-1} \cdot \left(-v\right)}{u - t1} \]
                        2. Final simplification65.5%

                          \[\leadsto \frac{-1 \cdot v}{\left(-u\right) + t1} \]
                        3. Add Preprocessing

                        Alternative 11: 62.2% accurate, 1.4× speedup?

                        \[\begin{array}{l} \\ \left(-v\right) \cdot \frac{-1}{u - t1} \end{array} \]
                        (FPCore (u v t1) :precision binary64 (* (- v) (/ -1.0 (- u t1))))
                        double code(double u, double v, double t1) {
                        	return -v * (-1.0 / (u - t1));
                        }
                        
                        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(u, v, t1)
                        use fmin_fmax_functions
                            real(8), intent (in) :: u
                            real(8), intent (in) :: v
                            real(8), intent (in) :: t1
                            code = -v * ((-1.0d0) / (u - t1))
                        end function
                        
                        public static double code(double u, double v, double t1) {
                        	return -v * (-1.0 / (u - t1));
                        }
                        
                        def code(u, v, t1):
                        	return -v * (-1.0 / (u - t1))
                        
                        function code(u, v, t1)
                        	return Float64(Float64(-v) * Float64(-1.0 / Float64(u - t1)))
                        end
                        
                        function tmp = code(u, v, t1)
                        	tmp = -v * (-1.0 / (u - t1));
                        end
                        
                        code[u_, v_, t1_] := N[((-v) * N[(-1.0 / N[(u - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                        
                        \begin{array}{l}
                        
                        \\
                        \left(-v\right) \cdot \frac{-1}{u - t1}
                        \end{array}
                        
                        Derivation
                        1. Initial program 72.7%

                          \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                        2. Add Preprocessing
                        3. Applied rewrites96.9%

                          \[\leadsto \color{blue}{\frac{\frac{t1}{u - t1} \cdot \left(-v\right)}{u - t1}} \]
                        4. Step-by-step derivation
                          1. lift-/.f64N/A

                            \[\leadsto \color{blue}{\frac{\frac{t1}{u - t1} \cdot \left(-v\right)}{u - t1}} \]
                          2. lift-*.f64N/A

                            \[\leadsto \frac{\color{blue}{\frac{t1}{u - t1} \cdot \left(-v\right)}}{u - t1} \]
                          3. lift-neg.f64N/A

                            \[\leadsto \frac{\frac{t1}{u - t1} \cdot \color{blue}{\left(\mathsf{neg}\left(v\right)\right)}}{u - t1} \]
                          4. mul-1-negN/A

                            \[\leadsto \frac{\frac{t1}{u - t1} \cdot \color{blue}{\left(-1 \cdot v\right)}}{u - t1} \]
                          5. *-commutativeN/A

                            \[\leadsto \frac{\color{blue}{\left(-1 \cdot v\right) \cdot \frac{t1}{u - t1}}}{u - t1} \]
                          6. associate-/l*N/A

                            \[\leadsto \color{blue}{\left(-1 \cdot v\right) \cdot \frac{\frac{t1}{u - t1}}{u - t1}} \]
                          7. lower-*.f64N/A

                            \[\leadsto \color{blue}{\left(-1 \cdot v\right) \cdot \frac{\frac{t1}{u - t1}}{u - t1}} \]
                          8. mul-1-negN/A

                            \[\leadsto \color{blue}{\left(\mathsf{neg}\left(v\right)\right)} \cdot \frac{\frac{t1}{u - t1}}{u - t1} \]
                          9. lift-neg.f64N/A

                            \[\leadsto \color{blue}{\left(-v\right)} \cdot \frac{\frac{t1}{u - t1}}{u - t1} \]
                          10. lower-/.f6495.3

                            \[\leadsto \left(-v\right) \cdot \color{blue}{\frac{\frac{t1}{u - t1}}{u - t1}} \]
                        5. Applied rewrites95.3%

                          \[\leadsto \color{blue}{\left(-v\right) \cdot \frac{\frac{t1}{u - t1}}{u - t1}} \]
                        6. Taylor expanded in u around 0

                          \[\leadsto \left(-v\right) \cdot \frac{\color{blue}{-1}}{u - t1} \]
                        7. Step-by-step derivation
                          1. Applied rewrites65.3%

                            \[\leadsto \left(-v\right) \cdot \frac{\color{blue}{-1}}{u - t1} \]
                          2. Add Preprocessing

                          Alternative 12: 54.5% accurate, 2.1× speedup?

                          \[\begin{array}{l} \\ \frac{-v}{t1} \end{array} \]
                          (FPCore (u v t1) :precision binary64 (/ (- v) t1))
                          double code(double u, double v, double t1) {
                          	return -v / t1;
                          }
                          
                          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(u, v, t1)
                          use fmin_fmax_functions
                              real(8), intent (in) :: u
                              real(8), intent (in) :: v
                              real(8), intent (in) :: t1
                              code = -v / t1
                          end function
                          
                          public static double code(double u, double v, double t1) {
                          	return -v / t1;
                          }
                          
                          def code(u, v, t1):
                          	return -v / t1
                          
                          function code(u, v, t1)
                          	return Float64(Float64(-v) / t1)
                          end
                          
                          function tmp = code(u, v, t1)
                          	tmp = -v / t1;
                          end
                          
                          code[u_, v_, t1_] := N[((-v) / t1), $MachinePrecision]
                          
                          \begin{array}{l}
                          
                          \\
                          \frac{-v}{t1}
                          \end{array}
                          
                          Derivation
                          1. Initial program 72.7%

                            \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                          2. Add Preprocessing
                          3. Taylor expanded in u around 0

                            \[\leadsto \color{blue}{-1 \cdot \frac{v}{t1}} \]
                          4. Step-by-step derivation
                            1. associate-*r/N/A

                              \[\leadsto \color{blue}{\frac{-1 \cdot v}{t1}} \]
                            2. lower-/.f64N/A

                              \[\leadsto \color{blue}{\frac{-1 \cdot v}{t1}} \]
                            3. mul-1-negN/A

                              \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(v\right)}}{t1} \]
                            4. lower-neg.f6458.6

                              \[\leadsto \frac{\color{blue}{-v}}{t1} \]
                          5. Applied rewrites58.6%

                            \[\leadsto \color{blue}{\frac{-v}{t1}} \]
                          6. Add Preprocessing

                          Reproduce

                          ?
                          herbie shell --seed 2025007 
                          (FPCore (u v t1)
                            :name "Rosa's DopplerBench"
                            :precision binary64
                            (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))