Rosa's DopplerBench

Percentage Accurate: 72.6% → 98.1%
Time: 3.4s
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.6% 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.1% 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.6%

    \[\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.1

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

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

Alternative 2: 86.4% accurate, 0.7× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\frac{-t1}{u + t1} \cdot \frac{v}{t1}\\


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

    1. Initial program 42.4%

      \[\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.f6491.4

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

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

    if -5.5000000000000002e137 < t1 < 4.50000000000000017e95

    1. Initial program 84.8%

      \[\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-+.f6484.2

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

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

    if 4.50000000000000017e95 < t1

    1. Initial program 48.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 3: 79.8% accurate, 0.8× speedup?

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

      1. Initial program 78.0%

        \[\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.4

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -4.1e6 < u < 3.30000000000000016e-43

        1. Initial program 66.7%

          \[\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.f6478.9

            \[\leadsto \frac{-v}{t1} \]
        4. Applied rewrites78.9%

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

      Alternative 4: 79.1% accurate, 0.7× speedup?

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

        1. Initial program 77.0%

          \[\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.9

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

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

            \[\leadsto -1 \cdot \color{blue}{\frac{v}{u}} \]
          3. Step-by-step derivation
            1. lower-/.f6433.7

              \[\leadsto -1 \cdot \frac{v}{\color{blue}{u}} \]
          4. Applied rewrites33.7%

            \[\leadsto -1 \cdot \color{blue}{\frac{v}{u}} \]
          5. Taylor expanded in u around inf

            \[\leadsto \color{blue}{\left(-1 \cdot \frac{t1}{u}\right)} \cdot \frac{v}{u} \]
          6. 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.0

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

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

          if -6.5e6 < u < 3.30000000000000016e-43

          1. Initial program 66.7%

            \[\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.f6478.9

              \[\leadsto \frac{-v}{t1} \]
          4. Applied rewrites78.9%

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

          if 3.30000000000000016e-43 < u < 2.64999999999999995e169

          1. Initial program 80.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. 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-+.f6479.7

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

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

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

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

          Alternative 5: 78.2% accurate, 0.8× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-t1}{u} \cdot \frac{v}{u + t1}\\ \mathbf{if}\;u \leq -4100000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;u \leq 3.3 \cdot 10^{-43}:\\ \;\;\;\;\frac{-v}{t1}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
          (FPCore (u v t1)
           :precision binary64
           (let* ((t_1 (* (/ (- t1) u) (/ v (+ u t1)))))
             (if (<= u -4100000.0) t_1 (if (<= u 3.3e-43) (/ (- v) t1) t_1))))
          double code(double u, double v, double t1) {
          	double t_1 = (-t1 / u) * (v / (u + t1));
          	double tmp;
          	if (u <= -4100000.0) {
          		tmp = t_1;
          	} else if (u <= 3.3e-43) {
          		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 = (-t1 / u) * (v / (u + t1))
              if (u <= (-4100000.0d0)) then
                  tmp = t_1
              else if (u <= 3.3d-43) 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 = (-t1 / u) * (v / (u + t1));
          	double tmp;
          	if (u <= -4100000.0) {
          		tmp = t_1;
          	} else if (u <= 3.3e-43) {
          		tmp = -v / t1;
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          def code(u, v, t1):
          	t_1 = (-t1 / u) * (v / (u + t1))
          	tmp = 0
          	if u <= -4100000.0:
          		tmp = t_1
          	elif u <= 3.3e-43:
          		tmp = -v / t1
          	else:
          		tmp = t_1
          	return tmp
          
          function code(u, v, t1)
          	t_1 = Float64(Float64(Float64(-t1) / u) * Float64(v / Float64(u + t1)))
          	tmp = 0.0
          	if (u <= -4100000.0)
          		tmp = t_1;
          	elseif (u <= 3.3e-43)
          		tmp = Float64(Float64(-v) / t1);
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          function tmp_2 = code(u, v, t1)
          	t_1 = (-t1 / u) * (v / (u + t1));
          	tmp = 0.0;
          	if (u <= -4100000.0)
          		tmp = t_1;
          	elseif (u <= 3.3e-43)
          		tmp = -v / t1;
          	else
          		tmp = t_1;
          	end
          	tmp_2 = tmp;
          end
          
          code[u_, v_, t1_] := Block[{t$95$1 = N[(N[((-t1) / u), $MachinePrecision] * N[(v / N[(u + t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[u, -4100000.0], t$95$1, If[LessEqual[u, 3.3e-43], N[((-v) / t1), $MachinePrecision], t$95$1]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := \frac{-t1}{u} \cdot \frac{v}{u + t1}\\
          \mathbf{if}\;u \leq -4100000:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;u \leq 3.3 \cdot 10^{-43}:\\
          \;\;\;\;\frac{-v}{t1}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if u < -4.1e6 or 3.30000000000000016e-43 < u

            1. Initial program 78.0%

              \[\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.4

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

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

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

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

              if -4.1e6 < u < 3.30000000000000016e-43

              1. Initial program 66.7%

                \[\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.f6478.9

                  \[\leadsto \frac{-v}{t1} \]
              4. Applied rewrites78.9%

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

            Alternative 6: 77.5% accurate, 0.9× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-t1}{u} \cdot \frac{v}{u}\\ \mathbf{if}\;u \leq -6500000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;u \leq 6.3 \cdot 10^{+69}:\\ \;\;\;\;\frac{-v}{t1}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
            (FPCore (u v t1)
             :precision binary64
             (let* ((t_1 (* (/ (- t1) u) (/ v u))))
               (if (<= u -6500000.0) t_1 (if (<= u 6.3e+69) (/ (- v) t1) t_1))))
            double code(double u, double v, double t1) {
            	double t_1 = (-t1 / u) * (v / u);
            	double tmp;
            	if (u <= -6500000.0) {
            		tmp = t_1;
            	} else if (u <= 6.3e+69) {
            		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 = (-t1 / u) * (v / u)
                if (u <= (-6500000.0d0)) then
                    tmp = t_1
                else if (u <= 6.3d+69) 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 = (-t1 / u) * (v / u);
            	double tmp;
            	if (u <= -6500000.0) {
            		tmp = t_1;
            	} else if (u <= 6.3e+69) {
            		tmp = -v / t1;
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            def code(u, v, t1):
            	t_1 = (-t1 / u) * (v / u)
            	tmp = 0
            	if u <= -6500000.0:
            		tmp = t_1
            	elif u <= 6.3e+69:
            		tmp = -v / t1
            	else:
            		tmp = t_1
            	return tmp
            
            function code(u, v, t1)
            	t_1 = Float64(Float64(Float64(-t1) / u) * Float64(v / u))
            	tmp = 0.0
            	if (u <= -6500000.0)
            		tmp = t_1;
            	elseif (u <= 6.3e+69)
            		tmp = Float64(Float64(-v) / t1);
            	else
            		tmp = t_1;
            	end
            	return tmp
            end
            
            function tmp_2 = code(u, v, t1)
            	t_1 = (-t1 / u) * (v / u);
            	tmp = 0.0;
            	if (u <= -6500000.0)
            		tmp = t_1;
            	elseif (u <= 6.3e+69)
            		tmp = -v / t1;
            	else
            		tmp = t_1;
            	end
            	tmp_2 = tmp;
            end
            
            code[u_, v_, t1_] := Block[{t$95$1 = N[(N[((-t1) / u), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[u, -6500000.0], t$95$1, If[LessEqual[u, 6.3e+69], N[((-v) / t1), $MachinePrecision], t$95$1]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \frac{-t1}{u} \cdot \frac{v}{u}\\
            \mathbf{if}\;u \leq -6500000:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;u \leq 6.3 \cdot 10^{+69}:\\
            \;\;\;\;\frac{-v}{t1}\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if u < -6.5e6 or 6.30000000000000007e69 < u

              1. Initial program 77.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.4

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

                \[\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 rewrites48.5%

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

                  \[\leadsto -1 \cdot \color{blue}{\frac{v}{u}} \]
                3. Step-by-step derivation
                  1. lower-/.f6431.5

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

                  \[\leadsto -1 \cdot \color{blue}{\frac{v}{u}} \]
                5. Taylor expanded in u around inf

                  \[\leadsto \color{blue}{\left(-1 \cdot \frac{t1}{u}\right)} \cdot \frac{v}{u} \]
                6. 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-/.f6479.8

                    \[\leadsto \frac{-t1}{\color{blue}{u}} \cdot \frac{v}{u} \]
                7. Applied rewrites79.8%

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

                if -6.5e6 < u < 6.30000000000000007e69

                1. Initial program 69.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.f6473.8

                    \[\leadsto \frac{-v}{t1} \]
                4. Applied rewrites73.8%

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

              Alternative 7: 77.1% accurate, 0.9× speedup?

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

                1. Initial program 64.6%

                  \[\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. Step-by-step derivation
                  1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -3.4e-8 < t1 < 9.1999999999999992e-90

                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-*.f6473.1

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

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

              Alternative 8: 76.4% accurate, 0.9× speedup?

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

                1. Initial program 64.6%

                  \[\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. Step-by-step derivation
                  1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -3.4e-8 < t1 < 3.8000000000000001e-89

                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. 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-+.f6482.3

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

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

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

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

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

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

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

              Alternative 9: 62.8% accurate, 1.4× speedup?

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

                1. Initial program 75.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.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 3.69999999999999989e70 < v

                1. Initial program 61.2%

                  \[\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.f6454.1

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

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

              Alternative 10: 59.6% accurate, 1.1× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := -1 \cdot \frac{v}{u}\\ \mathbf{if}\;u \leq -1 \cdot 10^{+157}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;u \leq 1.9 \cdot 10^{+177}:\\ \;\;\;\;\frac{-v}{t1}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
              (FPCore (u v t1)
               :precision binary64
               (let* ((t_1 (* -1.0 (/ v u))))
                 (if (<= u -1e+157) t_1 (if (<= u 1.9e+177) (/ (- v) t1) t_1))))
              double code(double u, double v, double t1) {
              	double t_1 = -1.0 * (v / u);
              	double tmp;
              	if (u <= -1e+157) {
              		tmp = t_1;
              	} else if (u <= 1.9e+177) {
              		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 = (-1.0d0) * (v / u)
                  if (u <= (-1d+157)) then
                      tmp = t_1
                  else if (u <= 1.9d+177) 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 = -1.0 * (v / u);
              	double tmp;
              	if (u <= -1e+157) {
              		tmp = t_1;
              	} else if (u <= 1.9e+177) {
              		tmp = -v / t1;
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              def code(u, v, t1):
              	t_1 = -1.0 * (v / u)
              	tmp = 0
              	if u <= -1e+157:
              		tmp = t_1
              	elif u <= 1.9e+177:
              		tmp = -v / t1
              	else:
              		tmp = t_1
              	return tmp
              
              function code(u, v, t1)
              	t_1 = Float64(-1.0 * Float64(v / u))
              	tmp = 0.0
              	if (u <= -1e+157)
              		tmp = t_1;
              	elseif (u <= 1.9e+177)
              		tmp = Float64(Float64(-v) / t1);
              	else
              		tmp = t_1;
              	end
              	return tmp
              end
              
              function tmp_2 = code(u, v, t1)
              	t_1 = -1.0 * (v / u);
              	tmp = 0.0;
              	if (u <= -1e+157)
              		tmp = t_1;
              	elseif (u <= 1.9e+177)
              		tmp = -v / t1;
              	else
              		tmp = t_1;
              	end
              	tmp_2 = tmp;
              end
              
              code[u_, v_, t1_] := Block[{t$95$1 = N[(-1.0 * N[(v / u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[u, -1e+157], t$95$1, If[LessEqual[u, 1.9e+177], N[((-v) / t1), $MachinePrecision], t$95$1]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := -1 \cdot \frac{v}{u}\\
              \mathbf{if}\;u \leq -1 \cdot 10^{+157}:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;u \leq 1.9 \cdot 10^{+177}:\\
              \;\;\;\;\frac{-v}{t1}\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if u < -9.99999999999999983e156 or 1.8999999999999999e177 < u

                1. Initial program 75.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.2

                    \[\leadsto \frac{-t1}{u + t1} \cdot \frac{v}{\color{blue}{u + t1}} \]
                3. Applied rewrites99.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 rewrites49.7%

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

                    \[\leadsto -1 \cdot \color{blue}{\frac{v}{u}} \]
                  3. Step-by-step derivation
                    1. lower-/.f6443.1

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

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

                  if -9.99999999999999983e156 < u < 1.8999999999999999e177

                  1. Initial program 71.9%

                    \[\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.f6464.2

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

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

                Alternative 11: 54.9% 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.6%

                  \[\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.f6454.9

                    \[\leadsto \frac{-v}{t1} \]
                4. Applied rewrites54.9%

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

                Reproduce

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