Rosa's DopplerBench

Percentage Accurate: 72.1% → 97.9%
Time: 6.8s
Alternatives: 7
Speedup: 0.8×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 7 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.1% 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));
}
real(8) function code(u, v, t1)
    real(8), intent (in) :: u
    real(8), intent (in) :: v
    real(8), intent (in) :: t1
    code = (-t1 * v) / ((t1 + u) * (t1 + u))
end function
public static double code(double u, double v, double t1) {
	return (-t1 * v) / ((t1 + u) * (t1 + u));
}
def code(u, v, t1):
	return (-t1 * v) / ((t1 + u) * (t1 + u))
function code(u, v, t1)
	return Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u)))
end
function tmp = code(u, v, t1)
	tmp = (-t1 * v) / ((t1 + u) * (t1 + u));
end
code[u_, v_, t1_] := N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 97.9% accurate, 0.8× speedup?

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

\\
\frac{-v}{u + t1} \cdot \frac{t1}{u + t1}
\end{array}
Derivation
  1. Initial program 69.5%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{v}{{\color{blue}{\left(u + t1\right)}}^{2}} \cdot \left(\mathsf{neg}\left(t1\right)\right) \]
    10. lower-neg.f6472.3

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

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

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

    Alternative 2: 86.0% accurate, 0.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t1 \leq -5.8 \cdot 10^{+25}:\\ \;\;\;\;\frac{-1 \cdot v}{\left(-u\right) + t1}\\ \mathbf{elif}\;t1 \leq 1.1 \cdot 10^{+120}:\\ \;\;\;\;\frac{-v}{\left(u + t1\right) \cdot \left(u + t1\right)} \cdot t1\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{u + t1}\\ \end{array} \end{array} \]
    (FPCore (u v t1)
     :precision binary64
     (if (<= t1 -5.8e+25)
       (/ (* -1.0 v) (+ (- u) t1))
       (if (<= t1 1.1e+120)
         (* (/ (- v) (* (+ u t1) (+ u t1))) t1)
         (/ (- v) (+ u t1)))))
    double code(double u, double v, double t1) {
    	double tmp;
    	if (t1 <= -5.8e+25) {
    		tmp = (-1.0 * v) / (-u + t1);
    	} else if (t1 <= 1.1e+120) {
    		tmp = (-v / ((u + t1) * (u + t1))) * t1;
    	} else {
    		tmp = -v / (u + t1);
    	}
    	return tmp;
    }
    
    real(8) function code(u, v, t1)
        real(8), intent (in) :: u
        real(8), intent (in) :: v
        real(8), intent (in) :: t1
        real(8) :: tmp
        if (t1 <= (-5.8d+25)) then
            tmp = ((-1.0d0) * v) / (-u + t1)
        else if (t1 <= 1.1d+120) then
            tmp = (-v / ((u + t1) * (u + t1))) * t1
        else
            tmp = -v / (u + t1)
        end if
        code = tmp
    end function
    
    public static double code(double u, double v, double t1) {
    	double tmp;
    	if (t1 <= -5.8e+25) {
    		tmp = (-1.0 * v) / (-u + t1);
    	} else if (t1 <= 1.1e+120) {
    		tmp = (-v / ((u + t1) * (u + t1))) * t1;
    	} else {
    		tmp = -v / (u + t1);
    	}
    	return tmp;
    }
    
    def code(u, v, t1):
    	tmp = 0
    	if t1 <= -5.8e+25:
    		tmp = (-1.0 * v) / (-u + t1)
    	elif t1 <= 1.1e+120:
    		tmp = (-v / ((u + t1) * (u + t1))) * t1
    	else:
    		tmp = -v / (u + t1)
    	return tmp
    
    function code(u, v, t1)
    	tmp = 0.0
    	if (t1 <= -5.8e+25)
    		tmp = Float64(Float64(-1.0 * v) / Float64(Float64(-u) + t1));
    	elseif (t1 <= 1.1e+120)
    		tmp = Float64(Float64(Float64(-v) / Float64(Float64(u + t1) * Float64(u + t1))) * t1);
    	else
    		tmp = Float64(Float64(-v) / Float64(u + t1));
    	end
    	return tmp
    end
    
    function tmp_2 = code(u, v, t1)
    	tmp = 0.0;
    	if (t1 <= -5.8e+25)
    		tmp = (-1.0 * v) / (-u + t1);
    	elseif (t1 <= 1.1e+120)
    		tmp = (-v / ((u + t1) * (u + t1))) * t1;
    	else
    		tmp = -v / (u + t1);
    	end
    	tmp_2 = tmp;
    end
    
    code[u_, v_, t1_] := If[LessEqual[t1, -5.8e+25], N[(N[(-1.0 * v), $MachinePrecision] / N[((-u) + t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 1.1e+120], N[(N[((-v) / N[(N[(u + t1), $MachinePrecision] * N[(u + t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t1), $MachinePrecision], N[((-v) / N[(u + t1), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;t1 \leq -5.8 \cdot 10^{+25}:\\
    \;\;\;\;\frac{-1 \cdot v}{\left(-u\right) + t1}\\
    
    \mathbf{elif}\;t1 \leq 1.1 \cdot 10^{+120}:\\
    \;\;\;\;\frac{-v}{\left(u + t1\right) \cdot \left(u + t1\right)} \cdot t1\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{-v}{u + t1}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if t1 < -5.7999999999999998e25

      1. Initial program 49.6%

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

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

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

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

        if -5.7999999999999998e25 < t1 < 1.1000000000000001e120

        1. Initial program 83.8%

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{v}{{\color{blue}{\left(u + t1\right)}}^{2}} \cdot \left(\mathsf{neg}\left(t1\right)\right) \]
          10. lower-neg.f6488.1

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

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

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

          if 1.1000000000000001e120 < t1

          1. Initial program 38.7%

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{v}{{\color{blue}{\left(u + t1\right)}}^{2}} \cdot \left(\mathsf{neg}\left(t1\right)\right) \]
            10. lower-neg.f6442.6

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

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

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

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

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -5.8 \cdot 10^{+25}:\\ \;\;\;\;\frac{-1 \cdot v}{\left(-u\right) + t1}\\ \mathbf{elif}\;t1 \leq 1.1 \cdot 10^{+120}:\\ \;\;\;\;\frac{-v}{\left(u + t1\right) \cdot \left(u + t1\right)} \cdot t1\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{u + t1}\\ \end{array} \]
            6. Add Preprocessing

            Alternative 3: 78.0% accurate, 0.7× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t1 \leq -1.75 \cdot 10^{-62}:\\ \;\;\;\;\frac{-1 \cdot v}{\left(-u\right) + t1}\\ \mathbf{elif}\;t1 \leq 32000000000000:\\ \;\;\;\;t1 \cdot \frac{\frac{-v}{u}}{u}\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{u + t1}\\ \end{array} \end{array} \]
            (FPCore (u v t1)
             :precision binary64
             (if (<= t1 -1.75e-62)
               (/ (* -1.0 v) (+ (- u) t1))
               (if (<= t1 32000000000000.0) (* t1 (/ (/ (- v) u) u)) (/ (- v) (+ u t1)))))
            double code(double u, double v, double t1) {
            	double tmp;
            	if (t1 <= -1.75e-62) {
            		tmp = (-1.0 * v) / (-u + t1);
            	} else if (t1 <= 32000000000000.0) {
            		tmp = t1 * ((-v / u) / u);
            	} else {
            		tmp = -v / (u + t1);
            	}
            	return tmp;
            }
            
            real(8) function code(u, v, t1)
                real(8), intent (in) :: u
                real(8), intent (in) :: v
                real(8), intent (in) :: t1
                real(8) :: tmp
                if (t1 <= (-1.75d-62)) then
                    tmp = ((-1.0d0) * v) / (-u + t1)
                else if (t1 <= 32000000000000.0d0) then
                    tmp = t1 * ((-v / u) / u)
                else
                    tmp = -v / (u + t1)
                end if
                code = tmp
            end function
            
            public static double code(double u, double v, double t1) {
            	double tmp;
            	if (t1 <= -1.75e-62) {
            		tmp = (-1.0 * v) / (-u + t1);
            	} else if (t1 <= 32000000000000.0) {
            		tmp = t1 * ((-v / u) / u);
            	} else {
            		tmp = -v / (u + t1);
            	}
            	return tmp;
            }
            
            def code(u, v, t1):
            	tmp = 0
            	if t1 <= -1.75e-62:
            		tmp = (-1.0 * v) / (-u + t1)
            	elif t1 <= 32000000000000.0:
            		tmp = t1 * ((-v / u) / u)
            	else:
            		tmp = -v / (u + t1)
            	return tmp
            
            function code(u, v, t1)
            	tmp = 0.0
            	if (t1 <= -1.75e-62)
            		tmp = Float64(Float64(-1.0 * v) / Float64(Float64(-u) + t1));
            	elseif (t1 <= 32000000000000.0)
            		tmp = Float64(t1 * Float64(Float64(Float64(-v) / u) / u));
            	else
            		tmp = Float64(Float64(-v) / Float64(u + t1));
            	end
            	return tmp
            end
            
            function tmp_2 = code(u, v, t1)
            	tmp = 0.0;
            	if (t1 <= -1.75e-62)
            		tmp = (-1.0 * v) / (-u + t1);
            	elseif (t1 <= 32000000000000.0)
            		tmp = t1 * ((-v / u) / u);
            	else
            		tmp = -v / (u + t1);
            	end
            	tmp_2 = tmp;
            end
            
            code[u_, v_, t1_] := If[LessEqual[t1, -1.75e-62], N[(N[(-1.0 * v), $MachinePrecision] / N[((-u) + t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 32000000000000.0], N[(t1 * N[(N[((-v) / u), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision], N[((-v) / N[(u + t1), $MachinePrecision]), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;t1 \leq -1.75 \cdot 10^{-62}:\\
            \;\;\;\;\frac{-1 \cdot v}{\left(-u\right) + t1}\\
            
            \mathbf{elif}\;t1 \leq 32000000000000:\\
            \;\;\;\;t1 \cdot \frac{\frac{-v}{u}}{u}\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{-v}{u + t1}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if t1 < -1.7500000000000001e-62

              1. Initial program 62.8%

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

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

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

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

                if -1.7500000000000001e-62 < t1 < 3.2e13

                1. Initial program 79.8%

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{\color{blue}{-v}}{u} \cdot \frac{t1}{u} \]
                  12. lower-/.f6480.8

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

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

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

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

                    if 3.2e13 < t1

                    1. Initial program 58.1%

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \frac{v}{{\color{blue}{\left(u + t1\right)}}^{2}} \cdot \left(\mathsf{neg}\left(t1\right)\right) \]
                      10. lower-neg.f6461.9

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

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

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

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

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

                        \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -1.75 \cdot 10^{-62}:\\ \;\;\;\;\frac{-1 \cdot v}{\left(-u\right) + t1}\\ \mathbf{elif}\;t1 \leq 32000000000000:\\ \;\;\;\;t1 \cdot \frac{\frac{-v}{u}}{u}\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{u + t1}\\ \end{array} \]
                      6. Add Preprocessing

                      Alternative 4: 75.9% accurate, 0.8× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t1 \leq -1.9 \cdot 10^{-63}:\\ \;\;\;\;\frac{-1 \cdot v}{\left(-u\right) + t1}\\ \mathbf{elif}\;t1 \leq 5.6 \cdot 10^{-136}:\\ \;\;\;\;\frac{-v}{u \cdot u} \cdot t1\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{u + t1}\\ \end{array} \end{array} \]
                      (FPCore (u v t1)
                       :precision binary64
                       (if (<= t1 -1.9e-63)
                         (/ (* -1.0 v) (+ (- u) t1))
                         (if (<= t1 5.6e-136) (* (/ (- v) (* u u)) t1) (/ (- v) (+ u t1)))))
                      double code(double u, double v, double t1) {
                      	double tmp;
                      	if (t1 <= -1.9e-63) {
                      		tmp = (-1.0 * v) / (-u + t1);
                      	} else if (t1 <= 5.6e-136) {
                      		tmp = (-v / (u * u)) * t1;
                      	} else {
                      		tmp = -v / (u + t1);
                      	}
                      	return tmp;
                      }
                      
                      real(8) function code(u, v, t1)
                          real(8), intent (in) :: u
                          real(8), intent (in) :: v
                          real(8), intent (in) :: t1
                          real(8) :: tmp
                          if (t1 <= (-1.9d-63)) then
                              tmp = ((-1.0d0) * v) / (-u + t1)
                          else if (t1 <= 5.6d-136) then
                              tmp = (-v / (u * u)) * t1
                          else
                              tmp = -v / (u + t1)
                          end if
                          code = tmp
                      end function
                      
                      public static double code(double u, double v, double t1) {
                      	double tmp;
                      	if (t1 <= -1.9e-63) {
                      		tmp = (-1.0 * v) / (-u + t1);
                      	} else if (t1 <= 5.6e-136) {
                      		tmp = (-v / (u * u)) * t1;
                      	} else {
                      		tmp = -v / (u + t1);
                      	}
                      	return tmp;
                      }
                      
                      def code(u, v, t1):
                      	tmp = 0
                      	if t1 <= -1.9e-63:
                      		tmp = (-1.0 * v) / (-u + t1)
                      	elif t1 <= 5.6e-136:
                      		tmp = (-v / (u * u)) * t1
                      	else:
                      		tmp = -v / (u + t1)
                      	return tmp
                      
                      function code(u, v, t1)
                      	tmp = 0.0
                      	if (t1 <= -1.9e-63)
                      		tmp = Float64(Float64(-1.0 * v) / Float64(Float64(-u) + t1));
                      	elseif (t1 <= 5.6e-136)
                      		tmp = Float64(Float64(Float64(-v) / Float64(u * u)) * t1);
                      	else
                      		tmp = Float64(Float64(-v) / Float64(u + t1));
                      	end
                      	return tmp
                      end
                      
                      function tmp_2 = code(u, v, t1)
                      	tmp = 0.0;
                      	if (t1 <= -1.9e-63)
                      		tmp = (-1.0 * v) / (-u + t1);
                      	elseif (t1 <= 5.6e-136)
                      		tmp = (-v / (u * u)) * t1;
                      	else
                      		tmp = -v / (u + t1);
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[u_, v_, t1_] := If[LessEqual[t1, -1.9e-63], N[(N[(-1.0 * v), $MachinePrecision] / N[((-u) + t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 5.6e-136], N[(N[((-v) / N[(u * u), $MachinePrecision]), $MachinePrecision] * t1), $MachinePrecision], N[((-v) / N[(u + t1), $MachinePrecision]), $MachinePrecision]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;t1 \leq -1.9 \cdot 10^{-63}:\\
                      \;\;\;\;\frac{-1 \cdot v}{\left(-u\right) + t1}\\
                      
                      \mathbf{elif}\;t1 \leq 5.6 \cdot 10^{-136}:\\
                      \;\;\;\;\frac{-v}{u \cdot u} \cdot t1\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\frac{-v}{u + t1}\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if t1 < -1.90000000000000009e-63

                        1. Initial program 62.6%

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

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

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

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

                          if -1.90000000000000009e-63 < t1 < 5.6000000000000002e-136

                          1. Initial program 79.8%

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \frac{v}{{\color{blue}{\left(u + t1\right)}}^{2}} \cdot \left(\mathsf{neg}\left(t1\right)\right) \]
                            10. lower-neg.f6485.8

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

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

                            \[\leadsto \frac{v}{{u}^{2}} \cdot \left(-t1\right) \]
                          7. Step-by-step derivation
                            1. Applied rewrites80.9%

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

                            if 5.6000000000000002e-136 < t1

                            1. Initial program 63.4%

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \frac{v}{{\color{blue}{\left(u + t1\right)}}^{2}} \cdot \left(\mathsf{neg}\left(t1\right)\right) \]
                              10. lower-neg.f6466.5

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

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

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

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

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

                                \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -1.9 \cdot 10^{-63}:\\ \;\;\;\;\frac{-1 \cdot v}{\left(-u\right) + t1}\\ \mathbf{elif}\;t1 \leq 5.6 \cdot 10^{-136}:\\ \;\;\;\;\frac{-v}{u \cdot u} \cdot t1\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{u + t1}\\ \end{array} \]
                              6. Add Preprocessing

                              Alternative 5: 75.6% accurate, 0.8× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t1 \leq -1.9 \cdot 10^{-63}:\\ \;\;\;\;\frac{-1 \cdot v}{\left(-u\right) + t1}\\ \mathbf{elif}\;t1 \leq 5.6 \cdot 10^{-136}:\\ \;\;\;\;\left(-v\right) \cdot \frac{t1}{u \cdot u}\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{u + t1}\\ \end{array} \end{array} \]
                              (FPCore (u v t1)
                               :precision binary64
                               (if (<= t1 -1.9e-63)
                                 (/ (* -1.0 v) (+ (- u) t1))
                                 (if (<= t1 5.6e-136) (* (- v) (/ t1 (* u u))) (/ (- v) (+ u t1)))))
                              double code(double u, double v, double t1) {
                              	double tmp;
                              	if (t1 <= -1.9e-63) {
                              		tmp = (-1.0 * v) / (-u + t1);
                              	} else if (t1 <= 5.6e-136) {
                              		tmp = -v * (t1 / (u * u));
                              	} else {
                              		tmp = -v / (u + t1);
                              	}
                              	return tmp;
                              }
                              
                              real(8) function code(u, v, t1)
                                  real(8), intent (in) :: u
                                  real(8), intent (in) :: v
                                  real(8), intent (in) :: t1
                                  real(8) :: tmp
                                  if (t1 <= (-1.9d-63)) then
                                      tmp = ((-1.0d0) * v) / (-u + t1)
                                  else if (t1 <= 5.6d-136) then
                                      tmp = -v * (t1 / (u * u))
                                  else
                                      tmp = -v / (u + t1)
                                  end if
                                  code = tmp
                              end function
                              
                              public static double code(double u, double v, double t1) {
                              	double tmp;
                              	if (t1 <= -1.9e-63) {
                              		tmp = (-1.0 * v) / (-u + t1);
                              	} else if (t1 <= 5.6e-136) {
                              		tmp = -v * (t1 / (u * u));
                              	} else {
                              		tmp = -v / (u + t1);
                              	}
                              	return tmp;
                              }
                              
                              def code(u, v, t1):
                              	tmp = 0
                              	if t1 <= -1.9e-63:
                              		tmp = (-1.0 * v) / (-u + t1)
                              	elif t1 <= 5.6e-136:
                              		tmp = -v * (t1 / (u * u))
                              	else:
                              		tmp = -v / (u + t1)
                              	return tmp
                              
                              function code(u, v, t1)
                              	tmp = 0.0
                              	if (t1 <= -1.9e-63)
                              		tmp = Float64(Float64(-1.0 * v) / Float64(Float64(-u) + t1));
                              	elseif (t1 <= 5.6e-136)
                              		tmp = Float64(Float64(-v) * Float64(t1 / Float64(u * u)));
                              	else
                              		tmp = Float64(Float64(-v) / Float64(u + t1));
                              	end
                              	return tmp
                              end
                              
                              function tmp_2 = code(u, v, t1)
                              	tmp = 0.0;
                              	if (t1 <= -1.9e-63)
                              		tmp = (-1.0 * v) / (-u + t1);
                              	elseif (t1 <= 5.6e-136)
                              		tmp = -v * (t1 / (u * u));
                              	else
                              		tmp = -v / (u + t1);
                              	end
                              	tmp_2 = tmp;
                              end
                              
                              code[u_, v_, t1_] := If[LessEqual[t1, -1.9e-63], N[(N[(-1.0 * v), $MachinePrecision] / N[((-u) + t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 5.6e-136], N[((-v) * N[(t1 / N[(u * u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-v) / N[(u + t1), $MachinePrecision]), $MachinePrecision]]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;t1 \leq -1.9 \cdot 10^{-63}:\\
                              \;\;\;\;\frac{-1 \cdot v}{\left(-u\right) + t1}\\
                              
                              \mathbf{elif}\;t1 \leq 5.6 \cdot 10^{-136}:\\
                              \;\;\;\;\left(-v\right) \cdot \frac{t1}{u \cdot u}\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\frac{-v}{u + t1}\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 3 regimes
                              2. if t1 < -1.90000000000000009e-63

                                1. Initial program 62.6%

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

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

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

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

                                  if -1.90000000000000009e-63 < t1 < 5.6000000000000002e-136

                                  1. Initial program 79.8%

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \frac{\color{blue}{-v}}{u} \cdot \frac{t1}{u} \]
                                    12. lower-/.f6485.5

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

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

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

                                    if 5.6000000000000002e-136 < t1

                                    1. Initial program 63.4%

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \frac{v}{{\color{blue}{\left(u + t1\right)}}^{2}} \cdot \left(\mathsf{neg}\left(t1\right)\right) \]
                                      10. lower-neg.f6466.5

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

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

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

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

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

                                        \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -1.9 \cdot 10^{-63}:\\ \;\;\;\;\frac{-1 \cdot v}{\left(-u\right) + t1}\\ \mathbf{elif}\;t1 \leq 5.6 \cdot 10^{-136}:\\ \;\;\;\;\left(-v\right) \cdot \frac{t1}{u \cdot u}\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{u + t1}\\ \end{array} \]
                                      6. Add Preprocessing

                                      Alternative 6: 61.6% accurate, 1.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \frac{v}{{\color{blue}{\left(u + t1\right)}}^{2}} \cdot \left(\mathsf{neg}\left(t1\right)\right) \]
                                        10. lower-neg.f6472.3

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

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

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

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

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

                                          Alternative 7: 54.2% accurate, 2.1× speedup?

                                          \[\begin{array}{l} \\ \frac{-v}{t1} \end{array} \]
                                          (FPCore (u v t1) :precision binary64 (/ (- v) t1))
                                          double code(double u, double v, double t1) {
                                          	return -v / t1;
                                          }
                                          
                                          real(8) function code(u, v, t1)
                                              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 69.5%

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

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

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

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

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

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

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

                                          Reproduce

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