Rosa's DopplerBench

Percentage Accurate: 73.0% → 98.0%
Time: 4.0s
Alternatives: 14
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 14 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 73.0% 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: 98.0% 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 74.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. 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.9

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

    \[\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. +-commutativeN/A

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

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

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

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

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

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

      \[\leadsto \frac{\frac{-t1}{u + t1} \cdot v}{\color{blue}{u + t1}} \]
    15. lift-+.f6497.2

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

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

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

Alternative 2: 83.0% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\ \mathbf{if}\;t\_1 \leq 10^{+233}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{t1}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (let* ((t_1 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u)))))
   (if (<= t_1 1e+233) t_1 (/ (- v) t1))))
double code(double u, double v, double t1) {
	double t_1 = (-t1 * v) / ((t1 + u) * (t1 + u));
	double tmp;
	if (t_1 <= 1e+233) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = (-t1 * v) / ((t1 + u) * (t1 + u))
    if (t_1 <= 1d+233) then
        tmp = t_1
    else
        tmp = -v / t1
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double t_1 = (-t1 * v) / ((t1 + u) * (t1 + u));
	double tmp;
	if (t_1 <= 1e+233) {
		tmp = t_1;
	} else {
		tmp = -v / t1;
	}
	return tmp;
}
def code(u, v, t1):
	t_1 = (-t1 * v) / ((t1 + u) * (t1 + u))
	tmp = 0
	if t_1 <= 1e+233:
		tmp = t_1
	else:
		tmp = -v / t1
	return tmp
function code(u, v, t1)
	t_1 = Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u)))
	tmp = 0.0
	if (t_1 <= 1e+233)
		tmp = t_1;
	else
		tmp = Float64(Float64(-v) / t1);
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	t_1 = (-t1 * v) / ((t1 + u) * (t1 + u));
	tmp = 0.0;
	if (t_1 <= 1e+233)
		tmp = t_1;
	else
		tmp = -v / t1;
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := Block[{t$95$1 = N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 1e+233], t$95$1, N[((-v) / t1), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 (neg.f64 t1) v) (*.f64 (+.f64 t1 u) (+.f64 t1 u))) < 9.99999999999999974e232

    1. Initial program 86.8%

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

    if 9.99999999999999974e232 < (/.f64 (*.f64 (neg.f64 t1) v) (*.f64 (+.f64 t1 u) (+.f64 t1 u)))

    1. Initial program 14.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 0

      \[\leadsto \color{blue}{-1 \cdot \frac{v}{t1}} \]
    4. Step-by-step derivation
      1. Applied rewrites72.1%

        \[\leadsto \color{blue}{\frac{-v}{t1}} \]
    5. Recombined 2 regimes into one program.
    6. Add Preprocessing

    Alternative 3: 76.9% accurate, 0.6× speedup?

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

      1. Initial program 86.2%

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

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

          \[\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-/.f6483.7

            \[\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. lift-*.f64N/A

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

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

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

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

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

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

        if -6.5e-65 < u < 5.6e23

        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. Applied rewrites77.9%

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

          if 5.4000000000000003e143 < u

          1. Initial program 72.3%

            \[\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. Applied rewrites94.3%

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -6.5 \cdot 10^{-65}:\\ \;\;\;\;t1 \cdot \frac{-v}{u \cdot \left(u + t1\right)}\\ \mathbf{elif}\;u \leq 5.6 \cdot 10^{+23}:\\ \;\;\;\;\frac{-v}{t1}\\ \mathbf{elif}\;u \leq 5.4 \cdot 10^{+143}:\\ \;\;\;\;t1 \cdot \frac{-v}{u \cdot \left(u + t1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{u} \cdot \frac{t1}{u}\\ \end{array} \]
          7. Add Preprocessing

          Alternative 4: 79.8% accurate, 0.7× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t1 \leq -2.8 \cdot 10^{+17} \lor \neg \left(t1 \leq 2.4 \cdot 10^{-36}\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 -2.8e+17) (not (<= t1 2.4e-36)))
             (/ (- v) (+ u t1))
             (/ (* v (/ (- t1) u)) u)))
          double code(double u, double v, double t1) {
          	double tmp;
          	if ((t1 <= -2.8e+17) || !(t1 <= 2.4e-36)) {
          		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 <= (-2.8d+17)) .or. (.not. (t1 <= 2.4d-36))) 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 <= -2.8e+17) || !(t1 <= 2.4e-36)) {
          		tmp = -v / (u + t1);
          	} else {
          		tmp = (v * (-t1 / u)) / u;
          	}
          	return tmp;
          }
          
          def code(u, v, t1):
          	tmp = 0
          	if (t1 <= -2.8e+17) or not (t1 <= 2.4e-36):
          		tmp = -v / (u + t1)
          	else:
          		tmp = (v * (-t1 / u)) / u
          	return tmp
          
          function code(u, v, t1)
          	tmp = 0.0
          	if ((t1 <= -2.8e+17) || !(t1 <= 2.4e-36))
          		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 <= -2.8e+17) || ~((t1 <= 2.4e-36)))
          		tmp = -v / (u + t1);
          	else
          		tmp = (v * (-t1 / u)) / u;
          	end
          	tmp_2 = tmp;
          end
          
          code[u_, v_, t1_] := If[Or[LessEqual[t1, -2.8e+17], N[Not[LessEqual[t1, 2.4e-36]], $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 -2.8 \cdot 10^{+17} \lor \neg \left(t1 \leq 2.4 \cdot 10^{-36}\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 < -2.8e17 or 2.4e-36 < t1

            1. Initial program 64.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-+.f6499.9

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

              \[\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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

              if -2.8e17 < t1 < 2.4e-36

              1. Initial program 82.5%

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

                \[\leadsto \color{blue}{-1 \cdot \frac{t1 \cdot v}{{u}^{2}}} \]
              4. Step-by-step derivation
                1. Applied rewrites74.5%

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

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

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

                Alternative 5: 79.0% accurate, 0.7× speedup?

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

                  1. Initial program 64.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-+.f6499.9

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

                    \[\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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

                    if -2.8e17 < t1 < 1.56e-37

                    1. Initial program 82.5%

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

                      \[\leadsto \color{blue}{-1 \cdot \frac{t1 \cdot v}{{u}^{2}}} \]
                    4. Step-by-step derivation
                      1. Applied rewrites74.5%

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

                          \[\leadsto \frac{v \cdot \frac{-t1}{u}}{\color{blue}{u}} \]
                        2. Step-by-step derivation
                          1. Applied rewrites74.0%

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

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

                        Alternative 6: 76.3% accurate, 0.7× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;u \leq -6.5 \cdot 10^{-65}:\\ \;\;\;\;t1 \cdot \frac{-v}{u \cdot \left(u + t1\right)}\\ \mathbf{elif}\;u \leq 4.8 \cdot 10^{+42}:\\ \;\;\;\;\frac{-v}{t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{v}{u} \cdot t1}{-u}\\ \end{array} \end{array} \]
                        (FPCore (u v t1)
                         :precision binary64
                         (if (<= u -6.5e-65)
                           (* t1 (/ (- v) (* u (+ u t1))))
                           (if (<= u 4.8e+42) (/ (- v) t1) (/ (* (/ v u) t1) (- u)))))
                        double code(double u, double v, double t1) {
                        	double tmp;
                        	if (u <= -6.5e-65) {
                        		tmp = t1 * (-v / (u * (u + t1)));
                        	} else if (u <= 4.8e+42) {
                        		tmp = -v / t1;
                        	} else {
                        		tmp = ((v / 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 (u <= (-6.5d-65)) then
                                tmp = t1 * (-v / (u * (u + t1)))
                            else if (u <= 4.8d+42) then
                                tmp = -v / t1
                            else
                                tmp = ((v / u) * t1) / -u
                            end if
                            code = tmp
                        end function
                        
                        public static double code(double u, double v, double t1) {
                        	double tmp;
                        	if (u <= -6.5e-65) {
                        		tmp = t1 * (-v / (u * (u + t1)));
                        	} else if (u <= 4.8e+42) {
                        		tmp = -v / t1;
                        	} else {
                        		tmp = ((v / u) * t1) / -u;
                        	}
                        	return tmp;
                        }
                        
                        def code(u, v, t1):
                        	tmp = 0
                        	if u <= -6.5e-65:
                        		tmp = t1 * (-v / (u * (u + t1)))
                        	elif u <= 4.8e+42:
                        		tmp = -v / t1
                        	else:
                        		tmp = ((v / u) * t1) / -u
                        	return tmp
                        
                        function code(u, v, t1)
                        	tmp = 0.0
                        	if (u <= -6.5e-65)
                        		tmp = Float64(t1 * Float64(Float64(-v) / Float64(u * Float64(u + t1))));
                        	elseif (u <= 4.8e+42)
                        		tmp = Float64(Float64(-v) / t1);
                        	else
                        		tmp = Float64(Float64(Float64(v / u) * t1) / Float64(-u));
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(u, v, t1)
                        	tmp = 0.0;
                        	if (u <= -6.5e-65)
                        		tmp = t1 * (-v / (u * (u + t1)));
                        	elseif (u <= 4.8e+42)
                        		tmp = -v / t1;
                        	else
                        		tmp = ((v / u) * t1) / -u;
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[u_, v_, t1_] := If[LessEqual[u, -6.5e-65], N[(t1 * N[((-v) / N[(u * N[(u + t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 4.8e+42], N[((-v) / t1), $MachinePrecision], N[(N[(N[(v / u), $MachinePrecision] * t1), $MachinePrecision] / (-u)), $MachinePrecision]]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;u \leq -6.5 \cdot 10^{-65}:\\
                        \;\;\;\;t1 \cdot \frac{-v}{u \cdot \left(u + t1\right)}\\
                        
                        \mathbf{elif}\;u \leq 4.8 \cdot 10^{+42}:\\
                        \;\;\;\;\frac{-v}{t1}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\frac{\frac{v}{u} \cdot t1}{-u}\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 3 regimes
                        2. if u < -6.5e-65

                          1. Initial program 87.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}{\left(t1 + u\right) \cdot \color{blue}{u}} \]
                          4. Step-by-step derivation
                            1. Applied rewrites77.0%

                              \[\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-/.f6485.5

                                \[\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. lift-*.f64N/A

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

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

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

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

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

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

                            if -6.5e-65 < u < 4.7999999999999997e42

                            1. Initial program 65.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. Applied rewrites76.7%

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

                              if 4.7999999999999997e42 < u

                              1. Initial program 78.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. Applied rewrites83.1%

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

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

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -6.5 \cdot 10^{-65}:\\ \;\;\;\;t1 \cdot \frac{-v}{u \cdot \left(u + t1\right)}\\ \mathbf{elif}\;u \leq 4.8 \cdot 10^{+42}:\\ \;\;\;\;\frac{-v}{t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{v}{u} \cdot t1}{-u}\\ \end{array} \]
                                5. Add Preprocessing

                                Alternative 7: 75.1% accurate, 0.8× speedup?

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

                                  1. Initial program 82.7%

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

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

                                      \[\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-/.f6481.0

                                        \[\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. lift-*.f64N/A

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

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

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

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

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

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

                                    if -6.5e-65 < u < 5.6e23

                                    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. Applied rewrites77.9%

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

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

                                    Alternative 8: 77.4% accurate, 0.8× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t1 \leq -7300 \lor \neg \left(t1 \leq 1.56 \cdot 10^{-37}\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 -7300.0) (not (<= t1 1.56e-37)))
                                       (/ (- v) (+ u t1))
                                       (/ (* (- t1) v) (* u u))))
                                    double code(double u, double v, double t1) {
                                    	double tmp;
                                    	if ((t1 <= -7300.0) || !(t1 <= 1.56e-37)) {
                                    		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 <= (-7300.0d0)) .or. (.not. (t1 <= 1.56d-37))) 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 <= -7300.0) || !(t1 <= 1.56e-37)) {
                                    		tmp = -v / (u + t1);
                                    	} else {
                                    		tmp = (-t1 * v) / (u * u);
                                    	}
                                    	return tmp;
                                    }
                                    
                                    def code(u, v, t1):
                                    	tmp = 0
                                    	if (t1 <= -7300.0) or not (t1 <= 1.56e-37):
                                    		tmp = -v / (u + t1)
                                    	else:
                                    		tmp = (-t1 * v) / (u * u)
                                    	return tmp
                                    
                                    function code(u, v, t1)
                                    	tmp = 0.0
                                    	if ((t1 <= -7300.0) || !(t1 <= 1.56e-37))
                                    		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 <= -7300.0) || ~((t1 <= 1.56e-37)))
                                    		tmp = -v / (u + t1);
                                    	else
                                    		tmp = (-t1 * v) / (u * u);
                                    	end
                                    	tmp_2 = tmp;
                                    end
                                    
                                    code[u_, v_, t1_] := If[Or[LessEqual[t1, -7300.0], N[Not[LessEqual[t1, 1.56e-37]], $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 -7300 \lor \neg \left(t1 \leq 1.56 \cdot 10^{-37}\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 < -7300 or 1.56e-37 < t1

                                      1. Initial program 65.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-+.f6499.9

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

                                        \[\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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

                                        if -7300 < t1 < 1.56e-37

                                        1. Initial program 82.7%

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

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

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

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

                                        Alternative 9: 73.9% accurate, 0.8× speedup?

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

                                          1. Initial program 82.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 \color{blue}{-1 \cdot \frac{t1 \cdot v}{{u}^{2}}} \]
                                          4. Step-by-step derivation
                                            1. Applied rewrites79.0%

                                              \[\leadsto \color{blue}{\frac{v}{u} \cdot \frac{-t1}{u}} \]
                                            2. Step-by-step derivation
                                              1. Applied rewrites76.3%

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

                                              if -1.4499999999999999e-71 < u < 7.0000000000000004e23

                                              1. Initial program 65.3%

                                                \[\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. Applied rewrites78.3%

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

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

                                              Alternative 10: 97.8% accurate, 0.8× speedup?

                                              \[\begin{array}{l} \\ \frac{\left(-t1\right) \cdot \frac{v}{u + t1}}{u + t1} \end{array} \]
                                              (FPCore (u v t1) :precision binary64 (/ (* (- t1) (/ v (+ u t1))) (+ u t1)))
                                              double code(double u, double v, double t1) {
                                              	return (-t1 * (v / (u + t1))) / (u + t1);
                                              }
                                              
                                              module fmin_fmax_functions
                                                  implicit none
                                                  private
                                                  public fmax
                                                  public fmin
                                              
                                                  interface fmax
                                                      module procedure fmax88
                                                      module procedure fmax44
                                                      module procedure fmax84
                                                      module procedure fmax48
                                                  end interface
                                                  interface fmin
                                                      module procedure fmin88
                                                      module procedure fmin44
                                                      module procedure fmin84
                                                      module procedure fmin48
                                                  end interface
                                              contains
                                                  real(8) function fmax88(x, y) result (res)
                                                      real(8), intent (in) :: x
                                                      real(8), intent (in) :: y
                                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                  end function
                                                  real(4) function fmax44(x, y) result (res)
                                                      real(4), intent (in) :: x
                                                      real(4), intent (in) :: y
                                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                  end function
                                                  real(8) function fmax84(x, y) result(res)
                                                      real(8), intent (in) :: x
                                                      real(4), intent (in) :: y
                                                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                  end function
                                                  real(8) function fmax48(x, y) result(res)
                                                      real(4), intent (in) :: x
                                                      real(8), intent (in) :: y
                                                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                  end function
                                                  real(8) function fmin88(x, y) result (res)
                                                      real(8), intent (in) :: x
                                                      real(8), intent (in) :: y
                                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                  end function
                                                  real(4) function fmin44(x, y) result (res)
                                                      real(4), intent (in) :: x
                                                      real(4), intent (in) :: y
                                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                  end function
                                                  real(8) function fmin84(x, y) result(res)
                                                      real(8), intent (in) :: x
                                                      real(4), intent (in) :: y
                                                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                  end function
                                                  real(8) function fmin48(x, y) result(res)
                                                      real(4), intent (in) :: x
                                                      real(8), intent (in) :: y
                                                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                  end function
                                              end module
                                              
                                              real(8) function code(u, v, t1)
                                              use fmin_fmax_functions
                                                  real(8), intent (in) :: u
                                                  real(8), intent (in) :: v
                                                  real(8), intent (in) :: t1
                                                  code = (-t1 * (v / (u + t1))) / (u + t1)
                                              end function
                                              
                                              public static double code(double u, double v, double t1) {
                                              	return (-t1 * (v / (u + t1))) / (u + t1);
                                              }
                                              
                                              def code(u, v, t1):
                                              	return (-t1 * (v / (u + t1))) / (u + t1)
                                              
                                              function code(u, v, t1)
                                              	return Float64(Float64(Float64(-t1) * Float64(v / Float64(u + t1))) / Float64(u + t1))
                                              end
                                              
                                              function tmp = code(u, v, t1)
                                              	tmp = (-t1 * (v / (u + t1))) / (u + t1);
                                              end
                                              
                                              code[u_, v_, t1_] := N[(N[((-t1) * N[(v / N[(u + t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(u + t1), $MachinePrecision]), $MachinePrecision]
                                              
                                              \begin{array}{l}
                                              
                                              \\
                                              \frac{\left(-t1\right) \cdot \frac{v}{u + t1}}{u + t1}
                                              \end{array}
                                              
                                              Derivation
                                              1. Initial program 74.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. 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.9

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

                                                \[\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-*l/N/A

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

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

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

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

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

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

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

                                                  \[\leadsto \frac{\left(-t1\right) \cdot \frac{v}{u + t1}}{\color{blue}{u + t1}} \]
                                                15. lift-+.f6496.7

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

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

                                              Alternative 11: 97.8% accurate, 0.8× speedup?

                                              \[\begin{array}{l} \\ \frac{-t1}{u + t1} \cdot \frac{v}{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[((-t1) / N[(u + t1), $MachinePrecision]), $MachinePrecision] * N[(v / N[(u + t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                                              
                                              \begin{array}{l}
                                              
                                              \\
                                              \frac{-t1}{u + t1} \cdot \frac{v}{u + t1}
                                              \end{array}
                                              
                                              Derivation
                                              1. Initial program 74.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. 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.9

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

                                                \[\leadsto \color{blue}{\frac{-t1}{u + t1} \cdot \frac{v}{u + t1}} \]
                                              5. Add Preprocessing

                                              Alternative 12: 58.7% accurate, 1.2× speedup?

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

                                                1. Initial program 76.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. 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-+.f6496.2

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

                                                  \[\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. +-commutativeN/A

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

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

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

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

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

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

                                                    \[\leadsto \frac{\frac{-t1}{u + t1} \cdot v}{\color{blue}{u + t1}} \]
                                                  15. lift-+.f6496.3

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

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

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

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

                                                    \[\leadsto \frac{-v}{\color{blue}{u}} \]
                                                  3. Step-by-step derivation
                                                    1. Applied rewrites40.6%

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

                                                    if -5.50000000000000017e150 < u < 4.6e139

                                                    1. Initial program 73.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 0

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

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

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

                                                    Alternative 13: 61.8% 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 74.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. 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.9

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

                                                      \[\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. +-commutativeN/A

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

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

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

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

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

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

                                                        \[\leadsto \frac{\frac{-t1}{u + t1} \cdot v}{\color{blue}{u + t1}} \]
                                                      15. lift-+.f6497.2

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

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

                                                      \[\leadsto \frac{\color{blue}{-1 \cdot v}}{u + t1} \]
                                                    8. Step-by-step derivation
                                                      1. Applied rewrites58.5%

                                                        \[\leadsto \frac{\color{blue}{-v}}{u + t1} \]
                                                      2. Add Preprocessing

                                                      Alternative 14: 54.6% 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 74.4%

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

                                                        \[\leadsto \color{blue}{-1 \cdot \frac{v}{t1}} \]
                                                      4. Step-by-step derivation
                                                        1. Applied rewrites51.1%

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

                                                        Reproduce

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