Optimal throwing angle

Percentage Accurate: 66.6% → 99.5%
Time: 10.5s
Alternatives: 11
Speedup: 2.0×

Specification

?
\[\begin{array}{l} \\ \tan^{-1} \left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot 9.8\right) \cdot H}}\right) \end{array} \]
(FPCore (v H)
 :precision binary64
 (atan (/ v (sqrt (- (* v v) (* (* 2.0 9.8) H))))))
double code(double v, double H) {
	return atan((v / sqrt(((v * v) - ((2.0 * 9.8) * H)))));
}
real(8) function code(v, h)
    real(8), intent (in) :: v
    real(8), intent (in) :: h
    code = atan((v / sqrt(((v * v) - ((2.0d0 * 9.8d0) * h)))))
end function
public static double code(double v, double H) {
	return Math.atan((v / Math.sqrt(((v * v) - ((2.0 * 9.8) * H)))));
}
def code(v, H):
	return math.atan((v / math.sqrt(((v * v) - ((2.0 * 9.8) * H)))))
function code(v, H)
	return atan(Float64(v / sqrt(Float64(Float64(v * v) - Float64(Float64(2.0 * 9.8) * H)))))
end
function tmp = code(v, H)
	tmp = atan((v / sqrt(((v * v) - ((2.0 * 9.8) * H)))));
end
code[v_, H_] := N[ArcTan[N[(v / N[Sqrt[N[(N[(v * v), $MachinePrecision] - N[(N[(2.0 * 9.8), $MachinePrecision] * H), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}

\\
\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot 9.8\right) \cdot H}}\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 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: 66.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \tan^{-1} \left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot 9.8\right) \cdot H}}\right) \end{array} \]
(FPCore (v H)
 :precision binary64
 (atan (/ v (sqrt (- (* v v) (* (* 2.0 9.8) H))))))
double code(double v, double H) {
	return atan((v / sqrt(((v * v) - ((2.0 * 9.8) * H)))));
}
real(8) function code(v, h)
    real(8), intent (in) :: v
    real(8), intent (in) :: h
    code = atan((v / sqrt(((v * v) - ((2.0d0 * 9.8d0) * h)))))
end function
public static double code(double v, double H) {
	return Math.atan((v / Math.sqrt(((v * v) - ((2.0 * 9.8) * H)))));
}
def code(v, H):
	return math.atan((v / math.sqrt(((v * v) - ((2.0 * 9.8) * H)))))
function code(v, H)
	return atan(Float64(v / sqrt(Float64(Float64(v * v) - Float64(Float64(2.0 * 9.8) * H)))))
end
function tmp = code(v, H)
	tmp = atan((v / sqrt(((v * v) - ((2.0 * 9.8) * H)))));
end
code[v_, H_] := N[ArcTan[N[(v / N[Sqrt[N[(N[(v * v), $MachinePrecision] - N[(N[(2.0 * 9.8), $MachinePrecision] * H), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}

\\
\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot 9.8\right) \cdot H}}\right)
\end{array}

Alternative 1: 99.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;v \leq -4 \cdot 10^{+114}:\\ \;\;\;\;0 - \tan^{-1} \left(\frac{\frac{v}{1 + \frac{-9.8}{\frac{v \cdot v}{H}}}}{v}\right)\\ \mathbf{elif}\;v \leq 2 \cdot 10^{+112}:\\ \;\;\;\;\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v + H \cdot -19.6}}\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} 1\\ \end{array} \end{array} \]
(FPCore (v H)
 :precision binary64
 (if (<= v -4e+114)
   (- 0.0 (atan (/ (/ v (+ 1.0 (/ -9.8 (/ (* v v) H)))) v)))
   (if (<= v 2e+112) (atan (/ v (sqrt (+ (* v v) (* H -19.6))))) (atan 1.0))))
double code(double v, double H) {
	double tmp;
	if (v <= -4e+114) {
		tmp = 0.0 - atan(((v / (1.0 + (-9.8 / ((v * v) / H)))) / v));
	} else if (v <= 2e+112) {
		tmp = atan((v / sqrt(((v * v) + (H * -19.6)))));
	} else {
		tmp = atan(1.0);
	}
	return tmp;
}
real(8) function code(v, h)
    real(8), intent (in) :: v
    real(8), intent (in) :: h
    real(8) :: tmp
    if (v <= (-4d+114)) then
        tmp = 0.0d0 - atan(((v / (1.0d0 + ((-9.8d0) / ((v * v) / h)))) / v))
    else if (v <= 2d+112) then
        tmp = atan((v / sqrt(((v * v) + (h * (-19.6d0))))))
    else
        tmp = atan(1.0d0)
    end if
    code = tmp
end function
public static double code(double v, double H) {
	double tmp;
	if (v <= -4e+114) {
		tmp = 0.0 - Math.atan(((v / (1.0 + (-9.8 / ((v * v) / H)))) / v));
	} else if (v <= 2e+112) {
		tmp = Math.atan((v / Math.sqrt(((v * v) + (H * -19.6)))));
	} else {
		tmp = Math.atan(1.0);
	}
	return tmp;
}
def code(v, H):
	tmp = 0
	if v <= -4e+114:
		tmp = 0.0 - math.atan(((v / (1.0 + (-9.8 / ((v * v) / H)))) / v))
	elif v <= 2e+112:
		tmp = math.atan((v / math.sqrt(((v * v) + (H * -19.6)))))
	else:
		tmp = math.atan(1.0)
	return tmp
function code(v, H)
	tmp = 0.0
	if (v <= -4e+114)
		tmp = Float64(0.0 - atan(Float64(Float64(v / Float64(1.0 + Float64(-9.8 / Float64(Float64(v * v) / H)))) / v)));
	elseif (v <= 2e+112)
		tmp = atan(Float64(v / sqrt(Float64(Float64(v * v) + Float64(H * -19.6)))));
	else
		tmp = atan(1.0);
	end
	return tmp
end
function tmp_2 = code(v, H)
	tmp = 0.0;
	if (v <= -4e+114)
		tmp = 0.0 - atan(((v / (1.0 + (-9.8 / ((v * v) / H)))) / v));
	elseif (v <= 2e+112)
		tmp = atan((v / sqrt(((v * v) + (H * -19.6)))));
	else
		tmp = atan(1.0);
	end
	tmp_2 = tmp;
end
code[v_, H_] := If[LessEqual[v, -4e+114], N[(0.0 - N[ArcTan[N[(N[(v / N[(1.0 + N[(-9.8 / N[(N[(v * v), $MachinePrecision] / H), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / v), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[v, 2e+112], N[ArcTan[N[(v / N[Sqrt[N[(N[(v * v), $MachinePrecision] + N[(H * -19.6), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcTan[1.0], $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;v \leq -4 \cdot 10^{+114}:\\
\;\;\;\;0 - \tan^{-1} \left(\frac{\frac{v}{1 + \frac{-9.8}{\frac{v \cdot v}{H}}}}{v}\right)\\

\mathbf{elif}\;v \leq 2 \cdot 10^{+112}:\\
\;\;\;\;\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v + H \cdot -19.6}}\right)\\

\mathbf{else}:\\
\;\;\;\;\tan^{-1} 1\\


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

    1. Initial program 21.8%

      \[\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot 9.8\right) \cdot H}}\right) \]
    2. Step-by-step derivation
      1. atan-lowering-atan.f64N/A

        \[\leadsto \mathsf{atan.f64}\left(\left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}}\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}\right)\right)\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right) \]
      4. sub-negN/A

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v + \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(v \cdot v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(H \cdot \left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
      8. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(H \cdot \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
      10. metadata-evalN/A

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(\frac{98}{5}\right)\right)\right)\right)\right)\right)\right) \]
      11. metadata-eval21.8%

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \frac{-98}{5}\right)\right)\right)\right)\right) \]
    3. Simplified21.8%

      \[\leadsto \color{blue}{\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v + H \cdot -19.6}}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in v around -inf

      \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \color{blue}{\left(-1 \cdot \left(v \cdot \left(1 + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right)\right)}\right)\right) \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\left(-1 \cdot v\right) \cdot \left(1 + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\left(1 + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right) \cdot \left(-1 \cdot v\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\left(1 + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right), \left(-1 \cdot v\right)\right)\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{H}{{v}^{2}} \cdot \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{H}{{v}^{2}}\right), \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \left({v}^{2}\right)\right), \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \left(v \cdot v\right)\right), \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
      10. mul-1-negN/A

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{-49}{5}\right)\right), \left(\mathsf{neg}\left(v\right)\right)\right)\right)\right) \]
      11. neg-sub0N/A

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{-49}{5}\right)\right), \left(0 - v\right)\right)\right)\right) \]
      12. --lowering--.f6498.4%

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{-49}{5}\right)\right), \mathsf{\_.f64}\left(0, v\right)\right)\right)\right) \]
    7. Simplified98.4%

      \[\leadsto \tan^{-1} \left(\frac{v}{\color{blue}{\left(1 + \frac{H}{v \cdot v} \cdot -9.8\right) \cdot \left(0 - v\right)}}\right) \]
    8. Step-by-step derivation
      1. sub0-negN/A

        \[\leadsto \tan^{-1} \left(\frac{v}{\left(1 + \frac{H}{v \cdot v} \cdot \frac{-49}{5}\right) \cdot \left(\mathsf{neg}\left(v\right)\right)}\right) \]
      2. associate-/r*N/A

        \[\leadsto \tan^{-1} \left(\frac{\frac{v}{1 + \frac{H}{v \cdot v} \cdot \frac{-49}{5}}}{\mathsf{neg}\left(v\right)}\right) \]
      3. distribute-frac-neg2N/A

        \[\leadsto \tan^{-1} \left(\mathsf{neg}\left(\frac{\frac{v}{1 + \frac{H}{v \cdot v} \cdot \frac{-49}{5}}}{v}\right)\right) \]
      4. atan-negN/A

        \[\leadsto \mathsf{neg}\left(\tan^{-1} \left(\frac{\frac{v}{1 + \frac{H}{v \cdot v} \cdot \frac{-49}{5}}}{v}\right)\right) \]
      5. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\tan^{-1} \left(\frac{\frac{v}{1 + \frac{H}{v \cdot v} \cdot \frac{-49}{5}}}{v}\right)\right) \]
      6. atan-lowering-atan.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{v}{1 + \frac{H}{v \cdot v} \cdot \frac{-49}{5}}}{v}\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\frac{v}{1 + \frac{H}{v \cdot v} \cdot \frac{-49}{5}}\right), v\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \left(1 + \frac{H}{v \cdot v} \cdot \frac{-49}{5}\right)\right), v\right)\right)\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(1, \left(\frac{H}{v \cdot v} \cdot \frac{-49}{5}\right)\right)\right), v\right)\right)\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(1, \left(\frac{-49}{5} \cdot \frac{H}{v \cdot v}\right)\right)\right), v\right)\right)\right) \]
      11. clear-numN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(1, \left(\frac{-49}{5} \cdot \frac{1}{\frac{v \cdot v}{H}}\right)\right)\right), v\right)\right)\right) \]
      12. un-div-invN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(1, \left(\frac{\frac{-49}{5}}{\frac{v \cdot v}{H}}\right)\right)\right), v\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\frac{-49}{5}, \left(\frac{v \cdot v}{H}\right)\right)\right)\right), v\right)\right)\right) \]
      14. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\frac{-49}{5}, \mathsf{/.f64}\left(\left(v \cdot v\right), H\right)\right)\right)\right), v\right)\right)\right) \]
      15. *-lowering-*.f6498.4%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\frac{-49}{5}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(v, v\right), H\right)\right)\right)\right), v\right)\right)\right) \]
    9. Applied egg-rr98.4%

      \[\leadsto \color{blue}{-\tan^{-1} \left(\frac{\frac{v}{1 + \frac{-9.8}{\frac{v \cdot v}{H}}}}{v}\right)} \]

    if -4e114 < v < 1.9999999999999999e112

    1. Initial program 99.1%

      \[\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot 9.8\right) \cdot H}}\right) \]
    2. Step-by-step derivation
      1. atan-lowering-atan.f64N/A

        \[\leadsto \mathsf{atan.f64}\left(\left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}}\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}\right)\right)\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right) \]
      4. sub-negN/A

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v + \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(v \cdot v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(H \cdot \left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
      8. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(H \cdot \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
      10. metadata-evalN/A

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(\frac{98}{5}\right)\right)\right)\right)\right)\right)\right) \]
      11. metadata-eval99.1%

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \frac{-98}{5}\right)\right)\right)\right)\right) \]
    3. Simplified99.1%

      \[\leadsto \color{blue}{\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v + H \cdot -19.6}}\right)} \]
    4. Add Preprocessing

    if 1.9999999999999999e112 < v

    1. Initial program 17.3%

      \[\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot 9.8\right) \cdot H}}\right) \]
    2. Step-by-step derivation
      1. atan-lowering-atan.f64N/A

        \[\leadsto \mathsf{atan.f64}\left(\left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}}\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}\right)\right)\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right) \]
      4. sub-negN/A

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v + \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(v \cdot v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(H \cdot \left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
      8. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(H \cdot \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
      10. metadata-evalN/A

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(\frac{98}{5}\right)\right)\right)\right)\right)\right)\right) \]
      11. metadata-eval17.3%

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \frac{-98}{5}\right)\right)\right)\right)\right) \]
    3. Simplified17.3%

      \[\leadsto \color{blue}{\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v + H \cdot -19.6}}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in v around inf

      \[\leadsto \mathsf{atan.f64}\left(\color{blue}{1}\right) \]
    6. Step-by-step derivation
      1. Simplified100.0%

        \[\leadsto \tan^{-1} \color{blue}{1} \]
    7. Recombined 3 regimes into one program.
    8. Final simplification99.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;v \leq -4 \cdot 10^{+114}:\\ \;\;\;\;0 - \tan^{-1} \left(\frac{\frac{v}{1 + \frac{-9.8}{\frac{v \cdot v}{H}}}}{v}\right)\\ \mathbf{elif}\;v \leq 2 \cdot 10^{+112}:\\ \;\;\;\;\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v + H \cdot -19.6}}\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} 1\\ \end{array} \]
    9. Add Preprocessing

    Alternative 2: 89.6% accurate, 1.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;v \leq -3.8 \cdot 10^{-16}:\\ \;\;\;\;0 - \tan^{-1} \left(\frac{\frac{v}{1 + \frac{-9.8}{\frac{v \cdot v}{H}}}}{v}\right)\\ \mathbf{elif}\;v \leq 6.8 \cdot 10^{-29}:\\ \;\;\;\;\tan^{-1} \left(\frac{v}{\sqrt{H \cdot -19.6}}\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(1 + H \cdot \frac{9.8 + \frac{H}{v \cdot v} \cdot 144.06}{v \cdot v}\right)\\ \end{array} \end{array} \]
    (FPCore (v H)
     :precision binary64
     (if (<= v -3.8e-16)
       (- 0.0 (atan (/ (/ v (+ 1.0 (/ -9.8 (/ (* v v) H)))) v)))
       (if (<= v 6.8e-29)
         (atan (/ v (sqrt (* H -19.6))))
         (atan (+ 1.0 (* H (/ (+ 9.8 (* (/ H (* v v)) 144.06)) (* v v))))))))
    double code(double v, double H) {
    	double tmp;
    	if (v <= -3.8e-16) {
    		tmp = 0.0 - atan(((v / (1.0 + (-9.8 / ((v * v) / H)))) / v));
    	} else if (v <= 6.8e-29) {
    		tmp = atan((v / sqrt((H * -19.6))));
    	} else {
    		tmp = atan((1.0 + (H * ((9.8 + ((H / (v * v)) * 144.06)) / (v * v)))));
    	}
    	return tmp;
    }
    
    real(8) function code(v, h)
        real(8), intent (in) :: v
        real(8), intent (in) :: h
        real(8) :: tmp
        if (v <= (-3.8d-16)) then
            tmp = 0.0d0 - atan(((v / (1.0d0 + ((-9.8d0) / ((v * v) / h)))) / v))
        else if (v <= 6.8d-29) then
            tmp = atan((v / sqrt((h * (-19.6d0)))))
        else
            tmp = atan((1.0d0 + (h * ((9.8d0 + ((h / (v * v)) * 144.06d0)) / (v * v)))))
        end if
        code = tmp
    end function
    
    public static double code(double v, double H) {
    	double tmp;
    	if (v <= -3.8e-16) {
    		tmp = 0.0 - Math.atan(((v / (1.0 + (-9.8 / ((v * v) / H)))) / v));
    	} else if (v <= 6.8e-29) {
    		tmp = Math.atan((v / Math.sqrt((H * -19.6))));
    	} else {
    		tmp = Math.atan((1.0 + (H * ((9.8 + ((H / (v * v)) * 144.06)) / (v * v)))));
    	}
    	return tmp;
    }
    
    def code(v, H):
    	tmp = 0
    	if v <= -3.8e-16:
    		tmp = 0.0 - math.atan(((v / (1.0 + (-9.8 / ((v * v) / H)))) / v))
    	elif v <= 6.8e-29:
    		tmp = math.atan((v / math.sqrt((H * -19.6))))
    	else:
    		tmp = math.atan((1.0 + (H * ((9.8 + ((H / (v * v)) * 144.06)) / (v * v)))))
    	return tmp
    
    function code(v, H)
    	tmp = 0.0
    	if (v <= -3.8e-16)
    		tmp = Float64(0.0 - atan(Float64(Float64(v / Float64(1.0 + Float64(-9.8 / Float64(Float64(v * v) / H)))) / v)));
    	elseif (v <= 6.8e-29)
    		tmp = atan(Float64(v / sqrt(Float64(H * -19.6))));
    	else
    		tmp = atan(Float64(1.0 + Float64(H * Float64(Float64(9.8 + Float64(Float64(H / Float64(v * v)) * 144.06)) / Float64(v * v)))));
    	end
    	return tmp
    end
    
    function tmp_2 = code(v, H)
    	tmp = 0.0;
    	if (v <= -3.8e-16)
    		tmp = 0.0 - atan(((v / (1.0 + (-9.8 / ((v * v) / H)))) / v));
    	elseif (v <= 6.8e-29)
    		tmp = atan((v / sqrt((H * -19.6))));
    	else
    		tmp = atan((1.0 + (H * ((9.8 + ((H / (v * v)) * 144.06)) / (v * v)))));
    	end
    	tmp_2 = tmp;
    end
    
    code[v_, H_] := If[LessEqual[v, -3.8e-16], N[(0.0 - N[ArcTan[N[(N[(v / N[(1.0 + N[(-9.8 / N[(N[(v * v), $MachinePrecision] / H), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / v), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[v, 6.8e-29], N[ArcTan[N[(v / N[Sqrt[N[(H * -19.6), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcTan[N[(1.0 + N[(H * N[(N[(9.8 + N[(N[(H / N[(v * v), $MachinePrecision]), $MachinePrecision] * 144.06), $MachinePrecision]), $MachinePrecision] / N[(v * v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;v \leq -3.8 \cdot 10^{-16}:\\
    \;\;\;\;0 - \tan^{-1} \left(\frac{\frac{v}{1 + \frac{-9.8}{\frac{v \cdot v}{H}}}}{v}\right)\\
    
    \mathbf{elif}\;v \leq 6.8 \cdot 10^{-29}:\\
    \;\;\;\;\tan^{-1} \left(\frac{v}{\sqrt{H \cdot -19.6}}\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\tan^{-1} \left(1 + H \cdot \frac{9.8 + \frac{H}{v \cdot v} \cdot 144.06}{v \cdot v}\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if v < -3.80000000000000012e-16

      1. Initial program 49.9%

        \[\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot 9.8\right) \cdot H}}\right) \]
      2. Step-by-step derivation
        1. atan-lowering-atan.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}}\right)\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}\right)\right)\right) \]
        3. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right) \]
        4. sub-negN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v + \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        5. +-lowering-+.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(v \cdot v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        7. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(H \cdot \left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        8. distribute-rgt-neg-inN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(H \cdot \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        10. metadata-evalN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(\frac{98}{5}\right)\right)\right)\right)\right)\right)\right) \]
        11. metadata-eval49.9%

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \frac{-98}{5}\right)\right)\right)\right)\right) \]
      3. Simplified49.9%

        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v + H \cdot -19.6}}\right)} \]
      4. Add Preprocessing
      5. Taylor expanded in v around -inf

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \color{blue}{\left(-1 \cdot \left(v \cdot \left(1 + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right)\right)}\right)\right) \]
      6. Step-by-step derivation
        1. associate-*r*N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\left(-1 \cdot v\right) \cdot \left(1 + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right)\right)\right) \]
        2. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\left(1 + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right) \cdot \left(-1 \cdot v\right)\right)\right)\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\left(1 + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        4. +-lowering-+.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        5. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{H}{{v}^{2}} \cdot \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{H}{{v}^{2}}\right), \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        7. /-lowering-/.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \left({v}^{2}\right)\right), \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        8. unpow2N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \left(v \cdot v\right)\right), \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        10. mul-1-negN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{-49}{5}\right)\right), \left(\mathsf{neg}\left(v\right)\right)\right)\right)\right) \]
        11. neg-sub0N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{-49}{5}\right)\right), \left(0 - v\right)\right)\right)\right) \]
        12. --lowering--.f6493.9%

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{-49}{5}\right)\right), \mathsf{\_.f64}\left(0, v\right)\right)\right)\right) \]
      7. Simplified93.9%

        \[\leadsto \tan^{-1} \left(\frac{v}{\color{blue}{\left(1 + \frac{H}{v \cdot v} \cdot -9.8\right) \cdot \left(0 - v\right)}}\right) \]
      8. Step-by-step derivation
        1. sub0-negN/A

          \[\leadsto \tan^{-1} \left(\frac{v}{\left(1 + \frac{H}{v \cdot v} \cdot \frac{-49}{5}\right) \cdot \left(\mathsf{neg}\left(v\right)\right)}\right) \]
        2. associate-/r*N/A

          \[\leadsto \tan^{-1} \left(\frac{\frac{v}{1 + \frac{H}{v \cdot v} \cdot \frac{-49}{5}}}{\mathsf{neg}\left(v\right)}\right) \]
        3. distribute-frac-neg2N/A

          \[\leadsto \tan^{-1} \left(\mathsf{neg}\left(\frac{\frac{v}{1 + \frac{H}{v \cdot v} \cdot \frac{-49}{5}}}{v}\right)\right) \]
        4. atan-negN/A

          \[\leadsto \mathsf{neg}\left(\tan^{-1} \left(\frac{\frac{v}{1 + \frac{H}{v \cdot v} \cdot \frac{-49}{5}}}{v}\right)\right) \]
        5. neg-lowering-neg.f64N/A

          \[\leadsto \mathsf{neg.f64}\left(\tan^{-1} \left(\frac{\frac{v}{1 + \frac{H}{v \cdot v} \cdot \frac{-49}{5}}}{v}\right)\right) \]
        6. atan-lowering-atan.f64N/A

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{v}{1 + \frac{H}{v \cdot v} \cdot \frac{-49}{5}}}{v}\right)\right)\right) \]
        7. /-lowering-/.f64N/A

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\frac{v}{1 + \frac{H}{v \cdot v} \cdot \frac{-49}{5}}\right), v\right)\right)\right) \]
        8. /-lowering-/.f64N/A

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \left(1 + \frac{H}{v \cdot v} \cdot \frac{-49}{5}\right)\right), v\right)\right)\right) \]
        9. +-lowering-+.f64N/A

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(1, \left(\frac{H}{v \cdot v} \cdot \frac{-49}{5}\right)\right)\right), v\right)\right)\right) \]
        10. *-commutativeN/A

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(1, \left(\frac{-49}{5} \cdot \frac{H}{v \cdot v}\right)\right)\right), v\right)\right)\right) \]
        11. clear-numN/A

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(1, \left(\frac{-49}{5} \cdot \frac{1}{\frac{v \cdot v}{H}}\right)\right)\right), v\right)\right)\right) \]
        12. un-div-invN/A

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(1, \left(\frac{\frac{-49}{5}}{\frac{v \cdot v}{H}}\right)\right)\right), v\right)\right)\right) \]
        13. /-lowering-/.f64N/A

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\frac{-49}{5}, \left(\frac{v \cdot v}{H}\right)\right)\right)\right), v\right)\right)\right) \]
        14. /-lowering-/.f64N/A

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\frac{-49}{5}, \mathsf{/.f64}\left(\left(v \cdot v\right), H\right)\right)\right)\right), v\right)\right)\right) \]
        15. *-lowering-*.f6493.9%

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\frac{-49}{5}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(v, v\right), H\right)\right)\right)\right), v\right)\right)\right) \]
      9. Applied egg-rr93.9%

        \[\leadsto \color{blue}{-\tan^{-1} \left(\frac{\frac{v}{1 + \frac{-9.8}{\frac{v \cdot v}{H}}}}{v}\right)} \]

      if -3.80000000000000012e-16 < v < 6.79999999999999945e-29

      1. Initial program 99.5%

        \[\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot 9.8\right) \cdot H}}\right) \]
      2. Step-by-step derivation
        1. atan-lowering-atan.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}}\right)\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}\right)\right)\right) \]
        3. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right) \]
        4. sub-negN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v + \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        5. +-lowering-+.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(v \cdot v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        7. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(H \cdot \left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        8. distribute-rgt-neg-inN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(H \cdot \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        10. metadata-evalN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(\frac{98}{5}\right)\right)\right)\right)\right)\right)\right) \]
        11. metadata-eval99.5%

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \frac{-98}{5}\right)\right)\right)\right)\right) \]
      3. Simplified99.5%

        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v + H \cdot -19.6}}\right)} \]
      4. Add Preprocessing
      5. Taylor expanded in v around 0

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\color{blue}{\left(\frac{-98}{5} \cdot H\right)}\right)\right)\right) \]
      6. Step-by-step derivation
        1. *-lowering-*.f6488.7%

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\frac{-98}{5}, H\right)\right)\right)\right) \]
      7. Simplified88.7%

        \[\leadsto \tan^{-1} \left(\frac{v}{\sqrt{\color{blue}{-19.6 \cdot H}}}\right) \]

      if 6.79999999999999945e-29 < v

      1. Initial program 52.7%

        \[\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot 9.8\right) \cdot H}}\right) \]
      2. Step-by-step derivation
        1. atan-lowering-atan.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}}\right)\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}\right)\right)\right) \]
        3. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right) \]
        4. sub-negN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v + \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        5. +-lowering-+.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(v \cdot v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        7. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(H \cdot \left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        8. distribute-rgt-neg-inN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(H \cdot \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        10. metadata-evalN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(\frac{98}{5}\right)\right)\right)\right)\right)\right)\right) \]
        11. metadata-eval52.7%

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \frac{-98}{5}\right)\right)\right)\right)\right) \]
      3. Simplified52.7%

        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v + H \cdot -19.6}}\right)} \]
      4. Add Preprocessing
      5. Taylor expanded in H around 0

        \[\leadsto \mathsf{atan.f64}\left(\color{blue}{\left(1 + H \cdot \left(\frac{7203}{50} \cdot \frac{H}{{v}^{4}} + \frac{49}{5} \cdot \frac{1}{{v}^{2}}\right)\right)}\right) \]
      6. Step-by-step derivation
        1. +-lowering-+.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \left(H \cdot \left(\frac{7203}{50} \cdot \frac{H}{{v}^{4}} + \frac{49}{5} \cdot \frac{1}{{v}^{2}}\right)\right)\right)\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \left(\frac{7203}{50} \cdot \frac{H}{{v}^{4}} + \frac{49}{5} \cdot \frac{1}{{v}^{2}}\right)\right)\right)\right) \]
        3. +-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \left(\frac{49}{5} \cdot \frac{1}{{v}^{2}} + \frac{7203}{50} \cdot \frac{H}{{v}^{4}}\right)\right)\right)\right) \]
        4. associate-*r/N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \left(\frac{49}{5} \cdot \frac{1}{{v}^{2}} + \frac{\frac{7203}{50} \cdot H}{{v}^{4}}\right)\right)\right)\right) \]
        5. associate-*l/N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \left(\frac{49}{5} \cdot \frac{1}{{v}^{2}} + \frac{\frac{7203}{50}}{{v}^{4}} \cdot H\right)\right)\right)\right) \]
        6. metadata-evalN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \left(\frac{49}{5} \cdot \frac{1}{{v}^{2}} + \frac{\frac{7203}{50} \cdot 1}{{v}^{4}} \cdot H\right)\right)\right)\right) \]
        7. associate-*r/N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \left(\frac{49}{5} \cdot \frac{1}{{v}^{2}} + \left(\frac{7203}{50} \cdot \frac{1}{{v}^{4}}\right) \cdot H\right)\right)\right)\right) \]
        8. +-lowering-+.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\left(\frac{49}{5} \cdot \frac{1}{{v}^{2}}\right), \left(\left(\frac{7203}{50} \cdot \frac{1}{{v}^{4}}\right) \cdot H\right)\right)\right)\right)\right) \]
        9. associate-*r/N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\left(\frac{\frac{49}{5} \cdot 1}{{v}^{2}}\right), \left(\left(\frac{7203}{50} \cdot \frac{1}{{v}^{4}}\right) \cdot H\right)\right)\right)\right)\right) \]
        10. metadata-evalN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\left(\frac{\frac{49}{5}}{{v}^{2}}\right), \left(\left(\frac{7203}{50} \cdot \frac{1}{{v}^{4}}\right) \cdot H\right)\right)\right)\right)\right) \]
        11. /-lowering-/.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \left({v}^{2}\right)\right), \left(\left(\frac{7203}{50} \cdot \frac{1}{{v}^{4}}\right) \cdot H\right)\right)\right)\right)\right) \]
        12. unpow2N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \left(v \cdot v\right)\right), \left(\left(\frac{7203}{50} \cdot \frac{1}{{v}^{4}}\right) \cdot H\right)\right)\right)\right)\right) \]
        13. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(v, v\right)\right), \left(\left(\frac{7203}{50} \cdot \frac{1}{{v}^{4}}\right) \cdot H\right)\right)\right)\right)\right) \]
        14. associate-*r/N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(v, v\right)\right), \left(\frac{\frac{7203}{50} \cdot 1}{{v}^{4}} \cdot H\right)\right)\right)\right)\right) \]
        15. metadata-evalN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(v, v\right)\right), \left(\frac{\frac{7203}{50}}{{v}^{4}} \cdot H\right)\right)\right)\right)\right) \]
        16. associate-*l/N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(v, v\right)\right), \left(\frac{\frac{7203}{50} \cdot H}{{v}^{4}}\right)\right)\right)\right)\right) \]
        17. /-lowering-/.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(v, v\right)\right), \mathsf{/.f64}\left(\left(\frac{7203}{50} \cdot H\right), \left({v}^{4}\right)\right)\right)\right)\right)\right) \]
        18. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(v, v\right)\right), \mathsf{/.f64}\left(\left(H \cdot \frac{7203}{50}\right), \left({v}^{4}\right)\right)\right)\right)\right)\right) \]
        19. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(v, v\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \frac{7203}{50}\right), \left({v}^{4}\right)\right)\right)\right)\right)\right) \]
        20. metadata-evalN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(v, v\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \frac{7203}{50}\right), \left({v}^{\left(2 \cdot 2\right)}\right)\right)\right)\right)\right)\right) \]
        21. pow-sqrN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(v, v\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \frac{7203}{50}\right), \left({v}^{2} \cdot {v}^{2}\right)\right)\right)\right)\right)\right) \]
        22. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(v, v\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \frac{7203}{50}\right), \mathsf{*.f64}\left(\left({v}^{2}\right), \left({v}^{2}\right)\right)\right)\right)\right)\right)\right) \]
        23. unpow2N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(v, v\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \frac{7203}{50}\right), \mathsf{*.f64}\left(\left(v \cdot v\right), \left({v}^{2}\right)\right)\right)\right)\right)\right)\right) \]
        24. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(v, v\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \frac{7203}{50}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(v, v\right), \left({v}^{2}\right)\right)\right)\right)\right)\right)\right) \]
        25. unpow2N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(v, v\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \frac{7203}{50}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(v \cdot v\right)\right)\right)\right)\right)\right)\right) \]
      7. Simplified91.0%

        \[\leadsto \tan^{-1} \color{blue}{\left(1 + H \cdot \left(\frac{9.8}{v \cdot v} + \frac{H \cdot 144.06}{\left(v \cdot v\right) \cdot \left(v \cdot v\right)}\right)\right)} \]
      8. Taylor expanded in v around inf

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \color{blue}{\left(\frac{\frac{49}{5} + \frac{7203}{50} \cdot \frac{H}{{v}^{2}}}{{v}^{2}}\right)}\right)\right)\right) \]
      9. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{/.f64}\left(\left(\frac{49}{5} + \frac{7203}{50} \cdot \frac{H}{{v}^{2}}\right), \left({v}^{2}\right)\right)\right)\right)\right) \]
        2. +-lowering-+.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{49}{5}, \left(\frac{7203}{50} \cdot \frac{H}{{v}^{2}}\right)\right), \left({v}^{2}\right)\right)\right)\right)\right) \]
        3. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{49}{5}, \left(\frac{H}{{v}^{2}} \cdot \frac{7203}{50}\right)\right), \left({v}^{2}\right)\right)\right)\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(\left(\frac{H}{{v}^{2}}\right), \frac{7203}{50}\right)\right), \left({v}^{2}\right)\right)\right)\right)\right) \]
        5. /-lowering-/.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \left({v}^{2}\right)\right), \frac{7203}{50}\right)\right), \left({v}^{2}\right)\right)\right)\right)\right) \]
        6. unpow2N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \left(v \cdot v\right)\right), \frac{7203}{50}\right)\right), \left({v}^{2}\right)\right)\right)\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{7203}{50}\right)\right), \left({v}^{2}\right)\right)\right)\right)\right) \]
        8. unpow2N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{7203}{50}\right)\right), \left(v \cdot v\right)\right)\right)\right)\right) \]
        9. *-lowering-*.f6491.2%

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{7203}{50}\right)\right), \mathsf{*.f64}\left(v, v\right)\right)\right)\right)\right) \]
      10. Simplified91.2%

        \[\leadsto \tan^{-1} \left(1 + H \cdot \color{blue}{\frac{9.8 + \frac{H}{v \cdot v} \cdot 144.06}{v \cdot v}}\right) \]
    3. Recombined 3 regimes into one program.
    4. Final simplification91.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;v \leq -3.8 \cdot 10^{-16}:\\ \;\;\;\;0 - \tan^{-1} \left(\frac{\frac{v}{1 + \frac{-9.8}{\frac{v \cdot v}{H}}}}{v}\right)\\ \mathbf{elif}\;v \leq 6.8 \cdot 10^{-29}:\\ \;\;\;\;\tan^{-1} \left(\frac{v}{\sqrt{H \cdot -19.6}}\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(1 + H \cdot \frac{9.8 + \frac{H}{v \cdot v} \cdot 144.06}{v \cdot v}\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 3: 89.6% accurate, 1.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;v \leq -1.6 \cdot 10^{-16}:\\ \;\;\;\;0 - \tan^{-1} \left(\frac{\frac{v}{1 + \frac{-9.8}{\frac{v \cdot v}{H}}}}{v}\right)\\ \mathbf{elif}\;v \leq 3.15 \cdot 10^{-28}:\\ \;\;\;\;\tan^{-1} \left(v \cdot \sqrt{\frac{-0.05102040816326531}{H}}\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(1 + H \cdot \frac{9.8 + \frac{H}{v \cdot v} \cdot 144.06}{v \cdot v}\right)\\ \end{array} \end{array} \]
    (FPCore (v H)
     :precision binary64
     (if (<= v -1.6e-16)
       (- 0.0 (atan (/ (/ v (+ 1.0 (/ -9.8 (/ (* v v) H)))) v)))
       (if (<= v 3.15e-28)
         (atan (* v (sqrt (/ -0.05102040816326531 H))))
         (atan (+ 1.0 (* H (/ (+ 9.8 (* (/ H (* v v)) 144.06)) (* v v))))))))
    double code(double v, double H) {
    	double tmp;
    	if (v <= -1.6e-16) {
    		tmp = 0.0 - atan(((v / (1.0 + (-9.8 / ((v * v) / H)))) / v));
    	} else if (v <= 3.15e-28) {
    		tmp = atan((v * sqrt((-0.05102040816326531 / H))));
    	} else {
    		tmp = atan((1.0 + (H * ((9.8 + ((H / (v * v)) * 144.06)) / (v * v)))));
    	}
    	return tmp;
    }
    
    real(8) function code(v, h)
        real(8), intent (in) :: v
        real(8), intent (in) :: h
        real(8) :: tmp
        if (v <= (-1.6d-16)) then
            tmp = 0.0d0 - atan(((v / (1.0d0 + ((-9.8d0) / ((v * v) / h)))) / v))
        else if (v <= 3.15d-28) then
            tmp = atan((v * sqrt(((-0.05102040816326531d0) / h))))
        else
            tmp = atan((1.0d0 + (h * ((9.8d0 + ((h / (v * v)) * 144.06d0)) / (v * v)))))
        end if
        code = tmp
    end function
    
    public static double code(double v, double H) {
    	double tmp;
    	if (v <= -1.6e-16) {
    		tmp = 0.0 - Math.atan(((v / (1.0 + (-9.8 / ((v * v) / H)))) / v));
    	} else if (v <= 3.15e-28) {
    		tmp = Math.atan((v * Math.sqrt((-0.05102040816326531 / H))));
    	} else {
    		tmp = Math.atan((1.0 + (H * ((9.8 + ((H / (v * v)) * 144.06)) / (v * v)))));
    	}
    	return tmp;
    }
    
    def code(v, H):
    	tmp = 0
    	if v <= -1.6e-16:
    		tmp = 0.0 - math.atan(((v / (1.0 + (-9.8 / ((v * v) / H)))) / v))
    	elif v <= 3.15e-28:
    		tmp = math.atan((v * math.sqrt((-0.05102040816326531 / H))))
    	else:
    		tmp = math.atan((1.0 + (H * ((9.8 + ((H / (v * v)) * 144.06)) / (v * v)))))
    	return tmp
    
    function code(v, H)
    	tmp = 0.0
    	if (v <= -1.6e-16)
    		tmp = Float64(0.0 - atan(Float64(Float64(v / Float64(1.0 + Float64(-9.8 / Float64(Float64(v * v) / H)))) / v)));
    	elseif (v <= 3.15e-28)
    		tmp = atan(Float64(v * sqrt(Float64(-0.05102040816326531 / H))));
    	else
    		tmp = atan(Float64(1.0 + Float64(H * Float64(Float64(9.8 + Float64(Float64(H / Float64(v * v)) * 144.06)) / Float64(v * v)))));
    	end
    	return tmp
    end
    
    function tmp_2 = code(v, H)
    	tmp = 0.0;
    	if (v <= -1.6e-16)
    		tmp = 0.0 - atan(((v / (1.0 + (-9.8 / ((v * v) / H)))) / v));
    	elseif (v <= 3.15e-28)
    		tmp = atan((v * sqrt((-0.05102040816326531 / H))));
    	else
    		tmp = atan((1.0 + (H * ((9.8 + ((H / (v * v)) * 144.06)) / (v * v)))));
    	end
    	tmp_2 = tmp;
    end
    
    code[v_, H_] := If[LessEqual[v, -1.6e-16], N[(0.0 - N[ArcTan[N[(N[(v / N[(1.0 + N[(-9.8 / N[(N[(v * v), $MachinePrecision] / H), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / v), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[v, 3.15e-28], N[ArcTan[N[(v * N[Sqrt[N[(-0.05102040816326531 / H), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcTan[N[(1.0 + N[(H * N[(N[(9.8 + N[(N[(H / N[(v * v), $MachinePrecision]), $MachinePrecision] * 144.06), $MachinePrecision]), $MachinePrecision] / N[(v * v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;v \leq -1.6 \cdot 10^{-16}:\\
    \;\;\;\;0 - \tan^{-1} \left(\frac{\frac{v}{1 + \frac{-9.8}{\frac{v \cdot v}{H}}}}{v}\right)\\
    
    \mathbf{elif}\;v \leq 3.15 \cdot 10^{-28}:\\
    \;\;\;\;\tan^{-1} \left(v \cdot \sqrt{\frac{-0.05102040816326531}{H}}\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\tan^{-1} \left(1 + H \cdot \frac{9.8 + \frac{H}{v \cdot v} \cdot 144.06}{v \cdot v}\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if v < -1.60000000000000011e-16

      1. Initial program 49.9%

        \[\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot 9.8\right) \cdot H}}\right) \]
      2. Step-by-step derivation
        1. atan-lowering-atan.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}}\right)\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}\right)\right)\right) \]
        3. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right) \]
        4. sub-negN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v + \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        5. +-lowering-+.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(v \cdot v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        7. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(H \cdot \left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        8. distribute-rgt-neg-inN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(H \cdot \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        10. metadata-evalN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(\frac{98}{5}\right)\right)\right)\right)\right)\right)\right) \]
        11. metadata-eval49.9%

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \frac{-98}{5}\right)\right)\right)\right)\right) \]
      3. Simplified49.9%

        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v + H \cdot -19.6}}\right)} \]
      4. Add Preprocessing
      5. Taylor expanded in v around -inf

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \color{blue}{\left(-1 \cdot \left(v \cdot \left(1 + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right)\right)}\right)\right) \]
      6. Step-by-step derivation
        1. associate-*r*N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\left(-1 \cdot v\right) \cdot \left(1 + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right)\right)\right) \]
        2. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\left(1 + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right) \cdot \left(-1 \cdot v\right)\right)\right)\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\left(1 + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        4. +-lowering-+.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        5. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{H}{{v}^{2}} \cdot \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{H}{{v}^{2}}\right), \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        7. /-lowering-/.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \left({v}^{2}\right)\right), \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        8. unpow2N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \left(v \cdot v\right)\right), \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        10. mul-1-negN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{-49}{5}\right)\right), \left(\mathsf{neg}\left(v\right)\right)\right)\right)\right) \]
        11. neg-sub0N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{-49}{5}\right)\right), \left(0 - v\right)\right)\right)\right) \]
        12. --lowering--.f6493.9%

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{-49}{5}\right)\right), \mathsf{\_.f64}\left(0, v\right)\right)\right)\right) \]
      7. Simplified93.9%

        \[\leadsto \tan^{-1} \left(\frac{v}{\color{blue}{\left(1 + \frac{H}{v \cdot v} \cdot -9.8\right) \cdot \left(0 - v\right)}}\right) \]
      8. Step-by-step derivation
        1. sub0-negN/A

          \[\leadsto \tan^{-1} \left(\frac{v}{\left(1 + \frac{H}{v \cdot v} \cdot \frac{-49}{5}\right) \cdot \left(\mathsf{neg}\left(v\right)\right)}\right) \]
        2. associate-/r*N/A

          \[\leadsto \tan^{-1} \left(\frac{\frac{v}{1 + \frac{H}{v \cdot v} \cdot \frac{-49}{5}}}{\mathsf{neg}\left(v\right)}\right) \]
        3. distribute-frac-neg2N/A

          \[\leadsto \tan^{-1} \left(\mathsf{neg}\left(\frac{\frac{v}{1 + \frac{H}{v \cdot v} \cdot \frac{-49}{5}}}{v}\right)\right) \]
        4. atan-negN/A

          \[\leadsto \mathsf{neg}\left(\tan^{-1} \left(\frac{\frac{v}{1 + \frac{H}{v \cdot v} \cdot \frac{-49}{5}}}{v}\right)\right) \]
        5. neg-lowering-neg.f64N/A

          \[\leadsto \mathsf{neg.f64}\left(\tan^{-1} \left(\frac{\frac{v}{1 + \frac{H}{v \cdot v} \cdot \frac{-49}{5}}}{v}\right)\right) \]
        6. atan-lowering-atan.f64N/A

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{v}{1 + \frac{H}{v \cdot v} \cdot \frac{-49}{5}}}{v}\right)\right)\right) \]
        7. /-lowering-/.f64N/A

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\frac{v}{1 + \frac{H}{v \cdot v} \cdot \frac{-49}{5}}\right), v\right)\right)\right) \]
        8. /-lowering-/.f64N/A

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \left(1 + \frac{H}{v \cdot v} \cdot \frac{-49}{5}\right)\right), v\right)\right)\right) \]
        9. +-lowering-+.f64N/A

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(1, \left(\frac{H}{v \cdot v} \cdot \frac{-49}{5}\right)\right)\right), v\right)\right)\right) \]
        10. *-commutativeN/A

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(1, \left(\frac{-49}{5} \cdot \frac{H}{v \cdot v}\right)\right)\right), v\right)\right)\right) \]
        11. clear-numN/A

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(1, \left(\frac{-49}{5} \cdot \frac{1}{\frac{v \cdot v}{H}}\right)\right)\right), v\right)\right)\right) \]
        12. un-div-invN/A

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(1, \left(\frac{\frac{-49}{5}}{\frac{v \cdot v}{H}}\right)\right)\right), v\right)\right)\right) \]
        13. /-lowering-/.f64N/A

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\frac{-49}{5}, \left(\frac{v \cdot v}{H}\right)\right)\right)\right), v\right)\right)\right) \]
        14. /-lowering-/.f64N/A

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\frac{-49}{5}, \mathsf{/.f64}\left(\left(v \cdot v\right), H\right)\right)\right)\right), v\right)\right)\right) \]
        15. *-lowering-*.f6493.9%

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\frac{-49}{5}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(v, v\right), H\right)\right)\right)\right), v\right)\right)\right) \]
      9. Applied egg-rr93.9%

        \[\leadsto \color{blue}{-\tan^{-1} \left(\frac{\frac{v}{1 + \frac{-9.8}{\frac{v \cdot v}{H}}}}{v}\right)} \]

      if -1.60000000000000011e-16 < v < 3.1499999999999999e-28

      1. Initial program 99.5%

        \[\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot 9.8\right) \cdot H}}\right) \]
      2. Step-by-step derivation
        1. atan-lowering-atan.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}}\right)\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}\right)\right)\right) \]
        3. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right) \]
        4. sub-negN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v + \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        5. +-lowering-+.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(v \cdot v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        7. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(H \cdot \left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        8. distribute-rgt-neg-inN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(H \cdot \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        10. metadata-evalN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(\frac{98}{5}\right)\right)\right)\right)\right)\right)\right) \]
        11. metadata-eval99.5%

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \frac{-98}{5}\right)\right)\right)\right)\right) \]
      3. Simplified99.5%

        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v + H \cdot -19.6}}\right)} \]
      4. Add Preprocessing
      5. Taylor expanded in v around 0

        \[\leadsto \color{blue}{\tan^{-1} \left(v \cdot \sqrt{\frac{1}{\frac{-98}{5} \cdot H + {v}^{2}}}\right)} \]
      6. Step-by-step derivation
        1. atan-lowering-atan.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\left(v \cdot \sqrt{\frac{1}{\frac{-98}{5} \cdot H + {v}^{2}}}\right)\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{*.f64}\left(v, \left(\sqrt{\frac{1}{\frac{-98}{5} \cdot H + {v}^{2}}}\right)\right)\right) \]
        3. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{*.f64}\left(v, \mathsf{sqrt.f64}\left(\left(\frac{1}{\frac{-98}{5} \cdot H + {v}^{2}}\right)\right)\right)\right) \]
        4. /-lowering-/.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{*.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(\frac{-98}{5} \cdot H + {v}^{2}\right)\right)\right)\right)\right) \]
        5. +-lowering-+.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{*.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\left(\frac{-98}{5} \cdot H\right), \left({v}^{2}\right)\right)\right)\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{*.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-98}{5}, H\right), \left({v}^{2}\right)\right)\right)\right)\right)\right) \]
        7. unpow2N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{*.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-98}{5}, H\right), \left(v \cdot v\right)\right)\right)\right)\right)\right) \]
        8. *-lowering-*.f6499.5%

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{*.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-98}{5}, H\right), \mathsf{*.f64}\left(v, v\right)\right)\right)\right)\right)\right) \]
      7. Simplified99.5%

        \[\leadsto \color{blue}{\tan^{-1} \left(v \cdot \sqrt{\frac{1}{-19.6 \cdot H + v \cdot v}}\right)} \]
      8. Taylor expanded in H around inf

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{*.f64}\left(v, \mathsf{sqrt.f64}\left(\color{blue}{\left(\frac{\frac{-5}{98}}{H}\right)}\right)\right)\right) \]
      9. Step-by-step derivation
        1. /-lowering-/.f6488.6%

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{*.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\frac{-5}{98}, H\right)\right)\right)\right) \]
      10. Simplified88.6%

        \[\leadsto \tan^{-1} \left(v \cdot \sqrt{\color{blue}{\frac{-0.05102040816326531}{H}}}\right) \]

      if 3.1499999999999999e-28 < v

      1. Initial program 52.7%

        \[\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot 9.8\right) \cdot H}}\right) \]
      2. Step-by-step derivation
        1. atan-lowering-atan.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}}\right)\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}\right)\right)\right) \]
        3. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right) \]
        4. sub-negN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v + \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        5. +-lowering-+.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(v \cdot v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        7. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(H \cdot \left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        8. distribute-rgt-neg-inN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(H \cdot \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        10. metadata-evalN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(\frac{98}{5}\right)\right)\right)\right)\right)\right)\right) \]
        11. metadata-eval52.7%

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \frac{-98}{5}\right)\right)\right)\right)\right) \]
      3. Simplified52.7%

        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v + H \cdot -19.6}}\right)} \]
      4. Add Preprocessing
      5. Taylor expanded in H around 0

        \[\leadsto \mathsf{atan.f64}\left(\color{blue}{\left(1 + H \cdot \left(\frac{7203}{50} \cdot \frac{H}{{v}^{4}} + \frac{49}{5} \cdot \frac{1}{{v}^{2}}\right)\right)}\right) \]
      6. Step-by-step derivation
        1. +-lowering-+.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \left(H \cdot \left(\frac{7203}{50} \cdot \frac{H}{{v}^{4}} + \frac{49}{5} \cdot \frac{1}{{v}^{2}}\right)\right)\right)\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \left(\frac{7203}{50} \cdot \frac{H}{{v}^{4}} + \frac{49}{5} \cdot \frac{1}{{v}^{2}}\right)\right)\right)\right) \]
        3. +-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \left(\frac{49}{5} \cdot \frac{1}{{v}^{2}} + \frac{7203}{50} \cdot \frac{H}{{v}^{4}}\right)\right)\right)\right) \]
        4. associate-*r/N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \left(\frac{49}{5} \cdot \frac{1}{{v}^{2}} + \frac{\frac{7203}{50} \cdot H}{{v}^{4}}\right)\right)\right)\right) \]
        5. associate-*l/N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \left(\frac{49}{5} \cdot \frac{1}{{v}^{2}} + \frac{\frac{7203}{50}}{{v}^{4}} \cdot H\right)\right)\right)\right) \]
        6. metadata-evalN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \left(\frac{49}{5} \cdot \frac{1}{{v}^{2}} + \frac{\frac{7203}{50} \cdot 1}{{v}^{4}} \cdot H\right)\right)\right)\right) \]
        7. associate-*r/N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \left(\frac{49}{5} \cdot \frac{1}{{v}^{2}} + \left(\frac{7203}{50} \cdot \frac{1}{{v}^{4}}\right) \cdot H\right)\right)\right)\right) \]
        8. +-lowering-+.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\left(\frac{49}{5} \cdot \frac{1}{{v}^{2}}\right), \left(\left(\frac{7203}{50} \cdot \frac{1}{{v}^{4}}\right) \cdot H\right)\right)\right)\right)\right) \]
        9. associate-*r/N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\left(\frac{\frac{49}{5} \cdot 1}{{v}^{2}}\right), \left(\left(\frac{7203}{50} \cdot \frac{1}{{v}^{4}}\right) \cdot H\right)\right)\right)\right)\right) \]
        10. metadata-evalN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\left(\frac{\frac{49}{5}}{{v}^{2}}\right), \left(\left(\frac{7203}{50} \cdot \frac{1}{{v}^{4}}\right) \cdot H\right)\right)\right)\right)\right) \]
        11. /-lowering-/.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \left({v}^{2}\right)\right), \left(\left(\frac{7203}{50} \cdot \frac{1}{{v}^{4}}\right) \cdot H\right)\right)\right)\right)\right) \]
        12. unpow2N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \left(v \cdot v\right)\right), \left(\left(\frac{7203}{50} \cdot \frac{1}{{v}^{4}}\right) \cdot H\right)\right)\right)\right)\right) \]
        13. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(v, v\right)\right), \left(\left(\frac{7203}{50} \cdot \frac{1}{{v}^{4}}\right) \cdot H\right)\right)\right)\right)\right) \]
        14. associate-*r/N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(v, v\right)\right), \left(\frac{\frac{7203}{50} \cdot 1}{{v}^{4}} \cdot H\right)\right)\right)\right)\right) \]
        15. metadata-evalN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(v, v\right)\right), \left(\frac{\frac{7203}{50}}{{v}^{4}} \cdot H\right)\right)\right)\right)\right) \]
        16. associate-*l/N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(v, v\right)\right), \left(\frac{\frac{7203}{50} \cdot H}{{v}^{4}}\right)\right)\right)\right)\right) \]
        17. /-lowering-/.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(v, v\right)\right), \mathsf{/.f64}\left(\left(\frac{7203}{50} \cdot H\right), \left({v}^{4}\right)\right)\right)\right)\right)\right) \]
        18. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(v, v\right)\right), \mathsf{/.f64}\left(\left(H \cdot \frac{7203}{50}\right), \left({v}^{4}\right)\right)\right)\right)\right)\right) \]
        19. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(v, v\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \frac{7203}{50}\right), \left({v}^{4}\right)\right)\right)\right)\right)\right) \]
        20. metadata-evalN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(v, v\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \frac{7203}{50}\right), \left({v}^{\left(2 \cdot 2\right)}\right)\right)\right)\right)\right)\right) \]
        21. pow-sqrN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(v, v\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \frac{7203}{50}\right), \left({v}^{2} \cdot {v}^{2}\right)\right)\right)\right)\right)\right) \]
        22. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(v, v\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \frac{7203}{50}\right), \mathsf{*.f64}\left(\left({v}^{2}\right), \left({v}^{2}\right)\right)\right)\right)\right)\right)\right) \]
        23. unpow2N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(v, v\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \frac{7203}{50}\right), \mathsf{*.f64}\left(\left(v \cdot v\right), \left({v}^{2}\right)\right)\right)\right)\right)\right)\right) \]
        24. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(v, v\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \frac{7203}{50}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(v, v\right), \left({v}^{2}\right)\right)\right)\right)\right)\right)\right) \]
        25. unpow2N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(v, v\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \frac{7203}{50}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(v \cdot v\right)\right)\right)\right)\right)\right)\right) \]
      7. Simplified91.0%

        \[\leadsto \tan^{-1} \color{blue}{\left(1 + H \cdot \left(\frac{9.8}{v \cdot v} + \frac{H \cdot 144.06}{\left(v \cdot v\right) \cdot \left(v \cdot v\right)}\right)\right)} \]
      8. Taylor expanded in v around inf

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \color{blue}{\left(\frac{\frac{49}{5} + \frac{7203}{50} \cdot \frac{H}{{v}^{2}}}{{v}^{2}}\right)}\right)\right)\right) \]
      9. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{/.f64}\left(\left(\frac{49}{5} + \frac{7203}{50} \cdot \frac{H}{{v}^{2}}\right), \left({v}^{2}\right)\right)\right)\right)\right) \]
        2. +-lowering-+.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{49}{5}, \left(\frac{7203}{50} \cdot \frac{H}{{v}^{2}}\right)\right), \left({v}^{2}\right)\right)\right)\right)\right) \]
        3. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{49}{5}, \left(\frac{H}{{v}^{2}} \cdot \frac{7203}{50}\right)\right), \left({v}^{2}\right)\right)\right)\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(\left(\frac{H}{{v}^{2}}\right), \frac{7203}{50}\right)\right), \left({v}^{2}\right)\right)\right)\right)\right) \]
        5. /-lowering-/.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \left({v}^{2}\right)\right), \frac{7203}{50}\right)\right), \left({v}^{2}\right)\right)\right)\right)\right) \]
        6. unpow2N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \left(v \cdot v\right)\right), \frac{7203}{50}\right)\right), \left({v}^{2}\right)\right)\right)\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{7203}{50}\right)\right), \left({v}^{2}\right)\right)\right)\right)\right) \]
        8. unpow2N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{7203}{50}\right)\right), \left(v \cdot v\right)\right)\right)\right)\right) \]
        9. *-lowering-*.f6491.2%

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{7203}{50}\right)\right), \mathsf{*.f64}\left(v, v\right)\right)\right)\right)\right) \]
      10. Simplified91.2%

        \[\leadsto \tan^{-1} \left(1 + H \cdot \color{blue}{\frac{9.8 + \frac{H}{v \cdot v} \cdot 144.06}{v \cdot v}}\right) \]
    3. Recombined 3 regimes into one program.
    4. Final simplification91.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;v \leq -1.6 \cdot 10^{-16}:\\ \;\;\;\;0 - \tan^{-1} \left(\frac{\frac{v}{1 + \frac{-9.8}{\frac{v \cdot v}{H}}}}{v}\right)\\ \mathbf{elif}\;v \leq 3.15 \cdot 10^{-28}:\\ \;\;\;\;\tan^{-1} \left(v \cdot \sqrt{\frac{-0.05102040816326531}{H}}\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(1 + H \cdot \frac{9.8 + \frac{H}{v \cdot v} \cdot 144.06}{v \cdot v}\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 4: 73.3% accurate, 1.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;v \leq 7.5 \cdot 10^{-187}:\\ \;\;\;\;\tan^{-1} \left(\frac{v}{v \cdot \left(-1 - \frac{-9.8 \cdot \frac{H}{v}}{v}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(1 + H \cdot \frac{9.8 + \frac{H}{v \cdot v} \cdot 144.06}{v \cdot v}\right)\\ \end{array} \end{array} \]
    (FPCore (v H)
     :precision binary64
     (if (<= v 7.5e-187)
       (atan (/ v (* v (- -1.0 (/ (* -9.8 (/ H v)) v)))))
       (atan (+ 1.0 (* H (/ (+ 9.8 (* (/ H (* v v)) 144.06)) (* v v)))))))
    double code(double v, double H) {
    	double tmp;
    	if (v <= 7.5e-187) {
    		tmp = atan((v / (v * (-1.0 - ((-9.8 * (H / v)) / v)))));
    	} else {
    		tmp = atan((1.0 + (H * ((9.8 + ((H / (v * v)) * 144.06)) / (v * v)))));
    	}
    	return tmp;
    }
    
    real(8) function code(v, h)
        real(8), intent (in) :: v
        real(8), intent (in) :: h
        real(8) :: tmp
        if (v <= 7.5d-187) then
            tmp = atan((v / (v * ((-1.0d0) - (((-9.8d0) * (h / v)) / v)))))
        else
            tmp = atan((1.0d0 + (h * ((9.8d0 + ((h / (v * v)) * 144.06d0)) / (v * v)))))
        end if
        code = tmp
    end function
    
    public static double code(double v, double H) {
    	double tmp;
    	if (v <= 7.5e-187) {
    		tmp = Math.atan((v / (v * (-1.0 - ((-9.8 * (H / v)) / v)))));
    	} else {
    		tmp = Math.atan((1.0 + (H * ((9.8 + ((H / (v * v)) * 144.06)) / (v * v)))));
    	}
    	return tmp;
    }
    
    def code(v, H):
    	tmp = 0
    	if v <= 7.5e-187:
    		tmp = math.atan((v / (v * (-1.0 - ((-9.8 * (H / v)) / v)))))
    	else:
    		tmp = math.atan((1.0 + (H * ((9.8 + ((H / (v * v)) * 144.06)) / (v * v)))))
    	return tmp
    
    function code(v, H)
    	tmp = 0.0
    	if (v <= 7.5e-187)
    		tmp = atan(Float64(v / Float64(v * Float64(-1.0 - Float64(Float64(-9.8 * Float64(H / v)) / v)))));
    	else
    		tmp = atan(Float64(1.0 + Float64(H * Float64(Float64(9.8 + Float64(Float64(H / Float64(v * v)) * 144.06)) / Float64(v * v)))));
    	end
    	return tmp
    end
    
    function tmp_2 = code(v, H)
    	tmp = 0.0;
    	if (v <= 7.5e-187)
    		tmp = atan((v / (v * (-1.0 - ((-9.8 * (H / v)) / v)))));
    	else
    		tmp = atan((1.0 + (H * ((9.8 + ((H / (v * v)) * 144.06)) / (v * v)))));
    	end
    	tmp_2 = tmp;
    end
    
    code[v_, H_] := If[LessEqual[v, 7.5e-187], N[ArcTan[N[(v / N[(v * N[(-1.0 - N[(N[(-9.8 * N[(H / v), $MachinePrecision]), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcTan[N[(1.0 + N[(H * N[(N[(9.8 + N[(N[(H / N[(v * v), $MachinePrecision]), $MachinePrecision] * 144.06), $MachinePrecision]), $MachinePrecision] / N[(v * v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;v \leq 7.5 \cdot 10^{-187}:\\
    \;\;\;\;\tan^{-1} \left(\frac{v}{v \cdot \left(-1 - \frac{-9.8 \cdot \frac{H}{v}}{v}\right)}\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\tan^{-1} \left(1 + H \cdot \frac{9.8 + \frac{H}{v \cdot v} \cdot 144.06}{v \cdot v}\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if v < 7.5000000000000004e-187

      1. Initial program 69.9%

        \[\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot 9.8\right) \cdot H}}\right) \]
      2. Step-by-step derivation
        1. atan-lowering-atan.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}}\right)\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}\right)\right)\right) \]
        3. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right) \]
        4. sub-negN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v + \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        5. +-lowering-+.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(v \cdot v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        7. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(H \cdot \left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        8. distribute-rgt-neg-inN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(H \cdot \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        10. metadata-evalN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(\frac{98}{5}\right)\right)\right)\right)\right)\right)\right) \]
        11. metadata-eval69.9%

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \frac{-98}{5}\right)\right)\right)\right)\right) \]
      3. Simplified69.9%

        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v + H \cdot -19.6}}\right)} \]
      4. Add Preprocessing
      5. Taylor expanded in v around -inf

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \color{blue}{\left(-1 \cdot \left(v \cdot \left(1 + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right)\right)}\right)\right) \]
      6. Step-by-step derivation
        1. associate-*r*N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\left(-1 \cdot v\right) \cdot \left(1 + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right)\right)\right) \]
        2. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\left(1 + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right) \cdot \left(-1 \cdot v\right)\right)\right)\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\left(1 + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        4. +-lowering-+.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        5. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{H}{{v}^{2}} \cdot \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{H}{{v}^{2}}\right), \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        7. /-lowering-/.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \left({v}^{2}\right)\right), \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        8. unpow2N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \left(v \cdot v\right)\right), \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        10. mul-1-negN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{-49}{5}\right)\right), \left(\mathsf{neg}\left(v\right)\right)\right)\right)\right) \]
        11. neg-sub0N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{-49}{5}\right)\right), \left(0 - v\right)\right)\right)\right) \]
        12. --lowering--.f6466.0%

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{-49}{5}\right)\right), \mathsf{\_.f64}\left(0, v\right)\right)\right)\right) \]
      7. Simplified66.0%

        \[\leadsto \tan^{-1} \left(\frac{v}{\color{blue}{\left(1 + \frac{H}{v \cdot v} \cdot -9.8\right) \cdot \left(0 - v\right)}}\right) \]
      8. Step-by-step derivation
        1. associate-/r*N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{\frac{H}{v}}{v} \cdot \frac{-49}{5}\right)\right), \mathsf{\_.f64}\left(0, v\right)\right)\right)\right) \]
        2. associate-*l/N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{\frac{H}{v} \cdot \frac{-49}{5}}{v}\right)\right), \mathsf{\_.f64}\left(0, v\right)\right)\right)\right) \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{H}{v} \cdot \frac{-49}{5}\right), v\right)\right), \mathsf{\_.f64}\left(0, v\right)\right)\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{H}{v}\right), \frac{-49}{5}\right), v\right)\right), \mathsf{\_.f64}\left(0, v\right)\right)\right)\right) \]
        5. /-lowering-/.f6466.0%

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(H, v\right), \frac{-49}{5}\right), v\right)\right), \mathsf{\_.f64}\left(0, v\right)\right)\right)\right) \]
      9. Applied egg-rr66.0%

        \[\leadsto \tan^{-1} \left(\frac{v}{\left(1 + \color{blue}{\frac{\frac{H}{v} \cdot -9.8}{v}}\right) \cdot \left(0 - v\right)}\right) \]

      if 7.5000000000000004e-187 < v

      1. Initial program 61.8%

        \[\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot 9.8\right) \cdot H}}\right) \]
      2. Step-by-step derivation
        1. atan-lowering-atan.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}}\right)\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}\right)\right)\right) \]
        3. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right) \]
        4. sub-negN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v + \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        5. +-lowering-+.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(v \cdot v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        7. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(H \cdot \left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        8. distribute-rgt-neg-inN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(H \cdot \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        10. metadata-evalN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(\frac{98}{5}\right)\right)\right)\right)\right)\right)\right) \]
        11. metadata-eval61.8%

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \frac{-98}{5}\right)\right)\right)\right)\right) \]
      3. Simplified61.8%

        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v + H \cdot -19.6}}\right)} \]
      4. Add Preprocessing
      5. Taylor expanded in H around 0

        \[\leadsto \mathsf{atan.f64}\left(\color{blue}{\left(1 + H \cdot \left(\frac{7203}{50} \cdot \frac{H}{{v}^{4}} + \frac{49}{5} \cdot \frac{1}{{v}^{2}}\right)\right)}\right) \]
      6. Step-by-step derivation
        1. +-lowering-+.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \left(H \cdot \left(\frac{7203}{50} \cdot \frac{H}{{v}^{4}} + \frac{49}{5} \cdot \frac{1}{{v}^{2}}\right)\right)\right)\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \left(\frac{7203}{50} \cdot \frac{H}{{v}^{4}} + \frac{49}{5} \cdot \frac{1}{{v}^{2}}\right)\right)\right)\right) \]
        3. +-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \left(\frac{49}{5} \cdot \frac{1}{{v}^{2}} + \frac{7203}{50} \cdot \frac{H}{{v}^{4}}\right)\right)\right)\right) \]
        4. associate-*r/N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \left(\frac{49}{5} \cdot \frac{1}{{v}^{2}} + \frac{\frac{7203}{50} \cdot H}{{v}^{4}}\right)\right)\right)\right) \]
        5. associate-*l/N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \left(\frac{49}{5} \cdot \frac{1}{{v}^{2}} + \frac{\frac{7203}{50}}{{v}^{4}} \cdot H\right)\right)\right)\right) \]
        6. metadata-evalN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \left(\frac{49}{5} \cdot \frac{1}{{v}^{2}} + \frac{\frac{7203}{50} \cdot 1}{{v}^{4}} \cdot H\right)\right)\right)\right) \]
        7. associate-*r/N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \left(\frac{49}{5} \cdot \frac{1}{{v}^{2}} + \left(\frac{7203}{50} \cdot \frac{1}{{v}^{4}}\right) \cdot H\right)\right)\right)\right) \]
        8. +-lowering-+.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\left(\frac{49}{5} \cdot \frac{1}{{v}^{2}}\right), \left(\left(\frac{7203}{50} \cdot \frac{1}{{v}^{4}}\right) \cdot H\right)\right)\right)\right)\right) \]
        9. associate-*r/N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\left(\frac{\frac{49}{5} \cdot 1}{{v}^{2}}\right), \left(\left(\frac{7203}{50} \cdot \frac{1}{{v}^{4}}\right) \cdot H\right)\right)\right)\right)\right) \]
        10. metadata-evalN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\left(\frac{\frac{49}{5}}{{v}^{2}}\right), \left(\left(\frac{7203}{50} \cdot \frac{1}{{v}^{4}}\right) \cdot H\right)\right)\right)\right)\right) \]
        11. /-lowering-/.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \left({v}^{2}\right)\right), \left(\left(\frac{7203}{50} \cdot \frac{1}{{v}^{4}}\right) \cdot H\right)\right)\right)\right)\right) \]
        12. unpow2N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \left(v \cdot v\right)\right), \left(\left(\frac{7203}{50} \cdot \frac{1}{{v}^{4}}\right) \cdot H\right)\right)\right)\right)\right) \]
        13. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(v, v\right)\right), \left(\left(\frac{7203}{50} \cdot \frac{1}{{v}^{4}}\right) \cdot H\right)\right)\right)\right)\right) \]
        14. associate-*r/N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(v, v\right)\right), \left(\frac{\frac{7203}{50} \cdot 1}{{v}^{4}} \cdot H\right)\right)\right)\right)\right) \]
        15. metadata-evalN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(v, v\right)\right), \left(\frac{\frac{7203}{50}}{{v}^{4}} \cdot H\right)\right)\right)\right)\right) \]
        16. associate-*l/N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(v, v\right)\right), \left(\frac{\frac{7203}{50} \cdot H}{{v}^{4}}\right)\right)\right)\right)\right) \]
        17. /-lowering-/.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(v, v\right)\right), \mathsf{/.f64}\left(\left(\frac{7203}{50} \cdot H\right), \left({v}^{4}\right)\right)\right)\right)\right)\right) \]
        18. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(v, v\right)\right), \mathsf{/.f64}\left(\left(H \cdot \frac{7203}{50}\right), \left({v}^{4}\right)\right)\right)\right)\right)\right) \]
        19. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(v, v\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \frac{7203}{50}\right), \left({v}^{4}\right)\right)\right)\right)\right)\right) \]
        20. metadata-evalN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(v, v\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \frac{7203}{50}\right), \left({v}^{\left(2 \cdot 2\right)}\right)\right)\right)\right)\right)\right) \]
        21. pow-sqrN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(v, v\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \frac{7203}{50}\right), \left({v}^{2} \cdot {v}^{2}\right)\right)\right)\right)\right)\right) \]
        22. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(v, v\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \frac{7203}{50}\right), \mathsf{*.f64}\left(\left({v}^{2}\right), \left({v}^{2}\right)\right)\right)\right)\right)\right)\right) \]
        23. unpow2N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(v, v\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \frac{7203}{50}\right), \mathsf{*.f64}\left(\left(v \cdot v\right), \left({v}^{2}\right)\right)\right)\right)\right)\right)\right) \]
        24. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(v, v\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \frac{7203}{50}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(v, v\right), \left({v}^{2}\right)\right)\right)\right)\right)\right)\right) \]
        25. unpow2N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(v, v\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \frac{7203}{50}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(v \cdot v\right)\right)\right)\right)\right)\right)\right) \]
      7. Simplified75.9%

        \[\leadsto \tan^{-1} \color{blue}{\left(1 + H \cdot \left(\frac{9.8}{v \cdot v} + \frac{H \cdot 144.06}{\left(v \cdot v\right) \cdot \left(v \cdot v\right)}\right)\right)} \]
      8. Taylor expanded in v around inf

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \color{blue}{\left(\frac{\frac{49}{5} + \frac{7203}{50} \cdot \frac{H}{{v}^{2}}}{{v}^{2}}\right)}\right)\right)\right) \]
      9. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{/.f64}\left(\left(\frac{49}{5} + \frac{7203}{50} \cdot \frac{H}{{v}^{2}}\right), \left({v}^{2}\right)\right)\right)\right)\right) \]
        2. +-lowering-+.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{49}{5}, \left(\frac{7203}{50} \cdot \frac{H}{{v}^{2}}\right)\right), \left({v}^{2}\right)\right)\right)\right)\right) \]
        3. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{49}{5}, \left(\frac{H}{{v}^{2}} \cdot \frac{7203}{50}\right)\right), \left({v}^{2}\right)\right)\right)\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(\left(\frac{H}{{v}^{2}}\right), \frac{7203}{50}\right)\right), \left({v}^{2}\right)\right)\right)\right)\right) \]
        5. /-lowering-/.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \left({v}^{2}\right)\right), \frac{7203}{50}\right)\right), \left({v}^{2}\right)\right)\right)\right)\right) \]
        6. unpow2N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \left(v \cdot v\right)\right), \frac{7203}{50}\right)\right), \left({v}^{2}\right)\right)\right)\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{7203}{50}\right)\right), \left({v}^{2}\right)\right)\right)\right)\right) \]
        8. unpow2N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{7203}{50}\right)\right), \left(v \cdot v\right)\right)\right)\right)\right) \]
        9. *-lowering-*.f6477.9%

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(H, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{7203}{50}\right)\right), \mathsf{*.f64}\left(v, v\right)\right)\right)\right)\right) \]
      10. Simplified77.9%

        \[\leadsto \tan^{-1} \left(1 + H \cdot \color{blue}{\frac{9.8 + \frac{H}{v \cdot v} \cdot 144.06}{v \cdot v}}\right) \]
    3. Recombined 2 regimes into one program.
    4. Final simplification71.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;v \leq 7.5 \cdot 10^{-187}:\\ \;\;\;\;\tan^{-1} \left(\frac{v}{v \cdot \left(-1 - \frac{-9.8 \cdot \frac{H}{v}}{v}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(1 + H \cdot \frac{9.8 + \frac{H}{v \cdot v} \cdot 144.06}{v \cdot v}\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 5: 73.3% accurate, 1.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;v \leq -9.5 \cdot 10^{-277}:\\ \;\;\;\;0 - \tan^{-1} \left(\frac{\frac{v}{1 + \frac{-9.8}{\frac{v \cdot v}{H}}}}{v}\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(\frac{v}{v + \frac{-9.8 \cdot H}{v}}\right)\\ \end{array} \end{array} \]
    (FPCore (v H)
     :precision binary64
     (if (<= v -9.5e-277)
       (- 0.0 (atan (/ (/ v (+ 1.0 (/ -9.8 (/ (* v v) H)))) v)))
       (atan (/ v (+ v (/ (* -9.8 H) v))))))
    double code(double v, double H) {
    	double tmp;
    	if (v <= -9.5e-277) {
    		tmp = 0.0 - atan(((v / (1.0 + (-9.8 / ((v * v) / H)))) / v));
    	} else {
    		tmp = atan((v / (v + ((-9.8 * H) / v))));
    	}
    	return tmp;
    }
    
    real(8) function code(v, h)
        real(8), intent (in) :: v
        real(8), intent (in) :: h
        real(8) :: tmp
        if (v <= (-9.5d-277)) then
            tmp = 0.0d0 - atan(((v / (1.0d0 + ((-9.8d0) / ((v * v) / h)))) / v))
        else
            tmp = atan((v / (v + (((-9.8d0) * h) / v))))
        end if
        code = tmp
    end function
    
    public static double code(double v, double H) {
    	double tmp;
    	if (v <= -9.5e-277) {
    		tmp = 0.0 - Math.atan(((v / (1.0 + (-9.8 / ((v * v) / H)))) / v));
    	} else {
    		tmp = Math.atan((v / (v + ((-9.8 * H) / v))));
    	}
    	return tmp;
    }
    
    def code(v, H):
    	tmp = 0
    	if v <= -9.5e-277:
    		tmp = 0.0 - math.atan(((v / (1.0 + (-9.8 / ((v * v) / H)))) / v))
    	else:
    		tmp = math.atan((v / (v + ((-9.8 * H) / v))))
    	return tmp
    
    function code(v, H)
    	tmp = 0.0
    	if (v <= -9.5e-277)
    		tmp = Float64(0.0 - atan(Float64(Float64(v / Float64(1.0 + Float64(-9.8 / Float64(Float64(v * v) / H)))) / v)));
    	else
    		tmp = atan(Float64(v / Float64(v + Float64(Float64(-9.8 * H) / v))));
    	end
    	return tmp
    end
    
    function tmp_2 = code(v, H)
    	tmp = 0.0;
    	if (v <= -9.5e-277)
    		tmp = 0.0 - atan(((v / (1.0 + (-9.8 / ((v * v) / H)))) / v));
    	else
    		tmp = atan((v / (v + ((-9.8 * H) / v))));
    	end
    	tmp_2 = tmp;
    end
    
    code[v_, H_] := If[LessEqual[v, -9.5e-277], N[(0.0 - N[ArcTan[N[(N[(v / N[(1.0 + N[(-9.8 / N[(N[(v * v), $MachinePrecision] / H), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / v), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[ArcTan[N[(v / N[(v + N[(N[(-9.8 * H), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;v \leq -9.5 \cdot 10^{-277}:\\
    \;\;\;\;0 - \tan^{-1} \left(\frac{\frac{v}{1 + \frac{-9.8}{\frac{v \cdot v}{H}}}}{v}\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\tan^{-1} \left(\frac{v}{v + \frac{-9.8 \cdot H}{v}}\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if v < -9.5e-277

      1. Initial program 65.8%

        \[\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot 9.8\right) \cdot H}}\right) \]
      2. Step-by-step derivation
        1. atan-lowering-atan.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}}\right)\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}\right)\right)\right) \]
        3. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right) \]
        4. sub-negN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v + \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        5. +-lowering-+.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(v \cdot v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        7. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(H \cdot \left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        8. distribute-rgt-neg-inN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(H \cdot \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        10. metadata-evalN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(\frac{98}{5}\right)\right)\right)\right)\right)\right)\right) \]
        11. metadata-eval65.8%

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \frac{-98}{5}\right)\right)\right)\right)\right) \]
      3. Simplified65.8%

        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v + H \cdot -19.6}}\right)} \]
      4. Add Preprocessing
      5. Taylor expanded in v around -inf

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \color{blue}{\left(-1 \cdot \left(v \cdot \left(1 + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right)\right)}\right)\right) \]
      6. Step-by-step derivation
        1. associate-*r*N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\left(-1 \cdot v\right) \cdot \left(1 + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right)\right)\right) \]
        2. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\left(1 + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right) \cdot \left(-1 \cdot v\right)\right)\right)\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\left(1 + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        4. +-lowering-+.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        5. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{H}{{v}^{2}} \cdot \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{H}{{v}^{2}}\right), \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        7. /-lowering-/.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \left({v}^{2}\right)\right), \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        8. unpow2N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \left(v \cdot v\right)\right), \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        10. mul-1-negN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{-49}{5}\right)\right), \left(\mathsf{neg}\left(v\right)\right)\right)\right)\right) \]
        11. neg-sub0N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{-49}{5}\right)\right), \left(0 - v\right)\right)\right)\right) \]
        12. --lowering--.f6472.7%

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{-49}{5}\right)\right), \mathsf{\_.f64}\left(0, v\right)\right)\right)\right) \]
      7. Simplified72.7%

        \[\leadsto \tan^{-1} \left(\frac{v}{\color{blue}{\left(1 + \frac{H}{v \cdot v} \cdot -9.8\right) \cdot \left(0 - v\right)}}\right) \]
      8. Step-by-step derivation
        1. sub0-negN/A

          \[\leadsto \tan^{-1} \left(\frac{v}{\left(1 + \frac{H}{v \cdot v} \cdot \frac{-49}{5}\right) \cdot \left(\mathsf{neg}\left(v\right)\right)}\right) \]
        2. associate-/r*N/A

          \[\leadsto \tan^{-1} \left(\frac{\frac{v}{1 + \frac{H}{v \cdot v} \cdot \frac{-49}{5}}}{\mathsf{neg}\left(v\right)}\right) \]
        3. distribute-frac-neg2N/A

          \[\leadsto \tan^{-1} \left(\mathsf{neg}\left(\frac{\frac{v}{1 + \frac{H}{v \cdot v} \cdot \frac{-49}{5}}}{v}\right)\right) \]
        4. atan-negN/A

          \[\leadsto \mathsf{neg}\left(\tan^{-1} \left(\frac{\frac{v}{1 + \frac{H}{v \cdot v} \cdot \frac{-49}{5}}}{v}\right)\right) \]
        5. neg-lowering-neg.f64N/A

          \[\leadsto \mathsf{neg.f64}\left(\tan^{-1} \left(\frac{\frac{v}{1 + \frac{H}{v \cdot v} \cdot \frac{-49}{5}}}{v}\right)\right) \]
        6. atan-lowering-atan.f64N/A

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{v}{1 + \frac{H}{v \cdot v} \cdot \frac{-49}{5}}}{v}\right)\right)\right) \]
        7. /-lowering-/.f64N/A

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\frac{v}{1 + \frac{H}{v \cdot v} \cdot \frac{-49}{5}}\right), v\right)\right)\right) \]
        8. /-lowering-/.f64N/A

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \left(1 + \frac{H}{v \cdot v} \cdot \frac{-49}{5}\right)\right), v\right)\right)\right) \]
        9. +-lowering-+.f64N/A

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(1, \left(\frac{H}{v \cdot v} \cdot \frac{-49}{5}\right)\right)\right), v\right)\right)\right) \]
        10. *-commutativeN/A

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(1, \left(\frac{-49}{5} \cdot \frac{H}{v \cdot v}\right)\right)\right), v\right)\right)\right) \]
        11. clear-numN/A

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(1, \left(\frac{-49}{5} \cdot \frac{1}{\frac{v \cdot v}{H}}\right)\right)\right), v\right)\right)\right) \]
        12. un-div-invN/A

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(1, \left(\frac{\frac{-49}{5}}{\frac{v \cdot v}{H}}\right)\right)\right), v\right)\right)\right) \]
        13. /-lowering-/.f64N/A

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\frac{-49}{5}, \left(\frac{v \cdot v}{H}\right)\right)\right)\right), v\right)\right)\right) \]
        14. /-lowering-/.f64N/A

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\frac{-49}{5}, \mathsf{/.f64}\left(\left(v \cdot v\right), H\right)\right)\right)\right), v\right)\right)\right) \]
        15. *-lowering-*.f6472.7%

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\frac{-49}{5}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(v, v\right), H\right)\right)\right)\right), v\right)\right)\right) \]
      9. Applied egg-rr72.7%

        \[\leadsto \color{blue}{-\tan^{-1} \left(\frac{\frac{v}{1 + \frac{-9.8}{\frac{v \cdot v}{H}}}}{v}\right)} \]

      if -9.5e-277 < v

      1. Initial program 67.3%

        \[\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot 9.8\right) \cdot H}}\right) \]
      2. Step-by-step derivation
        1. atan-lowering-atan.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}}\right)\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}\right)\right)\right) \]
        3. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right) \]
        4. sub-negN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v + \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        5. +-lowering-+.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(v \cdot v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        7. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(H \cdot \left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        8. distribute-rgt-neg-inN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(H \cdot \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        10. metadata-evalN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(\frac{98}{5}\right)\right)\right)\right)\right)\right)\right) \]
        11. metadata-eval67.3%

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \frac{-98}{5}\right)\right)\right)\right)\right) \]
      3. Simplified67.3%

        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v + H \cdot -19.6}}\right)} \]
      4. Add Preprocessing
      5. Taylor expanded in H around 0

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \color{blue}{\left(v + \frac{-49}{5} \cdot \frac{H}{v}\right)}\right)\right) \]
      6. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(v + \frac{H}{v} \cdot \frac{-49}{5}\right)\right)\right) \]
        2. associate-*l/N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(v + \frac{H \cdot \frac{-49}{5}}{v}\right)\right)\right) \]
        3. associate-*r/N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(v + H \cdot \frac{\frac{-49}{5}}{v}\right)\right)\right) \]
        4. metadata-evalN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(v + H \cdot \frac{\mathsf{neg}\left(\frac{49}{5}\right)}{v}\right)\right)\right) \]
        5. distribute-neg-fracN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(v + H \cdot \left(\mathsf{neg}\left(\frac{\frac{49}{5}}{v}\right)\right)\right)\right)\right) \]
        6. metadata-evalN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(v + H \cdot \left(\mathsf{neg}\left(\frac{\frac{49}{5} \cdot 1}{v}\right)\right)\right)\right)\right) \]
        7. associate-*r/N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(v + H \cdot \left(\mathsf{neg}\left(\frac{49}{5} \cdot \frac{1}{v}\right)\right)\right)\right)\right) \]
        8. +-lowering-+.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \left(H \cdot \left(\mathsf{neg}\left(\frac{49}{5} \cdot \frac{1}{v}\right)\right)\right)\right)\right)\right) \]
        9. associate-*r/N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \left(H \cdot \left(\mathsf{neg}\left(\frac{\frac{49}{5} \cdot 1}{v}\right)\right)\right)\right)\right)\right) \]
        10. metadata-evalN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \left(H \cdot \left(\mathsf{neg}\left(\frac{\frac{49}{5}}{v}\right)\right)\right)\right)\right)\right) \]
        11. distribute-neg-fracN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \left(H \cdot \frac{\mathsf{neg}\left(\frac{49}{5}\right)}{v}\right)\right)\right)\right) \]
        12. metadata-evalN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \left(H \cdot \frac{\frac{-49}{5}}{v}\right)\right)\right)\right) \]
        13. associate-*r/N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \left(\frac{H \cdot \frac{-49}{5}}{v}\right)\right)\right)\right) \]
        14. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \left(\frac{\frac{-49}{5} \cdot H}{v}\right)\right)\right)\right) \]
        15. /-lowering-/.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \mathsf{/.f64}\left(\left(\frac{-49}{5} \cdot H\right), v\right)\right)\right)\right) \]
        16. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \mathsf{/.f64}\left(\left(H \cdot \frac{-49}{5}\right), v\right)\right)\right)\right) \]
        17. *-lowering-*.f6468.8%

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \frac{-49}{5}\right), v\right)\right)\right)\right) \]
      7. Simplified68.8%

        \[\leadsto \tan^{-1} \left(\frac{v}{\color{blue}{v + \frac{H \cdot -9.8}{v}}}\right) \]
    3. Recombined 2 regimes into one program.
    4. Final simplification70.8%

      \[\leadsto \begin{array}{l} \mathbf{if}\;v \leq -9.5 \cdot 10^{-277}:\\ \;\;\;\;0 - \tan^{-1} \left(\frac{\frac{v}{1 + \frac{-9.8}{\frac{v \cdot v}{H}}}}{v}\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(\frac{v}{v + \frac{-9.8 \cdot H}{v}}\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 6: 73.3% accurate, 1.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;v \leq -2 \cdot 10^{-280}:\\ \;\;\;\;\tan^{-1} \left(\frac{v}{v \cdot \left(-1 - \frac{-9.8 \cdot \frac{H}{v}}{v}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(\frac{v}{v + \frac{-9.8 \cdot H}{v}}\right)\\ \end{array} \end{array} \]
    (FPCore (v H)
     :precision binary64
     (if (<= v -2e-280)
       (atan (/ v (* v (- -1.0 (/ (* -9.8 (/ H v)) v)))))
       (atan (/ v (+ v (/ (* -9.8 H) v))))))
    double code(double v, double H) {
    	double tmp;
    	if (v <= -2e-280) {
    		tmp = atan((v / (v * (-1.0 - ((-9.8 * (H / v)) / v)))));
    	} else {
    		tmp = atan((v / (v + ((-9.8 * H) / v))));
    	}
    	return tmp;
    }
    
    real(8) function code(v, h)
        real(8), intent (in) :: v
        real(8), intent (in) :: h
        real(8) :: tmp
        if (v <= (-2d-280)) then
            tmp = atan((v / (v * ((-1.0d0) - (((-9.8d0) * (h / v)) / v)))))
        else
            tmp = atan((v / (v + (((-9.8d0) * h) / v))))
        end if
        code = tmp
    end function
    
    public static double code(double v, double H) {
    	double tmp;
    	if (v <= -2e-280) {
    		tmp = Math.atan((v / (v * (-1.0 - ((-9.8 * (H / v)) / v)))));
    	} else {
    		tmp = Math.atan((v / (v + ((-9.8 * H) / v))));
    	}
    	return tmp;
    }
    
    def code(v, H):
    	tmp = 0
    	if v <= -2e-280:
    		tmp = math.atan((v / (v * (-1.0 - ((-9.8 * (H / v)) / v)))))
    	else:
    		tmp = math.atan((v / (v + ((-9.8 * H) / v))))
    	return tmp
    
    function code(v, H)
    	tmp = 0.0
    	if (v <= -2e-280)
    		tmp = atan(Float64(v / Float64(v * Float64(-1.0 - Float64(Float64(-9.8 * Float64(H / v)) / v)))));
    	else
    		tmp = atan(Float64(v / Float64(v + Float64(Float64(-9.8 * H) / v))));
    	end
    	return tmp
    end
    
    function tmp_2 = code(v, H)
    	tmp = 0.0;
    	if (v <= -2e-280)
    		tmp = atan((v / (v * (-1.0 - ((-9.8 * (H / v)) / v)))));
    	else
    		tmp = atan((v / (v + ((-9.8 * H) / v))));
    	end
    	tmp_2 = tmp;
    end
    
    code[v_, H_] := If[LessEqual[v, -2e-280], N[ArcTan[N[(v / N[(v * N[(-1.0 - N[(N[(-9.8 * N[(H / v), $MachinePrecision]), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcTan[N[(v / N[(v + N[(N[(-9.8 * H), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;v \leq -2 \cdot 10^{-280}:\\
    \;\;\;\;\tan^{-1} \left(\frac{v}{v \cdot \left(-1 - \frac{-9.8 \cdot \frac{H}{v}}{v}\right)}\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\tan^{-1} \left(\frac{v}{v + \frac{-9.8 \cdot H}{v}}\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if v < -1.9999999999999999e-280

      1. Initial program 66.3%

        \[\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot 9.8\right) \cdot H}}\right) \]
      2. Step-by-step derivation
        1. atan-lowering-atan.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}}\right)\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}\right)\right)\right) \]
        3. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right) \]
        4. sub-negN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v + \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        5. +-lowering-+.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(v \cdot v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        7. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(H \cdot \left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        8. distribute-rgt-neg-inN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(H \cdot \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        10. metadata-evalN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(\frac{98}{5}\right)\right)\right)\right)\right)\right)\right) \]
        11. metadata-eval66.3%

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \frac{-98}{5}\right)\right)\right)\right)\right) \]
      3. Simplified66.3%

        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v + H \cdot -19.6}}\right)} \]
      4. Add Preprocessing
      5. Taylor expanded in v around -inf

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \color{blue}{\left(-1 \cdot \left(v \cdot \left(1 + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right)\right)}\right)\right) \]
      6. Step-by-step derivation
        1. associate-*r*N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\left(-1 \cdot v\right) \cdot \left(1 + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right)\right)\right) \]
        2. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\left(1 + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right) \cdot \left(-1 \cdot v\right)\right)\right)\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\left(1 + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        4. +-lowering-+.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        5. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{H}{{v}^{2}} \cdot \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{H}{{v}^{2}}\right), \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        7. /-lowering-/.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \left({v}^{2}\right)\right), \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        8. unpow2N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \left(v \cdot v\right)\right), \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        10. mul-1-negN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{-49}{5}\right)\right), \left(\mathsf{neg}\left(v\right)\right)\right)\right)\right) \]
        11. neg-sub0N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{-49}{5}\right)\right), \left(0 - v\right)\right)\right)\right) \]
        12. --lowering--.f6472.4%

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{-49}{5}\right)\right), \mathsf{\_.f64}\left(0, v\right)\right)\right)\right) \]
      7. Simplified72.4%

        \[\leadsto \tan^{-1} \left(\frac{v}{\color{blue}{\left(1 + \frac{H}{v \cdot v} \cdot -9.8\right) \cdot \left(0 - v\right)}}\right) \]
      8. Step-by-step derivation
        1. associate-/r*N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{\frac{H}{v}}{v} \cdot \frac{-49}{5}\right)\right), \mathsf{\_.f64}\left(0, v\right)\right)\right)\right) \]
        2. associate-*l/N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{\frac{H}{v} \cdot \frac{-49}{5}}{v}\right)\right), \mathsf{\_.f64}\left(0, v\right)\right)\right)\right) \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{H}{v} \cdot \frac{-49}{5}\right), v\right)\right), \mathsf{\_.f64}\left(0, v\right)\right)\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{H}{v}\right), \frac{-49}{5}\right), v\right)\right), \mathsf{\_.f64}\left(0, v\right)\right)\right)\right) \]
        5. /-lowering-/.f6472.5%

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(H, v\right), \frac{-49}{5}\right), v\right)\right), \mathsf{\_.f64}\left(0, v\right)\right)\right)\right) \]
      9. Applied egg-rr72.5%

        \[\leadsto \tan^{-1} \left(\frac{v}{\left(1 + \color{blue}{\frac{\frac{H}{v} \cdot -9.8}{v}}\right) \cdot \left(0 - v\right)}\right) \]

      if -1.9999999999999999e-280 < v

      1. Initial program 66.8%

        \[\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot 9.8\right) \cdot H}}\right) \]
      2. Step-by-step derivation
        1. atan-lowering-atan.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}}\right)\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}\right)\right)\right) \]
        3. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right) \]
        4. sub-negN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v + \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        5. +-lowering-+.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(v \cdot v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        7. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(H \cdot \left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        8. distribute-rgt-neg-inN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(H \cdot \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        10. metadata-evalN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(\frac{98}{5}\right)\right)\right)\right)\right)\right)\right) \]
        11. metadata-eval66.8%

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \frac{-98}{5}\right)\right)\right)\right)\right) \]
      3. Simplified66.8%

        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v + H \cdot -19.6}}\right)} \]
      4. Add Preprocessing
      5. Taylor expanded in H around 0

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \color{blue}{\left(v + \frac{-49}{5} \cdot \frac{H}{v}\right)}\right)\right) \]
      6. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(v + \frac{H}{v} \cdot \frac{-49}{5}\right)\right)\right) \]
        2. associate-*l/N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(v + \frac{H \cdot \frac{-49}{5}}{v}\right)\right)\right) \]
        3. associate-*r/N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(v + H \cdot \frac{\frac{-49}{5}}{v}\right)\right)\right) \]
        4. metadata-evalN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(v + H \cdot \frac{\mathsf{neg}\left(\frac{49}{5}\right)}{v}\right)\right)\right) \]
        5. distribute-neg-fracN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(v + H \cdot \left(\mathsf{neg}\left(\frac{\frac{49}{5}}{v}\right)\right)\right)\right)\right) \]
        6. metadata-evalN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(v + H \cdot \left(\mathsf{neg}\left(\frac{\frac{49}{5} \cdot 1}{v}\right)\right)\right)\right)\right) \]
        7. associate-*r/N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(v + H \cdot \left(\mathsf{neg}\left(\frac{49}{5} \cdot \frac{1}{v}\right)\right)\right)\right)\right) \]
        8. +-lowering-+.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \left(H \cdot \left(\mathsf{neg}\left(\frac{49}{5} \cdot \frac{1}{v}\right)\right)\right)\right)\right)\right) \]
        9. associate-*r/N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \left(H \cdot \left(\mathsf{neg}\left(\frac{\frac{49}{5} \cdot 1}{v}\right)\right)\right)\right)\right)\right) \]
        10. metadata-evalN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \left(H \cdot \left(\mathsf{neg}\left(\frac{\frac{49}{5}}{v}\right)\right)\right)\right)\right)\right) \]
        11. distribute-neg-fracN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \left(H \cdot \frac{\mathsf{neg}\left(\frac{49}{5}\right)}{v}\right)\right)\right)\right) \]
        12. metadata-evalN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \left(H \cdot \frac{\frac{-49}{5}}{v}\right)\right)\right)\right) \]
        13. associate-*r/N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \left(\frac{H \cdot \frac{-49}{5}}{v}\right)\right)\right)\right) \]
        14. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \left(\frac{\frac{-49}{5} \cdot H}{v}\right)\right)\right)\right) \]
        15. /-lowering-/.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \mathsf{/.f64}\left(\left(\frac{-49}{5} \cdot H\right), v\right)\right)\right)\right) \]
        16. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \mathsf{/.f64}\left(\left(H \cdot \frac{-49}{5}\right), v\right)\right)\right)\right) \]
        17. *-lowering-*.f6469.1%

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \frac{-49}{5}\right), v\right)\right)\right)\right) \]
      7. Simplified69.1%

        \[\leadsto \tan^{-1} \left(\frac{v}{\color{blue}{v + \frac{H \cdot -9.8}{v}}}\right) \]
    3. Recombined 2 regimes into one program.
    4. Final simplification70.8%

      \[\leadsto \begin{array}{l} \mathbf{if}\;v \leq -2 \cdot 10^{-280}:\\ \;\;\;\;\tan^{-1} \left(\frac{v}{v \cdot \left(-1 - \frac{-9.8 \cdot \frac{H}{v}}{v}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(\frac{v}{v + \frac{-9.8 \cdot H}{v}}\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 7: 73.3% accurate, 1.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;v \leq -2 \cdot 10^{-280}:\\ \;\;\;\;\tan^{-1} \left(\frac{v}{v \cdot \left(-1 - -9.8 \cdot \frac{H}{v \cdot v}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(\frac{v}{v + \frac{-9.8 \cdot H}{v}}\right)\\ \end{array} \end{array} \]
    (FPCore (v H)
     :precision binary64
     (if (<= v -2e-280)
       (atan (/ v (* v (- -1.0 (* -9.8 (/ H (* v v)))))))
       (atan (/ v (+ v (/ (* -9.8 H) v))))))
    double code(double v, double H) {
    	double tmp;
    	if (v <= -2e-280) {
    		tmp = atan((v / (v * (-1.0 - (-9.8 * (H / (v * v)))))));
    	} else {
    		tmp = atan((v / (v + ((-9.8 * H) / v))));
    	}
    	return tmp;
    }
    
    real(8) function code(v, h)
        real(8), intent (in) :: v
        real(8), intent (in) :: h
        real(8) :: tmp
        if (v <= (-2d-280)) then
            tmp = atan((v / (v * ((-1.0d0) - ((-9.8d0) * (h / (v * v)))))))
        else
            tmp = atan((v / (v + (((-9.8d0) * h) / v))))
        end if
        code = tmp
    end function
    
    public static double code(double v, double H) {
    	double tmp;
    	if (v <= -2e-280) {
    		tmp = Math.atan((v / (v * (-1.0 - (-9.8 * (H / (v * v)))))));
    	} else {
    		tmp = Math.atan((v / (v + ((-9.8 * H) / v))));
    	}
    	return tmp;
    }
    
    def code(v, H):
    	tmp = 0
    	if v <= -2e-280:
    		tmp = math.atan((v / (v * (-1.0 - (-9.8 * (H / (v * v)))))))
    	else:
    		tmp = math.atan((v / (v + ((-9.8 * H) / v))))
    	return tmp
    
    function code(v, H)
    	tmp = 0.0
    	if (v <= -2e-280)
    		tmp = atan(Float64(v / Float64(v * Float64(-1.0 - Float64(-9.8 * Float64(H / Float64(v * v)))))));
    	else
    		tmp = atan(Float64(v / Float64(v + Float64(Float64(-9.8 * H) / v))));
    	end
    	return tmp
    end
    
    function tmp_2 = code(v, H)
    	tmp = 0.0;
    	if (v <= -2e-280)
    		tmp = atan((v / (v * (-1.0 - (-9.8 * (H / (v * v)))))));
    	else
    		tmp = atan((v / (v + ((-9.8 * H) / v))));
    	end
    	tmp_2 = tmp;
    end
    
    code[v_, H_] := If[LessEqual[v, -2e-280], N[ArcTan[N[(v / N[(v * N[(-1.0 - N[(-9.8 * N[(H / N[(v * v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcTan[N[(v / N[(v + N[(N[(-9.8 * H), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;v \leq -2 \cdot 10^{-280}:\\
    \;\;\;\;\tan^{-1} \left(\frac{v}{v \cdot \left(-1 - -9.8 \cdot \frac{H}{v \cdot v}\right)}\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\tan^{-1} \left(\frac{v}{v + \frac{-9.8 \cdot H}{v}}\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if v < -1.9999999999999999e-280

      1. Initial program 66.3%

        \[\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot 9.8\right) \cdot H}}\right) \]
      2. Step-by-step derivation
        1. atan-lowering-atan.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}}\right)\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}\right)\right)\right) \]
        3. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right) \]
        4. sub-negN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v + \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        5. +-lowering-+.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(v \cdot v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        7. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(H \cdot \left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        8. distribute-rgt-neg-inN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(H \cdot \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        10. metadata-evalN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(\frac{98}{5}\right)\right)\right)\right)\right)\right)\right) \]
        11. metadata-eval66.3%

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \frac{-98}{5}\right)\right)\right)\right)\right) \]
      3. Simplified66.3%

        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v + H \cdot -19.6}}\right)} \]
      4. Add Preprocessing
      5. Taylor expanded in v around -inf

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \color{blue}{\left(-1 \cdot \left(v \cdot \left(1 + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right)\right)}\right)\right) \]
      6. Step-by-step derivation
        1. associate-*r*N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\left(-1 \cdot v\right) \cdot \left(1 + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right)\right)\right) \]
        2. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\left(1 + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right) \cdot \left(-1 \cdot v\right)\right)\right)\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\left(1 + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        4. +-lowering-+.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        5. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{H}{{v}^{2}} \cdot \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{H}{{v}^{2}}\right), \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        7. /-lowering-/.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \left({v}^{2}\right)\right), \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        8. unpow2N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \left(v \cdot v\right)\right), \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        10. mul-1-negN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{-49}{5}\right)\right), \left(\mathsf{neg}\left(v\right)\right)\right)\right)\right) \]
        11. neg-sub0N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{-49}{5}\right)\right), \left(0 - v\right)\right)\right)\right) \]
        12. --lowering--.f6472.4%

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{-49}{5}\right)\right), \mathsf{\_.f64}\left(0, v\right)\right)\right)\right) \]
      7. Simplified72.4%

        \[\leadsto \tan^{-1} \left(\frac{v}{\color{blue}{\left(1 + \frac{H}{v \cdot v} \cdot -9.8\right) \cdot \left(0 - v\right)}}\right) \]

      if -1.9999999999999999e-280 < v

      1. Initial program 66.8%

        \[\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot 9.8\right) \cdot H}}\right) \]
      2. Step-by-step derivation
        1. atan-lowering-atan.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}}\right)\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}\right)\right)\right) \]
        3. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right) \]
        4. sub-negN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v + \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        5. +-lowering-+.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(v \cdot v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        7. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(H \cdot \left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        8. distribute-rgt-neg-inN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(H \cdot \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        10. metadata-evalN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(\frac{98}{5}\right)\right)\right)\right)\right)\right)\right) \]
        11. metadata-eval66.8%

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \frac{-98}{5}\right)\right)\right)\right)\right) \]
      3. Simplified66.8%

        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v + H \cdot -19.6}}\right)} \]
      4. Add Preprocessing
      5. Taylor expanded in H around 0

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \color{blue}{\left(v + \frac{-49}{5} \cdot \frac{H}{v}\right)}\right)\right) \]
      6. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(v + \frac{H}{v} \cdot \frac{-49}{5}\right)\right)\right) \]
        2. associate-*l/N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(v + \frac{H \cdot \frac{-49}{5}}{v}\right)\right)\right) \]
        3. associate-*r/N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(v + H \cdot \frac{\frac{-49}{5}}{v}\right)\right)\right) \]
        4. metadata-evalN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(v + H \cdot \frac{\mathsf{neg}\left(\frac{49}{5}\right)}{v}\right)\right)\right) \]
        5. distribute-neg-fracN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(v + H \cdot \left(\mathsf{neg}\left(\frac{\frac{49}{5}}{v}\right)\right)\right)\right)\right) \]
        6. metadata-evalN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(v + H \cdot \left(\mathsf{neg}\left(\frac{\frac{49}{5} \cdot 1}{v}\right)\right)\right)\right)\right) \]
        7. associate-*r/N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(v + H \cdot \left(\mathsf{neg}\left(\frac{49}{5} \cdot \frac{1}{v}\right)\right)\right)\right)\right) \]
        8. +-lowering-+.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \left(H \cdot \left(\mathsf{neg}\left(\frac{49}{5} \cdot \frac{1}{v}\right)\right)\right)\right)\right)\right) \]
        9. associate-*r/N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \left(H \cdot \left(\mathsf{neg}\left(\frac{\frac{49}{5} \cdot 1}{v}\right)\right)\right)\right)\right)\right) \]
        10. metadata-evalN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \left(H \cdot \left(\mathsf{neg}\left(\frac{\frac{49}{5}}{v}\right)\right)\right)\right)\right)\right) \]
        11. distribute-neg-fracN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \left(H \cdot \frac{\mathsf{neg}\left(\frac{49}{5}\right)}{v}\right)\right)\right)\right) \]
        12. metadata-evalN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \left(H \cdot \frac{\frac{-49}{5}}{v}\right)\right)\right)\right) \]
        13. associate-*r/N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \left(\frac{H \cdot \frac{-49}{5}}{v}\right)\right)\right)\right) \]
        14. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \left(\frac{\frac{-49}{5} \cdot H}{v}\right)\right)\right)\right) \]
        15. /-lowering-/.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \mathsf{/.f64}\left(\left(\frac{-49}{5} \cdot H\right), v\right)\right)\right)\right) \]
        16. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \mathsf{/.f64}\left(\left(H \cdot \frac{-49}{5}\right), v\right)\right)\right)\right) \]
        17. *-lowering-*.f6469.1%

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \frac{-49}{5}\right), v\right)\right)\right)\right) \]
      7. Simplified69.1%

        \[\leadsto \tan^{-1} \left(\frac{v}{\color{blue}{v + \frac{H \cdot -9.8}{v}}}\right) \]
    3. Recombined 2 regimes into one program.
    4. Final simplification70.8%

      \[\leadsto \begin{array}{l} \mathbf{if}\;v \leq -2 \cdot 10^{-280}:\\ \;\;\;\;\tan^{-1} \left(\frac{v}{v \cdot \left(-1 - -9.8 \cdot \frac{H}{v \cdot v}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(\frac{v}{v + \frac{-9.8 \cdot H}{v}}\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 8: 72.4% accurate, 1.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;v \leq -5.2 \cdot 10^{-94}:\\ \;\;\;\;\tan^{-1} -1\\ \mathbf{elif}\;v \leq 4 \cdot 10^{-187}:\\ \;\;\;\;\tan^{-1} \left(v \cdot \left(\frac{v}{H} \cdot 0.10204081632653061\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} 1\\ \end{array} \end{array} \]
    (FPCore (v H)
     :precision binary64
     (if (<= v -5.2e-94)
       (atan -1.0)
       (if (<= v 4e-187) (atan (* v (* (/ v H) 0.10204081632653061))) (atan 1.0))))
    double code(double v, double H) {
    	double tmp;
    	if (v <= -5.2e-94) {
    		tmp = atan(-1.0);
    	} else if (v <= 4e-187) {
    		tmp = atan((v * ((v / H) * 0.10204081632653061)));
    	} else {
    		tmp = atan(1.0);
    	}
    	return tmp;
    }
    
    real(8) function code(v, h)
        real(8), intent (in) :: v
        real(8), intent (in) :: h
        real(8) :: tmp
        if (v <= (-5.2d-94)) then
            tmp = atan((-1.0d0))
        else if (v <= 4d-187) then
            tmp = atan((v * ((v / h) * 0.10204081632653061d0)))
        else
            tmp = atan(1.0d0)
        end if
        code = tmp
    end function
    
    public static double code(double v, double H) {
    	double tmp;
    	if (v <= -5.2e-94) {
    		tmp = Math.atan(-1.0);
    	} else if (v <= 4e-187) {
    		tmp = Math.atan((v * ((v / H) * 0.10204081632653061)));
    	} else {
    		tmp = Math.atan(1.0);
    	}
    	return tmp;
    }
    
    def code(v, H):
    	tmp = 0
    	if v <= -5.2e-94:
    		tmp = math.atan(-1.0)
    	elif v <= 4e-187:
    		tmp = math.atan((v * ((v / H) * 0.10204081632653061)))
    	else:
    		tmp = math.atan(1.0)
    	return tmp
    
    function code(v, H)
    	tmp = 0.0
    	if (v <= -5.2e-94)
    		tmp = atan(-1.0);
    	elseif (v <= 4e-187)
    		tmp = atan(Float64(v * Float64(Float64(v / H) * 0.10204081632653061)));
    	else
    		tmp = atan(1.0);
    	end
    	return tmp
    end
    
    function tmp_2 = code(v, H)
    	tmp = 0.0;
    	if (v <= -5.2e-94)
    		tmp = atan(-1.0);
    	elseif (v <= 4e-187)
    		tmp = atan((v * ((v / H) * 0.10204081632653061)));
    	else
    		tmp = atan(1.0);
    	end
    	tmp_2 = tmp;
    end
    
    code[v_, H_] := If[LessEqual[v, -5.2e-94], N[ArcTan[-1.0], $MachinePrecision], If[LessEqual[v, 4e-187], N[ArcTan[N[(v * N[(N[(v / H), $MachinePrecision] * 0.10204081632653061), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcTan[1.0], $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;v \leq -5.2 \cdot 10^{-94}:\\
    \;\;\;\;\tan^{-1} -1\\
    
    \mathbf{elif}\;v \leq 4 \cdot 10^{-187}:\\
    \;\;\;\;\tan^{-1} \left(v \cdot \left(\frac{v}{H} \cdot 0.10204081632653061\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\tan^{-1} 1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if v < -5.19999999999999988e-94

      1. Initial program 57.9%

        \[\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot 9.8\right) \cdot H}}\right) \]
      2. Step-by-step derivation
        1. atan-lowering-atan.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}}\right)\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}\right)\right)\right) \]
        3. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right) \]
        4. sub-negN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v + \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        5. +-lowering-+.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(v \cdot v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
        7. *-commutativeN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(H \cdot \left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        8. distribute-rgt-neg-inN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(H \cdot \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
        10. metadata-evalN/A

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(\frac{98}{5}\right)\right)\right)\right)\right)\right)\right) \]
        11. metadata-eval57.9%

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \frac{-98}{5}\right)\right)\right)\right)\right) \]
      3. Simplified57.9%

        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v + H \cdot -19.6}}\right)} \]
      4. Add Preprocessing
      5. Taylor expanded in v around -inf

        \[\leadsto \mathsf{atan.f64}\left(\color{blue}{-1}\right) \]
      6. Step-by-step derivation
        1. Simplified84.3%

          \[\leadsto \tan^{-1} \color{blue}{-1} \]

        if -5.19999999999999988e-94 < v < 4.0000000000000001e-187

        1. Initial program 99.5%

          \[\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot 9.8\right) \cdot H}}\right) \]
        2. Step-by-step derivation
          1. atan-lowering-atan.f64N/A

            \[\leadsto \mathsf{atan.f64}\left(\left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}}\right)\right) \]
          2. /-lowering-/.f64N/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}\right)\right)\right) \]
          3. sqrt-lowering-sqrt.f64N/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right) \]
          4. sub-negN/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v + \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
          5. +-lowering-+.f64N/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(v \cdot v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
          7. *-commutativeN/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(H \cdot \left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
          8. distribute-rgt-neg-inN/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(H \cdot \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
          10. metadata-evalN/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(\frac{98}{5}\right)\right)\right)\right)\right)\right)\right) \]
          11. metadata-eval99.5%

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \frac{-98}{5}\right)\right)\right)\right)\right) \]
        3. Simplified99.5%

          \[\leadsto \color{blue}{\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v + H \cdot -19.6}}\right)} \]
        4. Add Preprocessing
        5. Taylor expanded in v around -inf

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \color{blue}{\left(-1 \cdot \left(v \cdot \left(1 + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right)\right)}\right)\right) \]
        6. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\left(-1 \cdot v\right) \cdot \left(1 + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right)\right)\right) \]
          2. *-commutativeN/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\left(1 + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right) \cdot \left(-1 \cdot v\right)\right)\right)\right) \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\left(1 + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right), \left(-1 \cdot v\right)\right)\right)\right) \]
          4. +-lowering-+.f64N/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
          5. *-commutativeN/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{H}{{v}^{2}} \cdot \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{H}{{v}^{2}}\right), \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
          7. /-lowering-/.f64N/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \left({v}^{2}\right)\right), \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
          8. unpow2N/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \left(v \cdot v\right)\right), \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{-49}{5}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
          10. mul-1-negN/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{-49}{5}\right)\right), \left(\mathsf{neg}\left(v\right)\right)\right)\right)\right) \]
          11. neg-sub0N/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{-49}{5}\right)\right), \left(0 - v\right)\right)\right)\right) \]
          12. --lowering--.f6420.8%

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right), \frac{-49}{5}\right)\right), \mathsf{\_.f64}\left(0, v\right)\right)\right)\right) \]
        7. Simplified20.8%

          \[\leadsto \tan^{-1} \left(\frac{v}{\color{blue}{\left(1 + \frac{H}{v \cdot v} \cdot -9.8\right) \cdot \left(0 - v\right)}}\right) \]
        8. Taylor expanded in H around inf

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\color{blue}{\left(\frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)}, \mathsf{\_.f64}\left(0, v\right)\right)\right)\right) \]
        9. Step-by-step derivation
          1. associate-*r/N/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\left(\frac{\frac{-49}{5} \cdot H}{{v}^{2}}\right), \mathsf{\_.f64}\left(0, v\right)\right)\right)\right) \]
          2. /-lowering-/.f64N/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{-49}{5} \cdot H\right), \left({v}^{2}\right)\right), \mathsf{\_.f64}\left(0, v\right)\right)\right)\right) \]
          3. *-commutativeN/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(H \cdot \frac{-49}{5}\right), \left({v}^{2}\right)\right), \mathsf{\_.f64}\left(0, v\right)\right)\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \frac{-49}{5}\right), \left({v}^{2}\right)\right), \mathsf{\_.f64}\left(0, v\right)\right)\right)\right) \]
          5. unpow2N/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \frac{-49}{5}\right), \left(v \cdot v\right)\right), \mathsf{\_.f64}\left(0, v\right)\right)\right)\right) \]
          6. *-lowering-*.f6420.8%

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \frac{-49}{5}\right), \mathsf{*.f64}\left(v, v\right)\right), \mathsf{\_.f64}\left(0, v\right)\right)\right)\right) \]
        10. Simplified20.8%

          \[\leadsto \tan^{-1} \left(\frac{v}{\color{blue}{\frac{H \cdot -9.8}{v \cdot v}} \cdot \left(0 - v\right)}\right) \]
        11. Taylor expanded in v around 0

          \[\leadsto \color{blue}{\tan^{-1} \left(\frac{5}{49} \cdot \frac{{v}^{2}}{H}\right)} \]
        12. Step-by-step derivation
          1. associate-*r/N/A

            \[\leadsto \tan^{-1} \left(\frac{\frac{5}{49} \cdot {v}^{2}}{H}\right) \]
          2. *-commutativeN/A

            \[\leadsto \tan^{-1} \left(\frac{{v}^{2} \cdot \frac{5}{49}}{H}\right) \]
          3. associate-*r/N/A

            \[\leadsto \tan^{-1} \left({v}^{2} \cdot \frac{\frac{5}{49}}{H}\right) \]
          4. metadata-evalN/A

            \[\leadsto \tan^{-1} \left({v}^{2} \cdot \frac{\frac{5}{49} \cdot 1}{H}\right) \]
          5. associate-*r/N/A

            \[\leadsto \tan^{-1} \left({v}^{2} \cdot \left(\frac{5}{49} \cdot \frac{1}{H}\right)\right) \]
          6. atan-lowering-atan.f64N/A

            \[\leadsto \mathsf{atan.f64}\left(\left({v}^{2} \cdot \left(\frac{5}{49} \cdot \frac{1}{H}\right)\right)\right) \]
          7. associate-*r/N/A

            \[\leadsto \mathsf{atan.f64}\left(\left({v}^{2} \cdot \frac{\frac{5}{49} \cdot 1}{H}\right)\right) \]
          8. metadata-evalN/A

            \[\leadsto \mathsf{atan.f64}\left(\left({v}^{2} \cdot \frac{\frac{5}{49}}{H}\right)\right) \]
          9. associate-*r/N/A

            \[\leadsto \mathsf{atan.f64}\left(\left(\frac{{v}^{2} \cdot \frac{5}{49}}{H}\right)\right) \]
          10. associate-*l/N/A

            \[\leadsto \mathsf{atan.f64}\left(\left(\frac{{v}^{2}}{H} \cdot \frac{5}{49}\right)\right) \]
          11. *-lowering-*.f64N/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\left(\frac{{v}^{2}}{H}\right), \frac{5}{49}\right)\right) \]
          12. /-lowering-/.f64N/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left({v}^{2}\right), H\right), \frac{5}{49}\right)\right) \]
          13. unpow2N/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(v \cdot v\right), H\right), \frac{5}{49}\right)\right) \]
          14. *-lowering-*.f6420.8%

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(v, v\right), H\right), \frac{5}{49}\right)\right) \]
        13. Simplified20.8%

          \[\leadsto \color{blue}{\tan^{-1} \left(\frac{v \cdot v}{H} \cdot 0.10204081632653061\right)} \]
        14. Step-by-step derivation
          1. associate-/l*N/A

            \[\leadsto \mathsf{atan.f64}\left(\left(\left(v \cdot \frac{v}{H}\right) \cdot \frac{5}{49}\right)\right) \]
          2. associate-*l*N/A

            \[\leadsto \mathsf{atan.f64}\left(\left(v \cdot \left(\frac{v}{H} \cdot \frac{5}{49}\right)\right)\right) \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{*.f64}\left(v, \left(\frac{v}{H} \cdot \frac{5}{49}\right)\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{*.f64}\left(v, \mathsf{*.f64}\left(\left(\frac{v}{H}\right), \frac{5}{49}\right)\right)\right) \]
          5. /-lowering-/.f6420.9%

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{*.f64}\left(v, \mathsf{*.f64}\left(\mathsf{/.f64}\left(v, H\right), \frac{5}{49}\right)\right)\right) \]
        15. Applied egg-rr20.9%

          \[\leadsto \tan^{-1} \color{blue}{\left(v \cdot \left(\frac{v}{H} \cdot 0.10204081632653061\right)\right)} \]

        if 4.0000000000000001e-187 < v

        1. Initial program 61.8%

          \[\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot 9.8\right) \cdot H}}\right) \]
        2. Step-by-step derivation
          1. atan-lowering-atan.f64N/A

            \[\leadsto \mathsf{atan.f64}\left(\left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}}\right)\right) \]
          2. /-lowering-/.f64N/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}\right)\right)\right) \]
          3. sqrt-lowering-sqrt.f64N/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right) \]
          4. sub-negN/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v + \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
          5. +-lowering-+.f64N/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(v \cdot v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
          7. *-commutativeN/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(H \cdot \left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
          8. distribute-rgt-neg-inN/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(H \cdot \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
          10. metadata-evalN/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(\frac{98}{5}\right)\right)\right)\right)\right)\right)\right) \]
          11. metadata-eval61.8%

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \frac{-98}{5}\right)\right)\right)\right)\right) \]
        3. Simplified61.8%

          \[\leadsto \color{blue}{\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v + H \cdot -19.6}}\right)} \]
        4. Add Preprocessing
        5. Taylor expanded in v around inf

          \[\leadsto \mathsf{atan.f64}\left(\color{blue}{1}\right) \]
        6. Step-by-step derivation
          1. Simplified76.3%

            \[\leadsto \tan^{-1} \color{blue}{1} \]
        7. Recombined 3 regimes into one program.
        8. Add Preprocessing

        Alternative 9: 72.7% accurate, 1.9× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;v \leq -1.02 \cdot 10^{-103}:\\ \;\;\;\;\tan^{-1} -1\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(\frac{v}{v + \frac{-9.8 \cdot H}{v}}\right)\\ \end{array} \end{array} \]
        (FPCore (v H)
         :precision binary64
         (if (<= v -1.02e-103) (atan -1.0) (atan (/ v (+ v (/ (* -9.8 H) v))))))
        double code(double v, double H) {
        	double tmp;
        	if (v <= -1.02e-103) {
        		tmp = atan(-1.0);
        	} else {
        		tmp = atan((v / (v + ((-9.8 * H) / v))));
        	}
        	return tmp;
        }
        
        real(8) function code(v, h)
            real(8), intent (in) :: v
            real(8), intent (in) :: h
            real(8) :: tmp
            if (v <= (-1.02d-103)) then
                tmp = atan((-1.0d0))
            else
                tmp = atan((v / (v + (((-9.8d0) * h) / v))))
            end if
            code = tmp
        end function
        
        public static double code(double v, double H) {
        	double tmp;
        	if (v <= -1.02e-103) {
        		tmp = Math.atan(-1.0);
        	} else {
        		tmp = Math.atan((v / (v + ((-9.8 * H) / v))));
        	}
        	return tmp;
        }
        
        def code(v, H):
        	tmp = 0
        	if v <= -1.02e-103:
        		tmp = math.atan(-1.0)
        	else:
        		tmp = math.atan((v / (v + ((-9.8 * H) / v))))
        	return tmp
        
        function code(v, H)
        	tmp = 0.0
        	if (v <= -1.02e-103)
        		tmp = atan(-1.0);
        	else
        		tmp = atan(Float64(v / Float64(v + Float64(Float64(-9.8 * H) / v))));
        	end
        	return tmp
        end
        
        function tmp_2 = code(v, H)
        	tmp = 0.0;
        	if (v <= -1.02e-103)
        		tmp = atan(-1.0);
        	else
        		tmp = atan((v / (v + ((-9.8 * H) / v))));
        	end
        	tmp_2 = tmp;
        end
        
        code[v_, H_] := If[LessEqual[v, -1.02e-103], N[ArcTan[-1.0], $MachinePrecision], N[ArcTan[N[(v / N[(v + N[(N[(-9.8 * H), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;v \leq -1.02 \cdot 10^{-103}:\\
        \;\;\;\;\tan^{-1} -1\\
        
        \mathbf{else}:\\
        \;\;\;\;\tan^{-1} \left(\frac{v}{v + \frac{-9.8 \cdot H}{v}}\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if v < -1.01999999999999998e-103

          1. Initial program 58.2%

            \[\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot 9.8\right) \cdot H}}\right) \]
          2. Step-by-step derivation
            1. atan-lowering-atan.f64N/A

              \[\leadsto \mathsf{atan.f64}\left(\left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}}\right)\right) \]
            2. /-lowering-/.f64N/A

              \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}\right)\right)\right) \]
            3. sqrt-lowering-sqrt.f64N/A

              \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right) \]
            4. sub-negN/A

              \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v + \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
            5. +-lowering-+.f64N/A

              \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(v \cdot v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
            7. *-commutativeN/A

              \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(H \cdot \left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
            8. distribute-rgt-neg-inN/A

              \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(H \cdot \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
            9. *-lowering-*.f64N/A

              \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
            10. metadata-evalN/A

              \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(\frac{98}{5}\right)\right)\right)\right)\right)\right)\right) \]
            11. metadata-eval58.2%

              \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \frac{-98}{5}\right)\right)\right)\right)\right) \]
          3. Simplified58.2%

            \[\leadsto \color{blue}{\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v + H \cdot -19.6}}\right)} \]
          4. Add Preprocessing
          5. Taylor expanded in v around -inf

            \[\leadsto \mathsf{atan.f64}\left(\color{blue}{-1}\right) \]
          6. Step-by-step derivation
            1. Simplified83.5%

              \[\leadsto \tan^{-1} \color{blue}{-1} \]

            if -1.01999999999999998e-103 < v

            1. Initial program 72.5%

              \[\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot 9.8\right) \cdot H}}\right) \]
            2. Step-by-step derivation
              1. atan-lowering-atan.f64N/A

                \[\leadsto \mathsf{atan.f64}\left(\left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}}\right)\right) \]
              2. /-lowering-/.f64N/A

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}\right)\right)\right) \]
              3. sqrt-lowering-sqrt.f64N/A

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right) \]
              4. sub-negN/A

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v + \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
              5. +-lowering-+.f64N/A

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(v \cdot v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
              7. *-commutativeN/A

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(H \cdot \left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
              8. distribute-rgt-neg-inN/A

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(H \cdot \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
              9. *-lowering-*.f64N/A

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
              10. metadata-evalN/A

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(\frac{98}{5}\right)\right)\right)\right)\right)\right)\right) \]
              11. metadata-eval72.5%

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \frac{-98}{5}\right)\right)\right)\right)\right) \]
            3. Simplified72.5%

              \[\leadsto \color{blue}{\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v + H \cdot -19.6}}\right)} \]
            4. Add Preprocessing
            5. Taylor expanded in H around 0

              \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \color{blue}{\left(v + \frac{-49}{5} \cdot \frac{H}{v}\right)}\right)\right) \]
            6. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(v + \frac{H}{v} \cdot \frac{-49}{5}\right)\right)\right) \]
              2. associate-*l/N/A

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(v + \frac{H \cdot \frac{-49}{5}}{v}\right)\right)\right) \]
              3. associate-*r/N/A

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(v + H \cdot \frac{\frac{-49}{5}}{v}\right)\right)\right) \]
              4. metadata-evalN/A

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(v + H \cdot \frac{\mathsf{neg}\left(\frac{49}{5}\right)}{v}\right)\right)\right) \]
              5. distribute-neg-fracN/A

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(v + H \cdot \left(\mathsf{neg}\left(\frac{\frac{49}{5}}{v}\right)\right)\right)\right)\right) \]
              6. metadata-evalN/A

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(v + H \cdot \left(\mathsf{neg}\left(\frac{\frac{49}{5} \cdot 1}{v}\right)\right)\right)\right)\right) \]
              7. associate-*r/N/A

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(v + H \cdot \left(\mathsf{neg}\left(\frac{49}{5} \cdot \frac{1}{v}\right)\right)\right)\right)\right) \]
              8. +-lowering-+.f64N/A

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \left(H \cdot \left(\mathsf{neg}\left(\frac{49}{5} \cdot \frac{1}{v}\right)\right)\right)\right)\right)\right) \]
              9. associate-*r/N/A

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \left(H \cdot \left(\mathsf{neg}\left(\frac{\frac{49}{5} \cdot 1}{v}\right)\right)\right)\right)\right)\right) \]
              10. metadata-evalN/A

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \left(H \cdot \left(\mathsf{neg}\left(\frac{\frac{49}{5}}{v}\right)\right)\right)\right)\right)\right) \]
              11. distribute-neg-fracN/A

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \left(H \cdot \frac{\mathsf{neg}\left(\frac{49}{5}\right)}{v}\right)\right)\right)\right) \]
              12. metadata-evalN/A

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \left(H \cdot \frac{\frac{-49}{5}}{v}\right)\right)\right)\right) \]
              13. associate-*r/N/A

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \left(\frac{H \cdot \frac{-49}{5}}{v}\right)\right)\right)\right) \]
              14. *-commutativeN/A

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \left(\frac{\frac{-49}{5} \cdot H}{v}\right)\right)\right)\right) \]
              15. /-lowering-/.f64N/A

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \mathsf{/.f64}\left(\left(\frac{-49}{5} \cdot H\right), v\right)\right)\right)\right) \]
              16. *-commutativeN/A

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \mathsf{/.f64}\left(\left(H \cdot \frac{-49}{5}\right), v\right)\right)\right)\right) \]
              17. *-lowering-*.f6461.6%

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(v, \mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \frac{-49}{5}\right), v\right)\right)\right)\right) \]
            7. Simplified61.6%

              \[\leadsto \tan^{-1} \left(\frac{v}{\color{blue}{v + \frac{H \cdot -9.8}{v}}}\right) \]
          7. Recombined 2 regimes into one program.
          8. Final simplification70.8%

            \[\leadsto \begin{array}{l} \mathbf{if}\;v \leq -1.02 \cdot 10^{-103}:\\ \;\;\;\;\tan^{-1} -1\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(\frac{v}{v + \frac{-9.8 \cdot H}{v}}\right)\\ \end{array} \]
          9. Add Preprocessing

          Alternative 10: 68.8% accurate, 2.0× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;v \leq -5 \cdot 10^{-311}:\\ \;\;\;\;\tan^{-1} -1\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} 1\\ \end{array} \end{array} \]
          (FPCore (v H) :precision binary64 (if (<= v -5e-311) (atan -1.0) (atan 1.0)))
          double code(double v, double H) {
          	double tmp;
          	if (v <= -5e-311) {
          		tmp = atan(-1.0);
          	} else {
          		tmp = atan(1.0);
          	}
          	return tmp;
          }
          
          real(8) function code(v, h)
              real(8), intent (in) :: v
              real(8), intent (in) :: h
              real(8) :: tmp
              if (v <= (-5d-311)) then
                  tmp = atan((-1.0d0))
              else
                  tmp = atan(1.0d0)
              end if
              code = tmp
          end function
          
          public static double code(double v, double H) {
          	double tmp;
          	if (v <= -5e-311) {
          		tmp = Math.atan(-1.0);
          	} else {
          		tmp = Math.atan(1.0);
          	}
          	return tmp;
          }
          
          def code(v, H):
          	tmp = 0
          	if v <= -5e-311:
          		tmp = math.atan(-1.0)
          	else:
          		tmp = math.atan(1.0)
          	return tmp
          
          function code(v, H)
          	tmp = 0.0
          	if (v <= -5e-311)
          		tmp = atan(-1.0);
          	else
          		tmp = atan(1.0);
          	end
          	return tmp
          end
          
          function tmp_2 = code(v, H)
          	tmp = 0.0;
          	if (v <= -5e-311)
          		tmp = atan(-1.0);
          	else
          		tmp = atan(1.0);
          	end
          	tmp_2 = tmp;
          end
          
          code[v_, H_] := If[LessEqual[v, -5e-311], N[ArcTan[-1.0], $MachinePrecision], N[ArcTan[1.0], $MachinePrecision]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;v \leq -5 \cdot 10^{-311}:\\
          \;\;\;\;\tan^{-1} -1\\
          
          \mathbf{else}:\\
          \;\;\;\;\tan^{-1} 1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if v < -5.00000000000023e-311

            1. Initial program 66.5%

              \[\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot 9.8\right) \cdot H}}\right) \]
            2. Step-by-step derivation
              1. atan-lowering-atan.f64N/A

                \[\leadsto \mathsf{atan.f64}\left(\left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}}\right)\right) \]
              2. /-lowering-/.f64N/A

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}\right)\right)\right) \]
              3. sqrt-lowering-sqrt.f64N/A

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right) \]
              4. sub-negN/A

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v + \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
              5. +-lowering-+.f64N/A

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(v \cdot v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
              7. *-commutativeN/A

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(H \cdot \left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
              8. distribute-rgt-neg-inN/A

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(H \cdot \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
              9. *-lowering-*.f64N/A

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
              10. metadata-evalN/A

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(\frac{98}{5}\right)\right)\right)\right)\right)\right)\right) \]
              11. metadata-eval66.5%

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \frac{-98}{5}\right)\right)\right)\right)\right) \]
            3. Simplified66.5%

              \[\leadsto \color{blue}{\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v + H \cdot -19.6}}\right)} \]
            4. Add Preprocessing
            5. Taylor expanded in v around -inf

              \[\leadsto \mathsf{atan.f64}\left(\color{blue}{-1}\right) \]
            6. Step-by-step derivation
              1. Simplified67.5%

                \[\leadsto \tan^{-1} \color{blue}{-1} \]

              if -5.00000000000023e-311 < v

              1. Initial program 66.5%

                \[\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot 9.8\right) \cdot H}}\right) \]
              2. Step-by-step derivation
                1. atan-lowering-atan.f64N/A

                  \[\leadsto \mathsf{atan.f64}\left(\left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}}\right)\right) \]
                2. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}\right)\right)\right) \]
                3. sqrt-lowering-sqrt.f64N/A

                  \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right) \]
                4. sub-negN/A

                  \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v + \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(v \cdot v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
                6. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
                7. *-commutativeN/A

                  \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(H \cdot \left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
                8. distribute-rgt-neg-inN/A

                  \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(H \cdot \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
                9. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
                10. metadata-evalN/A

                  \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(\frac{98}{5}\right)\right)\right)\right)\right)\right)\right) \]
                11. metadata-eval66.5%

                  \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \frac{-98}{5}\right)\right)\right)\right)\right) \]
              3. Simplified66.5%

                \[\leadsto \color{blue}{\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v + H \cdot -19.6}}\right)} \]
              4. Add Preprocessing
              5. Taylor expanded in v around inf

                \[\leadsto \mathsf{atan.f64}\left(\color{blue}{1}\right) \]
              6. Step-by-step derivation
                1. Simplified67.4%

                  \[\leadsto \tan^{-1} \color{blue}{1} \]
              7. Recombined 2 regimes into one program.
              8. Add Preprocessing

              Alternative 11: 35.3% accurate, 2.1× speedup?

              \[\begin{array}{l} \\ \tan^{-1} -1 \end{array} \]
              (FPCore (v H) :precision binary64 (atan -1.0))
              double code(double v, double H) {
              	return atan(-1.0);
              }
              
              real(8) function code(v, h)
                  real(8), intent (in) :: v
                  real(8), intent (in) :: h
                  code = atan((-1.0d0))
              end function
              
              public static double code(double v, double H) {
              	return Math.atan(-1.0);
              }
              
              def code(v, H):
              	return math.atan(-1.0)
              
              function code(v, H)
              	return atan(-1.0)
              end
              
              function tmp = code(v, H)
              	tmp = atan(-1.0);
              end
              
              code[v_, H_] := N[ArcTan[-1.0], $MachinePrecision]
              
              \begin{array}{l}
              
              \\
              \tan^{-1} -1
              \end{array}
              
              Derivation
              1. Initial program 66.5%

                \[\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot 9.8\right) \cdot H}}\right) \]
              2. Step-by-step derivation
                1. atan-lowering-atan.f64N/A

                  \[\leadsto \mathsf{atan.f64}\left(\left(\frac{v}{\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}}\right)\right) \]
                2. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\sqrt{v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H}\right)\right)\right) \]
                3. sqrt-lowering-sqrt.f64N/A

                  \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v - \left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right) \]
                4. sub-negN/A

                  \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\left(v \cdot v + \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(v \cdot v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
                6. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(\left(2 \cdot \frac{49}{5}\right) \cdot H\right)\right)\right)\right)\right)\right) \]
                7. *-commutativeN/A

                  \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(\mathsf{neg}\left(H \cdot \left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
                8. distribute-rgt-neg-inN/A

                  \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \left(H \cdot \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
                9. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(2 \cdot \frac{49}{5}\right)\right)\right)\right)\right)\right)\right) \]
                10. metadata-evalN/A

                  \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \left(\mathsf{neg}\left(\frac{98}{5}\right)\right)\right)\right)\right)\right)\right) \]
                11. metadata-eval66.5%

                  \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \frac{-98}{5}\right)\right)\right)\right)\right) \]
              3. Simplified66.5%

                \[\leadsto \color{blue}{\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v + H \cdot -19.6}}\right)} \]
              4. Add Preprocessing
              5. Taylor expanded in v around -inf

                \[\leadsto \mathsf{atan.f64}\left(\color{blue}{-1}\right) \]
              6. Step-by-step derivation
                1. Simplified36.2%

                  \[\leadsto \tan^{-1} \color{blue}{-1} \]
                2. Add Preprocessing

                Reproduce

                ?
                herbie shell --seed 2024160 
                (FPCore (v H)
                  :name "Optimal throwing angle"
                  :precision binary64
                  (atan (/ v (sqrt (- (* v v) (* (* 2.0 9.8) H))))))