
(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
(let* ((t_0
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))
(t_1 (- (- C A) (hypot B (- A C)))))
(if (<= t_0 -0.04)
(/ 180.0 (/ PI (atan (/ t_1 B))))
(if (<= t_0 0.0)
(/ 180.0 (/ PI (atan (* -0.5 (/ B C)))))
(* 180.0 (/ (atan (/ 1.0 (/ B t_1))) PI))))))
double code(double A, double B, double C) {
double t_0 = (1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
double t_1 = (C - A) - hypot(B, (A - C));
double tmp;
if (t_0 <= -0.04) {
tmp = 180.0 / (((double) M_PI) / atan((t_1 / B)));
} else if (t_0 <= 0.0) {
tmp = 180.0 / (((double) M_PI) / atan((-0.5 * (B / C))));
} else {
tmp = 180.0 * (atan((1.0 / (B / t_1))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))));
double t_1 = (C - A) - Math.hypot(B, (A - C));
double tmp;
if (t_0 <= -0.04) {
tmp = 180.0 / (Math.PI / Math.atan((t_1 / B)));
} else if (t_0 <= 0.0) {
tmp = 180.0 / (Math.PI / Math.atan((-0.5 * (B / C))));
} else {
tmp = 180.0 * (Math.atan((1.0 / (B / t_1))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))) t_1 = (C - A) - math.hypot(B, (A - C)) tmp = 0 if t_0 <= -0.04: tmp = 180.0 / (math.pi / math.atan((t_1 / B))) elif t_0 <= 0.0: tmp = 180.0 / (math.pi / math.atan((-0.5 * (B / C)))) else: tmp = 180.0 * (math.atan((1.0 / (B / t_1))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))) t_1 = Float64(Float64(C - A) - hypot(B, Float64(A - C))) tmp = 0.0 if (t_0 <= -0.04) tmp = Float64(180.0 / Float64(pi / atan(Float64(t_1 / B)))); elseif (t_0 <= 0.0) tmp = Float64(180.0 / Float64(pi / atan(Float64(-0.5 * Float64(B / C))))); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 / Float64(B / t_1))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))); t_1 = (C - A) - hypot(B, (A - C)); tmp = 0.0; if (t_0 <= -0.04) tmp = 180.0 / (pi / atan((t_1 / B))); elseif (t_0 <= 0.0) tmp = 180.0 / (pi / atan((-0.5 * (B / C)))); else tmp = 180.0 * (atan((1.0 / (B / t_1))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = 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]}, Block[{t$95$1 = N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -0.04], N[(180.0 / N[(Pi / N[ArcTan[N[(t$95$1 / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(180.0 / N[(Pi / N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 / N[(B / t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
t_1 := \left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)\\
\mathbf{if}\;t\_0 \leq -0.04:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{t\_1}{B}\right)}}\\
\mathbf{elif}\;t\_0 \leq 0:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{\frac{B}{t\_1}}\right)}{\pi}\\
\end{array}
\end{array}
if (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -0.0400000000000000008Initial program 64.4%
*-commutative64.4%
associate--l-64.4%
+-commutative64.4%
unpow264.4%
unpow264.4%
hypot-undefine87.5%
div-inv87.5%
clear-num87.6%
un-div-inv87.6%
Applied egg-rr90.7%
if -0.0400000000000000008 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -0.0Initial program 15.8%
*-commutative15.8%
associate--l-12.6%
+-commutative12.6%
unpow212.6%
unpow212.6%
hypot-undefine12.6%
div-inv12.6%
clear-num12.6%
un-div-inv12.6%
Applied egg-rr15.8%
Taylor expanded in A around 0 15.3%
+-commutative15.3%
unpow215.3%
unpow215.3%
hypot-undefine15.9%
Simplified15.9%
Taylor expanded in C around inf 53.5%
if -0.0 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) Initial program 50.1%
associate--l-50.1%
+-commutative50.1%
unpow250.1%
unpow250.1%
hypot-undefine85.7%
associate-/r/85.7%
associate--r+89.4%
Applied egg-rr89.4%
(FPCore (A B C)
:precision binary64
(if (<= A -2.95e+122)
(* 180.0 (/ (atan (/ (* -0.5 (+ B (/ (* B C) A))) (- A))) PI))
(if (<= A 2.8e-23)
(* 180.0 (/ (atan (/ 1.0 (/ B (- C (hypot C B))))) PI))
(* 180.0 (/ (atan (/ (+ A (hypot A B)) (- B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.95e+122) {
tmp = 180.0 * (atan(((-0.5 * (B + ((B * C) / A))) / -A)) / ((double) M_PI));
} else if (A <= 2.8e-23) {
tmp = 180.0 * (atan((1.0 / (B / (C - hypot(C, B))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A + hypot(A, B)) / -B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.95e+122) {
tmp = 180.0 * (Math.atan(((-0.5 * (B + ((B * C) / A))) / -A)) / Math.PI);
} else if (A <= 2.8e-23) {
tmp = 180.0 * (Math.atan((1.0 / (B / (C - Math.hypot(C, B))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A + Math.hypot(A, B)) / -B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.95e+122: tmp = 180.0 * (math.atan(((-0.5 * (B + ((B * C) / A))) / -A)) / math.pi) elif A <= 2.8e-23: tmp = 180.0 * (math.atan((1.0 / (B / (C - math.hypot(C, B))))) / math.pi) else: tmp = 180.0 * (math.atan(((A + math.hypot(A, B)) / -B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.95e+122) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B + Float64(Float64(B * C) / A))) / Float64(-A))) / pi)); elseif (A <= 2.8e-23) tmp = Float64(180.0 * Float64(atan(Float64(1.0 / Float64(B / Float64(C - hypot(C, B))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + hypot(A, B)) / Float64(-B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.95e+122) tmp = 180.0 * (atan(((-0.5 * (B + ((B * C) / A))) / -A)) / pi); elseif (A <= 2.8e-23) tmp = 180.0 * (atan((1.0 / (B / (C - hypot(C, B))))) / pi); else tmp = 180.0 * (atan(((A + hypot(A, B)) / -B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.95e+122], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(B + N[(N[(B * C), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-A)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.8e-23], N[(180.0 * N[(N[ArcTan[N[(1.0 / N[(B / N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.95 \cdot 10^{+122}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + \frac{B \cdot C}{A}\right)}{-A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2.8 \cdot 10^{-23}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{\frac{B}{C - \mathsf{hypot}\left(C, B\right)}}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{-B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.95000000000000016e122Initial program 14.6%
Taylor expanded in A around -inf 85.9%
associate-*r/85.9%
mul-1-neg85.9%
distribute-lft-out85.9%
*-commutative85.9%
Simplified85.9%
if -2.95000000000000016e122 < A < 2.7999999999999997e-23Initial program 50.8%
Taylor expanded in A around 0 50.1%
+-commutative50.1%
unpow250.1%
unpow250.1%
hypot-define77.5%
Simplified77.5%
clear-num77.5%
inv-pow77.5%
Applied egg-rr77.5%
unpow-177.5%
Simplified77.5%
if 2.7999999999999997e-23 < A Initial program 72.0%
Taylor expanded in C around 0 71.8%
associate-*r/71.8%
mul-1-neg71.8%
unpow271.8%
unpow271.8%
hypot-define88.7%
Simplified88.7%
Final simplification81.5%
(FPCore (A B C)
:precision binary64
(if (<= A -1.72e+118)
(* 180.0 (/ (atan (/ (* -0.5 (+ B (/ (* B C) A))) (- A))) PI))
(if (<= A 1.12e-21)
(* 180.0 (/ (atan (/ (- C (hypot C B)) B)) PI))
(* 180.0 (/ (atan (/ (+ A (hypot A B)) (- B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.72e+118) {
tmp = 180.0 * (atan(((-0.5 * (B + ((B * C) / A))) / -A)) / ((double) M_PI));
} else if (A <= 1.12e-21) {
tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A + hypot(A, B)) / -B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.72e+118) {
tmp = 180.0 * (Math.atan(((-0.5 * (B + ((B * C) / A))) / -A)) / Math.PI);
} else if (A <= 1.12e-21) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(C, B)) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A + Math.hypot(A, B)) / -B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.72e+118: tmp = 180.0 * (math.atan(((-0.5 * (B + ((B * C) / A))) / -A)) / math.pi) elif A <= 1.12e-21: tmp = 180.0 * (math.atan(((C - math.hypot(C, B)) / B)) / math.pi) else: tmp = 180.0 * (math.atan(((A + math.hypot(A, B)) / -B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.72e+118) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B + Float64(Float64(B * C) / A))) / Float64(-A))) / pi)); elseif (A <= 1.12e-21) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(C, B)) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + hypot(A, B)) / Float64(-B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.72e+118) tmp = 180.0 * (atan(((-0.5 * (B + ((B * C) / A))) / -A)) / pi); elseif (A <= 1.12e-21) tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / pi); else tmp = 180.0 * (atan(((A + hypot(A, B)) / -B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.72e+118], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(B + N[(N[(B * C), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-A)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.12e-21], 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[(N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.72 \cdot 10^{+118}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + \frac{B \cdot C}{A}\right)}{-A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.12 \cdot 10^{-21}:\\
\;\;\;\;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(\frac{A + \mathsf{hypot}\left(A, B\right)}{-B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.71999999999999999e118Initial program 14.6%
Taylor expanded in A around -inf 85.9%
associate-*r/85.9%
mul-1-neg85.9%
distribute-lft-out85.9%
*-commutative85.9%
Simplified85.9%
if -1.71999999999999999e118 < A < 1.11999999999999998e-21Initial program 50.8%
Taylor expanded in A around 0 50.1%
+-commutative50.1%
unpow250.1%
unpow250.1%
hypot-define77.5%
Simplified77.5%
if 1.11999999999999998e-21 < A Initial program 72.0%
Taylor expanded in C around 0 71.8%
associate-*r/71.8%
mul-1-neg71.8%
unpow271.8%
unpow271.8%
hypot-define88.7%
Simplified88.7%
Final simplification81.5%
(FPCore (A B C)
:precision binary64
(if (<= A -5.2e+120)
(* 180.0 (/ (atan (/ (* -0.5 (+ B (/ (* B C) A))) (- A))) PI))
(if (<= A 1.85e-23)
(* 180.0 (/ (atan (/ (- C (hypot C B)) B)) PI))
(/ (* -180.0 (atan (/ (+ A (hypot B A)) B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -5.2e+120) {
tmp = 180.0 * (atan(((-0.5 * (B + ((B * C) / A))) / -A)) / ((double) M_PI));
} else if (A <= 1.85e-23) {
tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / ((double) M_PI));
} 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 <= -5.2e+120) {
tmp = 180.0 * (Math.atan(((-0.5 * (B + ((B * C) / A))) / -A)) / Math.PI);
} else if (A <= 1.85e-23) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(C, B)) / B)) / Math.PI);
} 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 <= -5.2e+120: tmp = 180.0 * (math.atan(((-0.5 * (B + ((B * C) / A))) / -A)) / math.pi) elif A <= 1.85e-23: tmp = 180.0 * (math.atan(((C - math.hypot(C, B)) / B)) / math.pi) 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 <= -5.2e+120) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B + Float64(Float64(B * C) / A))) / Float64(-A))) / pi)); elseif (A <= 1.85e-23) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(C, B)) / B)) / pi)); 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 <= -5.2e+120) tmp = 180.0 * (atan(((-0.5 * (B + ((B * C) / A))) / -A)) / pi); elseif (A <= 1.85e-23) tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / pi); else tmp = (-180.0 * atan(((A + hypot(B, A)) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -5.2e+120], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(B + N[(N[(B * C), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-A)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.85e-23], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $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 -5.2 \cdot 10^{+120}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + \frac{B \cdot C}{A}\right)}{-A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.85 \cdot 10^{-23}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\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 < -5.1999999999999998e120Initial program 14.6%
Taylor expanded in A around -inf 85.9%
associate-*r/85.9%
mul-1-neg85.9%
distribute-lft-out85.9%
*-commutative85.9%
Simplified85.9%
if -5.1999999999999998e120 < A < 1.8500000000000001e-23Initial program 50.8%
Taylor expanded in A around 0 50.1%
+-commutative50.1%
unpow250.1%
unpow250.1%
hypot-define77.5%
Simplified77.5%
if 1.8500000000000001e-23 < A Initial program 72.0%
*-commutative72.0%
associate--l-72.0%
+-commutative72.0%
unpow272.0%
unpow272.0%
hypot-undefine94.3%
div-inv94.3%
clear-num94.3%
un-div-inv94.3%
Applied egg-rr94.3%
Taylor expanded in C around 0 71.8%
mul-1-neg71.8%
distribute-neg-frac271.8%
unpow271.8%
unpow271.8%
hypot-define88.7%
Simplified88.7%
div-inv88.6%
distribute-frac-neg288.6%
atan-neg88.6%
Applied egg-rr88.6%
associate-*r/88.7%
metadata-eval88.7%
associate-/r/88.7%
associate-*l/88.6%
Simplified88.6%
Final simplification81.5%
(FPCore (A B C)
:precision binary64
(if (<= A -1.25e+121)
(* 180.0 (/ (atan (/ (* -0.5 (+ B (/ (* B C) A))) (- A))) PI))
(if (<= A 1e+117)
(/ 180.0 (/ PI (atan (/ (- C (hypot C B)) B))))
(/ 180.0 (/ PI (atan (+ (/ (- C A) B) -1.0)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.25e+121) {
tmp = 180.0 * (atan(((-0.5 * (B + ((B * C) / A))) / -A)) / ((double) M_PI));
} else if (A <= 1e+117) {
tmp = 180.0 / (((double) M_PI) / atan(((C - hypot(C, B)) / B)));
} else {
tmp = 180.0 / (((double) M_PI) / atan((((C - A) / B) + -1.0)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.25e+121) {
tmp = 180.0 * (Math.atan(((-0.5 * (B + ((B * C) / A))) / -A)) / Math.PI);
} else if (A <= 1e+117) {
tmp = 180.0 / (Math.PI / Math.atan(((C - Math.hypot(C, B)) / B)));
} else {
tmp = 180.0 / (Math.PI / Math.atan((((C - A) / B) + -1.0)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.25e+121: tmp = 180.0 * (math.atan(((-0.5 * (B + ((B * C) / A))) / -A)) / math.pi) elif A <= 1e+117: tmp = 180.0 / (math.pi / math.atan(((C - math.hypot(C, B)) / B))) else: tmp = 180.0 / (math.pi / math.atan((((C - A) / B) + -1.0))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.25e+121) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B + Float64(Float64(B * C) / A))) / Float64(-A))) / pi)); elseif (A <= 1e+117) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(C - hypot(C, B)) / B)))); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(C - A) / B) + -1.0)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.25e+121) tmp = 180.0 * (atan(((-0.5 * (B + ((B * C) / A))) / -A)) / pi); elseif (A <= 1e+117) tmp = 180.0 / (pi / atan(((C - hypot(C, B)) / B))); else tmp = 180.0 / (pi / atan((((C - A) / B) + -1.0))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.25e+121], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(B + N[(N[(B * C), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-A)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1e+117], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.25 \cdot 10^{+121}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + \frac{B \cdot C}{A}\right)}{-A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 10^{+117}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}}\\
\end{array}
\end{array}
if A < -1.25000000000000002e121Initial program 14.6%
Taylor expanded in A around -inf 85.9%
associate-*r/85.9%
mul-1-neg85.9%
distribute-lft-out85.9%
*-commutative85.9%
Simplified85.9%
if -1.25000000000000002e121 < A < 1.00000000000000005e117Initial program 53.4%
*-commutative53.4%
associate--l-53.2%
+-commutative53.2%
unpow253.2%
unpow253.2%
hypot-undefine80.0%
div-inv80.0%
clear-num80.0%
un-div-inv80.0%
Applied egg-rr80.1%
Taylor expanded in A around 0 49.7%
+-commutative49.7%
unpow249.7%
unpow249.7%
hypot-undefine76.7%
Simplified76.7%
if 1.00000000000000005e117 < A Initial program 80.0%
*-commutative80.0%
associate--l-80.0%
+-commutative80.0%
unpow280.0%
unpow280.0%
hypot-undefine99.9%
div-inv99.9%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in B around inf 79.2%
+-commutative79.2%
associate--r+79.2%
div-sub85.6%
Simplified85.6%
Final simplification78.9%
(FPCore (A B C)
:precision binary64
(if (<= A -3.8e+122)
(* 180.0 (/ (atan (/ (* -0.5 (+ B (/ (* B C) A))) (- A))) PI))
(if (<= A 2.9e+117)
(* 180.0 (/ (atan (/ (- C (hypot C B)) B)) PI))
(/ 180.0 (/ PI (atan (+ (/ (- C A) B) -1.0)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.8e+122) {
tmp = 180.0 * (atan(((-0.5 * (B + ((B * C) / A))) / -A)) / ((double) M_PI));
} else if (A <= 2.9e+117) {
tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((((C - A) / B) + -1.0)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.8e+122) {
tmp = 180.0 * (Math.atan(((-0.5 * (B + ((B * C) / A))) / -A)) / Math.PI);
} else if (A <= 2.9e+117) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(C, B)) / B)) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((((C - A) / B) + -1.0)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.8e+122: tmp = 180.0 * (math.atan(((-0.5 * (B + ((B * C) / A))) / -A)) / math.pi) elif A <= 2.9e+117: tmp = 180.0 * (math.atan(((C - math.hypot(C, B)) / B)) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((((C - A) / B) + -1.0))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.8e+122) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B + Float64(Float64(B * C) / A))) / Float64(-A))) / pi)); elseif (A <= 2.9e+117) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(C, B)) / B)) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(C - A) / B) + -1.0)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.8e+122) tmp = 180.0 * (atan(((-0.5 * (B + ((B * C) / A))) / -A)) / pi); elseif (A <= 2.9e+117) tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / pi); else tmp = 180.0 / (pi / atan((((C - A) / B) + -1.0))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.8e+122], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(B + N[(N[(B * C), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-A)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.9e+117], 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[(Pi / N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.8 \cdot 10^{+122}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + \frac{B \cdot C}{A}\right)}{-A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2.9 \cdot 10^{+117}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}}\\
\end{array}
\end{array}
if A < -3.7999999999999998e122Initial program 14.6%
Taylor expanded in A around -inf 85.9%
associate-*r/85.9%
mul-1-neg85.9%
distribute-lft-out85.9%
*-commutative85.9%
Simplified85.9%
if -3.7999999999999998e122 < A < 2.90000000000000027e117Initial program 53.4%
Taylor expanded in A around 0 49.7%
+-commutative49.7%
unpow249.7%
unpow249.7%
hypot-define76.6%
Simplified76.6%
if 2.90000000000000027e117 < A Initial program 80.0%
*-commutative80.0%
associate--l-80.0%
+-commutative80.0%
unpow280.0%
unpow280.0%
hypot-undefine99.9%
div-inv99.9%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in B around inf 79.2%
+-commutative79.2%
associate--r+79.2%
div-sub85.6%
Simplified85.6%
Final simplification78.9%
(FPCore (A B C) :precision binary64 (if (<= A -2.55e+123) (* 180.0 (/ (atan (/ (* -0.5 (+ B (/ (* B C) A))) (- A))) PI)) (/ 180.0 (/ PI (atan (/ (- (- C A) (hypot B (- A C))) B))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.55e+123) {
tmp = 180.0 * (atan(((-0.5 * (B + ((B * C) / A))) / -A)) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((((C - A) - hypot(B, (A - C))) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.55e+123) {
tmp = 180.0 * (Math.atan(((-0.5 * (B + ((B * C) / A))) / -A)) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.55e+123: tmp = 180.0 * (math.atan(((-0.5 * (B + ((B * C) / A))) / -A)) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((((C - A) - math.hypot(B, (A - C))) / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.55e+123) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B + Float64(Float64(B * C) / A))) / Float64(-A))) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.55e+123) tmp = 180.0 * (atan(((-0.5 * (B + ((B * C) / A))) / -A)) / pi); else tmp = 180.0 / (pi / atan((((C - A) - hypot(B, (A - C))) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.55e+123], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(B + N[(N[(B * C), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-A)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.55 \cdot 10^{+123}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + \frac{B \cdot C}{A}\right)}{-A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}}\\
\end{array}
\end{array}
if A < -2.54999999999999986e123Initial program 14.6%
Taylor expanded in A around -inf 85.9%
associate-*r/85.9%
mul-1-neg85.9%
distribute-lft-out85.9%
*-commutative85.9%
Simplified85.9%
if -2.54999999999999986e123 < A Initial program 57.1%
*-commutative57.1%
associate--l-57.0%
+-commutative57.0%
unpow257.0%
unpow257.0%
hypot-undefine82.7%
div-inv82.7%
clear-num82.7%
un-div-inv82.8%
Applied egg-rr82.8%
Final simplification83.2%
(FPCore (A B C) :precision binary64 (if (<= A -3.4e+121) (* 180.0 (/ (atan (/ (* -0.5 (+ B (/ (* B C) A))) (- 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.4e+121) {
tmp = 180.0 * (atan(((-0.5 * (B + ((B * C) / A))) / -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.4e+121) {
tmp = 180.0 * (Math.atan(((-0.5 * (B + ((B * C) / A))) / -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.4e+121: tmp = 180.0 * (math.atan(((-0.5 * (B + ((B * C) / A))) / -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.4e+121) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B + Float64(Float64(B * C) / A))) / Float64(-A))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - 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.4e+121) tmp = 180.0 * (atan(((-0.5 * (B + ((B * C) / A))) / -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.4e+121], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(B + N[(N[(B * C), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-A)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], 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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.4 \cdot 10^{+121}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + \frac{B \cdot C}{A}\right)}{-A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.4000000000000001e121Initial program 14.6%
Taylor expanded in A around -inf 85.9%
associate-*r/85.9%
mul-1-neg85.9%
distribute-lft-out85.9%
*-commutative85.9%
Simplified85.9%
if -3.4000000000000001e121 < A Initial program 57.1%
associate-*l/57.1%
*-lft-identity57.1%
+-commutative57.1%
unpow257.1%
unpow257.1%
hypot-define82.8%
Simplified82.8%
Final simplification83.2%
(FPCore (A B C) :precision binary64 (if (<= A -2e+119) (* 180.0 (/ (atan (/ (* -0.5 (+ B (/ (* B C) A))) (- 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 <= -2e+119) {
tmp = 180.0 * (atan(((-0.5 * (B + ((B * C) / A))) / -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 <= -2e+119) {
tmp = 180.0 * (Math.atan(((-0.5 * (B + ((B * C) / A))) / -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 <= -2e+119: tmp = 180.0 * (math.atan(((-0.5 * (B + ((B * C) / A))) / -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 <= -2e+119) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B + Float64(Float64(B * C) / A))) / Float64(-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 <= -2e+119) tmp = 180.0 * (atan(((-0.5 * (B + ((B * C) / A))) / -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, -2e+119], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(B + N[(N[(B * C), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]), $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 -2 \cdot 10^{+119}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + \frac{B \cdot C}{A}\right)}{-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 < -1.99999999999999989e119Initial program 14.6%
Taylor expanded in A around -inf 85.9%
associate-*r/85.9%
mul-1-neg85.9%
distribute-lft-out85.9%
*-commutative85.9%
Simplified85.9%
if -1.99999999999999989e119 < A Initial program 57.1%
Simplified82.7%
Final simplification83.2%
(FPCore (A B C)
:precision binary64
(if (<= B -5e+54)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -9.5e-281)
(* 180.0 (/ (atan (/ (* -0.5 (+ B (* A (/ B C)))) C)) PI))
(if (or (<= B 6e-234) (not (<= B 5.4e-120)))
(/ 180.0 (/ PI (atan (+ (/ (- C A) B) -1.0))))
(/ 180.0 (/ PI (atan (/ (* 0.5 (+ B (* B (/ C A)))) A))))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5e+54) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -9.5e-281) {
tmp = 180.0 * (atan(((-0.5 * (B + (A * (B / C)))) / C)) / ((double) M_PI));
} else if ((B <= 6e-234) || !(B <= 5.4e-120)) {
tmp = 180.0 / (((double) M_PI) / atan((((C - A) / B) + -1.0)));
} else {
tmp = 180.0 / (((double) M_PI) / atan(((0.5 * (B + (B * (C / A)))) / A)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -5e+54) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -9.5e-281) {
tmp = 180.0 * (Math.atan(((-0.5 * (B + (A * (B / C)))) / C)) / Math.PI);
} else if ((B <= 6e-234) || !(B <= 5.4e-120)) {
tmp = 180.0 / (Math.PI / Math.atan((((C - A) / B) + -1.0)));
} else {
tmp = 180.0 / (Math.PI / Math.atan(((0.5 * (B + (B * (C / A)))) / A)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5e+54: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -9.5e-281: tmp = 180.0 * (math.atan(((-0.5 * (B + (A * (B / C)))) / C)) / math.pi) elif (B <= 6e-234) or not (B <= 5.4e-120): tmp = 180.0 / (math.pi / math.atan((((C - A) / B) + -1.0))) else: tmp = 180.0 / (math.pi / math.atan(((0.5 * (B + (B * (C / A)))) / A))) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -5e+54) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -9.5e-281) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B + Float64(A * Float64(B / C)))) / C)) / pi)); elseif ((B <= 6e-234) || !(B <= 5.4e-120)) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(C - A) / B) + -1.0)))); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(0.5 * Float64(B + Float64(B * Float64(C / A)))) / A)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -5e+54) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -9.5e-281) tmp = 180.0 * (atan(((-0.5 * (B + (A * (B / C)))) / C)) / pi); elseif ((B <= 6e-234) || ~((B <= 5.4e-120))) tmp = 180.0 / (pi / atan((((C - A) / B) + -1.0))); else tmp = 180.0 / (pi / atan(((0.5 * (B + (B * (C / A)))) / A))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5e+54], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -9.5e-281], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(B + N[(A * N[(B / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, 6e-234], N[Not[LessEqual[B, 5.4e-120]], $MachinePrecision]], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(0.5 * N[(B + N[(B * N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -5 \cdot 10^{+54}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -9.5 \cdot 10^{-281}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + A \cdot \frac{B}{C}\right)}{C}\right)}{\pi}\\
\mathbf{elif}\;B \leq 6 \cdot 10^{-234} \lor \neg \left(B \leq 5.4 \cdot 10^{-120}\right):\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{0.5 \cdot \left(B + B \cdot \frac{C}{A}\right)}{A}\right)}}\\
\end{array}
\end{array}
if B < -5.00000000000000005e54Initial program 40.8%
Taylor expanded in B around -inf 76.7%
if -5.00000000000000005e54 < B < -9.5000000000000003e-281Initial program 47.8%
Taylor expanded in C around inf 53.9%
Taylor expanded in C around -inf 54.1%
fma-define54.1%
mul-1-neg54.1%
fmm-undef54.1%
distribute-rgt1-in54.1%
metadata-eval54.1%
mul0-lft54.1%
div054.1%
metadata-eval54.1%
neg-sub054.1%
distribute-neg-frac54.1%
mul-1-neg54.1%
distribute-lft-out54.1%
associate-*r*54.1%
metadata-eval54.1%
distribute-lft-out54.1%
Simplified58.5%
if -9.5000000000000003e-281 < B < 5.99999999999999975e-234 or 5.3999999999999997e-120 < B Initial program 63.8%
*-commutative63.8%
associate--l-63.6%
+-commutative63.6%
unpow263.6%
unpow263.6%
hypot-undefine83.5%
div-inv83.5%
clear-num83.5%
un-div-inv83.5%
Applied egg-rr85.2%
Taylor expanded in B around inf 78.2%
+-commutative78.2%
associate--r+78.2%
div-sub79.1%
Simplified79.1%
if 5.99999999999999975e-234 < B < 5.3999999999999997e-120Initial program 32.9%
*-commutative32.9%
associate--l-32.9%
+-commutative32.9%
unpow232.9%
unpow232.9%
hypot-undefine53.9%
div-inv53.9%
clear-num53.9%
un-div-inv53.9%
Applied egg-rr60.5%
Taylor expanded in A around -inf 59.1%
associate-*r/59.1%
distribute-lft-out59.1%
associate-*r*59.1%
metadata-eval59.1%
associate-/l*59.2%
Simplified59.2%
Final simplification71.0%
(FPCore (A B C)
:precision binary64
(if (<= B -3.4e+53)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -1.06e-290)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= B 6e-183)
(* 180.0 (/ (atan (/ (* C 2.0) B)) PI))
(if (<= B 3.1e+40)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(* 180.0 (/ (atan -1.0) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3.4e+53) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -1.06e-290) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (B <= 6e-183) {
tmp = 180.0 * (atan(((C * 2.0) / B)) / ((double) M_PI));
} else if (B <= 3.1e+40) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((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 <= -3.4e+53) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -1.06e-290) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (B <= 6e-183) {
tmp = 180.0 * (Math.atan(((C * 2.0) / B)) / Math.PI);
} else if (B <= 3.1e+40) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -3.4e+53: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -1.06e-290: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif B <= 6e-183: tmp = 180.0 * (math.atan(((C * 2.0) / B)) / math.pi) elif B <= 3.1e+40: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -3.4e+53) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -1.06e-290) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (B <= 6e-183) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C * 2.0) / B)) / pi)); elseif (B <= 3.1e+40) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / 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 <= -3.4e+53) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -1.06e-290) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (B <= 6e-183) tmp = 180.0 * (atan(((C * 2.0) / B)) / pi); elseif (B <= 3.1e+40) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3.4e+53], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.06e-290], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6e-183], N[(180.0 * N[(N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.1e+40], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $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 -3.4 \cdot 10^{+53}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -1.06 \cdot 10^{-290}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;B \leq 6 \cdot 10^{-183}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C \cdot 2}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.1 \cdot 10^{+40}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -3.39999999999999998e53Initial program 40.8%
Taylor expanded in B around -inf 76.7%
if -3.39999999999999998e53 < B < -1.06000000000000003e-290Initial program 47.5%
Taylor expanded in A around 0 42.1%
+-commutative42.1%
unpow242.1%
unpow242.1%
hypot-define55.1%
Simplified55.1%
Taylor expanded in C around inf 49.3%
if -1.06000000000000003e-290 < B < 5.9999999999999996e-183Initial program 73.6%
associate-*l/73.6%
*-lft-identity73.6%
+-commutative73.6%
unpow273.6%
unpow273.6%
hypot-define82.6%
Simplified82.6%
Taylor expanded in C around -inf 65.0%
*-commutative65.0%
Simplified65.0%
if 5.9999999999999996e-183 < B < 3.0999999999999998e40Initial program 49.9%
Taylor expanded in A around -inf 38.0%
associate-*r/38.0%
Simplified38.0%
if 3.0999999999999998e40 < B Initial program 58.8%
Taylor expanded in B around inf 78.6%
Final simplification60.5%
(FPCore (A B C)
:precision binary64
(if (<= B -3e+53)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -2.3e-293)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= B 4.5e-230)
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI))
(if (<= B 3.2e+40)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(* 180.0 (/ (atan -1.0) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3e+53) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -2.3e-293) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (B <= 4.5e-230) {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
} else if (B <= 3.2e+40) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((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 <= -3e+53) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -2.3e-293) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (B <= 4.5e-230) {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
} else if (B <= 3.2e+40) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -3e+53: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -2.3e-293: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif B <= 4.5e-230: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) elif B <= 3.2e+40: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -3e+53) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -2.3e-293) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (B <= 4.5e-230) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); elseif (B <= 3.2e+40) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / 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 <= -3e+53) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -2.3e-293) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (B <= 4.5e-230) tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); elseif (B <= 3.2e+40) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3e+53], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.3e-293], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.5e-230], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.2e+40], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $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 -3 \cdot 10^{+53}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -2.3 \cdot 10^{-293}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4.5 \cdot 10^{-230}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.2 \cdot 10^{+40}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.99999999999999998e53Initial program 40.8%
Taylor expanded in B around -inf 76.7%
if -2.99999999999999998e53 < B < -2.29999999999999995e-293Initial program 47.7%
Taylor expanded in A around 0 42.4%
+-commutative42.4%
unpow242.4%
unpow242.4%
hypot-define56.4%
Simplified56.4%
Taylor expanded in C around inf 49.4%
if -2.29999999999999995e-293 < B < 4.50000000000000004e-230Initial program 100.0%
associate-*l/100.0%
*-lft-identity100.0%
+-commutative100.0%
unpow2100.0%
unpow2100.0%
hypot-define100.0%
Simplified100.0%
Taylor expanded in A around inf 73.3%
*-commutative73.3%
Simplified73.3%
if 4.50000000000000004e-230 < B < 3.19999999999999981e40Initial program 49.4%
Taylor expanded in A around -inf 38.6%
associate-*r/38.6%
Simplified38.6%
if 3.19999999999999981e40 < B Initial program 58.8%
Taylor expanded in B around inf 78.6%
Final simplification60.0%
(FPCore (A B C)
:precision binary64
(if (<= B -1.95e+54)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -1.1e-282)
(* 180.0 (/ (atan (/ (* -0.5 (+ B (* A (/ B C)))) C)) PI))
(/ 180.0 (/ PI (atan (+ (/ (- C A) B) -1.0)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.95e+54) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -1.1e-282) {
tmp = 180.0 * (atan(((-0.5 * (B + (A * (B / C)))) / C)) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((((C - A) / B) + -1.0)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.95e+54) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -1.1e-282) {
tmp = 180.0 * (Math.atan(((-0.5 * (B + (A * (B / C)))) / C)) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((((C - A) / B) + -1.0)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.95e+54: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -1.1e-282: tmp = 180.0 * (math.atan(((-0.5 * (B + (A * (B / C)))) / C)) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((((C - A) / B) + -1.0))) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.95e+54) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -1.1e-282) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B + Float64(A * Float64(B / C)))) / C)) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(C - A) / B) + -1.0)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.95e+54) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -1.1e-282) tmp = 180.0 * (atan(((-0.5 * (B + (A * (B / C)))) / C)) / pi); else tmp = 180.0 / (pi / atan((((C - A) / B) + -1.0))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.95e+54], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.1e-282], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(B + N[(A * N[(B / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.95 \cdot 10^{+54}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -1.1 \cdot 10^{-282}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + A \cdot \frac{B}{C}\right)}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}}\\
\end{array}
\end{array}
if B < -1.9500000000000001e54Initial program 40.8%
Taylor expanded in B around -inf 76.7%
if -1.9500000000000001e54 < B < -1.09999999999999991e-282Initial program 47.8%
Taylor expanded in C around inf 53.9%
Taylor expanded in C around -inf 54.1%
fma-define54.1%
mul-1-neg54.1%
fmm-undef54.1%
distribute-rgt1-in54.1%
metadata-eval54.1%
mul0-lft54.1%
div054.1%
metadata-eval54.1%
neg-sub054.1%
distribute-neg-frac54.1%
mul-1-neg54.1%
distribute-lft-out54.1%
associate-*r*54.1%
metadata-eval54.1%
distribute-lft-out54.1%
Simplified58.5%
if -1.09999999999999991e-282 < B Initial program 57.3%
*-commutative57.3%
associate--l-57.2%
+-commutative57.2%
unpow257.2%
unpow257.2%
hypot-undefine77.3%
div-inv77.3%
clear-num77.3%
un-div-inv77.4%
Applied egg-rr80.0%
Taylor expanded in B around inf 68.0%
+-commutative68.0%
associate--r+68.0%
div-sub68.7%
Simplified68.7%
Final simplification67.7%
(FPCore (A B C)
:precision binary64
(if (<= B -1.2e+55)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 5.8e-165)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= B 3.1e+40)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.2e+55) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 5.8e-165) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (B <= 3.1e+40) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((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 <= -1.2e+55) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 5.8e-165) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (B <= 3.1e+40) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.2e+55: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 5.8e-165: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif B <= 3.1e+40: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.2e+55) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 5.8e-165) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (B <= 3.1e+40) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / 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 <= -1.2e+55) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 5.8e-165) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (B <= 3.1e+40) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.2e+55], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.8e-165], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.1e+40], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $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 -1.2 \cdot 10^{+55}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 5.8 \cdot 10^{-165}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.1 \cdot 10^{+40}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.2e55Initial program 40.8%
Taylor expanded in B around -inf 76.7%
if -1.2e55 < B < 5.8e-165Initial program 52.3%
Taylor expanded in A around 0 46.5%
+-commutative46.5%
unpow246.5%
unpow246.5%
hypot-define60.0%
Simplified60.0%
Taylor expanded in C around inf 43.0%
if 5.8e-165 < B < 3.0999999999999998e40Initial program 52.6%
Taylor expanded in A around -inf 39.4%
associate-*r/39.4%
Simplified39.4%
if 3.0999999999999998e40 < B Initial program 58.8%
Taylor expanded in B around inf 78.6%
Final simplification57.4%
(FPCore (A B C)
:precision binary64
(if (<= B -3.6e+54)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -7.2e-290)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(/ 180.0 (/ PI (atan (+ (/ (- C A) B) -1.0)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3.6e+54) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -7.2e-290) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((((C - A) / B) + -1.0)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -3.6e+54) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -7.2e-290) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((((C - A) / B) + -1.0)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -3.6e+54: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -7.2e-290: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((((C - A) / B) + -1.0))) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -3.6e+54) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -7.2e-290) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(C - A) / B) + -1.0)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -3.6e+54) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -7.2e-290) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); else tmp = 180.0 / (pi / atan((((C - A) / B) + -1.0))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3.6e+54], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -7.2e-290], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -3.6 \cdot 10^{+54}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -7.2 \cdot 10^{-290}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}}\\
\end{array}
\end{array}
if B < -3.6000000000000001e54Initial program 40.8%
Taylor expanded in B around -inf 76.7%
if -3.6000000000000001e54 < B < -7.19999999999999959e-290Initial program 47.5%
Taylor expanded in A around 0 42.1%
+-commutative42.1%
unpow242.1%
unpow242.1%
hypot-define55.1%
Simplified55.1%
Taylor expanded in C around inf 49.3%
if -7.19999999999999959e-290 < B Initial program 57.6%
*-commutative57.6%
associate--l-57.6%
+-commutative57.6%
unpow257.6%
unpow257.6%
hypot-undefine77.9%
div-inv77.9%
clear-num77.9%
un-div-inv77.9%
Applied egg-rr80.4%
Taylor expanded in B around inf 68.5%
+-commutative68.5%
associate--r+68.5%
div-sub69.2%
Simplified69.2%
Final simplification65.5%
(FPCore (A B C)
:precision binary64
(if (<= C -1.55e-142)
(* 180.0 (/ (atan (/ (- C B) B)) PI))
(if (<= C 2.4e+17)
(/ 180.0 (/ PI (atan (- -1.0 (/ A B)))))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.55e-142) {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
} else if (C <= 2.4e+17) {
tmp = 180.0 / (((double) M_PI) / atan((-1.0 - (A / B))));
} 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.55e-142) {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
} else if (C <= 2.4e+17) {
tmp = 180.0 / (Math.PI / Math.atan((-1.0 - (A / B))));
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.55e-142: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) elif C <= 2.4e+17: tmp = 180.0 / (math.pi / math.atan((-1.0 - (A / B)))) 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.55e-142) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); elseif (C <= 2.4e+17) tmp = Float64(180.0 / Float64(pi / atan(Float64(-1.0 - Float64(A / B))))); 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.55e-142) tmp = 180.0 * (atan(((C - B) / B)) / pi); elseif (C <= 2.4e+17) tmp = 180.0 / (pi / atan((-1.0 - (A / B)))); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.55e-142], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.4e+17], N[(180.0 / N[(Pi / N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $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.55 \cdot 10^{-142}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 2.4 \cdot 10^{+17}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(-1 - \frac{A}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.55e-142Initial program 70.9%
Taylor expanded in A around 0 70.9%
+-commutative70.9%
unpow270.9%
unpow270.9%
hypot-define88.8%
Simplified88.8%
Taylor expanded in C around 0 73.8%
if -1.55e-142 < C < 2.4e17Initial program 50.5%
*-commutative50.5%
associate--l-49.3%
+-commutative49.3%
unpow249.3%
unpow249.3%
hypot-undefine70.8%
div-inv70.8%
clear-num70.8%
un-div-inv70.8%
Applied egg-rr75.6%
Taylor expanded in C around 0 49.8%
mul-1-neg49.8%
distribute-neg-frac249.8%
unpow249.8%
unpow249.8%
hypot-define74.9%
Simplified74.9%
Taylor expanded in A around 0 47.2%
sub-neg47.2%
metadata-eval47.2%
+-commutative47.2%
mul-1-neg47.2%
unsub-neg47.2%
Simplified47.2%
if 2.4e17 < C Initial program 21.7%
Taylor expanded in A around 0 21.7%
+-commutative21.7%
unpow221.7%
unpow221.7%
hypot-define59.4%
Simplified59.4%
Taylor expanded in C around inf 73.4%
(FPCore (A B C)
:precision binary64
(if (<= B -1.15e+54)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -2.15e-290)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(* 180.0 (/ (atan (/ (- C B) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.15e+54) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -2.15e-290) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.15e+54) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -2.15e-290) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.15e+54: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -2.15e-290: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) else: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.15e+54) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -2.15e-290) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.15e+54) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -2.15e-290) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); else tmp = 180.0 * (atan(((C - B) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.15e+54], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.15e-290], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.15 \cdot 10^{+54}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -2.15 \cdot 10^{-290}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.14999999999999997e54Initial program 40.8%
Taylor expanded in B around -inf 76.7%
if -1.14999999999999997e54 < B < -2.1500000000000001e-290Initial program 47.5%
Taylor expanded in A around 0 42.1%
+-commutative42.1%
unpow242.1%
unpow242.1%
hypot-define55.1%
Simplified55.1%
Taylor expanded in C around inf 49.3%
if -2.1500000000000001e-290 < B Initial program 57.6%
Taylor expanded in A around 0 52.1%
+-commutative52.1%
unpow252.1%
unpow252.1%
hypot-define71.1%
Simplified71.1%
Taylor expanded in C around 0 63.2%
(FPCore (A B C)
:precision binary64
(if (<= B -3e+53)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 4.6e-85)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3e+53) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 4.6e-85) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((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 <= -3e+53) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 4.6e-85) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -3e+53: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 4.6e-85: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -3e+53) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 4.6e-85) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / 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 <= -3e+53) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 4.6e-85) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3e+53], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.6e-85], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $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 -3 \cdot 10^{+53}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 4.6 \cdot 10^{-85}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.99999999999999998e53Initial program 40.8%
Taylor expanded in B around -inf 76.7%
if -2.99999999999999998e53 < B < 4.6000000000000001e-85Initial program 50.0%
Taylor expanded in A around 0 44.0%
+-commutative44.0%
unpow244.0%
unpow244.0%
hypot-define56.6%
Simplified56.6%
Taylor expanded in C around inf 40.5%
if 4.6000000000000001e-85 < B Initial program 60.0%
Taylor expanded in B around inf 62.4%
(FPCore (A B C)
:precision binary64
(if (<= B -1.95e-89)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 7.5e-91)
(* 180.0 (/ (atan 0.0) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.95e-89) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 7.5e-91) {
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 <= -1.95e-89) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 7.5e-91) {
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 <= -1.95e-89: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 7.5e-91: 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 <= -1.95e-89) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 7.5e-91) tmp = Float64(180.0 * Float64(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 <= -1.95e-89) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 7.5e-91) 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, -1.95e-89], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7.5e-91], N[(180.0 * N[(N[ArcTan[0.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.95 \cdot 10^{-89}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 7.5 \cdot 10^{-91}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.94999999999999989e-89Initial program 42.0%
Taylor expanded in B around -inf 59.8%
if -1.94999999999999989e-89 < B < 7.50000000000000051e-91Initial program 51.1%
Taylor expanded in C around inf 42.1%
Taylor expanded in B around 0 32.0%
distribute-rgt1-in32.0%
metadata-eval32.0%
mul0-lft32.0%
div032.0%
metadata-eval32.0%
Simplified32.0%
if 7.50000000000000051e-91 < B Initial program 59.8%
Taylor expanded in B around inf 61.3%
(FPCore (A B C) :precision binary64 (if (<= B 1.1e-89) (* 180.0 (/ (atan 0.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= 1.1e-89) {
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 <= 1.1e-89) {
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 <= 1.1e-89: 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 <= 1.1e-89) tmp = Float64(180.0 * Float64(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 <= 1.1e-89) 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, 1.1e-89], N[(180.0 * N[(N[ArcTan[0.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.1 \cdot 10^{-89}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < 1.10000000000000006e-89Initial program 47.2%
Taylor expanded in C around inf 34.1%
Taylor expanded in B around 0 19.6%
distribute-rgt1-in19.6%
metadata-eval19.6%
mul0-lft19.6%
div019.6%
metadata-eval19.6%
Simplified19.6%
if 1.10000000000000006e-89 < B Initial program 59.8%
Taylor expanded in B around inf 61.3%
(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 51.6%
Taylor expanded in B around inf 24.7%
herbie shell --seed 2024158
(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)))