Rosa's DopplerBench

Percentage Accurate: 72.4% → 98.2%
Time: 3.7s
Alternatives: 11
Speedup: 1.0×

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}

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 11 alternatives:

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

Initial Program: 72.4% 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.2% accurate, 0.7× speedup?

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

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

    \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
  2. 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-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 98.0% accurate, 1.0× 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 72.4%

    \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
  2. 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-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 86.7% 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}\;t1 \leq -3 \cdot 10^{+96}:\\ \;\;\;\;-1 \cdot \frac{v}{u + t1}\\ \mathbf{elif}\;t1 \leq -8 \cdot 10^{-98}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t1 \leq 9.5 \cdot 10^{-152}:\\ \;\;\;\;\frac{-t1}{u} \cdot \frac{v}{u}\\ \mathbf{elif}\;t1 \leq 1.9 \cdot 10^{+133}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(\frac{u + u}{t1} - 1\right) \cdot v}{t1}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (let* ((t_1 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u)))))
   (if (<= t1 -3e+96)
     (* -1.0 (/ v (+ u t1)))
     (if (<= t1 -8e-98)
       t_1
       (if (<= t1 9.5e-152)
         (* (/ (- t1) u) (/ v u))
         (if (<= t1 1.9e+133) t_1 (/ (* (- (/ (+ u u) t1) 1.0) v) t1)))))))
double code(double u, double v, double t1) {
	double t_1 = (-t1 * v) / ((t1 + u) * (t1 + u));
	double tmp;
	if (t1 <= -3e+96) {
		tmp = -1.0 * (v / (u + t1));
	} else if (t1 <= -8e-98) {
		tmp = t_1;
	} else if (t1 <= 9.5e-152) {
		tmp = (-t1 / u) * (v / u);
	} else if (t1 <= 1.9e+133) {
		tmp = t_1;
	} else {
		tmp = ((((u + u) / t1) - 1.0) * 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 (t1 <= (-3d+96)) then
        tmp = (-1.0d0) * (v / (u + t1))
    else if (t1 <= (-8d-98)) then
        tmp = t_1
    else if (t1 <= 9.5d-152) then
        tmp = (-t1 / u) * (v / u)
    else if (t1 <= 1.9d+133) then
        tmp = t_1
    else
        tmp = ((((u + u) / t1) - 1.0d0) * 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 (t1 <= -3e+96) {
		tmp = -1.0 * (v / (u + t1));
	} else if (t1 <= -8e-98) {
		tmp = t_1;
	} else if (t1 <= 9.5e-152) {
		tmp = (-t1 / u) * (v / u);
	} else if (t1 <= 1.9e+133) {
		tmp = t_1;
	} else {
		tmp = ((((u + u) / t1) - 1.0) * v) / t1;
	}
	return tmp;
}
def code(u, v, t1):
	t_1 = (-t1 * v) / ((t1 + u) * (t1 + u))
	tmp = 0
	if t1 <= -3e+96:
		tmp = -1.0 * (v / (u + t1))
	elif t1 <= -8e-98:
		tmp = t_1
	elif t1 <= 9.5e-152:
		tmp = (-t1 / u) * (v / u)
	elif t1 <= 1.9e+133:
		tmp = t_1
	else:
		tmp = ((((u + u) / t1) - 1.0) * 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 (t1 <= -3e+96)
		tmp = Float64(-1.0 * Float64(v / Float64(u + t1)));
	elseif (t1 <= -8e-98)
		tmp = t_1;
	elseif (t1 <= 9.5e-152)
		tmp = Float64(Float64(Float64(-t1) / u) * Float64(v / u));
	elseif (t1 <= 1.9e+133)
		tmp = t_1;
	else
		tmp = Float64(Float64(Float64(Float64(Float64(u + u) / t1) - 1.0) * 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 (t1 <= -3e+96)
		tmp = -1.0 * (v / (u + t1));
	elseif (t1 <= -8e-98)
		tmp = t_1;
	elseif (t1 <= 9.5e-152)
		tmp = (-t1 / u) * (v / u);
	elseif (t1 <= 1.9e+133)
		tmp = t_1;
	else
		tmp = ((((u + u) / t1) - 1.0) * 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[t1, -3e+96], N[(-1.0 * N[(v / N[(u + t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, -8e-98], t$95$1, If[LessEqual[t1, 9.5e-152], N[(N[((-t1) / u), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 1.9e+133], t$95$1, N[(N[(N[(N[(N[(u + u), $MachinePrecision] / t1), $MachinePrecision] - 1.0), $MachinePrecision] * v), $MachinePrecision] / 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}\;t1 \leq -3 \cdot 10^{+96}:\\
\;\;\;\;-1 \cdot \frac{v}{u + t1}\\

\mathbf{elif}\;t1 \leq -8 \cdot 10^{-98}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t1 \leq 1.9 \cdot 10^{+133}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 50.3%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. 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-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -3e96 < t1 < -7.99999999999999951e-98 or 9.49999999999999925e-152 < t1 < 1.9000000000000001e133

      1. Initial program 88.6%

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

      if -7.99999999999999951e-98 < t1 < 9.49999999999999925e-152

      1. Initial program 78.5%

        \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
      2. 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-*.f64N/A

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{-t1}{u + t1} \cdot \frac{v}{\color{blue}{u + t1}} \]
        13. lower-+.f6494.4

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 1.9000000000000001e133 < t1

        1. Initial program 40.0%

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{\mathsf{fma}\left(u \cdot \frac{v}{t1}, 2, \mathsf{neg}\left(v\right)\right)}{t1} \]
          9. lower-neg.f6488.1

            \[\leadsto \frac{\mathsf{fma}\left(u \cdot \frac{v}{t1}, 2, -v\right)}{t1} \]
        4. Applied rewrites88.1%

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

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

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

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

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

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

            \[\leadsto \frac{\left(\frac{2 \cdot u}{t1} - 1\right) \cdot v}{t1} \]
          6. count-2-revN/A

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

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

          \[\leadsto \frac{\left(\frac{u + u}{t1} - 1\right) \cdot v}{t1} \]
      9. Recombined 4 regimes into one program.
      10. Add Preprocessing

      Alternative 4: 86.1% accurate, 0.5× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(-t1\right) \cdot \frac{v}{\left(u + t1\right) \cdot \left(u + t1\right)}\\ t_2 := \frac{u}{t1} - 1\\ \mathbf{if}\;t1 \leq -2.2 \cdot 10^{+72}:\\ \;\;\;\;t\_2 \cdot \frac{v}{u + t1}\\ \mathbf{elif}\;t1 \leq -8 \cdot 10^{-98}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t1 \leq 9.2 \cdot 10^{-207}:\\ \;\;\;\;\frac{-t1}{u} \cdot \frac{v}{u}\\ \mathbf{elif}\;t1 \leq 2.5 \cdot 10^{+60}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_2 \cdot v}{u + t1}\\ \end{array} \end{array} \]
      (FPCore (u v t1)
       :precision binary64
       (let* ((t_1 (* (- t1) (/ v (* (+ u t1) (+ u t1))))) (t_2 (- (/ u t1) 1.0)))
         (if (<= t1 -2.2e+72)
           (* t_2 (/ v (+ u t1)))
           (if (<= t1 -8e-98)
             t_1
             (if (<= t1 9.2e-207)
               (* (/ (- t1) u) (/ v u))
               (if (<= t1 2.5e+60) t_1 (/ (* t_2 v) (+ u t1))))))))
      double code(double u, double v, double t1) {
      	double t_1 = -t1 * (v / ((u + t1) * (u + t1)));
      	double t_2 = (u / t1) - 1.0;
      	double tmp;
      	if (t1 <= -2.2e+72) {
      		tmp = t_2 * (v / (u + t1));
      	} else if (t1 <= -8e-98) {
      		tmp = t_1;
      	} else if (t1 <= 9.2e-207) {
      		tmp = (-t1 / u) * (v / u);
      	} else if (t1 <= 2.5e+60) {
      		tmp = t_1;
      	} else {
      		tmp = (t_2 * v) / (u + t1);
      	}
      	return tmp;
      }
      
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(u, v, t1)
      use fmin_fmax_functions
          real(8), intent (in) :: u
          real(8), intent (in) :: v
          real(8), intent (in) :: t1
          real(8) :: t_1
          real(8) :: t_2
          real(8) :: tmp
          t_1 = -t1 * (v / ((u + t1) * (u + t1)))
          t_2 = (u / t1) - 1.0d0
          if (t1 <= (-2.2d+72)) then
              tmp = t_2 * (v / (u + t1))
          else if (t1 <= (-8d-98)) then
              tmp = t_1
          else if (t1 <= 9.2d-207) then
              tmp = (-t1 / u) * (v / u)
          else if (t1 <= 2.5d+60) then
              tmp = t_1
          else
              tmp = (t_2 * v) / (u + t1)
          end if
          code = tmp
      end function
      
      public static double code(double u, double v, double t1) {
      	double t_1 = -t1 * (v / ((u + t1) * (u + t1)));
      	double t_2 = (u / t1) - 1.0;
      	double tmp;
      	if (t1 <= -2.2e+72) {
      		tmp = t_2 * (v / (u + t1));
      	} else if (t1 <= -8e-98) {
      		tmp = t_1;
      	} else if (t1 <= 9.2e-207) {
      		tmp = (-t1 / u) * (v / u);
      	} else if (t1 <= 2.5e+60) {
      		tmp = t_1;
      	} else {
      		tmp = (t_2 * v) / (u + t1);
      	}
      	return tmp;
      }
      
      def code(u, v, t1):
      	t_1 = -t1 * (v / ((u + t1) * (u + t1)))
      	t_2 = (u / t1) - 1.0
      	tmp = 0
      	if t1 <= -2.2e+72:
      		tmp = t_2 * (v / (u + t1))
      	elif t1 <= -8e-98:
      		tmp = t_1
      	elif t1 <= 9.2e-207:
      		tmp = (-t1 / u) * (v / u)
      	elif t1 <= 2.5e+60:
      		tmp = t_1
      	else:
      		tmp = (t_2 * v) / (u + t1)
      	return tmp
      
      function code(u, v, t1)
      	t_1 = Float64(Float64(-t1) * Float64(v / Float64(Float64(u + t1) * Float64(u + t1))))
      	t_2 = Float64(Float64(u / t1) - 1.0)
      	tmp = 0.0
      	if (t1 <= -2.2e+72)
      		tmp = Float64(t_2 * Float64(v / Float64(u + t1)));
      	elseif (t1 <= -8e-98)
      		tmp = t_1;
      	elseif (t1 <= 9.2e-207)
      		tmp = Float64(Float64(Float64(-t1) / u) * Float64(v / u));
      	elseif (t1 <= 2.5e+60)
      		tmp = t_1;
      	else
      		tmp = Float64(Float64(t_2 * v) / Float64(u + t1));
      	end
      	return tmp
      end
      
      function tmp_2 = code(u, v, t1)
      	t_1 = -t1 * (v / ((u + t1) * (u + t1)));
      	t_2 = (u / t1) - 1.0;
      	tmp = 0.0;
      	if (t1 <= -2.2e+72)
      		tmp = t_2 * (v / (u + t1));
      	elseif (t1 <= -8e-98)
      		tmp = t_1;
      	elseif (t1 <= 9.2e-207)
      		tmp = (-t1 / u) * (v / u);
      	elseif (t1 <= 2.5e+60)
      		tmp = t_1;
      	else
      		tmp = (t_2 * v) / (u + t1);
      	end
      	tmp_2 = tmp;
      end
      
      code[u_, v_, t1_] := Block[{t$95$1 = N[((-t1) * N[(v / N[(N[(u + t1), $MachinePrecision] * N[(u + t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(u / t1), $MachinePrecision] - 1.0), $MachinePrecision]}, If[LessEqual[t1, -2.2e+72], N[(t$95$2 * N[(v / N[(u + t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, -8e-98], t$95$1, If[LessEqual[t1, 9.2e-207], N[(N[((-t1) / u), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 2.5e+60], t$95$1, N[(N[(t$95$2 * v), $MachinePrecision] / N[(u + t1), $MachinePrecision]), $MachinePrecision]]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \left(-t1\right) \cdot \frac{v}{\left(u + t1\right) \cdot \left(u + t1\right)}\\
      t_2 := \frac{u}{t1} - 1\\
      \mathbf{if}\;t1 \leq -2.2 \cdot 10^{+72}:\\
      \;\;\;\;t\_2 \cdot \frac{v}{u + t1}\\
      
      \mathbf{elif}\;t1 \leq -8 \cdot 10^{-98}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t1 \leq 9.2 \cdot 10^{-207}:\\
      \;\;\;\;\frac{-t1}{u} \cdot \frac{v}{u}\\
      
      \mathbf{elif}\;t1 \leq 2.5 \cdot 10^{+60}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{t\_2 \cdot v}{u + t1}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if t1 < -2.2e72

        1. Initial program 53.2%

          \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
        2. 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-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -2.2e72 < t1 < -7.99999999999999951e-98 or 9.2000000000000002e-207 < t1 < 2.49999999999999987e60

        1. Initial program 89.5%

          \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
        2. 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-*.f64N/A

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(-t1\right) \cdot \frac{v}{\left(u + t1\right) \cdot \color{blue}{\left(u + t1\right)}} \]
          13. lower-+.f6489.5

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

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

        if -7.99999999999999951e-98 < t1 < 9.2000000000000002e-207

        1. Initial program 78.5%

          \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
        2. 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-*.f64N/A

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{-t1}{u + t1} \cdot \frac{v}{\color{blue}{u + t1}} \]
          13. lower-+.f6494.2

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{-t1}{u} \cdot \frac{v}{u} \]
            4. lower-/.f6483.5

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

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

          if 2.49999999999999987e60 < t1

          1. Initial program 51.7%

            \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
          2. 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-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{\left(\frac{u}{t1} - 1\right) \cdot v}{u + t1}} \]
        9. Recombined 4 regimes into one program.
        10. Add Preprocessing

        Alternative 5: 79.0% accurate, 0.8× speedup?

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

          1. Initial program 64.1%

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{\mathsf{fma}\left(u \cdot \frac{v}{t1}, 2, \mathsf{neg}\left(v\right)\right)}{t1} \]
            9. lower-neg.f6476.7

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

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

          if -5.9999999999999998e-22 < t1 < 3.7999999999999998e-11

          1. Initial program 83.5%

            \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
          2. 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-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 3.7999999999999998e-11 < t1

            1. Initial program 60.3%

              \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
            2. 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-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{-1} \cdot \frac{v}{u + t1} \]
            6. Recombined 3 regimes into one program.
            7. Add Preprocessing

            Alternative 6: 78.1% accurate, 0.8× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{v}{u + t1}\\ \mathbf{if}\;t1 \leq -5 \cdot 10^{-22}:\\ \;\;\;\;\left(\frac{u}{t1} - 1\right) \cdot t\_1\\ \mathbf{elif}\;t1 \leq 3.8 \cdot 10^{-11}:\\ \;\;\;\;\frac{-t1}{u} \cdot \frac{v}{u}\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot t\_1\\ \end{array} \end{array} \]
            (FPCore (u v t1)
             :precision binary64
             (let* ((t_1 (/ v (+ u t1))))
               (if (<= t1 -5e-22)
                 (* (- (/ u t1) 1.0) t_1)
                 (if (<= t1 3.8e-11) (* (/ (- t1) u) (/ v u)) (* -1.0 t_1)))))
            double code(double u, double v, double t1) {
            	double t_1 = v / (u + t1);
            	double tmp;
            	if (t1 <= -5e-22) {
            		tmp = ((u / t1) - 1.0) * t_1;
            	} else if (t1 <= 3.8e-11) {
            		tmp = (-t1 / u) * (v / u);
            	} else {
            		tmp = -1.0 * t_1;
            	}
            	return tmp;
            }
            
            module fmin_fmax_functions
                implicit none
                private
                public fmax
                public fmin
            
                interface fmax
                    module procedure fmax88
                    module procedure fmax44
                    module procedure fmax84
                    module procedure fmax48
                end interface
                interface fmin
                    module procedure fmin88
                    module procedure fmin44
                    module procedure fmin84
                    module procedure fmin48
                end interface
            contains
                real(8) function fmax88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(4) function fmax44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(8) function fmax84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmax48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                end function
                real(8) function fmin88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(4) function fmin44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(8) function fmin84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmin48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                end function
            end module
            
            real(8) function code(u, v, t1)
            use fmin_fmax_functions
                real(8), intent (in) :: u
                real(8), intent (in) :: v
                real(8), intent (in) :: t1
                real(8) :: t_1
                real(8) :: tmp
                t_1 = v / (u + t1)
                if (t1 <= (-5d-22)) then
                    tmp = ((u / t1) - 1.0d0) * t_1
                else if (t1 <= 3.8d-11) then
                    tmp = (-t1 / u) * (v / u)
                else
                    tmp = (-1.0d0) * t_1
                end if
                code = tmp
            end function
            
            public static double code(double u, double v, double t1) {
            	double t_1 = v / (u + t1);
            	double tmp;
            	if (t1 <= -5e-22) {
            		tmp = ((u / t1) - 1.0) * t_1;
            	} else if (t1 <= 3.8e-11) {
            		tmp = (-t1 / u) * (v / u);
            	} else {
            		tmp = -1.0 * t_1;
            	}
            	return tmp;
            }
            
            def code(u, v, t1):
            	t_1 = v / (u + t1)
            	tmp = 0
            	if t1 <= -5e-22:
            		tmp = ((u / t1) - 1.0) * t_1
            	elif t1 <= 3.8e-11:
            		tmp = (-t1 / u) * (v / u)
            	else:
            		tmp = -1.0 * t_1
            	return tmp
            
            function code(u, v, t1)
            	t_1 = Float64(v / Float64(u + t1))
            	tmp = 0.0
            	if (t1 <= -5e-22)
            		tmp = Float64(Float64(Float64(u / t1) - 1.0) * t_1);
            	elseif (t1 <= 3.8e-11)
            		tmp = Float64(Float64(Float64(-t1) / u) * Float64(v / u));
            	else
            		tmp = Float64(-1.0 * t_1);
            	end
            	return tmp
            end
            
            function tmp_2 = code(u, v, t1)
            	t_1 = v / (u + t1);
            	tmp = 0.0;
            	if (t1 <= -5e-22)
            		tmp = ((u / t1) - 1.0) * t_1;
            	elseif (t1 <= 3.8e-11)
            		tmp = (-t1 / u) * (v / u);
            	else
            		tmp = -1.0 * t_1;
            	end
            	tmp_2 = tmp;
            end
            
            code[u_, v_, t1_] := Block[{t$95$1 = N[(v / N[(u + t1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -5e-22], N[(N[(N[(u / t1), $MachinePrecision] - 1.0), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[t1, 3.8e-11], N[(N[((-t1) / u), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision], N[(-1.0 * t$95$1), $MachinePrecision]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \frac{v}{u + t1}\\
            \mathbf{if}\;t1 \leq -5 \cdot 10^{-22}:\\
            \;\;\;\;\left(\frac{u}{t1} - 1\right) \cdot t\_1\\
            
            \mathbf{elif}\;t1 \leq 3.8 \cdot 10^{-11}:\\
            \;\;\;\;\frac{-t1}{u} \cdot \frac{v}{u}\\
            
            \mathbf{else}:\\
            \;\;\;\;-1 \cdot t\_1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if t1 < -4.99999999999999954e-22

              1. Initial program 64.1%

                \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
              2. 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-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if -4.99999999999999954e-22 < t1 < 3.7999999999999998e-11

              1. Initial program 83.5%

                \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
              2. 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-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 3.7999999999999998e-11 < t1

                1. Initial program 60.3%

                  \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                2. 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-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \color{blue}{-1} \cdot \frac{v}{u + t1} \]
                6. Recombined 3 regimes into one program.
                7. Add Preprocessing

                Alternative 7: 78.0% accurate, 0.9× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t1 \leq -6 \cdot 10^{-22}:\\ \;\;\;\;\frac{-v}{t1}\\ \mathbf{elif}\;t1 \leq 3.8 \cdot 10^{-11}:\\ \;\;\;\;\frac{-t1}{u} \cdot \frac{v}{u}\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \frac{v}{u + t1}\\ \end{array} \end{array} \]
                (FPCore (u v t1)
                 :precision binary64
                 (if (<= t1 -6e-22)
                   (/ (- v) t1)
                   (if (<= t1 3.8e-11) (* (/ (- t1) u) (/ v u)) (* -1.0 (/ v (+ u t1))))))
                double code(double u, double v, double t1) {
                	double tmp;
                	if (t1 <= -6e-22) {
                		tmp = -v / t1;
                	} else if (t1 <= 3.8e-11) {
                		tmp = (-t1 / u) * (v / u);
                	} else {
                		tmp = -1.0 * (v / (u + t1));
                	}
                	return tmp;
                }
                
                module fmin_fmax_functions
                    implicit none
                    private
                    public fmax
                    public fmin
                
                    interface fmax
                        module procedure fmax88
                        module procedure fmax44
                        module procedure fmax84
                        module procedure fmax48
                    end interface
                    interface fmin
                        module procedure fmin88
                        module procedure fmin44
                        module procedure fmin84
                        module procedure fmin48
                    end interface
                contains
                    real(8) function fmax88(x, y) result (res)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                    end function
                    real(4) function fmax44(x, y) result (res)
                        real(4), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                    end function
                    real(8) function fmax84(x, y) result(res)
                        real(8), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                    end function
                    real(8) function fmax48(x, y) result(res)
                        real(4), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                    end function
                    real(8) function fmin88(x, y) result (res)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                    end function
                    real(4) function fmin44(x, y) result (res)
                        real(4), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                    end function
                    real(8) function fmin84(x, y) result(res)
                        real(8), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                    end function
                    real(8) function fmin48(x, y) result(res)
                        real(4), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                    end function
                end module
                
                real(8) function code(u, v, t1)
                use fmin_fmax_functions
                    real(8), intent (in) :: u
                    real(8), intent (in) :: v
                    real(8), intent (in) :: t1
                    real(8) :: tmp
                    if (t1 <= (-6d-22)) then
                        tmp = -v / t1
                    else if (t1 <= 3.8d-11) then
                        tmp = (-t1 / u) * (v / u)
                    else
                        tmp = (-1.0d0) * (v / (u + t1))
                    end if
                    code = tmp
                end function
                
                public static double code(double u, double v, double t1) {
                	double tmp;
                	if (t1 <= -6e-22) {
                		tmp = -v / t1;
                	} else if (t1 <= 3.8e-11) {
                		tmp = (-t1 / u) * (v / u);
                	} else {
                		tmp = -1.0 * (v / (u + t1));
                	}
                	return tmp;
                }
                
                def code(u, v, t1):
                	tmp = 0
                	if t1 <= -6e-22:
                		tmp = -v / t1
                	elif t1 <= 3.8e-11:
                		tmp = (-t1 / u) * (v / u)
                	else:
                		tmp = -1.0 * (v / (u + t1))
                	return tmp
                
                function code(u, v, t1)
                	tmp = 0.0
                	if (t1 <= -6e-22)
                		tmp = Float64(Float64(-v) / t1);
                	elseif (t1 <= 3.8e-11)
                		tmp = Float64(Float64(Float64(-t1) / u) * Float64(v / u));
                	else
                		tmp = Float64(-1.0 * Float64(v / Float64(u + t1)));
                	end
                	return tmp
                end
                
                function tmp_2 = code(u, v, t1)
                	tmp = 0.0;
                	if (t1 <= -6e-22)
                		tmp = -v / t1;
                	elseif (t1 <= 3.8e-11)
                		tmp = (-t1 / u) * (v / u);
                	else
                		tmp = -1.0 * (v / (u + t1));
                	end
                	tmp_2 = tmp;
                end
                
                code[u_, v_, t1_] := If[LessEqual[t1, -6e-22], N[((-v) / t1), $MachinePrecision], If[LessEqual[t1, 3.8e-11], N[(N[((-t1) / u), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision], N[(-1.0 * N[(v / N[(u + t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;t1 \leq -6 \cdot 10^{-22}:\\
                \;\;\;\;\frac{-v}{t1}\\
                
                \mathbf{elif}\;t1 \leq 3.8 \cdot 10^{-11}:\\
                \;\;\;\;\frac{-t1}{u} \cdot \frac{v}{u}\\
                
                \mathbf{else}:\\
                \;\;\;\;-1 \cdot \frac{v}{u + t1}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if t1 < -5.9999999999999998e-22

                  1. Initial program 64.1%

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

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

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

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

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

                      \[\leadsto \frac{-v}{t1} \]
                  4. Applied rewrites77.1%

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

                  if -5.9999999999999998e-22 < t1 < 3.7999999999999998e-11

                  1. Initial program 83.5%

                    \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                  2. 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-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 3.7999999999999998e-11 < t1

                    1. Initial program 60.3%

                      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                    2. 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-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \color{blue}{-1} \cdot \frac{v}{u + t1} \]
                    6. Recombined 3 regimes into one program.
                    7. Add Preprocessing

                    Alternative 8: 75.1% accurate, 0.9× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t1 \leq -6 \cdot 10^{-22}:\\ \;\;\;\;\frac{-v}{t1}\\ \mathbf{elif}\;t1 \leq 2.65 \cdot 10^{-11}:\\ \;\;\;\;\left(-t1\right) \cdot \frac{v}{u \cdot u}\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \frac{v}{u + t1}\\ \end{array} \end{array} \]
                    (FPCore (u v t1)
                     :precision binary64
                     (if (<= t1 -6e-22)
                       (/ (- v) t1)
                       (if (<= t1 2.65e-11) (* (- t1) (/ v (* u u))) (* -1.0 (/ v (+ u t1))))))
                    double code(double u, double v, double t1) {
                    	double tmp;
                    	if (t1 <= -6e-22) {
                    		tmp = -v / t1;
                    	} else if (t1 <= 2.65e-11) {
                    		tmp = -t1 * (v / (u * u));
                    	} else {
                    		tmp = -1.0 * (v / (u + t1));
                    	}
                    	return tmp;
                    }
                    
                    module fmin_fmax_functions
                        implicit none
                        private
                        public fmax
                        public fmin
                    
                        interface fmax
                            module procedure fmax88
                            module procedure fmax44
                            module procedure fmax84
                            module procedure fmax48
                        end interface
                        interface fmin
                            module procedure fmin88
                            module procedure fmin44
                            module procedure fmin84
                            module procedure fmin48
                        end interface
                    contains
                        real(8) function fmax88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmax44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmax84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmax48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                        end function
                        real(8) function fmin88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmin44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmin84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmin48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                        end function
                    end module
                    
                    real(8) function code(u, v, t1)
                    use fmin_fmax_functions
                        real(8), intent (in) :: u
                        real(8), intent (in) :: v
                        real(8), intent (in) :: t1
                        real(8) :: tmp
                        if (t1 <= (-6d-22)) then
                            tmp = -v / t1
                        else if (t1 <= 2.65d-11) then
                            tmp = -t1 * (v / (u * u))
                        else
                            tmp = (-1.0d0) * (v / (u + t1))
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double u, double v, double t1) {
                    	double tmp;
                    	if (t1 <= -6e-22) {
                    		tmp = -v / t1;
                    	} else if (t1 <= 2.65e-11) {
                    		tmp = -t1 * (v / (u * u));
                    	} else {
                    		tmp = -1.0 * (v / (u + t1));
                    	}
                    	return tmp;
                    }
                    
                    def code(u, v, t1):
                    	tmp = 0
                    	if t1 <= -6e-22:
                    		tmp = -v / t1
                    	elif t1 <= 2.65e-11:
                    		tmp = -t1 * (v / (u * u))
                    	else:
                    		tmp = -1.0 * (v / (u + t1))
                    	return tmp
                    
                    function code(u, v, t1)
                    	tmp = 0.0
                    	if (t1 <= -6e-22)
                    		tmp = Float64(Float64(-v) / t1);
                    	elseif (t1 <= 2.65e-11)
                    		tmp = Float64(Float64(-t1) * Float64(v / Float64(u * u)));
                    	else
                    		tmp = Float64(-1.0 * Float64(v / Float64(u + t1)));
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(u, v, t1)
                    	tmp = 0.0;
                    	if (t1 <= -6e-22)
                    		tmp = -v / t1;
                    	elseif (t1 <= 2.65e-11)
                    		tmp = -t1 * (v / (u * u));
                    	else
                    		tmp = -1.0 * (v / (u + t1));
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[u_, v_, t1_] := If[LessEqual[t1, -6e-22], N[((-v) / t1), $MachinePrecision], If[LessEqual[t1, 2.65e-11], N[((-t1) * N[(v / N[(u * u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 * N[(v / N[(u + t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;t1 \leq -6 \cdot 10^{-22}:\\
                    \;\;\;\;\frac{-v}{t1}\\
                    
                    \mathbf{elif}\;t1 \leq 2.65 \cdot 10^{-11}:\\
                    \;\;\;\;\left(-t1\right) \cdot \frac{v}{u \cdot u}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;-1 \cdot \frac{v}{u + t1}\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if t1 < -5.9999999999999998e-22

                      1. Initial program 64.1%

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

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

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

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

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

                          \[\leadsto \frac{-v}{t1} \]
                      4. Applied rewrites77.1%

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

                      if -5.9999999999999998e-22 < t1 < 2.6499999999999999e-11

                      1. Initial program 83.5%

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

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

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

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

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

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

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

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

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

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

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

                      if 2.6499999999999999e-11 < t1

                      1. Initial program 60.3%

                        \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                      2. 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-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \color{blue}{-1} \cdot \frac{v}{u + t1} \]
                      6. Recombined 3 regimes into one program.
                      7. Add Preprocessing

                      Alternative 9: 61.0% accurate, 1.3× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-v}{u}\\ \mathbf{if}\;u \leq -2.8 \cdot 10^{+155}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;u \leq 4.9 \cdot 10^{+181}:\\ \;\;\;\;\frac{-v}{t1}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                      (FPCore (u v t1)
                       :precision binary64
                       (let* ((t_1 (/ (- v) u)))
                         (if (<= u -2.8e+155) t_1 (if (<= u 4.9e+181) (/ (- v) t1) t_1))))
                      double code(double u, double v, double t1) {
                      	double t_1 = -v / u;
                      	double tmp;
                      	if (u <= -2.8e+155) {
                      		tmp = t_1;
                      	} else if (u <= 4.9e+181) {
                      		tmp = -v / t1;
                      	} else {
                      		tmp = t_1;
                      	}
                      	return tmp;
                      }
                      
                      module fmin_fmax_functions
                          implicit none
                          private
                          public fmax
                          public fmin
                      
                          interface fmax
                              module procedure fmax88
                              module procedure fmax44
                              module procedure fmax84
                              module procedure fmax48
                          end interface
                          interface fmin
                              module procedure fmin88
                              module procedure fmin44
                              module procedure fmin84
                              module procedure fmin48
                          end interface
                      contains
                          real(8) function fmax88(x, y) result (res)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                          end function
                          real(4) function fmax44(x, y) result (res)
                              real(4), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                          end function
                          real(8) function fmax84(x, y) result(res)
                              real(8), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                          end function
                          real(8) function fmax48(x, y) result(res)
                              real(4), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                          end function
                          real(8) function fmin88(x, y) result (res)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                          end function
                          real(4) function fmin44(x, y) result (res)
                              real(4), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                          end function
                          real(8) function fmin84(x, y) result(res)
                              real(8), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                          end function
                          real(8) function fmin48(x, y) result(res)
                              real(4), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                          end function
                      end module
                      
                      real(8) function code(u, v, t1)
                      use fmin_fmax_functions
                          real(8), intent (in) :: u
                          real(8), intent (in) :: v
                          real(8), intent (in) :: t1
                          real(8) :: t_1
                          real(8) :: tmp
                          t_1 = -v / u
                          if (u <= (-2.8d+155)) then
                              tmp = t_1
                          else if (u <= 4.9d+181) then
                              tmp = -v / t1
                          else
                              tmp = t_1
                          end if
                          code = tmp
                      end function
                      
                      public static double code(double u, double v, double t1) {
                      	double t_1 = -v / u;
                      	double tmp;
                      	if (u <= -2.8e+155) {
                      		tmp = t_1;
                      	} else if (u <= 4.9e+181) {
                      		tmp = -v / t1;
                      	} else {
                      		tmp = t_1;
                      	}
                      	return tmp;
                      }
                      
                      def code(u, v, t1):
                      	t_1 = -v / u
                      	tmp = 0
                      	if u <= -2.8e+155:
                      		tmp = t_1
                      	elif u <= 4.9e+181:
                      		tmp = -v / t1
                      	else:
                      		tmp = t_1
                      	return tmp
                      
                      function code(u, v, t1)
                      	t_1 = Float64(Float64(-v) / u)
                      	tmp = 0.0
                      	if (u <= -2.8e+155)
                      		tmp = t_1;
                      	elseif (u <= 4.9e+181)
                      		tmp = Float64(Float64(-v) / t1);
                      	else
                      		tmp = t_1;
                      	end
                      	return tmp
                      end
                      
                      function tmp_2 = code(u, v, t1)
                      	t_1 = -v / u;
                      	tmp = 0.0;
                      	if (u <= -2.8e+155)
                      		tmp = t_1;
                      	elseif (u <= 4.9e+181)
                      		tmp = -v / t1;
                      	else
                      		tmp = t_1;
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[u_, v_, t1_] := Block[{t$95$1 = N[((-v) / u), $MachinePrecision]}, If[LessEqual[u, -2.8e+155], t$95$1, If[LessEqual[u, 4.9e+181], N[((-v) / t1), $MachinePrecision], t$95$1]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      t_1 := \frac{-v}{u}\\
                      \mathbf{if}\;u \leq -2.8 \cdot 10^{+155}:\\
                      \;\;\;\;t\_1\\
                      
                      \mathbf{elif}\;u \leq 4.9 \cdot 10^{+181}:\\
                      \;\;\;\;\frac{-v}{t1}\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_1\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if u < -2.80000000000000016e155 or 4.89999999999999981e181 < u

                        1. Initial program 72.8%

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

                          \[\leadsto \frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \color{blue}{u}} \]
                        3. Step-by-step derivation
                          1. Applied rewrites72.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-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \frac{\frac{v \cdot \left(-t1\right)}{\color{blue}{u + t1}}}{u} \]
                            17. lift-+.f6484.3

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

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

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

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

                              \[\leadsto \frac{\mathsf{neg}\left(v\right)}{u} \]
                            2. lower-neg.f6440.5

                              \[\leadsto \frac{-v}{u} \]
                          6. Applied rewrites40.5%

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

                          if -2.80000000000000016e155 < u < 4.89999999999999981e181

                          1. Initial program 72.3%

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

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

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

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

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

                              \[\leadsto \frac{-v}{t1} \]
                          4. Applied rewrites63.2%

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

                        Alternative 10: 58.0% accurate, 1.7× speedup?

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

                          \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                        2. 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-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 11: 53.6% accurate, 3.1× speedup?

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

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

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

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

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

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

                              \[\leadsto \frac{-v}{t1} \]
                          4. Applied rewrites53.6%

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

                          Reproduce

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