
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
(FPCore (A B C) :precision binary64 (if (<= C 7.5e+110) (* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI)) (/ (* 180.0 (atan (* -0.5 (/ B C)))) PI)))
double code(double A, double B, double C) {
double tmp;
if (C <= 7.5e+110) {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
} else {
tmp = (180.0 * atan((-0.5 * (B / C)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 7.5e+110) {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
} else {
tmp = (180.0 * Math.atan((-0.5 * (B / C)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 7.5e+110: tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi) else: tmp = (180.0 * math.atan((-0.5 * (B / C)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (C <= 7.5e+110) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / C)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 7.5e+110) tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); else tmp = (180.0 * atan((-0.5 * (B / C)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 7.5e+110], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 7.5 \cdot 10^{+110}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < 7.5e110Initial program 60.6%
associate-*l/60.6%
*-lft-identity60.6%
+-commutative60.6%
unpow260.6%
unpow260.6%
hypot-define83.1%
Simplified83.1%
if 7.5e110 < C Initial program 14.0%
Taylor expanded in A around 0 12.0%
+-commutative12.0%
unpow212.0%
unpow212.0%
hypot-define36.9%
Simplified36.9%
Taylor expanded in C around inf 66.2%
Taylor expanded in B around 0 80.2%
associate-*r/80.5%
Simplified80.5%
(FPCore (A B C)
:precision binary64
(if (<= A -4e+47)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 5.9e-36)
(* 180.0 (/ (atan (/ (- C (hypot C B)) B)) PI))
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4e+47) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 5.9e-36) {
tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4e+47) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 5.9e-36) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(C, B)) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4e+47: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 5.9e-36: tmp = 180.0 * (math.atan(((C - math.hypot(C, B)) / B)) / math.pi) else: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4e+47) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 5.9e-36) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(C, B)) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4e+47) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 5.9e-36) tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / pi); else tmp = 180.0 * (atan((1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4e+47], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 5.9e-36], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4 \cdot 10^{+47}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 5.9 \cdot 10^{-36}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -4.0000000000000002e47Initial program 20.5%
Taylor expanded in A around -inf 72.8%
associate-*r/72.8%
Simplified72.8%
if -4.0000000000000002e47 < A < 5.89999999999999995e-36Initial program 53.8%
Taylor expanded in A around 0 52.7%
+-commutative52.7%
unpow252.7%
unpow252.7%
hypot-define78.1%
Simplified78.1%
if 5.89999999999999995e-36 < A Initial program 75.0%
Taylor expanded in B around -inf 81.0%
associate--l+81.0%
div-sub81.0%
Simplified81.0%
Taylor expanded in C around 0 81.3%
Final simplification77.8%
(FPCore (A B C) :precision binary64 (if (<= A -3.8e+47) (* 180.0 (/ (atan (/ (* B 0.5) A)) PI)) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.8e+47) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.8e+47) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.8e+47: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) else: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.8e+47) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.8e+47) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); else tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.8e+47], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.8 \cdot 10^{+47}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.8000000000000003e47Initial program 20.5%
Taylor expanded in A around -inf 72.8%
associate-*r/72.8%
Simplified72.8%
if -3.8000000000000003e47 < A Initial program 60.9%
Simplified82.4%
Final simplification80.3%
(FPCore (A B C)
:precision binary64
(if (<= B -1.3e-296)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
(if (<= B 3.8e-250)
(* (atan (* B (/ 0.5 A))) (/ 180.0 PI))
(* 180.0 (/ (atan (+ (/ C B) (- -1.0 (/ A B)))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.3e-296) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else if (B <= 3.8e-250) {
tmp = atan((B * (0.5 / A))) * (180.0 / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.3e-296) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else if (B <= 3.8e-250) {
tmp = Math.atan((B * (0.5 / A))) * (180.0 / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C / B) + (-1.0 - (A / B)))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.3e-296: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) elif B <= 3.8e-250: tmp = math.atan((B * (0.5 / A))) * (180.0 / math.pi) else: tmp = 180.0 * (math.atan(((C / B) + (-1.0 - (A / B)))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.3e-296) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); elseif (B <= 3.8e-250) tmp = Float64(atan(Float64(B * Float64(0.5 / A))) * Float64(180.0 / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + Float64(-1.0 - Float64(A / B)))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.3e-296) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); elseif (B <= 3.8e-250) tmp = atan((B * (0.5 / A))) * (180.0 / pi); else tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.3e-296], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.8e-250], N[(N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.3 \cdot 10^{-296}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.8 \cdot 10^{-250}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.3e-296Initial program 50.6%
Taylor expanded in B around -inf 67.2%
associate--l+67.2%
div-sub69.5%
Simplified69.5%
if -1.3e-296 < B < 3.79999999999999971e-250Initial program 54.0%
Taylor expanded in A around -inf 85.0%
associate-*r/85.0%
Simplified85.0%
clear-num80.5%
inv-pow80.5%
*-commutative80.5%
Applied egg-rr80.5%
unpow-180.5%
associate-/l*80.5%
Simplified80.5%
Taylor expanded in B around 0 85.0%
associate-*r/85.3%
associate-*r/85.3%
*-commutative85.3%
*-commutative85.3%
associate-/l*85.5%
associate-/l*85.5%
Simplified85.5%
if 3.79999999999999971e-250 < B Initial program 53.7%
Taylor expanded in B around inf 65.3%
Final simplification68.0%
(FPCore (A B C)
:precision binary64
(if (<= B -8.8e-5)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -1.16e-122)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= B 800000000.0)
(* 180.0 (/ (atan (/ C B)) PI))
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -8.8e-5) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -1.16e-122) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (B <= 800000000.0) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -8.8e-5) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -1.16e-122) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (B <= 800000000.0) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -8.8e-5: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -1.16e-122: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif B <= 800000000.0: tmp = 180.0 * (math.atan((C / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -8.8e-5) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -1.16e-122) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (B <= 800000000.0) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -8.8e-5) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -1.16e-122) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (B <= 800000000.0) tmp = 180.0 * (atan((C / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -8.8e-5], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.16e-122], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 800000000.0], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -8.8 \cdot 10^{-5}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -1.16 \cdot 10^{-122}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;B \leq 800000000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -8.7999999999999998e-5Initial program 45.2%
Taylor expanded in B around -inf 64.1%
if -8.7999999999999998e-5 < B < -1.16000000000000001e-122Initial program 34.3%
Taylor expanded in A around 0 25.1%
+-commutative25.1%
unpow225.1%
unpow225.1%
hypot-define35.7%
Simplified35.7%
Taylor expanded in C around inf 50.0%
if -1.16000000000000001e-122 < B < 8e8Initial program 64.8%
Taylor expanded in B around -inf 51.2%
associate--l+51.2%
div-sub55.5%
Simplified55.5%
Taylor expanded in C around inf 40.4%
if 8e8 < B Initial program 47.2%
Taylor expanded in B around inf 58.1%
(FPCore (A B C)
:precision binary64
(if (<= C -26.0)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(if (<= C 9.2e+53)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(* (/ 180.0 PI) (atan (/ (* B -0.5) C))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -26.0) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else if (C <= 9.2e+53) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / C));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -26.0) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else if (C <= 9.2e+53) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / C));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -26.0: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) elif C <= 9.2e+53: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) else: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / C)) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -26.0) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); elseif (C <= 9.2e+53) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / C))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -26.0) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); elseif (C <= 9.2e+53) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); else tmp = (180.0 / pi) * atan(((B * -0.5) / C)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -26.0], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 9.2e+53], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -26:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 9.2 \cdot 10^{+53}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\
\end{array}
\end{array}
if C < -26Initial program 72.9%
Taylor expanded in B around -inf 73.3%
associate--l+73.3%
div-sub80.1%
Simplified80.1%
Taylor expanded in A around 0 79.1%
if -26 < C < 9.20000000000000079e53Initial program 57.9%
Taylor expanded in B around -inf 56.3%
associate--l+56.3%
div-sub56.3%
Simplified56.3%
Taylor expanded in C around 0 55.4%
if 9.20000000000000079e53 < C Initial program 16.8%
Taylor expanded in A around 0 13.5%
+-commutative13.5%
unpow213.5%
unpow213.5%
hypot-define40.6%
Simplified40.6%
Taylor expanded in C around inf 60.7%
Taylor expanded in B around 0 72.1%
associate-*r/72.3%
*-commutative72.3%
associate-/l*72.3%
associate-*r/72.3%
*-commutative72.3%
Simplified72.3%
Final simplification64.7%
(FPCore (A B C)
:precision binary64
(if (<= C -7.6)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(if (<= C 7.5e+53)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -7.6) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else if (C <= 7.5e+53) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -7.6) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else if (C <= 7.5e+53) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -7.6: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) elif C <= 7.5e+53: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -7.6) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); elseif (C <= 7.5e+53) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -7.6) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); elseif (C <= 7.5e+53) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -7.6], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 7.5e+53], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -7.6:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 7.5 \cdot 10^{+53}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -7.5999999999999996Initial program 72.9%
Taylor expanded in B around -inf 73.3%
associate--l+73.3%
div-sub80.1%
Simplified80.1%
Taylor expanded in A around 0 79.1%
if -7.5999999999999996 < C < 7.4999999999999997e53Initial program 57.9%
Taylor expanded in B around -inf 56.3%
associate--l+56.3%
div-sub56.3%
Simplified56.3%
Taylor expanded in C around 0 55.4%
if 7.4999999999999997e53 < C Initial program 16.8%
Taylor expanded in A around 0 13.5%
+-commutative13.5%
unpow213.5%
unpow213.5%
hypot-define40.6%
Simplified40.6%
Taylor expanded in C around inf 72.1%
(FPCore (A B C)
:precision binary64
(if (<= A -6.8e-29)
(* 180.0 (/ (atan (* B (/ 0.5 A))) PI))
(if (<= A 1.45e-69)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(* 180.0 (/ (atan (/ A (- B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -6.8e-29) {
tmp = 180.0 * (atan((B * (0.5 / A))) / ((double) M_PI));
} else if (A <= 1.45e-69) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((A / -B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -6.8e-29) {
tmp = 180.0 * (Math.atan((B * (0.5 / A))) / Math.PI);
} else if (A <= 1.45e-69) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((A / -B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -6.8e-29: tmp = 180.0 * (math.atan((B * (0.5 / A))) / math.pi) elif A <= 1.45e-69: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) else: tmp = 180.0 * (math.atan((A / -B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -6.8e-29) tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(0.5 / A))) / pi)); elseif (A <= 1.45e-69) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(A / Float64(-B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -6.8e-29) tmp = 180.0 * (atan((B * (0.5 / A))) / pi); elseif (A <= 1.45e-69) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); else tmp = 180.0 * (atan((A / -B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -6.8e-29], N[(180.0 * N[(N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.45e-69], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(A / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -6.8 \cdot 10^{-29}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.45 \cdot 10^{-69}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -6.79999999999999945e-29Initial program 26.8%
Taylor expanded in A around -inf 65.1%
associate-*r/65.1%
Simplified65.1%
Taylor expanded in B around 0 65.1%
associate-*r/65.1%
*-commutative65.1%
associate-/l*64.9%
Simplified64.9%
if -6.79999999999999945e-29 < A < 1.4499999999999999e-69Initial program 56.4%
Taylor expanded in B around -inf 55.3%
associate--l+55.3%
div-sub55.3%
Simplified55.3%
Taylor expanded in A around 0 54.5%
if 1.4499999999999999e-69 < A Initial program 70.9%
Taylor expanded in B around -inf 74.9%
associate--l+74.9%
div-sub74.9%
Simplified74.9%
Taylor expanded in A around inf 65.5%
associate-*r/65.5%
mul-1-neg65.5%
Simplified65.5%
Final simplification60.7%
(FPCore (A B C)
:precision binary64
(if (<= A -8.5e-283)
(* 180.0 (/ (atan (* B (/ 0.5 A))) PI))
(if (<= A 3.6e-69)
(* 180.0 (/ (atan 1.0) PI))
(* 180.0 (/ (atan (/ A (- B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -8.5e-283) {
tmp = 180.0 * (atan((B * (0.5 / A))) / ((double) M_PI));
} else if (A <= 3.6e-69) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((A / -B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -8.5e-283) {
tmp = 180.0 * (Math.atan((B * (0.5 / A))) / Math.PI);
} else if (A <= 3.6e-69) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((A / -B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -8.5e-283: tmp = 180.0 * (math.atan((B * (0.5 / A))) / math.pi) elif A <= 3.6e-69: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan((A / -B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -8.5e-283) tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(0.5 / A))) / pi)); elseif (A <= 3.6e-69) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(A / Float64(-B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -8.5e-283) tmp = 180.0 * (atan((B * (0.5 / A))) / pi); elseif (A <= 3.6e-69) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan((A / -B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -8.5e-283], N[(180.0 * N[(N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.6e-69], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(A / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -8.5 \cdot 10^{-283}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 3.6 \cdot 10^{-69}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -8.49999999999999997e-283Initial program 40.9%
Taylor expanded in A around -inf 51.9%
associate-*r/51.9%
Simplified51.9%
Taylor expanded in B around 0 51.9%
associate-*r/51.9%
*-commutative51.9%
associate-/l*51.9%
Simplified51.9%
if -8.49999999999999997e-283 < A < 3.60000000000000018e-69Initial program 51.3%
Taylor expanded in B around -inf 37.6%
if 3.60000000000000018e-69 < A Initial program 71.8%
Taylor expanded in B around -inf 75.9%
associate--l+75.9%
div-sub75.9%
Simplified75.9%
Taylor expanded in A around inf 66.3%
associate-*r/66.3%
mul-1-neg66.3%
Simplified66.3%
Final simplification52.8%
(FPCore (A B C)
:precision binary64
(if (<= B -0.0052)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 600000000.0)
(* 180.0 (/ (atan (/ C B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -0.0052) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 600000000.0) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -0.0052) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 600000000.0) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -0.0052: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 600000000.0: tmp = 180.0 * (math.atan((C / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -0.0052) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 600000000.0) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -0.0052) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 600000000.0) tmp = 180.0 * (atan((C / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -0.0052], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 600000000.0], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -0.0052:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 600000000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -0.0051999999999999998Initial program 43.8%
Taylor expanded in B around -inf 65.3%
if -0.0051999999999999998 < B < 6e8Initial program 60.4%
Taylor expanded in B around -inf 49.1%
associate--l+49.1%
div-sub52.6%
Simplified52.6%
Taylor expanded in C around inf 37.8%
if 6e8 < B Initial program 47.2%
Taylor expanded in B around inf 58.1%
(FPCore (A B C) :precision binary64 (if (<= C 1.45e+54) (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)) (* (/ 180.0 PI) (atan (/ (* B -0.5) C)))))
double code(double A, double B, double C) {
double tmp;
if (C <= 1.45e+54) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / C));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 1.45e+54) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / C));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 1.45e+54: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) else: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / C)) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 1.45e+54) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / C))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 1.45e+54) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); else tmp = (180.0 / pi) * atan(((B * -0.5) / C)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 1.45e+54], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 1.45 \cdot 10^{+54}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\
\end{array}
\end{array}
if C < 1.4499999999999999e54Initial program 62.4%
Taylor expanded in B around -inf 61.4%
associate--l+61.4%
div-sub63.4%
Simplified63.4%
if 1.4499999999999999e54 < C Initial program 16.8%
Taylor expanded in A around 0 13.5%
+-commutative13.5%
unpow213.5%
unpow213.5%
hypot-define40.6%
Simplified40.6%
Taylor expanded in C around inf 60.7%
Taylor expanded in B around 0 72.1%
associate-*r/72.3%
*-commutative72.3%
associate-/l*72.3%
associate-*r/72.3%
*-commutative72.3%
Simplified72.3%
Final simplification65.4%
(FPCore (A B C)
:precision binary64
(if (<= B -2.6e-192)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.45e-77)
(/ (* 180.0 (atan 0.0)) PI)
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.6e-192) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.45e-77) {
tmp = (180.0 * atan(0.0)) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2.6e-192) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.45e-77) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.6e-192: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.45e-77: tmp = (180.0 * math.atan(0.0)) / math.pi else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2.6e-192) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.45e-77) tmp = Float64(Float64(180.0 * atan(0.0)) / pi); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2.6e-192) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.45e-77) tmp = (180.0 * atan(0.0)) / pi; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.6e-192], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.45e-77], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2.6 \cdot 10^{-192}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.45 \cdot 10^{-77}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.6000000000000002e-192Initial program 47.0%
Taylor expanded in B around -inf 50.9%
if -2.6000000000000002e-192 < B < 1.4499999999999999e-77Initial program 62.7%
Taylor expanded in C around inf 29.8%
associate-*r/29.8%
mul-1-neg29.8%
distribute-rgt1-in29.8%
metadata-eval29.8%
mul0-lft29.8%
metadata-eval29.8%
Simplified29.8%
associate-*r/29.8%
div029.8%
Applied egg-rr29.8%
if 1.4499999999999999e-77 < B Initial program 50.8%
Taylor expanded in B around inf 49.9%
(FPCore (A B C) :precision binary64 (if (<= B -1e-310) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1e-310) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1e-310) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1e-310: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1e-310) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1e-310) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1e-310], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1 \cdot 10^{-310}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -9.999999999999969e-311Initial program 50.2%
Taylor expanded in B around -inf 45.0%
if -9.999999999999969e-311 < B Initial program 54.1%
Taylor expanded in B around inf 38.0%
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan -1.0) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(-1.0) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(-1.0) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(-1.0) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(-1.0) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(-1.0) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} -1}{\pi}
\end{array}
Initial program 52.0%
Taylor expanded in B around inf 18.7%
herbie shell --seed 2024177
(FPCore (A B C)
:name "ABCF->ab-angle angle"
:precision binary64
(* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))