Rosa's DopplerBench

Percentage Accurate: 72.5% → 97.1%
Time: 3.8s
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: 72.5% 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: 97.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t1 \leq -1.85 \cdot 10^{-185} \lor \neg \left(t1 \leq 2.9 \cdot 10^{-279}\right):\\ \;\;\;\;\frac{-t1}{u + t1} \cdot \frac{v}{u + t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\left(-t1\right) \cdot v}{u}}{u}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (if (or (<= t1 -1.85e-185) (not (<= t1 2.9e-279)))
   (* (/ (- t1) (+ u t1)) (/ v (+ u t1)))
   (/ (/ (* (- t1) v) u) u)))
double code(double u, double v, double t1) {
	double tmp;
	if ((t1 <= -1.85e-185) || !(t1 <= 2.9e-279)) {
		tmp = (-t1 / (u + t1)) * (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.85d-185)) .or. (.not. (t1 <= 2.9d-279))) then
        tmp = (-t1 / (u + t1)) * (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.85e-185) || !(t1 <= 2.9e-279)) {
		tmp = (-t1 / (u + t1)) * (v / (u + t1));
	} else {
		tmp = ((-t1 * v) / u) / u;
	}
	return tmp;
}
def code(u, v, t1):
	tmp = 0
	if (t1 <= -1.85e-185) or not (t1 <= 2.9e-279):
		tmp = (-t1 / (u + t1)) * (v / (u + t1))
	else:
		tmp = ((-t1 * v) / u) / u
	return tmp
function code(u, v, t1)
	tmp = 0.0
	if ((t1 <= -1.85e-185) || !(t1 <= 2.9e-279))
		tmp = Float64(Float64(Float64(-t1) / Float64(u + t1)) * Float64(v / Float64(u + t1)));
	else
		tmp = Float64(Float64(Float64(Float64(-t1) * v) / u) / u);
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	tmp = 0.0;
	if ((t1 <= -1.85e-185) || ~((t1 <= 2.9e-279)))
		tmp = (-t1 / (u + t1)) * (v / (u + t1));
	else
		tmp = ((-t1 * v) / u) / u;
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.85e-185], N[Not[LessEqual[t1, 2.9e-279]], $MachinePrecision]], N[(N[((-t1) / N[(u + t1), $MachinePrecision]), $MachinePrecision] * N[(v / N[(u + t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[((-t1) * v), $MachinePrecision] / u), $MachinePrecision] / u), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.85 \cdot 10^{-185} \lor \neg \left(t1 \leq 2.9 \cdot 10^{-279}\right):\\
\;\;\;\;\frac{-t1}{u + t1} \cdot \frac{v}{u + t1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -1.85e-185 or 2.9e-279 < t1

    1. Initial program 71.0%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-t1}{u + t1} \cdot \frac{v}{\color{blue}{u + t1}} \]
      15. lower-+.f6499.1

        \[\leadsto \frac{-t1}{u + t1} \cdot \frac{v}{\color{blue}{u + t1}} \]
    4. Applied rewrites99.1%

      \[\leadsto \color{blue}{\frac{-t1}{u + t1} \cdot \frac{v}{u + t1}} \]

    if -1.85e-185 < t1 < 2.9e-279

    1. Initial program 92.0%

      \[\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 \frac{-1 \cdot \left(t1 \cdot v\right)}{\color{blue}{{u}^{2}}} \]
      2. mul-1-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(t1 \cdot v\right)}{{\color{blue}{u}}^{2}} \]
      3. distribute-lft-neg-outN/A

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

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

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

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

        \[\leadsto \frac{v}{u} \cdot \frac{-1 \cdot t1}{u} \]
      8. associate-*r/N/A

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

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

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

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

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

        \[\leadsto \frac{v}{u} \cdot \frac{\mathsf{neg}\left(t1\right)}{\color{blue}{u}} \]
      14. lift-neg.f6473.8

        \[\leadsto \frac{v}{u} \cdot \frac{-t1}{u} \]
    5. Applied rewrites73.8%

      \[\leadsto \color{blue}{\frac{v}{u} \cdot \frac{-t1}{u}} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{v \cdot \left(\mathsf{neg}\left(\frac{t1}{u}\right)\right)}{u} \]
      11. distribute-frac-negN/A

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

        \[\leadsto \frac{v \cdot \frac{\mathsf{neg}\left(t1\right)}{u}}{u} \]
      13. lift-neg.f6494.5

        \[\leadsto \frac{v \cdot \frac{-t1}{u}}{u} \]
    7. Applied rewrites94.5%

      \[\leadsto \frac{v \cdot \frac{-t1}{u}}{\color{blue}{u}} \]
    8. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{v \cdot \frac{-t1}{u}}{u} \]
      2. lift-neg.f64N/A

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

        \[\leadsto \frac{v \cdot \frac{\mathsf{neg}\left(t1\right)}{u}}{u} \]
      4. associate-*r/N/A

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

        \[\leadsto \frac{\frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{u}}{u} \]
      6. distribute-lft-neg-outN/A

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

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

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

        \[\leadsto \frac{\frac{\mathsf{neg}\left(t1 \cdot v\right)}{u}}{u} \]
      10. distribute-lft-neg-outN/A

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

        \[\leadsto \frac{\frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{u}}{u} \]
      12. lift-neg.f6497.0

        \[\leadsto \frac{\frac{\left(-t1\right) \cdot v}{u}}{u} \]
    9. Applied rewrites97.0%

      \[\leadsto \frac{\frac{\left(-t1\right) \cdot v}{u}}{u} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -1.85 \cdot 10^{-185} \lor \neg \left(t1 \leq 2.9 \cdot 10^{-279}\right):\\ \;\;\;\;\frac{-t1}{u + t1} \cdot \frac{v}{u + t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\left(-t1\right) \cdot v}{u}}{u}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 88.0% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := \left(\frac{u}{t1} - 1\right) \cdot \frac{v}{u + t1}\\
\mathbf{if}\;t1 \leq -1.25 \cdot 10^{+74}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t1 \leq -1.4 \cdot 10^{-258}:\\
\;\;\;\;\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\

\mathbf{elif}\;t1 \leq 1.26 \cdot 10^{-181}:\\
\;\;\;\;\frac{v \cdot \frac{-t1}{u}}{u}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t1 < -1.24999999999999991e74 or 2.3000000000000002e132 < t1

    1. Initial program 44.5%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-t1}{u + t1} \cdot \frac{v}{\color{blue}{u + t1}} \]
      15. lower-+.f64100.0

        \[\leadsto \frac{-t1}{u + t1} \cdot \frac{v}{\color{blue}{u + t1}} \]
    4. Applied rewrites100.0%

      \[\leadsto \color{blue}{\frac{-t1}{u + t1} \cdot \frac{v}{u + t1}} \]
    5. Taylor expanded in u around 0

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

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

        \[\leadsto \left(\frac{u}{t1} - 1\right) \cdot \frac{v}{u + t1} \]
    7. Applied rewrites96.6%

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

    if -1.24999999999999991e74 < t1 < -1.4000000000000001e-258

    1. Initial program 93.0%

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

    if -1.4000000000000001e-258 < t1 < 1.26000000000000002e-181

    1. Initial program 75.1%

      \[\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 \frac{-1 \cdot \left(t1 \cdot v\right)}{\color{blue}{{u}^{2}}} \]
      2. mul-1-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(t1 \cdot v\right)}{{\color{blue}{u}}^{2}} \]
      3. distribute-lft-neg-outN/A

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

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

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

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

        \[\leadsto \frac{v}{u} \cdot \frac{-1 \cdot t1}{u} \]
      8. associate-*r/N/A

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

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

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

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

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

        \[\leadsto \frac{v}{u} \cdot \frac{\mathsf{neg}\left(t1\right)}{\color{blue}{u}} \]
      14. lift-neg.f6481.2

        \[\leadsto \frac{v}{u} \cdot \frac{-t1}{u} \]
    5. Applied rewrites81.2%

      \[\leadsto \color{blue}{\frac{v}{u} \cdot \frac{-t1}{u}} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{v \cdot \left(\mathsf{neg}\left(\frac{t1}{u}\right)\right)}{u} \]
      11. distribute-frac-negN/A

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

        \[\leadsto \frac{v \cdot \frac{\mathsf{neg}\left(t1\right)}{u}}{u} \]
      13. lift-neg.f6489.7

        \[\leadsto \frac{v \cdot \frac{-t1}{u}}{u} \]
    7. Applied rewrites89.7%

      \[\leadsto \frac{v \cdot \frac{-t1}{u}}{\color{blue}{u}} \]

    if 1.26000000000000002e-181 < t1 < 2.3000000000000002e132

    1. Initial program 83.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 inf

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\left(-t1\right)} \cdot \frac{v}{\left(t1 + u\right) \cdot u} \]
        7. lower-/.f6459.4

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

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

          \[\leadsto \left(-t1\right) \cdot \frac{v}{\color{blue}{\left(u + t1\right)} \cdot u} \]
        10. lift-+.f6459.4

          \[\leadsto \left(-t1\right) \cdot \frac{v}{\color{blue}{\left(u + t1\right)} \cdot u} \]
        11. +-commutative59.4

          \[\leadsto \left(-t1\right) \cdot \frac{v}{\left(u + t1\right) \cdot u} \]
      3. Applied rewrites59.4%

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

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

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

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

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

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

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

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

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

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

    Alternative 3: 98.2% accurate, 0.6× speedup?

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

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-t1}{u + t1} \cdot \frac{v}{\color{blue}{u + t1}} \]
      15. lower-+.f6495.5

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

      \[\leadsto \color{blue}{\frac{-t1}{u + t1} \cdot \frac{v}{u + t1}} \]
    5. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\color{blue}{-t1}}{u + t1} \cdot v}{u + t1} \]
      12. lift-+.f64N/A

        \[\leadsto \frac{\frac{-t1}{\color{blue}{u + t1}} \cdot v}{u + t1} \]
      13. lift-+.f6498.6

        \[\leadsto \frac{\frac{-t1}{u + t1} \cdot v}{\color{blue}{u + t1}} \]
    6. Applied rewrites98.6%

      \[\leadsto \color{blue}{\frac{\frac{-t1}{u + t1} \cdot v}{u + t1}} \]
    7. Taylor expanded in t1 around inf

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

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

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

        \[\leadsto \frac{\frac{-t1}{\left(1 + \frac{u}{t1}\right) \cdot t1} \cdot v}{u + t1} \]
      4. lower-/.f6498.6

        \[\leadsto \frac{\frac{-t1}{\left(1 + \frac{u}{t1}\right) \cdot t1} \cdot v}{u + t1} \]
    9. Applied rewrites98.6%

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

    Alternative 4: 76.7% accurate, 0.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-v}{u + t1}\\ \mathbf{if}\;t1 \leq -4.1 \cdot 10^{-103}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t1 \leq 1.05 \cdot 10^{-279}:\\ \;\;\;\;\frac{\left(-t1\right) \cdot v}{u \cdot u}\\ \mathbf{elif}\;t1 \leq 2.15 \cdot 10^{+49}:\\ \;\;\;\;\frac{-v}{u} \cdot \frac{t1}{u}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (u v t1)
     :precision binary64
     (let* ((t_1 (/ (- v) (+ u t1))))
       (if (<= t1 -4.1e-103)
         t_1
         (if (<= t1 1.05e-279)
           (/ (* (- t1) v) (* u u))
           (if (<= t1 2.15e+49) (* (/ (- v) u) (/ t1 u)) t_1)))))
    double code(double u, double v, double t1) {
    	double t_1 = -v / (u + t1);
    	double tmp;
    	if (t1 <= -4.1e-103) {
    		tmp = t_1;
    	} else if (t1 <= 1.05e-279) {
    		tmp = (-t1 * v) / (u * u);
    	} else if (t1 <= 2.15e+49) {
    		tmp = (-v / u) * (t1 / u);
    	} else {
    		tmp = t_1;
    	}
    	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) :: t_1
        real(8) :: tmp
        t_1 = -v / (u + t1)
        if (t1 <= (-4.1d-103)) then
            tmp = t_1
        else if (t1 <= 1.05d-279) then
            tmp = (-t1 * v) / (u * u)
        else if (t1 <= 2.15d+49) then
            tmp = (-v / u) * (t1 / u)
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    public static double code(double u, double v, double t1) {
    	double t_1 = -v / (u + t1);
    	double tmp;
    	if (t1 <= -4.1e-103) {
    		tmp = t_1;
    	} else if (t1 <= 1.05e-279) {
    		tmp = (-t1 * v) / (u * u);
    	} else if (t1 <= 2.15e+49) {
    		tmp = (-v / u) * (t1 / u);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(u, v, t1):
    	t_1 = -v / (u + t1)
    	tmp = 0
    	if t1 <= -4.1e-103:
    		tmp = t_1
    	elif t1 <= 1.05e-279:
    		tmp = (-t1 * v) / (u * u)
    	elif t1 <= 2.15e+49:
    		tmp = (-v / u) * (t1 / u)
    	else:
    		tmp = t_1
    	return tmp
    
    function code(u, v, t1)
    	t_1 = Float64(Float64(-v) / Float64(u + t1))
    	tmp = 0.0
    	if (t1 <= -4.1e-103)
    		tmp = t_1;
    	elseif (t1 <= 1.05e-279)
    		tmp = Float64(Float64(Float64(-t1) * v) / Float64(u * u));
    	elseif (t1 <= 2.15e+49)
    		tmp = Float64(Float64(Float64(-v) / u) * Float64(t1 / u));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(u, v, t1)
    	t_1 = -v / (u + t1);
    	tmp = 0.0;
    	if (t1 <= -4.1e-103)
    		tmp = t_1;
    	elseif (t1 <= 1.05e-279)
    		tmp = (-t1 * v) / (u * u);
    	elseif (t1 <= 2.15e+49)
    		tmp = (-v / u) * (t1 / u);
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[u_, v_, t1_] := Block[{t$95$1 = N[((-v) / N[(u + t1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -4.1e-103], t$95$1, If[LessEqual[t1, 1.05e-279], N[(N[((-t1) * v), $MachinePrecision] / N[(u * u), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 2.15e+49], N[(N[((-v) / u), $MachinePrecision] * N[(t1 / u), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \frac{-v}{u + t1}\\
    \mathbf{if}\;t1 \leq -4.1 \cdot 10^{-103}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t1 \leq 1.05 \cdot 10^{-279}:\\
    \;\;\;\;\frac{\left(-t1\right) \cdot v}{u \cdot u}\\
    
    \mathbf{elif}\;t1 \leq 2.15 \cdot 10^{+49}:\\
    \;\;\;\;\frac{-v}{u} \cdot \frac{t1}{u}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if t1 < -4.09999999999999996e-103 or 2.15e49 < t1

      1. Initial program 63.7%

        \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. lift-/.f64N/A

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

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

          \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
        4. distribute-lft-neg-outN/A

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\frac{\color{blue}{\mathsf{neg}\left(t1 \cdot v\right)}}{t1 + u}}{t1 + u} \]
        13. distribute-lft-neg-outN/A

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

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

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

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

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

          \[\leadsto \frac{\frac{\left(-t1\right) \cdot v}{u + t1}}{\color{blue}{u + t1}} \]
        19. lower-+.f6479.2

          \[\leadsto \frac{\frac{\left(-t1\right) \cdot v}{u + t1}}{\color{blue}{u + t1}} \]
      4. Applied rewrites79.2%

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

        \[\leadsto \frac{\color{blue}{-1 \cdot v}}{u + t1} \]
      6. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \frac{\mathsf{neg}\left(v\right)}{u + t1} \]
        2. lift-neg.f6483.3

          \[\leadsto \frac{-v}{u + t1} \]
      7. Applied rewrites83.3%

        \[\leadsto \frac{\color{blue}{-v}}{u + t1} \]

      if -4.09999999999999996e-103 < t1 < 1.05000000000000003e-279

      1. Initial program 90.9%

        \[\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}{u \cdot \color{blue}{u}} \]
        2. lower-*.f6488.2

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

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

      if 1.05000000000000003e-279 < t1 < 2.15e49

      1. Initial program 78.0%

        \[\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 \frac{-1 \cdot \left(t1 \cdot v\right)}{\color{blue}{{u}^{2}}} \]
        2. mul-1-negN/A

          \[\leadsto \frac{\mathsf{neg}\left(t1 \cdot v\right)}{{\color{blue}{u}}^{2}} \]
        3. distribute-lft-neg-outN/A

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

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

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

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

          \[\leadsto \frac{v}{u} \cdot \frac{-1 \cdot t1}{u} \]
        8. associate-*r/N/A

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

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

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

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

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

          \[\leadsto \frac{v}{u} \cdot \frac{\mathsf{neg}\left(t1\right)}{\color{blue}{u}} \]
        14. lift-neg.f6481.2

          \[\leadsto \frac{v}{u} \cdot \frac{-t1}{u} \]
      5. Applied rewrites81.2%

        \[\leadsto \color{blue}{\frac{v}{u} \cdot \frac{-t1}{u}} \]
    3. Recombined 3 regimes into one program.
    4. Final simplification83.8%

      \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -4.1 \cdot 10^{-103}:\\ \;\;\;\;\frac{-v}{u + t1}\\ \mathbf{elif}\;t1 \leq 1.05 \cdot 10^{-279}:\\ \;\;\;\;\frac{\left(-t1\right) \cdot v}{u \cdot u}\\ \mathbf{elif}\;t1 \leq 2.15 \cdot 10^{+49}:\\ \;\;\;\;\frac{-v}{u} \cdot \frac{t1}{u}\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{u + t1}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 5: 86.6% accurate, 0.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t1 \leq -1.25 \cdot 10^{+74} \lor \neg \left(t1 \leq 3 \cdot 10^{+111}\right):\\ \;\;\;\;\left(\frac{u}{t1} - 1\right) \cdot \frac{v}{u + 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 -1.25e+74) (not (<= t1 3e+111)))
       (* (- (/ u t1) 1.0) (/ v (+ u t1)))
       (/ (* (- t1) v) (* (+ t1 u) (+ t1 u)))))
    double code(double u, double v, double t1) {
    	double tmp;
    	if ((t1 <= -1.25e+74) || !(t1 <= 3e+111)) {
    		tmp = ((u / t1) - 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 <= (-1.25d+74)) .or. (.not. (t1 <= 3d+111))) then
            tmp = ((u / t1) - 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 <= -1.25e+74) || !(t1 <= 3e+111)) {
    		tmp = ((u / t1) - 1.0) * (v / (u + t1));
    	} else {
    		tmp = (-t1 * v) / ((t1 + u) * (t1 + u));
    	}
    	return tmp;
    }
    
    def code(u, v, t1):
    	tmp = 0
    	if (t1 <= -1.25e+74) or not (t1 <= 3e+111):
    		tmp = ((u / t1) - 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 <= -1.25e+74) || !(t1 <= 3e+111))
    		tmp = Float64(Float64(Float64(u / t1) - 1.0) * Float64(v / 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 <= -1.25e+74) || ~((t1 <= 3e+111)))
    		tmp = ((u / t1) - 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, -1.25e+74], N[Not[LessEqual[t1, 3e+111]], $MachinePrecision]], N[(N[(N[(u / t1), $MachinePrecision] - 1.0), $MachinePrecision] * N[(v / N[(u + t1), $MachinePrecision]), $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 -1.25 \cdot 10^{+74} \lor \neg \left(t1 \leq 3 \cdot 10^{+111}\right):\\
    \;\;\;\;\left(\frac{u}{t1} - 1\right) \cdot \frac{v}{u + 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 < -1.24999999999999991e74 or 3e111 < t1

      1. Initial program 45.2%

        \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{-t1}{u + t1} \cdot \frac{v}{\color{blue}{u + t1}} \]
        15. lower-+.f64100.0

          \[\leadsto \frac{-t1}{u + t1} \cdot \frac{v}{\color{blue}{u + t1}} \]
      4. Applied rewrites100.0%

        \[\leadsto \color{blue}{\frac{-t1}{u + t1} \cdot \frac{v}{u + t1}} \]
      5. Taylor expanded in u around 0

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

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

          \[\leadsto \left(\frac{u}{t1} - 1\right) \cdot \frac{v}{u + t1} \]
      7. Applied rewrites95.6%

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

      if -1.24999999999999991e74 < t1 < 3e111

      1. Initial program 86.1%

        \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
      2. Add Preprocessing
    3. Recombined 2 regimes into one program.
    4. Final simplification88.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -1.25 \cdot 10^{+74} \lor \neg \left(t1 \leq 3 \cdot 10^{+111}\right):\\ \;\;\;\;\left(\frac{u}{t1} - 1\right) \cdot \frac{v}{u + t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 6: 86.7% accurate, 0.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t1 \leq -8.6 \cdot 10^{+73} \lor \neg \left(t1 \leq 3.2 \cdot 10^{+110}\right):\\ \;\;\;\;\frac{-v}{u + 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 -8.6e+73) (not (<= t1 3.2e+110)))
       (/ (- v) (+ u t1))
       (/ (* (- t1) v) (* (+ t1 u) (+ t1 u)))))
    double code(double u, double v, double t1) {
    	double tmp;
    	if ((t1 <= -8.6e+73) || !(t1 <= 3.2e+110)) {
    		tmp = -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 <= (-8.6d+73)) .or. (.not. (t1 <= 3.2d+110))) then
            tmp = -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 <= -8.6e+73) || !(t1 <= 3.2e+110)) {
    		tmp = -v / (u + t1);
    	} else {
    		tmp = (-t1 * v) / ((t1 + u) * (t1 + u));
    	}
    	return tmp;
    }
    
    def code(u, v, t1):
    	tmp = 0
    	if (t1 <= -8.6e+73) or not (t1 <= 3.2e+110):
    		tmp = -v / (u + t1)
    	else:
    		tmp = (-t1 * v) / ((t1 + u) * (t1 + u))
    	return tmp
    
    function code(u, v, t1)
    	tmp = 0.0
    	if ((t1 <= -8.6e+73) || !(t1 <= 3.2e+110))
    		tmp = Float64(Float64(-v) / 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 <= -8.6e+73) || ~((t1 <= 3.2e+110)))
    		tmp = -v / (u + t1);
    	else
    		tmp = (-t1 * v) / ((t1 + u) * (t1 + u));
    	end
    	tmp_2 = tmp;
    end
    
    code[u_, v_, t1_] := If[Or[LessEqual[t1, -8.6e+73], N[Not[LessEqual[t1, 3.2e+110]], $MachinePrecision]], N[((-v) / 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 -8.6 \cdot 10^{+73} \lor \neg \left(t1 \leq 3.2 \cdot 10^{+110}\right):\\
    \;\;\;\;\frac{-v}{u + 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 < -8.60000000000000026e73 or 3.19999999999999994e110 < t1

      1. Initial program 45.2%

        \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. lift-/.f64N/A

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

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

          \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
        4. distribute-lft-neg-outN/A

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\frac{\color{blue}{\mathsf{neg}\left(t1 \cdot v\right)}}{t1 + u}}{t1 + u} \]
        13. distribute-lft-neg-outN/A

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

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

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

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

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

          \[\leadsto \frac{\frac{\left(-t1\right) \cdot v}{u + t1}}{\color{blue}{u + t1}} \]
        19. lower-+.f6468.1

          \[\leadsto \frac{\frac{\left(-t1\right) \cdot v}{u + t1}}{\color{blue}{u + t1}} \]
      4. Applied rewrites68.1%

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

        \[\leadsto \frac{\color{blue}{-1 \cdot v}}{u + t1} \]
      6. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \frac{\mathsf{neg}\left(v\right)}{u + t1} \]
        2. lift-neg.f6494.8

          \[\leadsto \frac{-v}{u + t1} \]
      7. Applied rewrites94.8%

        \[\leadsto \frac{\color{blue}{-v}}{u + t1} \]

      if -8.60000000000000026e73 < t1 < 3.19999999999999994e110

      1. Initial program 86.1%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -8.6 \cdot 10^{+73} \lor \neg \left(t1 \leq 3.2 \cdot 10^{+110}\right):\\ \;\;\;\;\frac{-v}{u + t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 7: 77.9% accurate, 0.7× speedup?

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

      1. Initial program 63.7%

        \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. lift-/.f64N/A

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

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

          \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
        4. distribute-lft-neg-outN/A

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\frac{\color{blue}{\mathsf{neg}\left(t1 \cdot v\right)}}{t1 + u}}{t1 + u} \]
        13. distribute-lft-neg-outN/A

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

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

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

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

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

          \[\leadsto \frac{\frac{\left(-t1\right) \cdot v}{u + t1}}{\color{blue}{u + t1}} \]
        19. lower-+.f6479.2

          \[\leadsto \frac{\frac{\left(-t1\right) \cdot v}{u + t1}}{\color{blue}{u + t1}} \]
      4. Applied rewrites79.2%

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

        \[\leadsto \frac{\color{blue}{-1 \cdot v}}{u + t1} \]
      6. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \frac{\mathsf{neg}\left(v\right)}{u + t1} \]
        2. lift-neg.f6483.3

          \[\leadsto \frac{-v}{u + t1} \]
      7. Applied rewrites83.3%

        \[\leadsto \frac{\color{blue}{-v}}{u + t1} \]

      if -4.09999999999999996e-103 < t1 < 2.15e49

      1. Initial program 83.6%

        \[\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 \frac{-1 \cdot \left(t1 \cdot v\right)}{\color{blue}{{u}^{2}}} \]
        2. mul-1-negN/A

          \[\leadsto \frac{\mathsf{neg}\left(t1 \cdot v\right)}{{\color{blue}{u}}^{2}} \]
        3. distribute-lft-neg-outN/A

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

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

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

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

          \[\leadsto \frac{v}{u} \cdot \frac{-1 \cdot t1}{u} \]
        8. associate-*r/N/A

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

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

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

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

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

          \[\leadsto \frac{v}{u} \cdot \frac{\mathsf{neg}\left(t1\right)}{\color{blue}{u}} \]
        14. lift-neg.f6479.4

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

        \[\leadsto \color{blue}{\frac{v}{u} \cdot \frac{-t1}{u}} \]
      6. Step-by-step derivation
        1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{v \cdot \left(\mathsf{neg}\left(\frac{t1}{u}\right)\right)}{u} \]
        11. distribute-frac-negN/A

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

          \[\leadsto \frac{v \cdot \frac{\mathsf{neg}\left(t1\right)}{u}}{u} \]
        13. lift-neg.f6485.4

          \[\leadsto \frac{v \cdot \frac{-t1}{u}}{u} \]
      7. Applied rewrites85.4%

        \[\leadsto \frac{v \cdot \frac{-t1}{u}}{\color{blue}{u}} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification84.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -4.1 \cdot 10^{-103} \lor \neg \left(t1 \leq 2.15 \cdot 10^{+49}\right):\\ \;\;\;\;\frac{-v}{u + t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{v \cdot \frac{-t1}{u}}{u}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 8: 75.6% accurate, 0.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t1 \leq -4.1 \cdot 10^{-103} \lor \neg \left(t1 \leq 2.2 \cdot 10^{+33}\right):\\ \;\;\;\;\frac{-v}{u + 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 -4.1e-103) (not (<= t1 2.2e+33)))
       (/ (- v) (+ u t1))
       (/ (* (- t1) v) (* u u))))
    double code(double u, double v, double t1) {
    	double tmp;
    	if ((t1 <= -4.1e-103) || !(t1 <= 2.2e+33)) {
    		tmp = -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 <= (-4.1d-103)) .or. (.not. (t1 <= 2.2d+33))) then
            tmp = -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 <= -4.1e-103) || !(t1 <= 2.2e+33)) {
    		tmp = -v / (u + t1);
    	} else {
    		tmp = (-t1 * v) / (u * u);
    	}
    	return tmp;
    }
    
    def code(u, v, t1):
    	tmp = 0
    	if (t1 <= -4.1e-103) or not (t1 <= 2.2e+33):
    		tmp = -v / (u + t1)
    	else:
    		tmp = (-t1 * v) / (u * u)
    	return tmp
    
    function code(u, v, t1)
    	tmp = 0.0
    	if ((t1 <= -4.1e-103) || !(t1 <= 2.2e+33))
    		tmp = Float64(Float64(-v) / 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 <= -4.1e-103) || ~((t1 <= 2.2e+33)))
    		tmp = -v / (u + t1);
    	else
    		tmp = (-t1 * v) / (u * u);
    	end
    	tmp_2 = tmp;
    end
    
    code[u_, v_, t1_] := If[Or[LessEqual[t1, -4.1e-103], N[Not[LessEqual[t1, 2.2e+33]], $MachinePrecision]], N[((-v) / 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 -4.1 \cdot 10^{-103} \lor \neg \left(t1 \leq 2.2 \cdot 10^{+33}\right):\\
    \;\;\;\;\frac{-v}{u + 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 < -4.09999999999999996e-103 or 2.19999999999999994e33 < t1

      1. Initial program 63.4%

        \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. lift-/.f64N/A

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

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

          \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
        4. distribute-lft-neg-outN/A

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\frac{\color{blue}{\mathsf{neg}\left(t1 \cdot v\right)}}{t1 + u}}{t1 + u} \]
        13. distribute-lft-neg-outN/A

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

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

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

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

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

          \[\leadsto \frac{\frac{\left(-t1\right) \cdot v}{u + t1}}{\color{blue}{u + t1}} \]
        19. lower-+.f6479.1

          \[\leadsto \frac{\frac{\left(-t1\right) \cdot v}{u + t1}}{\color{blue}{u + t1}} \]
      4. Applied rewrites79.1%

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

        \[\leadsto \frac{\color{blue}{-1 \cdot v}}{u + t1} \]
      6. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \frac{\mathsf{neg}\left(v\right)}{u + t1} \]
        2. lift-neg.f6482.3

          \[\leadsto \frac{-v}{u + t1} \]
      7. Applied rewrites82.3%

        \[\leadsto \frac{\color{blue}{-v}}{u + t1} \]

      if -4.09999999999999996e-103 < t1 < 2.19999999999999994e33

      1. Initial program 84.6%

        \[\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}{u \cdot \color{blue}{u}} \]
        2. lower-*.f6479.6

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -4.1 \cdot 10^{-103} \lor \neg \left(t1 \leq 2.2 \cdot 10^{+33}\right):\\ \;\;\;\;\frac{-v}{u + t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-t1\right) \cdot v}{u \cdot u}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 9: 74.7% accurate, 0.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;u \leq -2050000 \lor \neg \left(u \leq 128000\right):\\ \;\;\;\;t1 \cdot \frac{-v}{u \cdot u}\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{t1}\\ \end{array} \end{array} \]
    (FPCore (u v t1)
     :precision binary64
     (if (or (<= u -2050000.0) (not (<= u 128000.0)))
       (* t1 (/ (- v) (* u u)))
       (/ (- v) t1)))
    double code(double u, double v, double t1) {
    	double tmp;
    	if ((u <= -2050000.0) || !(u <= 128000.0)) {
    		tmp = t1 * (-v / (u * u));
    	} else {
    		tmp = -v / 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 ((u <= (-2050000.0d0)) .or. (.not. (u <= 128000.0d0))) then
            tmp = t1 * (-v / (u * u))
        else
            tmp = -v / t1
        end if
        code = tmp
    end function
    
    public static double code(double u, double v, double t1) {
    	double tmp;
    	if ((u <= -2050000.0) || !(u <= 128000.0)) {
    		tmp = t1 * (-v / (u * u));
    	} else {
    		tmp = -v / t1;
    	}
    	return tmp;
    }
    
    def code(u, v, t1):
    	tmp = 0
    	if (u <= -2050000.0) or not (u <= 128000.0):
    		tmp = t1 * (-v / (u * u))
    	else:
    		tmp = -v / t1
    	return tmp
    
    function code(u, v, t1)
    	tmp = 0.0
    	if ((u <= -2050000.0) || !(u <= 128000.0))
    		tmp = Float64(t1 * Float64(Float64(-v) / Float64(u * u)));
    	else
    		tmp = Float64(Float64(-v) / t1);
    	end
    	return tmp
    end
    
    function tmp_2 = code(u, v, t1)
    	tmp = 0.0;
    	if ((u <= -2050000.0) || ~((u <= 128000.0)))
    		tmp = t1 * (-v / (u * u));
    	else
    		tmp = -v / t1;
    	end
    	tmp_2 = tmp;
    end
    
    code[u_, v_, t1_] := If[Or[LessEqual[u, -2050000.0], N[Not[LessEqual[u, 128000.0]], $MachinePrecision]], N[(t1 * N[((-v) / N[(u * u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;u \leq -2050000 \lor \neg \left(u \leq 128000\right):\\
    \;\;\;\;t1 \cdot \frac{-v}{u \cdot u}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{-v}{t1}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if u < -2.05e6 or 128000 < u

      1. Initial program 82.1%

        \[\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}{u \cdot \color{blue}{u}} \]
        2. lower-*.f6479.2

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\left(-t1\right)} \cdot \frac{v}{u \cdot u} \]
        7. lower-/.f6480.9

          \[\leadsto \left(-t1\right) \cdot \color{blue}{\frac{v}{u \cdot u}} \]
      7. Applied rewrites80.9%

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

      if -2.05e6 < u < 128000

      1. Initial program 65.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 \color{blue}{-1 \cdot \frac{v}{t1}} \]
      4. Step-by-step derivation
        1. associate-*r/N/A

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

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

          \[\leadsto \frac{\mathsf{neg}\left(v\right)}{t1} \]
        4. lower-neg.f6476.1

          \[\leadsto \frac{-v}{t1} \]
      5. Applied rewrites76.1%

        \[\leadsto \color{blue}{\frac{-v}{t1}} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification78.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -2050000 \lor \neg \left(u \leq 128000\right):\\ \;\;\;\;t1 \cdot \frac{-v}{u \cdot u}\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{t1}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 10: 98.3% accurate, 0.8× speedup?

    \[\begin{array}{l} \\ \frac{\frac{t1}{u + t1} \cdot \left(-v\right)}{u + 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)) * Float64(-v)) / 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 \left(-v\right)}{u + t1}
    \end{array}
    
    Derivation
    1. Initial program 73.9%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-t1}{u + t1} \cdot \frac{v}{\color{blue}{u + t1}} \]
      15. lower-+.f6495.5

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

      \[\leadsto \color{blue}{\frac{-t1}{u + t1} \cdot \frac{v}{u + t1}} \]
    5. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\color{blue}{-t1}}{u + t1} \cdot v}{u + t1} \]
      12. lift-+.f64N/A

        \[\leadsto \frac{\frac{-t1}{\color{blue}{u + t1}} \cdot v}{u + t1} \]
      13. lift-+.f6498.6

        \[\leadsto \frac{\frac{-t1}{u + t1} \cdot v}{\color{blue}{u + t1}} \]
    6. Applied rewrites98.6%

      \[\leadsto \color{blue}{\frac{\frac{-t1}{u + t1} \cdot v}{u + t1}} \]
    7. Final simplification98.6%

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

    Alternative 11: 62.1% accurate, 1.8× speedup?

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

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-/.f64N/A

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

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

        \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
      4. distribute-lft-neg-outN/A

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\color{blue}{\mathsf{neg}\left(t1 \cdot v\right)}}{t1 + u}}{t1 + u} \]
      13. distribute-lft-neg-outN/A

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

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

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

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

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

        \[\leadsto \frac{\frac{\left(-t1\right) \cdot v}{u + t1}}{\color{blue}{u + t1}} \]
      19. lower-+.f6484.4

        \[\leadsto \frac{\frac{\left(-t1\right) \cdot v}{u + t1}}{\color{blue}{u + t1}} \]
    4. Applied rewrites84.4%

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

      \[\leadsto \frac{\color{blue}{-1 \cdot v}}{u + t1} \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(v\right)}{u + t1} \]
      2. lift-neg.f6458.9

        \[\leadsto \frac{-v}{u + t1} \]
    7. Applied rewrites58.9%

      \[\leadsto \frac{\color{blue}{-v}}{u + t1} \]
    8. 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 73.9%

      \[\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 \frac{-1 \cdot v}{\color{blue}{t1}} \]
      2. lower-/.f64N/A

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

        \[\leadsto \frac{\mathsf{neg}\left(v\right)}{t1} \]
      4. lower-neg.f6448.8

        \[\leadsto \frac{-v}{t1} \]
    5. Applied rewrites48.8%

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

    Reproduce

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