
(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 21 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 1.35e+203)
(* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI))
(/
(*
180.0
(atan (fma -0.5 (+ (/ B C) (* A (/ B (pow C 2.0)))) (/ (* A 0.0) B))))
PI)))
double code(double A, double B, double C) {
double tmp;
if (C <= 1.35e+203) {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
} else {
tmp = (180.0 * atan(fma(-0.5, ((B / C) + (A * (B / pow(C, 2.0)))), ((A * 0.0) / B)))) / ((double) M_PI);
}
return tmp;
}
function code(A, B, C) tmp = 0.0 if (C <= 1.35e+203) 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(fma(-0.5, Float64(Float64(B / C) + Float64(A * Float64(B / (C ^ 2.0)))), Float64(Float64(A * 0.0) / B)))) / pi); end return tmp end
code[A_, B_, C_] := If[LessEqual[C, 1.35e+203], 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[(N[(B / C), $MachinePrecision] + N[(A * N[(B / N[Power[C, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(A * 0.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 1.35 \cdot 10^{+203}:\\
\;\;\;\;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(\mathsf{fma}\left(-0.5, \frac{B}{C} + A \cdot \frac{B}{{C}^{2}}, \frac{A \cdot 0}{B}\right)\right)}{\pi}\\
\end{array}
\end{array}
if C < 1.35e203Initial program 59.2%
associate-*l/59.2%
*-lft-identity59.2%
+-commutative59.2%
unpow259.2%
unpow259.2%
hypot-define84.0%
Simplified84.0%
if 1.35e203 < C Initial program 13.0%
Taylor expanded in C around inf 81.0%
associate-*r/81.0%
Applied egg-rr89.7%
Final simplification84.6%
(FPCore (A B C)
:precision binary64
(if (<= A -2.2e+127)
(* 180.0 (/ (atan (/ 1.0 (/ A (* B 0.5)))) PI))
(if (<= A 2.65e-23)
(* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B)))
(* 180.0 (/ (atan (/ (+ A (hypot B A)) (- B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.2e+127) {
tmp = 180.0 * (atan((1.0 / (A / (B * 0.5)))) / ((double) M_PI));
} else if (A <= 2.65e-23) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / B));
} else {
tmp = 180.0 * (atan(((A + hypot(B, A)) / -B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.2e+127) {
tmp = 180.0 * (Math.atan((1.0 / (A / (B * 0.5)))) / Math.PI);
} else if (A <= 2.65e-23) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / B));
} else {
tmp = 180.0 * (Math.atan(((A + Math.hypot(B, A)) / -B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.2e+127: tmp = 180.0 * (math.atan((1.0 / (A / (B * 0.5)))) / math.pi) elif A <= 2.65e-23: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / B)) else: tmp = 180.0 * (math.atan(((A + math.hypot(B, A)) / -B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.2e+127) tmp = Float64(180.0 * Float64(atan(Float64(1.0 / Float64(A / Float64(B * 0.5)))) / pi)); elseif (A <= 2.65e-23) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / B))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + hypot(B, A)) / Float64(-B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.2e+127) tmp = 180.0 * (atan((1.0 / (A / (B * 0.5)))) / pi); elseif (A <= 2.65e-23) tmp = (180.0 / pi) * atan(((C - hypot(B, C)) / B)); else tmp = 180.0 * (atan(((A + hypot(B, A)) / -B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.2e+127], N[(180.0 * N[(N[ArcTan[N[(1.0 / N[(A / N[(B * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.65e-23], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.2 \cdot 10^{+127}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{\frac{A}{B \cdot 0.5}}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2.65 \cdot 10^{-23}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{-B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.2000000000000002e127Initial program 11.4%
Taylor expanded in A around -inf 81.0%
associate-*r/81.0%
Simplified81.0%
clear-num81.0%
inv-pow81.0%
*-commutative81.0%
Applied egg-rr81.0%
unpow-181.0%
Simplified81.0%
if -2.2000000000000002e127 < A < 2.65000000000000021e-23Initial program 53.5%
Taylor expanded in B around 0 52.7%
Simplified77.6%
Taylor expanded in A around 0 51.5%
unpow251.5%
unpow251.5%
hypot-undefine76.4%
Simplified76.4%
if 2.65000000000000021e-23 < A Initial program 75.0%
Taylor expanded in C around 0 75.0%
associate-*r/75.0%
mul-1-neg75.0%
+-commutative75.0%
unpow275.0%
unpow275.0%
hypot-define93.3%
Simplified93.3%
Final simplification82.3%
(FPCore (A B C)
:precision binary64
(if (<= A -2.4e+132)
(* 180.0 (/ (atan (/ 1.0 (/ A (* B 0.5)))) PI))
(if (<= A 3e-22)
(* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B)))
(/ (* -180.0 (atan (/ (+ A (hypot B A)) B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.4e+132) {
tmp = 180.0 * (atan((1.0 / (A / (B * 0.5)))) / ((double) M_PI));
} else if (A <= 3e-22) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / B));
} else {
tmp = (-180.0 * atan(((A + hypot(B, A)) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.4e+132) {
tmp = 180.0 * (Math.atan((1.0 / (A / (B * 0.5)))) / Math.PI);
} else if (A <= 3e-22) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / B));
} else {
tmp = (-180.0 * Math.atan(((A + Math.hypot(B, A)) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.4e+132: tmp = 180.0 * (math.atan((1.0 / (A / (B * 0.5)))) / math.pi) elif A <= 3e-22: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / B)) else: tmp = (-180.0 * math.atan(((A + math.hypot(B, A)) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.4e+132) tmp = Float64(180.0 * Float64(atan(Float64(1.0 / Float64(A / Float64(B * 0.5)))) / pi)); elseif (A <= 3e-22) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / B))); else tmp = Float64(Float64(-180.0 * atan(Float64(Float64(A + hypot(B, A)) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.4e+132) tmp = 180.0 * (atan((1.0 / (A / (B * 0.5)))) / pi); elseif (A <= 3e-22) tmp = (180.0 / pi) * atan(((C - hypot(B, C)) / B)); else tmp = (-180.0 * atan(((A + hypot(B, A)) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.4e+132], N[(180.0 * N[(N[ArcTan[N[(1.0 / N[(A / N[(B * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3e-22], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(-180.0 * N[ArcTan[N[(N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.4 \cdot 10^{+132}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{\frac{A}{B \cdot 0.5}}\right)}{\pi}\\
\mathbf{elif}\;A \leq 3 \cdot 10^{-22}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.4000000000000001e132Initial program 11.4%
Taylor expanded in A around -inf 81.0%
associate-*r/81.0%
Simplified81.0%
clear-num81.0%
inv-pow81.0%
*-commutative81.0%
Applied egg-rr81.0%
unpow-181.0%
Simplified81.0%
if -2.4000000000000001e132 < A < 2.9999999999999999e-22Initial program 53.5%
Taylor expanded in B around 0 52.7%
Simplified77.6%
Taylor expanded in A around 0 51.5%
unpow251.5%
unpow251.5%
hypot-undefine76.4%
Simplified76.4%
if 2.9999999999999999e-22 < A Initial program 75.0%
Taylor expanded in C around 0 75.0%
associate-*r/75.0%
mul-1-neg75.0%
+-commutative75.0%
unpow275.0%
unpow275.0%
hypot-define93.3%
Simplified93.3%
associate-*r/93.3%
distribute-frac-neg93.3%
atan-neg93.3%
Applied egg-rr93.3%
distribute-rgt-neg-out93.3%
distribute-lft-neg-in93.3%
metadata-eval93.3%
Simplified93.3%
(FPCore (A B C)
:precision binary64
(if (<= A -1.3e+143)
(* 180.0 (/ (atan (/ 1.0 (/ A (* B 0.5)))) PI))
(if (<= A 3.1e-9)
(* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B)))
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.3e+143) {
tmp = 180.0 * (atan((1.0 / (A / (B * 0.5)))) / ((double) M_PI));
} else if (A <= 3.1e-9) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / B));
} 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 <= -1.3e+143) {
tmp = 180.0 * (Math.atan((1.0 / (A / (B * 0.5)))) / Math.PI);
} else if (A <= 3.1e-9) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / B));
} else {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.3e+143: tmp = 180.0 * (math.atan((1.0 / (A / (B * 0.5)))) / math.pi) elif A <= 3.1e-9: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / B)) else: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.3e+143) tmp = Float64(180.0 * Float64(atan(Float64(1.0 / Float64(A / Float64(B * 0.5)))) / pi)); elseif (A <= 3.1e-9) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / B))); 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 <= -1.3e+143) tmp = 180.0 * (atan((1.0 / (A / (B * 0.5)))) / pi); elseif (A <= 3.1e-9) tmp = (180.0 / pi) * atan(((C - hypot(B, C)) / B)); else tmp = 180.0 * (atan((1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.3e+143], N[(180.0 * N[(N[ArcTan[N[(1.0 / N[(A / N[(B * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.1e-9], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $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 -1.3 \cdot 10^{+143}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{\frac{A}{B \cdot 0.5}}\right)}{\pi}\\
\mathbf{elif}\;A \leq 3.1 \cdot 10^{-9}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.2999999999999999e143Initial program 11.4%
Taylor expanded in A around -inf 81.0%
associate-*r/81.0%
Simplified81.0%
clear-num81.0%
inv-pow81.0%
*-commutative81.0%
Applied egg-rr81.0%
unpow-181.0%
Simplified81.0%
if -1.2999999999999999e143 < A < 3.10000000000000005e-9Initial program 53.7%
Taylor expanded in B around 0 52.9%
Simplified78.2%
Taylor expanded in A around 0 51.1%
unpow251.1%
unpow251.1%
hypot-undefine76.4%
Simplified76.4%
if 3.10000000000000005e-9 < A Initial program 75.8%
Taylor expanded in C around 0 75.8%
associate-*r/75.8%
mul-1-neg75.8%
+-commutative75.8%
unpow275.8%
unpow275.8%
hypot-define93.0%
Simplified93.0%
Taylor expanded in B around -inf 83.0%
mul-1-neg83.0%
unsub-neg83.0%
Simplified83.0%
(FPCore (A B C)
:precision binary64
(if (<= A -7.8e+130)
(* 180.0 (/ (atan (/ 1.0 (/ A (* B 0.5)))) PI))
(if (<= A 4.7e-9)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -7.8e+130) {
tmp = 180.0 * (atan((1.0 / (A / (B * 0.5)))) / ((double) M_PI));
} else if (A <= 4.7e-9) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / 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 <= -7.8e+130) {
tmp = 180.0 * (Math.atan((1.0 / (A / (B * 0.5)))) / Math.PI);
} else if (A <= 4.7e-9) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / 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 <= -7.8e+130: tmp = 180.0 * (math.atan((1.0 / (A / (B * 0.5)))) / math.pi) elif A <= 4.7e-9: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / 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 <= -7.8e+130) tmp = Float64(180.0 * Float64(atan(Float64(1.0 / Float64(A / Float64(B * 0.5)))) / pi)); elseif (A <= 4.7e-9) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / 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 <= -7.8e+130) tmp = 180.0 * (atan((1.0 / (A / (B * 0.5)))) / pi); elseif (A <= 4.7e-9) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = 180.0 * (atan((1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -7.8e+130], N[(180.0 * N[(N[ArcTan[N[(1.0 / N[(A / N[(B * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.7e-9], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 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 -7.8 \cdot 10^{+130}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{\frac{A}{B \cdot 0.5}}\right)}{\pi}\\
\mathbf{elif}\;A \leq 4.7 \cdot 10^{-9}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -7.8000000000000004e130Initial program 11.4%
Taylor expanded in A around -inf 81.0%
associate-*r/81.0%
Simplified81.0%
clear-num81.0%
inv-pow81.0%
*-commutative81.0%
Applied egg-rr81.0%
unpow-181.0%
Simplified81.0%
if -7.8000000000000004e130 < A < 4.6999999999999999e-9Initial program 53.7%
Taylor expanded in A around 0 51.0%
unpow251.0%
unpow251.0%
hypot-define76.4%
Simplified76.4%
if 4.6999999999999999e-9 < A Initial program 75.8%
Taylor expanded in C around 0 75.8%
associate-*r/75.8%
mul-1-neg75.8%
+-commutative75.8%
unpow275.8%
unpow275.8%
hypot-define93.0%
Simplified93.0%
Taylor expanded in B around -inf 83.0%
mul-1-neg83.0%
unsub-neg83.0%
Simplified83.0%
(FPCore (A B C)
:precision binary64
(if (<= C 3.5e+185)
(* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI))
(*
180.0
(/ (atan (+ (/ (- A A) B) (/ (* -0.5 (+ B (* A (/ B C)))) C))) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= 3.5e+185) {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((((A - A) / B) + ((-0.5 * (B + (A * (B / C)))) / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 3.5e+185) {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((((A - A) / B) + ((-0.5 * (B + (A * (B / C)))) / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 3.5e+185: tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi) else: tmp = 180.0 * (math.atan((((A - A) / B) + ((-0.5 * (B + (A * (B / C)))) / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 3.5e+185) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(A - A) / B) + Float64(Float64(-0.5 * Float64(B + Float64(A * Float64(B / C)))) / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 3.5e+185) tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); else tmp = 180.0 * (atan((((A - A) / B) + ((-0.5 * (B + (A * (B / C)))) / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 3.5e+185], 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[(180.0 * N[(N[ArcTan[N[(N[(N[(A - A), $MachinePrecision] / B), $MachinePrecision] + N[(N[(-0.5 * N[(B + N[(A * N[(B / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 3.5 \cdot 10^{+185}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A - A}{B} + \frac{-0.5 \cdot \left(B + A \cdot \frac{B}{C}\right)}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < 3.50000000000000023e185Initial program 59.5%
associate-*l/59.5%
*-lft-identity59.5%
+-commutative59.5%
unpow259.5%
unpow259.5%
hypot-define84.2%
Simplified84.2%
if 3.50000000000000023e185 < C Initial program 15.5%
Taylor expanded in C around inf 79.6%
Taylor expanded in C around inf 80.4%
distribute-lft-out80.4%
associate-/l*87.3%
Simplified87.3%
Final simplification84.6%
(FPCore (A B C) :precision binary64 (if (<= A -1.56e+131) (* 180.0 (/ (atan (/ 1.0 (/ A (* B 0.5)))) PI)) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.56e+131) {
tmp = 180.0 * (atan((1.0 / (A / (B * 0.5)))) / ((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 <= -1.56e+131) {
tmp = 180.0 * (Math.atan((1.0 / (A / (B * 0.5)))) / 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 <= -1.56e+131: tmp = 180.0 * (math.atan((1.0 / (A / (B * 0.5)))) / 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 <= -1.56e+131) tmp = Float64(180.0 * Float64(atan(Float64(1.0 / Float64(A / Float64(B * 0.5)))) / 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 <= -1.56e+131) tmp = 180.0 * (atan((1.0 / (A / (B * 0.5)))) / 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, -1.56e+131], N[(180.0 * N[(N[ArcTan[N[(1.0 / N[(A / N[(B * 0.5), $MachinePrecision]), $MachinePrecision]), $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 -1.56 \cdot 10^{+131}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{\frac{A}{B \cdot 0.5}}\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 < -1.5600000000000001e131Initial program 11.4%
Taylor expanded in A around -inf 81.0%
associate-*r/81.0%
Simplified81.0%
clear-num81.0%
inv-pow81.0%
*-commutative81.0%
Applied egg-rr81.0%
unpow-181.0%
Simplified81.0%
if -1.5600000000000001e131 < A Initial program 61.3%
Simplified83.6%
(FPCore (A B C)
:precision binary64
(if (<= C -2e-60)
(* 180.0 (/ (atan (+ -1.0 (/ C B))) PI))
(if (<= C 1.12e-96)
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI))
(if (<= C 4e+62)
(* 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 <= -2e-60) {
tmp = 180.0 * (atan((-1.0 + (C / B))) / ((double) M_PI));
} else if (C <= 1.12e-96) {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
} else if (C <= 4e+62) {
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 <= -2e-60) {
tmp = 180.0 * (Math.atan((-1.0 + (C / B))) / Math.PI);
} else if (C <= 1.12e-96) {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
} else if (C <= 4e+62) {
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 <= -2e-60: tmp = 180.0 * (math.atan((-1.0 + (C / B))) / math.pi) elif C <= 1.12e-96: tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) elif C <= 4e+62: 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 <= -2e-60) tmp = Float64(180.0 * Float64(atan(Float64(-1.0 + Float64(C / B))) / pi)); elseif (C <= 1.12e-96) tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); elseif (C <= 4e+62) 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 <= -2e-60) tmp = 180.0 * (atan((-1.0 + (C / B))) / pi); elseif (C <= 1.12e-96) tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); elseif (C <= 4e+62) 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, -2e-60], N[(180.0 * N[(N[ArcTan[N[(-1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.12e-96], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 4e+62], 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 -2 \cdot 10^{-60}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.12 \cdot 10^{-96}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 4 \cdot 10^{+62}:\\
\;\;\;\;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 < -1.9999999999999999e-60Initial program 77.8%
Taylor expanded in B around inf 78.1%
Taylor expanded in A around 0 83.9%
if -1.9999999999999999e-60 < C < 1.1200000000000001e-96Initial program 58.0%
Taylor expanded in B around inf 59.0%
Taylor expanded in C around 0 57.1%
neg-mul-157.1%
distribute-neg-in57.1%
metadata-eval57.1%
unsub-neg57.1%
Simplified57.1%
if 1.1200000000000001e-96 < C < 4.00000000000000014e62Initial program 45.8%
Taylor expanded in C around 0 40.9%
associate-*r/40.9%
mul-1-neg40.9%
+-commutative40.9%
unpow240.9%
unpow240.9%
hypot-define66.6%
Simplified66.6%
Taylor expanded in B around -inf 55.5%
mul-1-neg55.5%
unsub-neg55.5%
Simplified55.5%
if 4.00000000000000014e62 < C Initial program 25.6%
Taylor expanded in A around 0 20.6%
unpow220.6%
unpow220.6%
hypot-define47.1%
Simplified47.1%
Taylor expanded in B around 0 66.4%
Final simplification66.7%
(FPCore (A B C)
:precision binary64
(if (<= C -2.8e-79)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(if (<= C 4.2e-92)
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI))
(if (<= C 1e+63)
(* 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 <= -2.8e-79) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else if (C <= 4.2e-92) {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
} else if (C <= 1e+63) {
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 <= -2.8e-79) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else if (C <= 4.2e-92) {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
} else if (C <= 1e+63) {
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 <= -2.8e-79: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) elif C <= 4.2e-92: tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) elif C <= 1e+63: 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 <= -2.8e-79) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); elseif (C <= 4.2e-92) tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); elseif (C <= 1e+63) 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 <= -2.8e-79) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); elseif (C <= 4.2e-92) tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); elseif (C <= 1e+63) 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, -2.8e-79], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 4.2e-92], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1e+63], 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 -2.8 \cdot 10^{-79}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 4.2 \cdot 10^{-92}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 10^{+63}:\\
\;\;\;\;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 < -2.80000000000000012e-79Initial program 77.8%
Taylor expanded in A around 0 75.4%
unpow275.4%
unpow275.4%
hypot-define90.1%
Simplified90.1%
Taylor expanded in B around -inf 73.7%
if -2.80000000000000012e-79 < C < 4.2e-92Initial program 57.2%
Taylor expanded in B around inf 59.4%
Taylor expanded in C around 0 57.4%
neg-mul-157.4%
distribute-neg-in57.4%
metadata-eval57.4%
unsub-neg57.4%
Simplified57.4%
if 4.2e-92 < C < 1.00000000000000006e63Initial program 45.8%
Taylor expanded in C around 0 40.9%
associate-*r/40.9%
mul-1-neg40.9%
+-commutative40.9%
unpow240.9%
unpow240.9%
hypot-define66.6%
Simplified66.6%
Taylor expanded in B around -inf 55.5%
mul-1-neg55.5%
unsub-neg55.5%
Simplified55.5%
if 1.00000000000000006e63 < C Initial program 25.6%
Taylor expanded in A around 0 20.6%
unpow220.6%
unpow220.6%
hypot-define47.1%
Simplified47.1%
Taylor expanded in B around 0 66.4%
(FPCore (A B C)
:precision binary64
(if (<= A -2.75e+124)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 3.2e-31)
(* 180.0 (/ (atan (+ -1.0 (/ C B))) PI))
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.75e+124) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 3.2e-31) {
tmp = 180.0 * (atan((-1.0 + (C / 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 <= -2.75e+124) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 3.2e-31) {
tmp = 180.0 * (Math.atan((-1.0 + (C / 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 <= -2.75e+124: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 3.2e-31: tmp = 180.0 * (math.atan((-1.0 + (C / 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 <= -2.75e+124) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 3.2e-31) tmp = Float64(180.0 * Float64(atan(Float64(-1.0 + Float64(C / 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 <= -2.75e+124) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 3.2e-31) tmp = 180.0 * (atan((-1.0 + (C / B))) / pi); else tmp = 180.0 * (atan((1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.75e+124], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.2e-31], 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[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.75 \cdot 10^{+124}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 3.2 \cdot 10^{-31}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.74999999999999989e124Initial program 11.4%
Taylor expanded in A around -inf 81.0%
associate-*r/81.0%
Simplified81.0%
if -2.74999999999999989e124 < A < 3.20000000000000018e-31Initial program 53.5%
Taylor expanded in B around inf 51.8%
Taylor expanded in A around 0 53.1%
if 3.20000000000000018e-31 < A Initial program 74.4%
Taylor expanded in C around 0 73.3%
associate-*r/73.3%
mul-1-neg73.3%
+-commutative73.3%
unpow273.3%
unpow273.3%
hypot-define91.2%
Simplified91.2%
Taylor expanded in B around -inf 79.5%
mul-1-neg79.5%
unsub-neg79.5%
Simplified79.5%
Final simplification65.2%
(FPCore (A B C)
:precision binary64
(if (<= C -2.9e-79)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(if (<= C 7.5e-65)
(* 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 <= -2.9e-79) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else if (C <= 7.5e-65) {
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 <= -2.9e-79) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else if (C <= 7.5e-65) {
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 <= -2.9e-79: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) elif C <= 7.5e-65: 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 <= -2.9e-79) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); elseif (C <= 7.5e-65) 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 <= -2.9e-79) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); elseif (C <= 7.5e-65) 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, -2.9e-79], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 7.5e-65], 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 -2.9 \cdot 10^{-79}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 7.5 \cdot 10^{-65}:\\
\;\;\;\;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 < -2.9000000000000001e-79Initial program 77.8%
Taylor expanded in A around 0 75.4%
unpow275.4%
unpow275.4%
hypot-define90.1%
Simplified90.1%
Taylor expanded in B around -inf 73.7%
if -2.9000000000000001e-79 < C < 7.5000000000000002e-65Initial program 56.9%
Taylor expanded in B around inf 56.6%
Taylor expanded in C around 0 54.8%
neg-mul-154.8%
distribute-neg-in54.8%
metadata-eval54.8%
unsub-neg54.8%
Simplified54.8%
if 7.5000000000000002e-65 < C Initial program 29.6%
Taylor expanded in A around 0 21.4%
unpow221.4%
unpow221.4%
hypot-define45.9%
Simplified45.9%
Taylor expanded in B around 0 60.8%
(FPCore (A B C)
:precision binary64
(if (<= C -1.7e-61)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= C -5e-310)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.7e-61) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (C <= -5e-310) {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((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 <= -1.7e-61) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (C <= -5e-310) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / 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 <= -1.7e-61: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif C <= -5e-310: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / 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 <= -1.7e-61) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (C <= -5e-310) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / 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 <= -1.7e-61) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (C <= -5e-310) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.7e-61], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -5e-310], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $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 -1.7 \cdot 10^{-61}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -5 \cdot 10^{-310}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.6999999999999999e-61Initial program 77.8%
Taylor expanded in C around -inf 69.8%
if -1.6999999999999999e-61 < C < -4.999999999999985e-310Initial program 66.5%
Taylor expanded in A around inf 36.4%
if -4.999999999999985e-310 < C Initial program 37.9%
Taylor expanded in A around 0 24.6%
unpow224.6%
unpow224.6%
hypot-define48.1%
Simplified48.1%
Taylor expanded in B around 0 49.6%
Final simplification52.8%
(FPCore (A B C)
:precision binary64
(if (<= C -2.9e-61)
(/ (* 180.0 (atan (/ C B))) PI)
(if (<= C -5e-310)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -2.9e-61) {
tmp = (180.0 * atan((C / B))) / ((double) M_PI);
} else if (C <= -5e-310) {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((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 <= -2.9e-61) {
tmp = (180.0 * Math.atan((C / B))) / Math.PI;
} else if (C <= -5e-310) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / 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 <= -2.9e-61: tmp = (180.0 * math.atan((C / B))) / math.pi elif C <= -5e-310: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / 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 <= -2.9e-61) tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi); elseif (C <= -5e-310) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / 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 <= -2.9e-61) tmp = (180.0 * atan((C / B))) / pi; elseif (C <= -5e-310) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -2.9e-61], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, -5e-310], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $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 -2.9 \cdot 10^{-61}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -5 \cdot 10^{-310}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -2.8999999999999999e-61Initial program 77.8%
Taylor expanded in B around inf 78.1%
Taylor expanded in C around inf 69.4%
associate-*r/69.4%
Applied egg-rr69.4%
if -2.8999999999999999e-61 < C < -4.999999999999985e-310Initial program 66.5%
Taylor expanded in A around inf 36.4%
if -4.999999999999985e-310 < C Initial program 37.9%
Taylor expanded in A around 0 24.6%
unpow224.6%
unpow224.6%
hypot-define48.1%
Simplified48.1%
Taylor expanded in B around 0 49.6%
Final simplification52.7%
(FPCore (A B C) :precision binary64 (if (<= B 5e-147) (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)) (/ (* 180.0 (atan (+ (/ C B) (- -1.0 (/ A B))))) PI)))
double code(double A, double B, double C) {
double tmp;
if (B <= 5e-147) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((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 <= 5e-147) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / 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 <= 5e-147: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / 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 <= 5e-147) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); else tmp = Float64(Float64(180.0 * 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 <= 5e-147) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / 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, 5e-147], 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 * N[ArcTan[N[(N[(C / B), $MachinePrecision] + N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 5 \cdot 10^{-147}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\
\end{array}
\end{array}
if B < 5.00000000000000013e-147Initial program 54.1%
Taylor expanded in B around -inf 59.6%
associate--l+59.6%
div-sub64.6%
Simplified64.6%
if 5.00000000000000013e-147 < B Initial program 56.2%
Taylor expanded in B around inf 75.8%
associate-*r/75.8%
Applied egg-rr75.8%
Final simplification68.8%
(FPCore (A B C) :precision binary64 (if (<= B 4e-95) (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)) (* 180.0 (/ (atan (+ (/ C B) (- -1.0 (/ A B)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= 4e-95) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((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 <= 4e-95) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / 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 <= 4e-95: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / 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 <= 4e-95) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / 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 <= 4e-95) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / 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, 4e-95], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / 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 4 \cdot 10^{-95}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\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 < 3.99999999999999996e-95Initial program 55.0%
Taylor expanded in B around -inf 60.2%
associate--l+60.2%
div-sub64.8%
Simplified64.8%
if 3.99999999999999996e-95 < B Initial program 54.6%
Taylor expanded in B around inf 77.0%
Final simplification68.8%
(FPCore (A B C)
:precision binary64
(if (<= B -1400.0)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 2.7e-71)
(* 180.0 (/ (atan (/ C B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1400.0) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 2.7e-71) {
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 <= -1400.0) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 2.7e-71) {
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 <= -1400.0: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 2.7e-71: 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 <= -1400.0) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 2.7e-71) 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 <= -1400.0) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 2.7e-71) 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, -1400.0], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.7e-71], 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 -1400:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 2.7 \cdot 10^{-71}:\\
\;\;\;\;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 < -1400Initial program 40.6%
Taylor expanded in B around -inf 55.1%
if -1400 < B < 2.7000000000000001e-71Initial program 63.0%
Taylor expanded in B around inf 50.5%
Taylor expanded in C around inf 37.9%
if 2.7000000000000001e-71 < B Initial program 54.7%
Taylor expanded in B around inf 60.7%
(FPCore (A B C)
:precision binary64
(if (<= B -7e-237)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 4.4e-45)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -7e-237) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 4.4e-45) {
tmp = 180.0 * (atan((0.0 / 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 <= -7e-237) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 4.4e-45) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -7e-237: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 4.4e-45: tmp = 180.0 * (math.atan((0.0 / 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 <= -7e-237) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 4.4e-45) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / 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 <= -7e-237) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 4.4e-45) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -7e-237], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.4e-45], N[(180.0 * N[(N[ArcTan[N[(0.0 / 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 -7 \cdot 10^{-237}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 4.4 \cdot 10^{-45}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -6.99999999999999966e-237Initial program 52.3%
Taylor expanded in B around -inf 40.0%
if -6.99999999999999966e-237 < B < 4.39999999999999987e-45Initial program 56.0%
Taylor expanded in C around inf 28.2%
associate-*r/28.2%
mul-1-neg28.2%
distribute-rgt1-in28.2%
metadata-eval28.2%
mul0-lft28.2%
metadata-eval28.2%
Simplified28.2%
if 4.39999999999999987e-45 < B Initial program 57.8%
Taylor expanded in B around inf 64.5%
(FPCore (A B C) :precision binary64 (if (<= B 4.8e-77) (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)) (* 180.0 (/ (atan (+ -1.0 (/ C B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= 4.8e-77) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-1.0 + (C / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 4.8e-77) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-1.0 + (C / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 4.8e-77: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) else: tmp = 180.0 * (math.atan((-1.0 + (C / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 4.8e-77) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-1.0 + Float64(C / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 4.8e-77) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); else tmp = 180.0 * (atan((-1.0 + (C / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 4.8e-77], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 4.8 \cdot 10^{-77}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 + \frac{C}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < 4.7999999999999998e-77Initial program 54.9%
Taylor expanded in B around -inf 59.9%
associate--l+59.9%
div-sub64.4%
Simplified64.4%
if 4.7999999999999998e-77 < B Initial program 54.7%
Taylor expanded in B around inf 79.0%
Taylor expanded in A around 0 70.6%
Final simplification66.3%
(FPCore (A B C) :precision binary64 (if (<= C 1e-305) (* 180.0 (/ (atan (+ 1.0 (/ C B))) PI)) (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= 1e-305) {
tmp = 180.0 * (atan((1.0 + (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 <= 1e-305) {
tmp = 180.0 * (Math.atan((1.0 + (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 <= 1e-305: tmp = 180.0 * (math.atan((1.0 + (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 <= 1e-305) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / 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 <= 1e-305) tmp = 180.0 * (atan((1.0 + (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, 1e-305], 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[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 10^{-305}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{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 < 9.99999999999999996e-306Initial program 72.2%
Taylor expanded in A around 0 64.1%
unpow264.1%
unpow264.1%
hypot-define79.1%
Simplified79.1%
Taylor expanded in B around -inf 58.9%
if 9.99999999999999996e-306 < C Initial program 38.4%
Taylor expanded in A around 0 24.9%
unpow224.9%
unpow224.9%
hypot-define48.7%
Simplified48.7%
Taylor expanded in B around 0 50.3%
(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 53.7%
Taylor expanded in B around -inf 36.0%
if -9.999999999999969e-311 < B Initial program 56.0%
Taylor expanded in B around inf 42.9%
(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 54.9%
Taylor expanded in B around inf 22.0%
herbie shell --seed 2024137
(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)))