Optimal throwing angle

Percentage Accurate: 67.4% → 99.3%
Time: 12.6s
Alternatives: 16
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 16 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: 67.4% 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.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;v \leq -2.2 \cdot 10^{-45}:\\ \;\;\;\;\tan^{-1} \left(0 - \sqrt{\frac{1}{1 + \frac{-19.6 \cdot H}{v \cdot v}}}\right)\\ \mathbf{elif}\;v \leq 6 \cdot 10^{-70}:\\ \;\;\;\;\tan^{-1} \left(\frac{v}{{\left(\frac{1}{-19.6 \cdot H + v \cdot v}\right)}^{-0.5}}\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(\frac{1}{\sqrt{1 + H \cdot \frac{-19.6}{v \cdot v}}}\right)\\ \end{array} \end{array} \]
(FPCore (v H)
 :precision binary64
 (if (<= v -2.2e-45)
   (atan (- 0.0 (sqrt (/ 1.0 (+ 1.0 (/ (* -19.6 H) (* v v)))))))
   (if (<= v 6e-70)
     (atan (/ v (pow (/ 1.0 (+ (* -19.6 H) (* v v))) -0.5)))
     (atan (/ 1.0 (sqrt (+ 1.0 (* H (/ -19.6 (* v v))))))))))
double code(double v, double H) {
	double tmp;
	if (v <= -2.2e-45) {
		tmp = atan((0.0 - sqrt((1.0 / (1.0 + ((-19.6 * H) / (v * v)))))));
	} else if (v <= 6e-70) {
		tmp = atan((v / pow((1.0 / ((-19.6 * H) + (v * v))), -0.5)));
	} else {
		tmp = atan((1.0 / sqrt((1.0 + (H * (-19.6 / (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 <= (-2.2d-45)) then
        tmp = atan((0.0d0 - sqrt((1.0d0 / (1.0d0 + (((-19.6d0) * h) / (v * v)))))))
    else if (v <= 6d-70) then
        tmp = atan((v / ((1.0d0 / (((-19.6d0) * h) + (v * v))) ** (-0.5d0))))
    else
        tmp = atan((1.0d0 / sqrt((1.0d0 + (h * ((-19.6d0) / (v * v)))))))
    end if
    code = tmp
end function
public static double code(double v, double H) {
	double tmp;
	if (v <= -2.2e-45) {
		tmp = Math.atan((0.0 - Math.sqrt((1.0 / (1.0 + ((-19.6 * H) / (v * v)))))));
	} else if (v <= 6e-70) {
		tmp = Math.atan((v / Math.pow((1.0 / ((-19.6 * H) + (v * v))), -0.5)));
	} else {
		tmp = Math.atan((1.0 / Math.sqrt((1.0 + (H * (-19.6 / (v * v)))))));
	}
	return tmp;
}
def code(v, H):
	tmp = 0
	if v <= -2.2e-45:
		tmp = math.atan((0.0 - math.sqrt((1.0 / (1.0 + ((-19.6 * H) / (v * v)))))))
	elif v <= 6e-70:
		tmp = math.atan((v / math.pow((1.0 / ((-19.6 * H) + (v * v))), -0.5)))
	else:
		tmp = math.atan((1.0 / math.sqrt((1.0 + (H * (-19.6 / (v * v)))))))
	return tmp
function code(v, H)
	tmp = 0.0
	if (v <= -2.2e-45)
		tmp = atan(Float64(0.0 - sqrt(Float64(1.0 / Float64(1.0 + Float64(Float64(-19.6 * H) / Float64(v * v)))))));
	elseif (v <= 6e-70)
		tmp = atan(Float64(v / (Float64(1.0 / Float64(Float64(-19.6 * H) + Float64(v * v))) ^ -0.5)));
	else
		tmp = atan(Float64(1.0 / sqrt(Float64(1.0 + Float64(H * Float64(-19.6 / Float64(v * v)))))));
	end
	return tmp
end
function tmp_2 = code(v, H)
	tmp = 0.0;
	if (v <= -2.2e-45)
		tmp = atan((0.0 - sqrt((1.0 / (1.0 + ((-19.6 * H) / (v * v)))))));
	elseif (v <= 6e-70)
		tmp = atan((v / ((1.0 / ((-19.6 * H) + (v * v))) ^ -0.5)));
	else
		tmp = atan((1.0 / sqrt((1.0 + (H * (-19.6 / (v * v)))))));
	end
	tmp_2 = tmp;
end
code[v_, H_] := If[LessEqual[v, -2.2e-45], N[ArcTan[N[(0.0 - N[Sqrt[N[(1.0 / N[(1.0 + N[(N[(-19.6 * H), $MachinePrecision] / N[(v * v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[v, 6e-70], N[ArcTan[N[(v / N[Power[N[(1.0 / N[(N[(-19.6 * H), $MachinePrecision] + N[(v * v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcTan[N[(1.0 / N[Sqrt[N[(1.0 + N[(H * N[(-19.6 / N[(v * v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;v \leq -2.2 \cdot 10^{-45}:\\
\;\;\;\;\tan^{-1} \left(0 - \sqrt{\frac{1}{1 + \frac{-19.6 \cdot H}{v \cdot v}}}\right)\\

\mathbf{elif}\;v \leq 6 \cdot 10^{-70}:\\
\;\;\;\;\tan^{-1} \left(\frac{v}{{\left(\frac{1}{-19.6 \cdot H + v \cdot v}\right)}^{-0.5}}\right)\\

\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(\frac{1}{\sqrt{1 + H \cdot \frac{-19.6}{v \cdot v}}}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if v < -2.19999999999999993e-45

    1. Initial program 58.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-eval58.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. Simplified58.1%

      \[\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, \mathsf{sqrt.f64}\left(\color{blue}{\left({v}^{2} \cdot \left(1 + \frac{-98}{5} \cdot \frac{H}{{v}^{2}}\right)\right)}\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(v \cdot v\right), \left(1 + \frac{-98}{5} \cdot \frac{H}{{v}^{2}}\right)\right)\right)\right)\right) \]
      3. *-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(1 + \frac{-98}{5} \cdot \frac{H}{{v}^{2}}\right)\right)\right)\right)\right) \]
      4. +-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(1, \left(\frac{-98}{5} \cdot \frac{H}{{v}^{2}}\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(\mathsf{*.f64}\left(v, v\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-98}{5}, \left(\frac{H}{{v}^{2}}\right)\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), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-98}{5}, \mathsf{/.f64}\left(H, \left({v}^{2}\right)\right)\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(\mathsf{*.f64}\left(v, v\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-98}{5}, \mathsf{/.f64}\left(H, \left(v \cdot v\right)\right)\right)\right)\right)\right)\right)\right) \]
      8. *-lowering-*.f6458.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(1, \mathsf{*.f64}\left(\frac{-98}{5}, \mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right)\right)\right)\right)\right)\right)\right) \]
    7. Simplified58.1%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \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)\right) \]
      12. *-lowering-*.f64100.0%

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \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)\right) \]
    10. Simplified100.0%

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

    if -2.19999999999999993e-45 < v < 6.0000000000000003e-70

    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. Step-by-step derivation
      1. pow1/2N/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{pow.f64}\left(\left(\frac{\left(v \cdot v\right) \cdot \left(v \cdot v\right) + \left(\left(H \cdot \frac{-98}{5}\right) \cdot \left(H \cdot \frac{-98}{5}\right) - \left(v \cdot v\right) \cdot \left(H \cdot \frac{-98}{5}\right)\right)}{{\left(v \cdot v\right)}^{3} + {\left(H \cdot \frac{-98}{5}\right)}^{3}}\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right)\right) \]
    6. Applied egg-rr99.6%

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

    if 6.0000000000000003e-70 < v

    1. Initial program 60.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-eval60.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. Simplified60.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, \mathsf{sqrt.f64}\left(\color{blue}{\left({v}^{2} \cdot \left(1 + \frac{-98}{5} \cdot \frac{H}{{v}^{2}}\right)\right)}\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(v \cdot v\right), \left(1 + \frac{-98}{5} \cdot \frac{H}{{v}^{2}}\right)\right)\right)\right)\right) \]
      3. *-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(1 + \frac{-98}{5} \cdot \frac{H}{{v}^{2}}\right)\right)\right)\right)\right) \]
      4. +-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(1, \left(\frac{-98}{5} \cdot \frac{H}{{v}^{2}}\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(\mathsf{*.f64}\left(v, v\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-98}{5}, \left(\frac{H}{{v}^{2}}\right)\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), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-98}{5}, \mathsf{/.f64}\left(H, \left({v}^{2}\right)\right)\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(\mathsf{*.f64}\left(v, v\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-98}{5}, \mathsf{/.f64}\left(H, \left(v \cdot v\right)\right)\right)\right)\right)\right)\right)\right) \]
      8. *-lowering-*.f6460.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(1, \mathsf{*.f64}\left(\frac{-98}{5}, \mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right)\right)\right)\right)\right)\right)\right) \]
    7. Simplified60.5%

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

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

        \[\leadsto \mathsf{atan.f64}\left(\left(\frac{v}{{\left(\left(v \cdot v\right) \cdot \left(1 + \frac{-98}{5} \cdot \frac{H}{v \cdot v}\right)\right)}^{\frac{1}{2}}}\right)\right) \]
      3. unpow-prod-downN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;v \leq -2.2 \cdot 10^{-45}:\\ \;\;\;\;\tan^{-1} \left(0 - \sqrt{\frac{1}{1 + \frac{-19.6 \cdot H}{v \cdot v}}}\right)\\ \mathbf{elif}\;v \leq 6 \cdot 10^{-70}:\\ \;\;\;\;\tan^{-1} \left(\frac{v}{{\left(\frac{1}{-19.6 \cdot H + v \cdot v}\right)}^{-0.5}}\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(\frac{1}{\sqrt{1 + H \cdot \frac{-19.6}{v \cdot v}}}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 99.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;v \leq -5 \cdot 10^{+154}:\\ \;\;\;\;\tan^{-1} -1\\ \mathbf{elif}\;v \leq 6.8 \cdot 10^{-69}:\\ \;\;\;\;\tan^{-1} \left(\frac{v}{{\left(\frac{1}{-19.6 \cdot H + v \cdot v}\right)}^{-0.5}}\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(\frac{1}{\sqrt{1 + H \cdot \frac{-19.6}{v \cdot v}}}\right)\\ \end{array} \end{array} \]
(FPCore (v H)
 :precision binary64
 (if (<= v -5e+154)
   (atan -1.0)
   (if (<= v 6.8e-69)
     (atan (/ v (pow (/ 1.0 (+ (* -19.6 H) (* v v))) -0.5)))
     (atan (/ 1.0 (sqrt (+ 1.0 (* H (/ -19.6 (* v v))))))))))
double code(double v, double H) {
	double tmp;
	if (v <= -5e+154) {
		tmp = atan(-1.0);
	} else if (v <= 6.8e-69) {
		tmp = atan((v / pow((1.0 / ((-19.6 * H) + (v * v))), -0.5)));
	} else {
		tmp = atan((1.0 / sqrt((1.0 + (H * (-19.6 / (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 <= (-5d+154)) then
        tmp = atan((-1.0d0))
    else if (v <= 6.8d-69) then
        tmp = atan((v / ((1.0d0 / (((-19.6d0) * h) + (v * v))) ** (-0.5d0))))
    else
        tmp = atan((1.0d0 / sqrt((1.0d0 + (h * ((-19.6d0) / (v * v)))))))
    end if
    code = tmp
end function
public static double code(double v, double H) {
	double tmp;
	if (v <= -5e+154) {
		tmp = Math.atan(-1.0);
	} else if (v <= 6.8e-69) {
		tmp = Math.atan((v / Math.pow((1.0 / ((-19.6 * H) + (v * v))), -0.5)));
	} else {
		tmp = Math.atan((1.0 / Math.sqrt((1.0 + (H * (-19.6 / (v * v)))))));
	}
	return tmp;
}
def code(v, H):
	tmp = 0
	if v <= -5e+154:
		tmp = math.atan(-1.0)
	elif v <= 6.8e-69:
		tmp = math.atan((v / math.pow((1.0 / ((-19.6 * H) + (v * v))), -0.5)))
	else:
		tmp = math.atan((1.0 / math.sqrt((1.0 + (H * (-19.6 / (v * v)))))))
	return tmp
function code(v, H)
	tmp = 0.0
	if (v <= -5e+154)
		tmp = atan(-1.0);
	elseif (v <= 6.8e-69)
		tmp = atan(Float64(v / (Float64(1.0 / Float64(Float64(-19.6 * H) + Float64(v * v))) ^ -0.5)));
	else
		tmp = atan(Float64(1.0 / sqrt(Float64(1.0 + Float64(H * Float64(-19.6 / Float64(v * v)))))));
	end
	return tmp
end
function tmp_2 = code(v, H)
	tmp = 0.0;
	if (v <= -5e+154)
		tmp = atan(-1.0);
	elseif (v <= 6.8e-69)
		tmp = atan((v / ((1.0 / ((-19.6 * H) + (v * v))) ^ -0.5)));
	else
		tmp = atan((1.0 / sqrt((1.0 + (H * (-19.6 / (v * v)))))));
	end
	tmp_2 = tmp;
end
code[v_, H_] := If[LessEqual[v, -5e+154], N[ArcTan[-1.0], $MachinePrecision], If[LessEqual[v, 6.8e-69], N[ArcTan[N[(v / N[Power[N[(1.0 / N[(N[(-19.6 * H), $MachinePrecision] + N[(v * v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcTan[N[(1.0 / N[Sqrt[N[(1.0 + N[(H * N[(-19.6 / N[(v * v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;v \leq -5 \cdot 10^{+154}:\\
\;\;\;\;\tan^{-1} -1\\

\mathbf{elif}\;v \leq 6.8 \cdot 10^{-69}:\\
\;\;\;\;\tan^{-1} \left(\frac{v}{{\left(\frac{1}{-19.6 \cdot H + v \cdot v}\right)}^{-0.5}}\right)\\

\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(\frac{1}{\sqrt{1 + H \cdot \frac{-19.6}{v \cdot v}}}\right)\\


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

    1. Initial program 3.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-eval3.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. Simplified3.1%

      \[\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} \]

      if -5.00000000000000004e154 < v < 6.80000000000000016e-69

      1. Initial program 99.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-eval99.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. Simplified99.7%

        \[\leadsto \color{blue}{\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v + H \cdot -19.6}}\right)} \]
      4. Add Preprocessing
      5. Step-by-step derivation
        1. pow1/2N/A

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

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

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

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

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

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

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

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{pow.f64}\left(\left(\frac{\left(v \cdot v\right) \cdot \left(v \cdot v\right) + \left(\left(H \cdot \frac{-98}{5}\right) \cdot \left(H \cdot \frac{-98}{5}\right) - \left(v \cdot v\right) \cdot \left(H \cdot \frac{-98}{5}\right)\right)}{{\left(v \cdot v\right)}^{3} + {\left(H \cdot \frac{-98}{5}\right)}^{3}}\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right)\right) \]
      6. Applied egg-rr99.7%

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

      if 6.80000000000000016e-69 < v

      1. Initial program 60.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-eval60.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. Simplified60.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, \mathsf{sqrt.f64}\left(\color{blue}{\left({v}^{2} \cdot \left(1 + \frac{-98}{5} \cdot \frac{H}{{v}^{2}}\right)\right)}\right)\right)\right) \]
      6. Step-by-step derivation
        1. *-lowering-*.f64N/A

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

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(v \cdot v\right), \left(1 + \frac{-98}{5} \cdot \frac{H}{{v}^{2}}\right)\right)\right)\right)\right) \]
        3. *-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(1 + \frac{-98}{5} \cdot \frac{H}{{v}^{2}}\right)\right)\right)\right)\right) \]
        4. +-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(1, \left(\frac{-98}{5} \cdot \frac{H}{{v}^{2}}\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(\mathsf{*.f64}\left(v, v\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-98}{5}, \left(\frac{H}{{v}^{2}}\right)\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), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-98}{5}, \mathsf{/.f64}\left(H, \left({v}^{2}\right)\right)\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(\mathsf{*.f64}\left(v, v\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-98}{5}, \mathsf{/.f64}\left(H, \left(v \cdot v\right)\right)\right)\right)\right)\right)\right)\right) \]
        8. *-lowering-*.f6460.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(1, \mathsf{*.f64}\left(\frac{-98}{5}, \mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right)\right)\right)\right)\right)\right)\right) \]
      7. Simplified60.5%

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

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

          \[\leadsto \mathsf{atan.f64}\left(\left(\frac{v}{{\left(\left(v \cdot v\right) \cdot \left(1 + \frac{-98}{5} \cdot \frac{H}{v \cdot v}\right)\right)}^{\frac{1}{2}}}\right)\right) \]
        3. unpow-prod-downN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;v \leq -5 \cdot 10^{+154}:\\ \;\;\;\;\tan^{-1} -1\\ \mathbf{elif}\;v \leq 6.8 \cdot 10^{-69}:\\ \;\;\;\;\tan^{-1} \left(\frac{v}{{\left(\frac{1}{-19.6 \cdot H + v \cdot v}\right)}^{-0.5}}\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(\frac{1}{\sqrt{1 + H \cdot \frac{-19.6}{v \cdot v}}}\right)\\ \end{array} \]
    9. Add Preprocessing

    Alternative 3: 99.4% accurate, 1.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;v \leq -5 \cdot 10^{+154}:\\ \;\;\;\;\tan^{-1} -1\\ \mathbf{elif}\;v \leq 6.2 \cdot 10^{-69}:\\ \;\;\;\;\tan^{-1} \left(v \cdot {\left(-19.6 \cdot H + v \cdot v\right)}^{-0.5}\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(\frac{1}{\sqrt{1 + H \cdot \frac{-19.6}{v \cdot v}}}\right)\\ \end{array} \end{array} \]
    (FPCore (v H)
     :precision binary64
     (if (<= v -5e+154)
       (atan -1.0)
       (if (<= v 6.2e-69)
         (atan (* v (pow (+ (* -19.6 H) (* v v)) -0.5)))
         (atan (/ 1.0 (sqrt (+ 1.0 (* H (/ -19.6 (* v v))))))))))
    double code(double v, double H) {
    	double tmp;
    	if (v <= -5e+154) {
    		tmp = atan(-1.0);
    	} else if (v <= 6.2e-69) {
    		tmp = atan((v * pow(((-19.6 * H) + (v * v)), -0.5)));
    	} else {
    		tmp = atan((1.0 / sqrt((1.0 + (H * (-19.6 / (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 <= (-5d+154)) then
            tmp = atan((-1.0d0))
        else if (v <= 6.2d-69) then
            tmp = atan((v * ((((-19.6d0) * h) + (v * v)) ** (-0.5d0))))
        else
            tmp = atan((1.0d0 / sqrt((1.0d0 + (h * ((-19.6d0) / (v * v)))))))
        end if
        code = tmp
    end function
    
    public static double code(double v, double H) {
    	double tmp;
    	if (v <= -5e+154) {
    		tmp = Math.atan(-1.0);
    	} else if (v <= 6.2e-69) {
    		tmp = Math.atan((v * Math.pow(((-19.6 * H) + (v * v)), -0.5)));
    	} else {
    		tmp = Math.atan((1.0 / Math.sqrt((1.0 + (H * (-19.6 / (v * v)))))));
    	}
    	return tmp;
    }
    
    def code(v, H):
    	tmp = 0
    	if v <= -5e+154:
    		tmp = math.atan(-1.0)
    	elif v <= 6.2e-69:
    		tmp = math.atan((v * math.pow(((-19.6 * H) + (v * v)), -0.5)))
    	else:
    		tmp = math.atan((1.0 / math.sqrt((1.0 + (H * (-19.6 / (v * v)))))))
    	return tmp
    
    function code(v, H)
    	tmp = 0.0
    	if (v <= -5e+154)
    		tmp = atan(-1.0);
    	elseif (v <= 6.2e-69)
    		tmp = atan(Float64(v * (Float64(Float64(-19.6 * H) + Float64(v * v)) ^ -0.5)));
    	else
    		tmp = atan(Float64(1.0 / sqrt(Float64(1.0 + Float64(H * Float64(-19.6 / Float64(v * v)))))));
    	end
    	return tmp
    end
    
    function tmp_2 = code(v, H)
    	tmp = 0.0;
    	if (v <= -5e+154)
    		tmp = atan(-1.0);
    	elseif (v <= 6.2e-69)
    		tmp = atan((v * (((-19.6 * H) + (v * v)) ^ -0.5)));
    	else
    		tmp = atan((1.0 / sqrt((1.0 + (H * (-19.6 / (v * v)))))));
    	end
    	tmp_2 = tmp;
    end
    
    code[v_, H_] := If[LessEqual[v, -5e+154], N[ArcTan[-1.0], $MachinePrecision], If[LessEqual[v, 6.2e-69], N[ArcTan[N[(v * N[Power[N[(N[(-19.6 * H), $MachinePrecision] + N[(v * v), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcTan[N[(1.0 / N[Sqrt[N[(1.0 + N[(H * N[(-19.6 / N[(v * v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;v \leq -5 \cdot 10^{+154}:\\
    \;\;\;\;\tan^{-1} -1\\
    
    \mathbf{elif}\;v \leq 6.2 \cdot 10^{-69}:\\
    \;\;\;\;\tan^{-1} \left(v \cdot {\left(-19.6 \cdot H + v \cdot v\right)}^{-0.5}\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\tan^{-1} \left(\frac{1}{\sqrt{1 + H \cdot \frac{-19.6}{v \cdot v}}}\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if v < -5.00000000000000004e154

      1. Initial program 3.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-eval3.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. Simplified3.1%

        \[\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} \]

        if -5.00000000000000004e154 < v < 6.1999999999999999e-69

        1. Initial program 99.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-eval99.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. Simplified99.7%

          \[\leadsto \color{blue}{\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v + H \cdot -19.6}}\right)} \]
        4. Add Preprocessing
        5. Step-by-step derivation
          1. clear-numN/A

            \[\leadsto \mathsf{atan.f64}\left(\left(\frac{1}{\frac{\sqrt{v \cdot v + H \cdot \frac{-98}{5}}}{v}}\right)\right) \]
          2. associate-/r/N/A

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(v, v\right), \mathsf{*.f64}\left(H, \frac{-98}{5}\right)\right), \frac{-1}{2}\right), v\right)\right) \]
        6. Applied egg-rr99.7%

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

        if 6.1999999999999999e-69 < v

        1. Initial program 60.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-eval60.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. Simplified60.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, \mathsf{sqrt.f64}\left(\color{blue}{\left({v}^{2} \cdot \left(1 + \frac{-98}{5} \cdot \frac{H}{{v}^{2}}\right)\right)}\right)\right)\right) \]
        6. Step-by-step derivation
          1. *-lowering-*.f64N/A

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

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(v \cdot v\right), \left(1 + \frac{-98}{5} \cdot \frac{H}{{v}^{2}}\right)\right)\right)\right)\right) \]
          3. *-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(1 + \frac{-98}{5} \cdot \frac{H}{{v}^{2}}\right)\right)\right)\right)\right) \]
          4. +-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(1, \left(\frac{-98}{5} \cdot \frac{H}{{v}^{2}}\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(\mathsf{*.f64}\left(v, v\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-98}{5}, \left(\frac{H}{{v}^{2}}\right)\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), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-98}{5}, \mathsf{/.f64}\left(H, \left({v}^{2}\right)\right)\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(\mathsf{*.f64}\left(v, v\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-98}{5}, \mathsf{/.f64}\left(H, \left(v \cdot v\right)\right)\right)\right)\right)\right)\right)\right) \]
          8. *-lowering-*.f6460.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(1, \mathsf{*.f64}\left(\frac{-98}{5}, \mathsf{/.f64}\left(H, \mathsf{*.f64}\left(v, v\right)\right)\right)\right)\right)\right)\right)\right) \]
        7. Simplified60.5%

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

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

            \[\leadsto \mathsf{atan.f64}\left(\left(\frac{v}{{\left(\left(v \cdot v\right) \cdot \left(1 + \frac{-98}{5} \cdot \frac{H}{v \cdot v}\right)\right)}^{\frac{1}{2}}}\right)\right) \]
          3. unpow-prod-downN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;v \leq -5 \cdot 10^{+154}:\\ \;\;\;\;\tan^{-1} -1\\ \mathbf{elif}\;v \leq 6.2 \cdot 10^{-69}:\\ \;\;\;\;\tan^{-1} \left(v \cdot {\left(-19.6 \cdot H + v \cdot v\right)}^{-0.5}\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(\frac{1}{\sqrt{1 + H \cdot \frac{-19.6}{v \cdot v}}}\right)\\ \end{array} \]
      9. Add Preprocessing

      Alternative 4: 99.6% accurate, 1.0× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;v \leq -5 \cdot 10^{+154}:\\ \;\;\;\;\tan^{-1} -1\\ \mathbf{elif}\;v \leq 10^{+140}:\\ \;\;\;\;\tan^{-1} \left(\frac{v}{\sqrt{-19.6 \cdot H + v \cdot v}}\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} 1\\ \end{array} \end{array} \]
      (FPCore (v H)
       :precision binary64
       (if (<= v -5e+154)
         (atan -1.0)
         (if (<= v 1e+140) (atan (/ v (sqrt (+ (* -19.6 H) (* v v))))) (atan 1.0))))
      double code(double v, double H) {
      	double tmp;
      	if (v <= -5e+154) {
      		tmp = atan(-1.0);
      	} else if (v <= 1e+140) {
      		tmp = atan((v / sqrt(((-19.6 * H) + (v * v)))));
      	} 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+154)) then
              tmp = atan((-1.0d0))
          else if (v <= 1d+140) then
              tmp = atan((v / sqrt((((-19.6d0) * h) + (v * v)))))
          else
              tmp = atan(1.0d0)
          end if
          code = tmp
      end function
      
      public static double code(double v, double H) {
      	double tmp;
      	if (v <= -5e+154) {
      		tmp = Math.atan(-1.0);
      	} else if (v <= 1e+140) {
      		tmp = Math.atan((v / Math.sqrt(((-19.6 * H) + (v * v)))));
      	} else {
      		tmp = Math.atan(1.0);
      	}
      	return tmp;
      }
      
      def code(v, H):
      	tmp = 0
      	if v <= -5e+154:
      		tmp = math.atan(-1.0)
      	elif v <= 1e+140:
      		tmp = math.atan((v / math.sqrt(((-19.6 * H) + (v * v)))))
      	else:
      		tmp = math.atan(1.0)
      	return tmp
      
      function code(v, H)
      	tmp = 0.0
      	if (v <= -5e+154)
      		tmp = atan(-1.0);
      	elseif (v <= 1e+140)
      		tmp = atan(Float64(v / sqrt(Float64(Float64(-19.6 * H) + Float64(v * v)))));
      	else
      		tmp = atan(1.0);
      	end
      	return tmp
      end
      
      function tmp_2 = code(v, H)
      	tmp = 0.0;
      	if (v <= -5e+154)
      		tmp = atan(-1.0);
      	elseif (v <= 1e+140)
      		tmp = atan((v / sqrt(((-19.6 * H) + (v * v)))));
      	else
      		tmp = atan(1.0);
      	end
      	tmp_2 = tmp;
      end
      
      code[v_, H_] := If[LessEqual[v, -5e+154], N[ArcTan[-1.0], $MachinePrecision], If[LessEqual[v, 1e+140], N[ArcTan[N[(v / N[Sqrt[N[(N[(-19.6 * H), $MachinePrecision] + N[(v * v), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcTan[1.0], $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;v \leq -5 \cdot 10^{+154}:\\
      \;\;\;\;\tan^{-1} -1\\
      
      \mathbf{elif}\;v \leq 10^{+140}:\\
      \;\;\;\;\tan^{-1} \left(\frac{v}{\sqrt{-19.6 \cdot H + v \cdot v}}\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\tan^{-1} 1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if v < -5.00000000000000004e154

        1. Initial program 3.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-eval3.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. Simplified3.1%

          \[\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} \]

          if -5.00000000000000004e154 < v < 1.00000000000000006e140

          1. Initial program 99.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-eval99.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. Simplified99.7%

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

          if 1.00000000000000006e140 < v

          1. Initial program 8.4%

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

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

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

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

          Alternative 5: 89.5% accurate, 1.0× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;v \leq -6.1 \cdot 10^{-7}:\\ \;\;\;\;\tan^{-1} \left(\frac{v}{v \cdot \left(-1 - \frac{H}{v \cdot v} \cdot -9.8\right)}\right)\\ \mathbf{elif}\;v \leq 2.7 \cdot 10^{-44}:\\ \;\;\;\;\tan^{-1} \left(\frac{v}{{\left(\frac{-0.05102040816326531}{H}\right)}^{-0.5}}\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(\frac{1}{\frac{v \cdot \left(1 + \frac{\frac{H \cdot -9.8}{v}}{v}\right)}{v}}\right)\\ \end{array} \end{array} \]
          (FPCore (v H)
           :precision binary64
           (if (<= v -6.1e-7)
             (atan (/ v (* v (- -1.0 (* (/ H (* v v)) -9.8)))))
             (if (<= v 2.7e-44)
               (atan (/ v (pow (/ -0.05102040816326531 H) -0.5)))
               (atan (/ 1.0 (/ (* v (+ 1.0 (/ (/ (* H -9.8) v) v))) v))))))
          double code(double v, double H) {
          	double tmp;
          	if (v <= -6.1e-7) {
          		tmp = atan((v / (v * (-1.0 - ((H / (v * v)) * -9.8)))));
          	} else if (v <= 2.7e-44) {
          		tmp = atan((v / pow((-0.05102040816326531 / H), -0.5)));
          	} else {
          		tmp = atan((1.0 / ((v * (1.0 + (((H * -9.8) / v) / 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 <= (-6.1d-7)) then
                  tmp = atan((v / (v * ((-1.0d0) - ((h / (v * v)) * (-9.8d0))))))
              else if (v <= 2.7d-44) then
                  tmp = atan((v / (((-0.05102040816326531d0) / h) ** (-0.5d0))))
              else
                  tmp = atan((1.0d0 / ((v * (1.0d0 + (((h * (-9.8d0)) / v) / v))) / v)))
              end if
              code = tmp
          end function
          
          public static double code(double v, double H) {
          	double tmp;
          	if (v <= -6.1e-7) {
          		tmp = Math.atan((v / (v * (-1.0 - ((H / (v * v)) * -9.8)))));
          	} else if (v <= 2.7e-44) {
          		tmp = Math.atan((v / Math.pow((-0.05102040816326531 / H), -0.5)));
          	} else {
          		tmp = Math.atan((1.0 / ((v * (1.0 + (((H * -9.8) / v) / v))) / v)));
          	}
          	return tmp;
          }
          
          def code(v, H):
          	tmp = 0
          	if v <= -6.1e-7:
          		tmp = math.atan((v / (v * (-1.0 - ((H / (v * v)) * -9.8)))))
          	elif v <= 2.7e-44:
          		tmp = math.atan((v / math.pow((-0.05102040816326531 / H), -0.5)))
          	else:
          		tmp = math.atan((1.0 / ((v * (1.0 + (((H * -9.8) / v) / v))) / v)))
          	return tmp
          
          function code(v, H)
          	tmp = 0.0
          	if (v <= -6.1e-7)
          		tmp = atan(Float64(v / Float64(v * Float64(-1.0 - Float64(Float64(H / Float64(v * v)) * -9.8)))));
          	elseif (v <= 2.7e-44)
          		tmp = atan(Float64(v / (Float64(-0.05102040816326531 / H) ^ -0.5)));
          	else
          		tmp = atan(Float64(1.0 / Float64(Float64(v * Float64(1.0 + Float64(Float64(Float64(H * -9.8) / v) / v))) / v)));
          	end
          	return tmp
          end
          
          function tmp_2 = code(v, H)
          	tmp = 0.0;
          	if (v <= -6.1e-7)
          		tmp = atan((v / (v * (-1.0 - ((H / (v * v)) * -9.8)))));
          	elseif (v <= 2.7e-44)
          		tmp = atan((v / ((-0.05102040816326531 / H) ^ -0.5)));
          	else
          		tmp = atan((1.0 / ((v * (1.0 + (((H * -9.8) / v) / v))) / v)));
          	end
          	tmp_2 = tmp;
          end
          
          code[v_, H_] := If[LessEqual[v, -6.1e-7], N[ArcTan[N[(v / N[(v * N[(-1.0 - N[(N[(H / N[(v * v), $MachinePrecision]), $MachinePrecision] * -9.8), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[v, 2.7e-44], N[ArcTan[N[(v / N[Power[N[(-0.05102040816326531 / H), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcTan[N[(1.0 / N[(N[(v * N[(1.0 + N[(N[(N[(H * -9.8), $MachinePrecision] / v), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;v \leq -6.1 \cdot 10^{-7}:\\
          \;\;\;\;\tan^{-1} \left(\frac{v}{v \cdot \left(-1 - \frac{H}{v \cdot v} \cdot -9.8\right)}\right)\\
          
          \mathbf{elif}\;v \leq 2.7 \cdot 10^{-44}:\\
          \;\;\;\;\tan^{-1} \left(\frac{v}{{\left(\frac{-0.05102040816326531}{H}\right)}^{-0.5}}\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\tan^{-1} \left(\frac{1}{\frac{v \cdot \left(1 + \frac{\frac{H \cdot -9.8}{v}}{v}\right)}{v}}\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if v < -6.09999999999999983e-7

            1. Initial program 56.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-eval56.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. Simplified56.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--.f6496.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. Simplified96.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) \]

            if -6.09999999999999983e-7 < v < 2.6999999999999999e-44

            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. Step-by-step derivation
              1. pow1/2N/A

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

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

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

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

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

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

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

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{pow.f64}\left(\left(\frac{\left(v \cdot v\right) \cdot \left(v \cdot v\right) + \left(\left(H \cdot \frac{-98}{5}\right) \cdot \left(H \cdot \frac{-98}{5}\right) - \left(v \cdot v\right) \cdot \left(H \cdot \frac{-98}{5}\right)\right)}{{\left(v \cdot v\right)}^{3} + {\left(H \cdot \frac{-98}{5}\right)}^{3}}\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right)\right) \]
            6. Applied egg-rr99.6%

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

              \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{pow.f64}\left(\color{blue}{\left(\frac{\frac{-5}{98}}{H}\right)}, \frac{-1}{2}\right)\right)\right) \]
            8. Step-by-step derivation
              1. rem-square-sqrtN/A

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

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

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

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\left(\sqrt{\frac{-5}{98}} \cdot \sqrt{\frac{-5}{98}}\right), H\right), \frac{-1}{2}\right)\right)\right) \]
              5. rem-square-sqrt90.1%

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\frac{-5}{98}, H\right), \frac{-1}{2}\right)\right)\right) \]
            9. Simplified90.1%

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

            if 2.6999999999999999e-44 < v

            1. Initial program 59.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-eval59.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. Simplified59.1%

              \[\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(v \cdot \left(1 + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right)}\right)\right) \]
            6. Step-by-step derivation
              1. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\frac{-49}{5}, \mathsf{/.f64}\left(v, \left(\frac{H}{v}\right)\right)\right)\right)\right)\right) \]
              13. /-lowering-/.f6488.3%

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

              \[\leadsto \tan^{-1} \color{blue}{\left(\frac{1}{1 + \frac{-9.8}{\frac{v}{\frac{H}{v}}}}\right)} \]
            10. Step-by-step derivation
              1. /-rgt-identityN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{v}{\frac{-1}{-1 + \frac{\frac{49}{5}}{\frac{v}{\frac{H}{v}}}}}\right), v\right)\right)\right) \]
            11. Applied egg-rr88.3%

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;v \leq -6.1 \cdot 10^{-7}:\\ \;\;\;\;\tan^{-1} \left(\frac{v}{v \cdot \left(-1 - \frac{H}{v \cdot v} \cdot -9.8\right)}\right)\\ \mathbf{elif}\;v \leq 2.7 \cdot 10^{-44}:\\ \;\;\;\;\tan^{-1} \left(\frac{v}{{\left(\frac{-0.05102040816326531}{H}\right)}^{-0.5}}\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} \left(\frac{1}{\frac{v \cdot \left(1 + \frac{\frac{H \cdot -9.8}{v}}{v}\right)}{v}}\right)\\ \end{array} \]
          5. Add Preprocessing

          Alternative 6: 89.4% accurate, 1.0× speedup?

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

            1. Initial program 56.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-eval56.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. Simplified56.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--.f6496.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. Simplified96.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) \]

            if -6.99999999999999968e-7 < v < 2.50000000000000019e-44

            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-*.f6489.9%

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

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

            if 2.50000000000000019e-44 < v

            1. Initial program 59.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-eval59.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. Simplified59.1%

              \[\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(v \cdot \left(1 + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right)}\right)\right) \]
            6. Step-by-step derivation
              1. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\frac{-49}{5}, \mathsf{/.f64}\left(v, \left(\frac{H}{v}\right)\right)\right)\right)\right)\right) \]
              13. /-lowering-/.f6488.3%

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

              \[\leadsto \tan^{-1} \color{blue}{\left(\frac{1}{1 + \frac{-9.8}{\frac{v}{\frac{H}{v}}}}\right)} \]
            10. Step-by-step derivation
              1. /-rgt-identityN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{v}{\frac{-1}{-1 + \frac{\frac{49}{5}}{\frac{v}{\frac{H}{v}}}}}\right), v\right)\right)\right) \]
            11. Applied egg-rr88.3%

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

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

          Alternative 7: 72.5% accurate, 1.8× speedup?

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

            1. Initial program 70.4%

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

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

              \[\leadsto \color{blue}{\tan^{-1} \left(\frac{v}{\sqrt{v \cdot v + H \cdot -19.6}}\right)} \]
            4. Add Preprocessing
            5. Step-by-step derivation
              1. pow1/2N/A

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

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

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

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

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

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

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

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{pow.f64}\left(\left(\frac{\left(v \cdot v\right) \cdot \left(v \cdot v\right) + \left(\left(H \cdot \frac{-98}{5}\right) \cdot \left(H \cdot \frac{-98}{5}\right) - \left(v \cdot v\right) \cdot \left(H \cdot \frac{-98}{5}\right)\right)}{{\left(v \cdot v\right)}^{3} + {\left(H \cdot \frac{-98}{5}\right)}^{3}}\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right)\right) \]
            6. Applied egg-rr70.4%

              \[\leadsto \tan^{-1} \left(\frac{v}{\color{blue}{{\left(\frac{1}{v \cdot v + H \cdot -19.6}\right)}^{-0.5}}}\right) \]
            7. 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) \]
            8. 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. associate-*r/N/A

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

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

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

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{\frac{-49}{5} \cdot \frac{H}{v}}{v}\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(\left(\frac{-49}{5} \cdot \frac{H}{v}\right), v\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
              10. associate-*r/N/A

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{\frac{-49}{5} \cdot H}{v}\right), v\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
              11. /-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{-49}{5} \cdot H\right), v\right), v\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
              12. *-commutativeN/A

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(H \cdot \frac{-49}{5}\right), v\right), v\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
              13. *-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(\mathsf{*.f64}\left(H, \frac{-49}{5}\right), v\right), v\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
              14. 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(\mathsf{*.f64}\left(H, \frac{-49}{5}\right), v\right), v\right)\right), \left(\mathsf{neg}\left(v\right)\right)\right)\right)\right) \]
              15. 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(\mathsf{*.f64}\left(H, \frac{-49}{5}\right), v\right), v\right)\right), \left(0 - v\right)\right)\right)\right) \]
              16. --lowering--.f6473.3%

                \[\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, \frac{-49}{5}\right), v\right), v\right)\right), \mathsf{\_.f64}\left(0, v\right)\right)\right)\right) \]
            9. Simplified73.3%

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

            if -1e-289 < v

            1. Initial program 71.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-eval71.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. Simplified71.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(v \cdot \left(1 + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right)}\right)\right) \]
            6. Step-by-step derivation
              1. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \tan^{-1} \color{blue}{\left(\frac{1}{1 + \frac{-9.8}{\frac{v}{\frac{H}{v}}}}\right)} \]
            10. Step-by-step derivation
              1. /-rgt-identityN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 8: 72.5% accurate, 1.8× speedup?

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

            1. Initial program 72.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-eval72.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. Simplified72.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.5%

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

              \[\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 4.99999999999999977e-259 < v

            1. Initial program 68.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-eval68.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. Simplified68.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 v around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \tan^{-1} \color{blue}{\left(\frac{1}{1 + \frac{-9.8}{\frac{v}{\frac{H}{v}}}}\right)} \]
            10. Step-by-step derivation
              1. /-rgt-identityN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 9: 71.8% accurate, 1.8× speedup?

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

            1. Initial program 61.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-eval61.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. Simplified61.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 v around -inf

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

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

              if -1.39999999999999998e-100 < v

              1. Initial program 77.4%

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

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

                \[\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(v \cdot \left(1 + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right)}\right)\right) \]
              6. Step-by-step derivation
                1. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \tan^{-1} \color{blue}{\left(\frac{1}{1 + \frac{-9.8}{\frac{v}{\frac{H}{v}}}}\right)} \]
              10. Step-by-step derivation
                1. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

            Alternative 10: 71.6% accurate, 1.8× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;v \leq -1.4 \cdot 10^{-100}:\\ \;\;\;\;\tan^{-1} -1\\ \mathbf{elif}\;v \leq 7.2 \cdot 10^{-140}:\\ \;\;\;\;\tan^{-1} \left(\frac{-0.10204081632653061}{\frac{H}{v \cdot v}}\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} 1\\ \end{array} \end{array} \]
            (FPCore (v H)
             :precision binary64
             (if (<= v -1.4e-100)
               (atan -1.0)
               (if (<= v 7.2e-140)
                 (atan (/ -0.10204081632653061 (/ H (* v v))))
                 (atan 1.0))))
            double code(double v, double H) {
            	double tmp;
            	if (v <= -1.4e-100) {
            		tmp = atan(-1.0);
            	} else if (v <= 7.2e-140) {
            		tmp = atan((-0.10204081632653061 / (H / (v * v))));
            	} 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 <= (-1.4d-100)) then
                    tmp = atan((-1.0d0))
                else if (v <= 7.2d-140) then
                    tmp = atan(((-0.10204081632653061d0) / (h / (v * v))))
                else
                    tmp = atan(1.0d0)
                end if
                code = tmp
            end function
            
            public static double code(double v, double H) {
            	double tmp;
            	if (v <= -1.4e-100) {
            		tmp = Math.atan(-1.0);
            	} else if (v <= 7.2e-140) {
            		tmp = Math.atan((-0.10204081632653061 / (H / (v * v))));
            	} else {
            		tmp = Math.atan(1.0);
            	}
            	return tmp;
            }
            
            def code(v, H):
            	tmp = 0
            	if v <= -1.4e-100:
            		tmp = math.atan(-1.0)
            	elif v <= 7.2e-140:
            		tmp = math.atan((-0.10204081632653061 / (H / (v * v))))
            	else:
            		tmp = math.atan(1.0)
            	return tmp
            
            function code(v, H)
            	tmp = 0.0
            	if (v <= -1.4e-100)
            		tmp = atan(-1.0);
            	elseif (v <= 7.2e-140)
            		tmp = atan(Float64(-0.10204081632653061 / Float64(H / Float64(v * v))));
            	else
            		tmp = atan(1.0);
            	end
            	return tmp
            end
            
            function tmp_2 = code(v, H)
            	tmp = 0.0;
            	if (v <= -1.4e-100)
            		tmp = atan(-1.0);
            	elseif (v <= 7.2e-140)
            		tmp = atan((-0.10204081632653061 / (H / (v * v))));
            	else
            		tmp = atan(1.0);
            	end
            	tmp_2 = tmp;
            end
            
            code[v_, H_] := If[LessEqual[v, -1.4e-100], N[ArcTan[-1.0], $MachinePrecision], If[LessEqual[v, 7.2e-140], N[ArcTan[N[(-0.10204081632653061 / N[(H / N[(v * v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcTan[1.0], $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;v \leq -1.4 \cdot 10^{-100}:\\
            \;\;\;\;\tan^{-1} -1\\
            
            \mathbf{elif}\;v \leq 7.2 \cdot 10^{-140}:\\
            \;\;\;\;\tan^{-1} \left(\frac{-0.10204081632653061}{\frac{H}{v \cdot v}}\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\tan^{-1} 1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if v < -1.39999999999999998e-100

              1. Initial program 61.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-eval61.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. Simplified61.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 v around -inf

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

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

                if -1.39999999999999998e-100 < v < 7.2000000000000001e-140

                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(v \cdot \left(1 + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right)}\right)\right) \]
                6. Step-by-step derivation
                  1. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \tan^{-1} \color{blue}{\left(-0.10204081632653061 \cdot \frac{v \cdot v}{H}\right)} \]
                13. Step-by-step derivation
                  1. clear-numN/A

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

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

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

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

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

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

                if 7.2000000000000001e-140 < v

                1. Initial program 65.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-eval65.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. Simplified65.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. Simplified79.6%

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

                Alternative 11: 71.6% accurate, 1.8× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;v \leq -1.4 \cdot 10^{-100}:\\ \;\;\;\;\tan^{-1} -1\\ \mathbf{elif}\;v \leq 2.3 \cdot 10^{-144}:\\ \;\;\;\;\tan^{-1} \left(\frac{v \cdot v}{H} \cdot -0.10204081632653061\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} 1\\ \end{array} \end{array} \]
                (FPCore (v H)
                 :precision binary64
                 (if (<= v -1.4e-100)
                   (atan -1.0)
                   (if (<= v 2.3e-144)
                     (atan (* (/ (* v v) H) -0.10204081632653061))
                     (atan 1.0))))
                double code(double v, double H) {
                	double tmp;
                	if (v <= -1.4e-100) {
                		tmp = atan(-1.0);
                	} else if (v <= 2.3e-144) {
                		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 <= (-1.4d-100)) then
                        tmp = atan((-1.0d0))
                    else if (v <= 2.3d-144) 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 <= -1.4e-100) {
                		tmp = Math.atan(-1.0);
                	} else if (v <= 2.3e-144) {
                		tmp = Math.atan((((v * v) / H) * -0.10204081632653061));
                	} else {
                		tmp = Math.atan(1.0);
                	}
                	return tmp;
                }
                
                def code(v, H):
                	tmp = 0
                	if v <= -1.4e-100:
                		tmp = math.atan(-1.0)
                	elif v <= 2.3e-144:
                		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 <= -1.4e-100)
                		tmp = atan(-1.0);
                	elseif (v <= 2.3e-144)
                		tmp = atan(Float64(Float64(Float64(v * v) / H) * -0.10204081632653061));
                	else
                		tmp = atan(1.0);
                	end
                	return tmp
                end
                
                function tmp_2 = code(v, H)
                	tmp = 0.0;
                	if (v <= -1.4e-100)
                		tmp = atan(-1.0);
                	elseif (v <= 2.3e-144)
                		tmp = atan((((v * v) / H) * -0.10204081632653061));
                	else
                		tmp = atan(1.0);
                	end
                	tmp_2 = tmp;
                end
                
                code[v_, H_] := If[LessEqual[v, -1.4e-100], N[ArcTan[-1.0], $MachinePrecision], If[LessEqual[v, 2.3e-144], N[ArcTan[N[(N[(N[(v * v), $MachinePrecision] / H), $MachinePrecision] * -0.10204081632653061), $MachinePrecision]], $MachinePrecision], N[ArcTan[1.0], $MachinePrecision]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;v \leq -1.4 \cdot 10^{-100}:\\
                \;\;\;\;\tan^{-1} -1\\
                
                \mathbf{elif}\;v \leq 2.3 \cdot 10^{-144}:\\
                \;\;\;\;\tan^{-1} \left(\frac{v \cdot v}{H} \cdot -0.10204081632653061\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;\tan^{-1} 1\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if v < -1.39999999999999998e-100

                  1. Initial program 61.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-eval61.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. Simplified61.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 v around -inf

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

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

                    if -1.39999999999999998e-100 < v < 2.3e-144

                    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(v \cdot \left(1 + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right)}\right)\right) \]
                    6. Step-by-step derivation
                      1. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 2.3e-144 < v

                    1. Initial program 65.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-eval65.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. Simplified65.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. Simplified79.6%

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

                      \[\leadsto \begin{array}{l} \mathbf{if}\;v \leq -1.4 \cdot 10^{-100}:\\ \;\;\;\;\tan^{-1} -1\\ \mathbf{elif}\;v \leq 2.3 \cdot 10^{-144}:\\ \;\;\;\;\tan^{-1} \left(\frac{v \cdot v}{H} \cdot -0.10204081632653061\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} 1\\ \end{array} \]
                    9. Add Preprocessing

                    Alternative 12: 72.1% accurate, 1.8× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;v \leq -3.6 \cdot 10^{-177}:\\ \;\;\;\;\tan^{-1} -1\\ \mathbf{elif}\;v \leq 1.12 \cdot 10^{-141}:\\ \;\;\;\;\tan^{-1} \left(-0.10204081632653061 \cdot \left(v \cdot \frac{v}{H}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} 1\\ \end{array} \end{array} \]
                    (FPCore (v H)
                     :precision binary64
                     (if (<= v -3.6e-177)
                       (atan -1.0)
                       (if (<= v 1.12e-141)
                         (atan (* -0.10204081632653061 (* v (/ v H))))
                         (atan 1.0))))
                    double code(double v, double H) {
                    	double tmp;
                    	if (v <= -3.6e-177) {
                    		tmp = atan(-1.0);
                    	} else if (v <= 1.12e-141) {
                    		tmp = atan((-0.10204081632653061 * (v * (v / H))));
                    	} 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 <= (-3.6d-177)) then
                            tmp = atan((-1.0d0))
                        else if (v <= 1.12d-141) then
                            tmp = atan(((-0.10204081632653061d0) * (v * (v / h))))
                        else
                            tmp = atan(1.0d0)
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double v, double H) {
                    	double tmp;
                    	if (v <= -3.6e-177) {
                    		tmp = Math.atan(-1.0);
                    	} else if (v <= 1.12e-141) {
                    		tmp = Math.atan((-0.10204081632653061 * (v * (v / H))));
                    	} else {
                    		tmp = Math.atan(1.0);
                    	}
                    	return tmp;
                    }
                    
                    def code(v, H):
                    	tmp = 0
                    	if v <= -3.6e-177:
                    		tmp = math.atan(-1.0)
                    	elif v <= 1.12e-141:
                    		tmp = math.atan((-0.10204081632653061 * (v * (v / H))))
                    	else:
                    		tmp = math.atan(1.0)
                    	return tmp
                    
                    function code(v, H)
                    	tmp = 0.0
                    	if (v <= -3.6e-177)
                    		tmp = atan(-1.0);
                    	elseif (v <= 1.12e-141)
                    		tmp = atan(Float64(-0.10204081632653061 * Float64(v * Float64(v / H))));
                    	else
                    		tmp = atan(1.0);
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(v, H)
                    	tmp = 0.0;
                    	if (v <= -3.6e-177)
                    		tmp = atan(-1.0);
                    	elseif (v <= 1.12e-141)
                    		tmp = atan((-0.10204081632653061 * (v * (v / H))));
                    	else
                    		tmp = atan(1.0);
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[v_, H_] := If[LessEqual[v, -3.6e-177], N[ArcTan[-1.0], $MachinePrecision], If[LessEqual[v, 1.12e-141], N[ArcTan[N[(-0.10204081632653061 * N[(v * N[(v / H), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcTan[1.0], $MachinePrecision]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;v \leq -3.6 \cdot 10^{-177}:\\
                    \;\;\;\;\tan^{-1} -1\\
                    
                    \mathbf{elif}\;v \leq 1.12 \cdot 10^{-141}:\\
                    \;\;\;\;\tan^{-1} \left(-0.10204081632653061 \cdot \left(v \cdot \frac{v}{H}\right)\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\tan^{-1} 1\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if v < -3.59999999999999983e-177

                      1. Initial program 65.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-eval65.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. Simplified65.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. Simplified80.0%

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

                        if -3.59999999999999983e-177 < v < 1.12000000000000002e-141

                        1. Initial program 99.6%

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

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

                          \[\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(v \cdot \left(1 + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right)}\right)\right) \]
                        6. Step-by-step derivation
                          1. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if 1.12000000000000002e-141 < v

                        1. Initial program 65.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-eval65.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. Simplified65.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. Simplified79.6%

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

                          \[\leadsto \begin{array}{l} \mathbf{if}\;v \leq -3.6 \cdot 10^{-177}:\\ \;\;\;\;\tan^{-1} -1\\ \mathbf{elif}\;v \leq 1.12 \cdot 10^{-141}:\\ \;\;\;\;\tan^{-1} \left(-0.10204081632653061 \cdot \left(v \cdot \frac{v}{H}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} 1\\ \end{array} \]
                        9. Add Preprocessing

                        Alternative 13: 72.2% accurate, 1.8× speedup?

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

                          1. Initial program 65.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-eval65.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. Simplified65.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. Simplified80.0%

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

                            if -4.0999999999999999e-178 < v

                            1. Initial program 75.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-eval75.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. Simplified75.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 v around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 14: 72.2% accurate, 1.9× speedup?

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

                            1. Initial program 65.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-eval65.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. Simplified65.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. Simplified80.0%

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

                              if -4.3999999999999997e-176 < v

                              1. Initial program 75.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-eval75.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. Simplified75.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(\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-*.f6466.5%

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

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

                            Alternative 15: 68.1% accurate, 2.0× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;v \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\tan^{-1} -1\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1} 1\\ \end{array} \end{array} \]
                            (FPCore (v H) :precision binary64 (if (<= v -5e-310) (atan -1.0) (atan 1.0)))
                            double code(double v, double H) {
                            	double tmp;
                            	if (v <= -5e-310) {
                            		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-310)) 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-310) {
                            		tmp = Math.atan(-1.0);
                            	} else {
                            		tmp = Math.atan(1.0);
                            	}
                            	return tmp;
                            }
                            
                            def code(v, H):
                            	tmp = 0
                            	if v <= -5e-310:
                            		tmp = math.atan(-1.0)
                            	else:
                            		tmp = math.atan(1.0)
                            	return tmp
                            
                            function code(v, H)
                            	tmp = 0.0
                            	if (v <= -5e-310)
                            		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-310)
                            		tmp = atan(-1.0);
                            	else
                            		tmp = atan(1.0);
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[v_, H_] := If[LessEqual[v, -5e-310], N[ArcTan[-1.0], $MachinePrecision], N[ArcTan[1.0], $MachinePrecision]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;v \leq -5 \cdot 10^{-310}:\\
                            \;\;\;\;\tan^{-1} -1\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\tan^{-1} 1\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if v < -4.999999999999985e-310

                              1. Initial program 70.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-eval70.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. Simplified70.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. Simplified67.8%

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

                                if -4.999999999999985e-310 < v

                                1. Initial program 71.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-eval71.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. Simplified71.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. Simplified66.3%

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

                                Alternative 16: 35.5% 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 71.0%

                                  \[\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-eval71.0%

                                    \[\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. Simplified71.0%

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

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

                                  Reproduce

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