Optimal throwing angle

Percentage Accurate: 66.9% → 98.9%
Time: 12.4s
Alternatives: 12
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 12 alternatives:

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

Initial Program: 66.9% 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: 98.9% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if v < -1.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 -1.00000000000000004e154 < v < 1.66e46

      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.66e46 < v

      1. Initial program 39.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-eval39.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. Simplified39.3%

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

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

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

      Alternative 2: 89.3% accurate, 1.0× speedup?

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

        1. Initial program 52.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \color{blue}{\left(-1 \cdot \left(v \cdot \left(1 + \left(\frac{-2401}{50} \cdot \frac{{H}^{2}}{{v}^{4}} + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\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 + \left(\frac{-2401}{50} \cdot \frac{{H}^{2}}{{v}^{4}} + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right)\right)\right)\right) \]
          2. *-commutativeN/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\left(1 + \left(\frac{-2401}{50} \cdot \frac{{H}^{2}}{{v}^{4}} + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\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 + \left(\frac{-2401}{50} \cdot \frac{{H}^{2}}{{v}^{4}} + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        7. Simplified74.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, v\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \frac{2401}{50}\right), \left({v}^{3}\right)\right)\right)\right), v\right)\right)\right) \]
          15. cube-multN/A

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

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

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

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

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, v\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \frac{2401}{50}\right), \mathsf{*.f64}\left(v, \mathsf{*.f64}\left(v, v\right)\right)\right)\right)\right), v\right)\right)\right) \]
        10. Simplified93.8%

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

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{\_.f64}\left(\left(\left(\frac{\frac{49}{5}}{v} + \frac{H \cdot \frac{2401}{50}}{v \cdot \left(v \cdot v\right)}\right) \cdot H\right), v\right)\right)\right) \]
          2. flip-+N/A

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

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

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{\frac{49}{5}}{v} \cdot \frac{\frac{49}{5}}{v} - \frac{H \cdot \frac{2401}{50}}{v \cdot \left(v \cdot v\right)} \cdot \frac{H \cdot \frac{2401}{50}}{v \cdot \left(v \cdot v\right)}\right) \cdot H\right), \left(\frac{\frac{49}{5}}{v} - \frac{H \cdot \frac{2401}{50}}{v \cdot \left(v \cdot v\right)}\right)\right), v\right)\right)\right) \]
        12. Applied egg-rr93.7%

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \mathsf{/.f64}\left(\frac{2401}{25}, \left(v \cdot v\right)\right)\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(H, \mathsf{/.f64}\left(\frac{2401}{50}, \mathsf{*.f64}\left(v, v\right)\right)\right)\right), v\right)\right), v\right)\right)\right) \]
          11. *-lowering-*.f6493.8%

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \mathsf{/.f64}\left(\frac{2401}{25}, \mathsf{*.f64}\left(v, v\right)\right)\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(H, \mathsf{/.f64}\left(\frac{2401}{50}, \mathsf{*.f64}\left(v, v\right)\right)\right)\right), v\right)\right), v\right)\right)\right) \]
        15. Simplified93.8%

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

        if -2.4000000000000001e-92 < v < 2.34999999999999985e-30

        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 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-*.f6495.4%

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

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

        if 2.34999999999999985e-30 < v

        1. Initial program 45.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-eval45.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. Simplified45.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-*.f6496.7%

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

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

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

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

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

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

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

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

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

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

      Alternative 3: 72.1% accurate, 1.6× speedup?

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

        1. Initial program 55.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-eval55.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. Simplified55.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(-1 \cdot \left(v \cdot \left(1 + \left(\frac{-2401}{50} \cdot \frac{{H}^{2}}{{v}^{4}} + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\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 + \left(\frac{-2401}{50} \cdot \frac{{H}^{2}}{{v}^{4}} + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right)\right)\right)\right) \]
          2. *-commutativeN/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\left(1 + \left(\frac{-2401}{50} \cdot \frac{{H}^{2}}{{v}^{4}} + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\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 + \left(\frac{-2401}{50} \cdot \frac{{H}^{2}}{{v}^{4}} + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        7. Simplified70.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, v\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \frac{2401}{50}\right), \left({v}^{3}\right)\right)\right)\right), v\right)\right)\right) \]
          15. cube-multN/A

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

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

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

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

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

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

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{\_.f64}\left(\left(\left(\frac{\frac{49}{5}}{v} + \frac{H \cdot \frac{2401}{50}}{v \cdot \left(v \cdot v\right)}\right) \cdot H\right), v\right)\right)\right) \]
          2. flip-+N/A

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

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

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{\frac{49}{5}}{v} \cdot \frac{\frac{49}{5}}{v} - \frac{H \cdot \frac{2401}{50}}{v \cdot \left(v \cdot v\right)} \cdot \frac{H \cdot \frac{2401}{50}}{v \cdot \left(v \cdot v\right)}\right) \cdot H\right), \left(\frac{\frac{49}{5}}{v} - \frac{H \cdot \frac{2401}{50}}{v \cdot \left(v \cdot v\right)}\right)\right), v\right)\right)\right) \]
        12. Applied egg-rr88.7%

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \mathsf{/.f64}\left(\frac{2401}{25}, \left(v \cdot v\right)\right)\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(H, \mathsf{/.f64}\left(\frac{2401}{50}, \mathsf{*.f64}\left(v, v\right)\right)\right)\right), v\right)\right), v\right)\right)\right) \]
          11. *-lowering-*.f6489.1%

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \mathsf{/.f64}\left(\frac{2401}{25}, \mathsf{*.f64}\left(v, v\right)\right)\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\frac{49}{5}, \mathsf{*.f64}\left(H, \mathsf{/.f64}\left(\frac{2401}{50}, \mathsf{*.f64}\left(v, v\right)\right)\right)\right), v\right)\right), v\right)\right)\right) \]
        15. Simplified89.1%

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

        if -2.50000000000000014e-129 < v

        1. Initial program 68.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-eval68.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. Simplified68.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-*.f6470.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. Simplified70.5%

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

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

      Alternative 4: 71.4% accurate, 1.8× speedup?

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

        1. Initial program 52.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{atan.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)\right) \]
        7. Simplified93.1%

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

        if -3.49999999999999994e-101 < v < 4.99999999999999968e-149

        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(-1 \cdot \left(v \cdot \left(1 + \left(\frac{-2401}{50} \cdot \frac{{H}^{2}}{{v}^{4}} + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\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 + \left(\frac{-2401}{50} \cdot \frac{{H}^{2}}{{v}^{4}} + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right)\right)\right)\right) \]
          2. *-commutativeN/A

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\left(1 + \left(\frac{-2401}{50} \cdot \frac{{H}^{2}}{{v}^{4}} + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\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 + \left(\frac{-2401}{50} \cdot \frac{{H}^{2}}{{v}^{4}} + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
        7. Simplified0.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, v\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \frac{2401}{50}\right), \left({v}^{3}\right)\right)\right)\right), v\right)\right)\right) \]
          15. cube-multN/A

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

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

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

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

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, v\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \frac{2401}{50}\right), \mathsf{*.f64}\left(v, \mathsf{*.f64}\left(v, v\right)\right)\right)\right)\right), v\right)\right)\right) \]
        10. Simplified30.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \frac{49}{5}\right), v\right)\right)\right) \]
        16. Simplified33.2%

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

        if 4.99999999999999968e-149 < v

        1. Initial program 54.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-eval54.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. Simplified54.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. Simplified85.3%

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

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

        Alternative 5: 71.5% accurate, 1.8× speedup?

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

          1. Initial program 52.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -3.49999999999999994e-101 < v < 6.0000000000000003e-149

            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(-1 \cdot \left(v \cdot \left(1 + \left(\frac{-2401}{50} \cdot \frac{{H}^{2}}{{v}^{4}} + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\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 + \left(\frac{-2401}{50} \cdot \frac{{H}^{2}}{{v}^{4}} + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right)\right)\right)\right) \]
              2. *-commutativeN/A

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\left(1 + \left(\frac{-2401}{50} \cdot \frac{{H}^{2}}{{v}^{4}} + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\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 + \left(\frac{-2401}{50} \cdot \frac{{H}^{2}}{{v}^{4}} + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
            7. Simplified0.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, v\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \frac{2401}{50}\right), \left({v}^{3}\right)\right)\right)\right), v\right)\right)\right) \]
              15. cube-multN/A

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

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

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

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

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, v\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \frac{2401}{50}\right), \mathsf{*.f64}\left(v, \mathsf{*.f64}\left(v, v\right)\right)\right)\right)\right), v\right)\right)\right) \]
            10. Simplified30.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \frac{49}{5}\right), v\right)\right)\right) \]
            16. Simplified33.2%

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

            if 6.0000000000000003e-149 < v

            1. Initial program 54.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-eval54.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. Simplified54.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. Simplified85.3%

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

            Alternative 6: 71.5% accurate, 1.8× speedup?

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

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

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

                if -1.1999999999999999e-208 < v < 2.4000000000000001e-111

                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. 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-*.f6439.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 2.4000000000000001e-111 < v

                1. Initial program 51.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 7: 72.3% accurate, 1.8× speedup?

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

                  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(\mathsf{/.f64}\left(v, \color{blue}{\left(-1 \cdot \left(v \cdot \left(1 + \left(\frac{-2401}{50} \cdot \frac{{H}^{2}}{{v}^{4}} + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\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 + \left(\frac{-2401}{50} \cdot \frac{{H}^{2}}{{v}^{4}} + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right)\right)\right)\right) \]
                    2. *-commutativeN/A

                      \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\left(1 + \left(\frac{-2401}{50} \cdot \frac{{H}^{2}}{{v}^{4}} + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\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 + \left(\frac{-2401}{50} \cdot \frac{{H}^{2}}{{v}^{4}} + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
                  7. Simplified54.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(H, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{49}{5}, v\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(H, \frac{2401}{50}\right), \left({v}^{3}\right)\right)\right)\right), v\right)\right)\right) \]
                    15. cube-multN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if 1.2199999999999999e-228 < v

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 8: 72.3% accurate, 1.9× speedup?

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

                  1. Initial program 60.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-eval60.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. Simplified60.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(-1 \cdot \left(v \cdot \left(1 + \left(\frac{-2401}{50} \cdot \frac{{H}^{2}}{{v}^{4}} + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\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 + \left(\frac{-2401}{50} \cdot \frac{{H}^{2}}{{v}^{4}} + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right)\right)\right)\right) \]
                    2. *-commutativeN/A

                      \[\leadsto \mathsf{atan.f64}\left(\mathsf{/.f64}\left(v, \left(\left(1 + \left(\frac{-2401}{50} \cdot \frac{{H}^{2}}{{v}^{4}} + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\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 + \left(\frac{-2401}{50} \cdot \frac{{H}^{2}}{{v}^{4}} + \frac{-49}{5} \cdot \frac{H}{{v}^{2}}\right)\right), \left(-1 \cdot v\right)\right)\right)\right) \]
                  7. Simplified62.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if -1.1400000000000001e-266 < v

                  1. Initial program 64.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-eval64.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. Simplified64.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 9: 71.4% accurate, 1.9× speedup?

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

                  1. Initial program 52.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{atan.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)\right) \]
                  7. Simplified93.1%

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

                  if -3.49999999999999994e-101 < v

                  1. Initial program 69.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-eval69.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. Simplified69.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 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-*.f6467.2%

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

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

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

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

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

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

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

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

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

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

                Alternative 10: 71.4% accurate, 1.9× speedup?

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

                  1. Initial program 52.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{atan.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)\right) \]
                  7. Simplified93.1%

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

                  if -3.49999999999999994e-101 < v

                  1. Initial program 69.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-eval69.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. Simplified69.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 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-*.f6467.2%

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

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

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

                Alternative 11: 67.7% 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 63.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-eval63.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. Simplified63.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. Simplified73.8%

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

                    if -4.999999999999985e-310 < v

                    1. Initial program 62.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-eval62.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. Simplified62.5%

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

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

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

                    Alternative 12: 34.3% accurate, 2.1× speedup?

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

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

                      Reproduce

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