
(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 (<= A -3.6e+132) (* 180.0 (/ (atan (/ (* -0.5 (- (/ (* C (- B)) A) B)) 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 <= -3.6e+132) {
tmp = 180.0 * (atan(((-0.5 * (((C * -B) / A) - B)) / 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 <= -3.6e+132) {
tmp = 180.0 * (Math.atan(((-0.5 * (((C * -B) / A) - B)) / 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 <= -3.6e+132: tmp = 180.0 * (math.atan(((-0.5 * (((C * -B) / A) - B)) / 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 <= -3.6e+132) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(Float64(Float64(C * Float64(-B)) / A) - B)) / 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 <= -3.6e+132) tmp = 180.0 * (atan(((-0.5 * (((C * -B) / A) - B)) / 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, -3.6e+132], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(N[(N[(C * (-B)), $MachinePrecision] / A), $MachinePrecision] - B), $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 -3.6 \cdot 10^{+132}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(\frac{C \cdot \left(-B\right)}{A} - B\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 < -3.60000000000000016e132Initial program 9.7%
Taylor expanded in A around -inf 93.5%
associate-*r/93.5%
mul-1-neg93.5%
distribute-lft-out93.5%
*-commutative93.5%
Simplified93.5%
if -3.60000000000000016e132 < A Initial program 59.1%
*-commutative59.1%
associate--l-58.0%
+-commutative58.0%
unpow258.0%
unpow258.0%
hypot-undefine77.9%
div-inv77.9%
clear-num77.9%
un-div-inv78.0%
Applied egg-rr79.1%
Final simplification81.6%
(FPCore (A B C)
:precision binary64
(if (<= A -2.85e+131)
(* 180.0 (/ (atan (/ (* -0.5 (- (/ (* C (- B)) A) B)) A)) PI))
(if (<= A 6.5e-162)
(* 180.0 (/ (atan (/ (- C (hypot C B)) B)) PI))
(* (/ 180.0 PI) (atan (/ (+ A (hypot A B)) (- B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.85e+131) {
tmp = 180.0 * (atan(((-0.5 * (((C * -B) / A) - B)) / A)) / ((double) M_PI));
} else if (A <= 6.5e-162) {
tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((A + hypot(A, B)) / -B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.85e+131) {
tmp = 180.0 * (Math.atan(((-0.5 * (((C * -B) / A) - B)) / A)) / Math.PI);
} else if (A <= 6.5e-162) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(C, B)) / B)) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan(((A + Math.hypot(A, B)) / -B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.85e+131: tmp = 180.0 * (math.atan(((-0.5 * (((C * -B) / A) - B)) / A)) / math.pi) elif A <= 6.5e-162: tmp = 180.0 * (math.atan(((C - math.hypot(C, B)) / B)) / math.pi) else: tmp = (180.0 / math.pi) * math.atan(((A + math.hypot(A, B)) / -B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.85e+131) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(Float64(Float64(C * Float64(-B)) / A) - B)) / A)) / pi)); elseif (A <= 6.5e-162) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(C, B)) / B)) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(A + hypot(A, B)) / Float64(-B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.85e+131) tmp = 180.0 * (atan(((-0.5 * (((C * -B) / A) - B)) / A)) / pi); elseif (A <= 6.5e-162) tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / pi); else tmp = (180.0 / pi) * atan(((A + hypot(A, B)) / -B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.85e+131], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(N[(N[(C * (-B)), $MachinePrecision] / A), $MachinePrecision] - B), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 6.5e-162], 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 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.85 \cdot 10^{+131}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(\frac{C \cdot \left(-B\right)}{A} - B\right)}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 6.5 \cdot 10^{-162}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{-B}\right)\\
\end{array}
\end{array}
if A < -2.85e131Initial program 9.7%
Taylor expanded in A around -inf 93.5%
associate-*r/93.5%
mul-1-neg93.5%
distribute-lft-out93.5%
*-commutative93.5%
Simplified93.5%
if -2.85e131 < A < 6.49999999999999989e-162Initial program 50.3%
Taylor expanded in A around 0 47.7%
+-commutative47.7%
unpow247.7%
unpow247.7%
hypot-define68.6%
Simplified68.6%
if 6.49999999999999989e-162 < A Initial program 71.5%
*-commutative71.5%
associate--l-71.5%
+-commutative71.5%
unpow271.5%
unpow271.5%
hypot-undefine90.2%
div-inv90.2%
clear-num90.2%
un-div-inv90.2%
Applied egg-rr90.2%
Taylor expanded in C around 0 71.5%
associate-*r/71.6%
Simplified90.2%
Taylor expanded in C around 0 70.7%
mul-1-neg70.7%
distribute-neg-frac270.7%
unpow270.7%
unpow270.7%
hypot-define88.0%
Simplified88.0%
Final simplification79.5%
(FPCore (A B C)
:precision binary64
(if (<= A -1.65e+132)
(* 180.0 (/ (atan (/ (* -0.5 (- (/ (* C (- B)) A) B)) A)) PI))
(if (<= A 6.8e-162)
(* 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.65e+132) {
tmp = 180.0 * (atan(((-0.5 * (((C * -B) / A) - B)) / A)) / ((double) M_PI));
} else if (A <= 6.8e-162) {
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.65e+132) {
tmp = 180.0 * (Math.atan(((-0.5 * (((C * -B) / A) - B)) / A)) / Math.PI);
} else if (A <= 6.8e-162) {
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.65e+132: tmp = 180.0 * (math.atan(((-0.5 * (((C * -B) / A) - B)) / A)) / math.pi) elif A <= 6.8e-162: 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.65e+132) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(Float64(Float64(C * Float64(-B)) / A) - B)) / A)) / pi)); elseif (A <= 6.8e-162) 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.65e+132) tmp = 180.0 * (atan(((-0.5 * (((C * -B) / A) - B)) / A)) / pi); elseif (A <= 6.8e-162) 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.65e+132], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(N[(N[(C * (-B)), $MachinePrecision] / A), $MachinePrecision] - B), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 6.8e-162], 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.65 \cdot 10^{+132}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(\frac{C \cdot \left(-B\right)}{A} - B\right)}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 6.8 \cdot 10^{-162}:\\
\;\;\;\;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.65000000000000015e132Initial program 9.7%
Taylor expanded in A around -inf 93.5%
associate-*r/93.5%
mul-1-neg93.5%
distribute-lft-out93.5%
*-commutative93.5%
Simplified93.5%
if -1.65000000000000015e132 < A < 6.8e-162Initial program 50.3%
Taylor expanded in A around 0 47.7%
+-commutative47.7%
unpow247.7%
unpow247.7%
hypot-define68.6%
Simplified68.6%
if 6.8e-162 < A Initial program 71.5%
Taylor expanded in C around 0 70.7%
associate-*r/70.7%
mul-1-neg70.7%
unpow270.7%
unpow270.7%
hypot-define87.9%
Simplified87.9%
Final simplification79.5%
(FPCore (A B C)
:precision binary64
(if (<= A -7.5e+139)
(* 180.0 (/ (atan (/ (* -0.5 (- (/ (* C (- B)) A) B)) A)) PI))
(if (<= A 2.8e+39)
(* 180.0 (/ (atan (/ (- C (hypot C B)) B)) PI))
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -7.5e+139) {
tmp = 180.0 * (atan(((-0.5 * (((C * -B) / A) - B)) / A)) / ((double) M_PI));
} else if (A <= 2.8e+39) {
tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -7.5e+139) {
tmp = 180.0 * (Math.atan(((-0.5 * (((C * -B) / A) - B)) / A)) / Math.PI);
} else if (A <= 2.8e+39) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(C, B)) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -7.5e+139: tmp = 180.0 * (math.atan(((-0.5 * (((C * -B) / A) - B)) / A)) / math.pi) elif A <= 2.8e+39: tmp = 180.0 * (math.atan(((C - math.hypot(C, B)) / B)) / math.pi) else: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -7.5e+139) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(Float64(Float64(C * Float64(-B)) / A) - B)) / A)) / pi)); elseif (A <= 2.8e+39) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(C, B)) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -7.5e+139) tmp = 180.0 * (atan(((-0.5 * (((C * -B) / A) - B)) / A)) / pi); elseif (A <= 2.8e+39) tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / pi); else tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -7.5e+139], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(N[(N[(C * (-B)), $MachinePrecision] / A), $MachinePrecision] - B), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.8e+39], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -7.5 \cdot 10^{+139}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(\frac{C \cdot \left(-B\right)}{A} - B\right)}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2.8 \cdot 10^{+39}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -7.49999999999999992e139Initial program 9.7%
Taylor expanded in A around -inf 93.5%
associate-*r/93.5%
mul-1-neg93.5%
distribute-lft-out93.5%
*-commutative93.5%
Simplified93.5%
if -7.49999999999999992e139 < A < 2.80000000000000001e39Initial program 50.8%
Taylor expanded in A around 0 44.6%
+-commutative44.6%
unpow244.6%
unpow244.6%
hypot-define67.9%
Simplified67.9%
if 2.80000000000000001e39 < A Initial program 86.1%
Taylor expanded in B around -inf 88.8%
associate--l+88.8%
div-sub90.9%
Simplified90.9%
Final simplification76.8%
(FPCore (A B C) :precision binary64 (if (<= A -1.5e+139) (* 180.0 (/ (atan (/ (* -0.5 (- (/ (* C (- B)) A) B)) A)) PI)) (* (atan (/ (- (- C A) (hypot B (- A C))) B)) (/ 180.0 PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.5e+139) {
tmp = 180.0 * (atan(((-0.5 * (((C * -B) / A) - B)) / A)) / ((double) M_PI));
} else {
tmp = atan((((C - A) - hypot(B, (A - C))) / B)) * (180.0 / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.5e+139) {
tmp = 180.0 * (Math.atan(((-0.5 * (((C * -B) / A) - B)) / A)) / Math.PI);
} else {
tmp = Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) * (180.0 / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.5e+139: tmp = 180.0 * (math.atan(((-0.5 * (((C * -B) / A) - B)) / A)) / math.pi) else: tmp = math.atan((((C - A) - math.hypot(B, (A - C))) / B)) * (180.0 / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.5e+139) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(Float64(Float64(C * Float64(-B)) / A) - B)) / A)) / pi)); else tmp = Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) * Float64(180.0 / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.5e+139) tmp = 180.0 * (atan(((-0.5 * (((C * -B) / A) - B)) / A)) / pi); else tmp = atan((((C - A) - hypot(B, (A - C))) / B)) * (180.0 / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.5e+139], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(N[(N[(C * (-B)), $MachinePrecision] / A), $MachinePrecision] - B), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.5 \cdot 10^{+139}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(\frac{C \cdot \left(-B\right)}{A} - B\right)}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right) \cdot \frac{180}{\pi}\\
\end{array}
\end{array}
if A < -1.5e139Initial program 9.7%
Taylor expanded in A around -inf 93.5%
associate-*r/93.5%
mul-1-neg93.5%
distribute-lft-out93.5%
*-commutative93.5%
Simplified93.5%
if -1.5e139 < A Initial program 59.1%
*-commutative59.1%
associate--l-58.0%
+-commutative58.0%
unpow258.0%
unpow258.0%
hypot-undefine77.9%
div-inv77.9%
clear-num77.9%
un-div-inv78.0%
Applied egg-rr79.1%
Taylor expanded in C around 0 58.0%
associate-*r/58.0%
Simplified79.1%
Final simplification81.6%
(FPCore (A B C) :precision binary64 (if (<= A -1.95e+135) (* 180.0 (/ (atan (/ (* -0.5 (- (/ (* C (- B)) A) B)) 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 <= -1.95e+135) {
tmp = 180.0 * (atan(((-0.5 * (((C * -B) / A) - B)) / 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 <= -1.95e+135) {
tmp = 180.0 * (Math.atan(((-0.5 * (((C * -B) / A) - B)) / 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 <= -1.95e+135: tmp = 180.0 * (math.atan(((-0.5 * (((C * -B) / A) - B)) / 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 <= -1.95e+135) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(Float64(Float64(C * Float64(-B)) / A) - B)) / 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 <= -1.95e+135) tmp = 180.0 * (atan(((-0.5 * (((C * -B) / A) - B)) / 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, -1.95e+135], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(N[(N[(C * (-B)), $MachinePrecision] / A), $MachinePrecision] - B), $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 -1.95 \cdot 10^{+135}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(\frac{C \cdot \left(-B\right)}{A} - B\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 < -1.95000000000000016e135Initial program 9.7%
Taylor expanded in A around -inf 93.5%
associate-*r/93.5%
mul-1-neg93.5%
distribute-lft-out93.5%
*-commutative93.5%
Simplified93.5%
if -1.95000000000000016e135 < A Initial program 59.1%
associate-*l/59.1%
*-lft-identity59.1%
+-commutative59.1%
unpow259.1%
unpow259.1%
hypot-define79.1%
Simplified79.1%
Final simplification81.6%
(FPCore (A B C) :precision binary64 (if (<= A -8e+61) (* 180.0 (/ (atan (/ (* B 0.5) A)) PI)) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -8e+61) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -8e+61) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -8e+61: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) else: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -8e+61) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -8e+61) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); else tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -8e+61], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -8 \cdot 10^{+61}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -7.9999999999999996e61Initial program 16.6%
Taylor expanded in A around -inf 83.7%
associate-*r/83.7%
Simplified83.7%
if -7.9999999999999996e61 < A Initial program 61.1%
Simplified80.1%
Final simplification80.9%
(FPCore (A B C)
:precision binary64
(if (<= C -0.0062)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= C -1.56e-195)
(* 180.0 (/ (atan 1.0) PI))
(if (<= C 2.75e-281)
(* 180.0 (/ (atan (/ A (- B))) PI))
(if (<= C 3e-181)
(* 180.0 (/ (atan -1.0) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -0.0062) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (C <= -1.56e-195) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (C <= 2.75e-281) {
tmp = 180.0 * (atan((A / -B)) / ((double) M_PI));
} else if (C <= 3e-181) {
tmp = 180.0 * (atan(-1.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 <= -0.0062) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (C <= -1.56e-195) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (C <= 2.75e-281) {
tmp = 180.0 * (Math.atan((A / -B)) / Math.PI);
} else if (C <= 3e-181) {
tmp = 180.0 * (Math.atan(-1.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 <= -0.0062: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif C <= -1.56e-195: tmp = 180.0 * (math.atan(1.0) / math.pi) elif C <= 2.75e-281: tmp = 180.0 * (math.atan((A / -B)) / math.pi) elif C <= 3e-181: tmp = 180.0 * (math.atan(-1.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 <= -0.0062) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (C <= -1.56e-195) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (C <= 2.75e-281) tmp = Float64(180.0 * Float64(atan(Float64(A / Float64(-B))) / pi)); elseif (C <= 3e-181) tmp = Float64(180.0 * Float64(atan(-1.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 <= -0.0062) tmp = 180.0 * (atan((C / B)) / pi); elseif (C <= -1.56e-195) tmp = 180.0 * (atan(1.0) / pi); elseif (C <= 2.75e-281) tmp = 180.0 * (atan((A / -B)) / pi); elseif (C <= 3e-181) tmp = 180.0 * (atan(-1.0) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -0.0062], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -1.56e-195], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.75e-281], N[(180.0 * N[(N[ArcTan[N[(A / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 3e-181], N[(180.0 * N[(N[ArcTan[-1.0], $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 -0.0062:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -1.56 \cdot 10^{-195}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;C \leq 2.75 \cdot 10^{-281}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 3 \cdot 10^{-181}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -0.00619999999999999978Initial program 75.4%
Taylor expanded in B around -inf 73.7%
associate--l+73.7%
div-sub77.3%
Simplified77.3%
Taylor expanded in C around inf 69.9%
if -0.00619999999999999978 < C < -1.56000000000000006e-195Initial program 55.5%
Taylor expanded in B around -inf 36.7%
if -1.56000000000000006e-195 < C < 2.7500000000000001e-281Initial program 44.9%
Taylor expanded in B around -inf 41.9%
associate--l+41.9%
div-sub41.9%
Simplified41.9%
Taylor expanded in A around inf 33.7%
associate-*r/33.7%
mul-1-neg33.7%
Simplified33.7%
if 2.7500000000000001e-281 < C < 2.99999999999999974e-181Initial program 52.4%
Taylor expanded in B around inf 49.1%
if 2.99999999999999974e-181 < C Initial program 38.0%
Taylor expanded in C around inf 56.7%
Taylor expanded in A around inf 56.7%
Final simplification53.6%
(FPCore (A B C) :precision binary64 (if (<= A -2.3e-78) (* 180.0 (/ (atan (/ (* -0.5 (- (/ (* C (- B)) A) B)) A)) PI)) (* 180.0 (/ (atan (+ (+ (/ (- C A) B) 2.0) -1.0)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.3e-78) {
tmp = 180.0 * (atan(((-0.5 * (((C * -B) / A) - B)) / A)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((((C - A) / B) + 2.0) + -1.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.3e-78) {
tmp = 180.0 * (Math.atan(((-0.5 * (((C * -B) / A) - B)) / A)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((((C - A) / B) + 2.0) + -1.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.3e-78: tmp = 180.0 * (math.atan(((-0.5 * (((C * -B) / A) - B)) / A)) / math.pi) else: tmp = 180.0 * (math.atan(((((C - A) / B) + 2.0) + -1.0)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.3e-78) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(Float64(Float64(C * Float64(-B)) / A) - B)) / A)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(Float64(C - A) / B) + 2.0) + -1.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.3e-78) tmp = 180.0 * (atan(((-0.5 * (((C * -B) / A) - B)) / A)) / pi); else tmp = 180.0 * (atan(((((C - A) / B) + 2.0) + -1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.3e-78], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(N[(N[(C * (-B)), $MachinePrecision] / A), $MachinePrecision] - B), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + 2.0), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.3 \cdot 10^{-78}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(\frac{C \cdot \left(-B\right)}{A} - B\right)}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(\frac{C - A}{B} + 2\right) + -1\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.3000000000000002e-78Initial program 27.3%
Taylor expanded in A around -inf 69.0%
associate-*r/69.0%
mul-1-neg69.0%
distribute-lft-out69.0%
*-commutative69.0%
Simplified69.0%
if -2.3000000000000002e-78 < A Initial program 64.0%
Taylor expanded in B around -inf 61.8%
associate--l+61.8%
div-sub62.4%
Simplified62.4%
expm1-log1p-u47.5%
expm1-undefine47.5%
Applied egg-rr47.5%
sub-neg47.5%
log1p-undefine47.5%
rem-exp-log62.4%
associate-+r+62.4%
metadata-eval62.4%
metadata-eval62.4%
Simplified62.4%
Final simplification64.8%
(FPCore (A B C)
:precision binary64
(if (<= B -290000000.0)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -5.9e-269)
(* 180.0 (/ (atan (/ A (- B))) PI))
(if (<= B 2.9e-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 <= -290000000.0) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -5.9e-269) {
tmp = 180.0 * (atan((A / -B)) / ((double) M_PI));
} else if (B <= 2.9e-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 <= -290000000.0) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -5.9e-269) {
tmp = 180.0 * (Math.atan((A / -B)) / Math.PI);
} else if (B <= 2.9e-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 <= -290000000.0: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -5.9e-269: tmp = 180.0 * (math.atan((A / -B)) / math.pi) elif B <= 2.9e-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 <= -290000000.0) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -5.9e-269) tmp = Float64(180.0 * Float64(atan(Float64(A / Float64(-B))) / pi)); elseif (B <= 2.9e-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 <= -290000000.0) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -5.9e-269) tmp = 180.0 * (atan((A / -B)) / pi); elseif (B <= 2.9e-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, -290000000.0], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -5.9e-269], N[(180.0 * N[(N[ArcTan[N[(A / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.9e-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 -290000000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -5.9 \cdot 10^{-269}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.9 \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 < -2.9e8Initial program 51.4%
Taylor expanded in B around -inf 60.4%
if -2.9e8 < B < -5.9e-269Initial program 60.8%
Taylor expanded in B around -inf 54.3%
associate--l+54.3%
div-sub55.9%
Simplified55.9%
Taylor expanded in A around inf 39.1%
associate-*r/39.1%
mul-1-neg39.1%
Simplified39.1%
if -5.9e-269 < B < 2.89999999999999992e-89Initial program 43.8%
Taylor expanded in C around inf 40.8%
Taylor expanded in B around 0 47.1%
distribute-rgt1-in47.1%
metadata-eval47.1%
mul0-lft47.1%
div047.1%
metadata-eval47.1%
Simplified47.1%
if 2.89999999999999992e-89 < B Initial program 46.0%
Taylor expanded in B around inf 50.9%
Final simplification49.5%
(FPCore (A B C) :precision binary64 (if (<= A -1.75e-81) (/ 180.0 (/ PI (atan (/ (* 0.5 (+ B (* C (/ B A)))) A)))) (* 180.0 (/ (atan (+ (+ (/ (- C A) B) 2.0) -1.0)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.75e-81) {
tmp = 180.0 / (((double) M_PI) / atan(((0.5 * (B + (C * (B / A)))) / A)));
} else {
tmp = 180.0 * (atan(((((C - A) / B) + 2.0) + -1.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.75e-81) {
tmp = 180.0 / (Math.PI / Math.atan(((0.5 * (B + (C * (B / A)))) / A)));
} else {
tmp = 180.0 * (Math.atan(((((C - A) / B) + 2.0) + -1.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.75e-81: tmp = 180.0 / (math.pi / math.atan(((0.5 * (B + (C * (B / A)))) / A))) else: tmp = 180.0 * (math.atan(((((C - A) / B) + 2.0) + -1.0)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.75e-81) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(0.5 * Float64(B + Float64(C * Float64(B / A)))) / A)))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(Float64(C - A) / B) + 2.0) + -1.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.75e-81) tmp = 180.0 / (pi / atan(((0.5 * (B + (C * (B / A)))) / A))); else tmp = 180.0 * (atan(((((C - A) / B) + 2.0) + -1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.75e-81], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(0.5 * N[(B + N[(C * N[(B / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + 2.0), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.75 \cdot 10^{-81}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{0.5 \cdot \left(B + C \cdot \frac{B}{A}\right)}{A}\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(\frac{C - A}{B} + 2\right) + -1\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.74999999999999993e-81Initial program 27.3%
*-commutative27.3%
associate--l-23.5%
+-commutative23.5%
unpow223.5%
unpow223.5%
hypot-undefine35.9%
div-inv35.9%
clear-num35.9%
un-div-inv35.9%
Applied egg-rr61.6%
Taylor expanded in A around -inf 68.5%
associate-*r/68.5%
distribute-lft-out68.5%
associate-*r*68.5%
metadata-eval68.5%
*-commutative68.5%
associate-/l*68.9%
Simplified68.9%
if -1.74999999999999993e-81 < A Initial program 64.0%
Taylor expanded in B around -inf 61.8%
associate--l+61.8%
div-sub62.4%
Simplified62.4%
expm1-log1p-u47.5%
expm1-undefine47.5%
Applied egg-rr47.5%
sub-neg47.5%
log1p-undefine47.5%
rem-exp-log62.4%
associate-+r+62.4%
metadata-eval62.4%
metadata-eval62.4%
Simplified62.4%
Final simplification64.8%
(FPCore (A B C)
:precision binary64
(if (<= A -5.1e+61)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 6.2e-174)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(/ 180.0 (/ PI (atan (- -1.0 (/ A B))))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -5.1e+61) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 6.2e-174) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((-1.0 - (A / B))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -5.1e+61) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 6.2e-174) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((-1.0 - (A / B))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -5.1e+61: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 6.2e-174: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((-1.0 - (A / B)))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -5.1e+61) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 6.2e-174) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(-1.0 - Float64(A / B))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -5.1e+61) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 6.2e-174) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); else tmp = 180.0 / (pi / atan((-1.0 - (A / B)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -5.1e+61], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 6.2e-174], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -5.1 \cdot 10^{+61}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 6.2 \cdot 10^{-174}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(-1 - \frac{A}{B}\right)}}\\
\end{array}
\end{array}
if A < -5.1000000000000001e61Initial program 16.6%
Taylor expanded in A around -inf 83.7%
associate-*r/83.7%
Simplified83.7%
if -5.1000000000000001e61 < A < 6.1999999999999998e-174Initial program 51.6%
Taylor expanded in B around -inf 45.6%
associate--l+45.6%
div-sub46.6%
Simplified46.6%
Taylor expanded in A around 0 46.5%
if 6.1999999999999998e-174 < A Initial program 71.7%
*-commutative71.7%
associate--l-71.7%
+-commutative71.7%
unpow271.7%
unpow271.7%
hypot-undefine90.6%
div-inv90.6%
clear-num90.6%
un-div-inv90.7%
Applied egg-rr90.7%
Taylor expanded in C around 0 70.9%
mul-1-neg71.0%
distribute-neg-frac271.0%
unpow271.0%
unpow271.0%
hypot-define87.4%
Simplified87.4%
Taylor expanded in A around 0 73.7%
sub-neg73.7%
metadata-eval73.7%
+-commutative73.7%
neg-mul-173.7%
unsub-neg73.7%
Simplified73.7%
Final simplification65.0%
(FPCore (A B C)
:precision binary64
(if (<= A -2.9e+62)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 3e-239)
(* 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.9e+62) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 3e-239) {
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.9e+62) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 3e-239) {
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.9e+62: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 3e-239: 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.9e+62) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 3e-239) 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.9e+62) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 3e-239) 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.9e+62], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3e-239], 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.9 \cdot 10^{+62}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 3 \cdot 10^{-239}:\\
\;\;\;\;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.89999999999999984e62Initial program 16.6%
Taylor expanded in A around -inf 83.7%
associate-*r/83.7%
Simplified83.7%
if -2.89999999999999984e62 < A < 2.9999999999999998e-239Initial program 54.0%
Taylor expanded in B around -inf 43.5%
associate--l+43.5%
div-sub44.6%
Simplified44.6%
Taylor expanded in A around 0 44.5%
if 2.9999999999999998e-239 < A Initial program 66.8%
Taylor expanded in B around -inf 69.4%
associate--l+69.4%
div-sub70.3%
Simplified70.3%
Taylor expanded in C around 0 69.6%
Final simplification64.3%
(FPCore (A B C)
:precision binary64
(if (<= A -1.55e+61)
(* 180.0 (/ (atan (* B (/ 0.5 A))) PI))
(if (<= A 3.1e-239)
(* 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 <= -1.55e+61) {
tmp = 180.0 * (atan((B * (0.5 / A))) / ((double) M_PI));
} else if (A <= 3.1e-239) {
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 <= -1.55e+61) {
tmp = 180.0 * (Math.atan((B * (0.5 / A))) / Math.PI);
} else if (A <= 3.1e-239) {
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 <= -1.55e+61: tmp = 180.0 * (math.atan((B * (0.5 / A))) / math.pi) elif A <= 3.1e-239: 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 <= -1.55e+61) tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(0.5 / A))) / pi)); elseif (A <= 3.1e-239) 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 <= -1.55e+61) tmp = 180.0 * (atan((B * (0.5 / A))) / pi); elseif (A <= 3.1e-239) 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, -1.55e+61], N[(180.0 * N[(N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.1e-239], 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 -1.55 \cdot 10^{+61}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 3.1 \cdot 10^{-239}:\\
\;\;\;\;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 < -1.55e61Initial program 16.6%
Taylor expanded in A around -inf 83.7%
associate-*r/83.7%
Simplified83.7%
Taylor expanded in B around 0 83.7%
associate-*r/83.7%
*-commutative83.7%
associate-/l*83.6%
Simplified83.6%
if -1.55e61 < A < 3.09999999999999985e-239Initial program 54.0%
Taylor expanded in B around -inf 43.5%
associate--l+43.5%
div-sub44.6%
Simplified44.6%
Taylor expanded in A around 0 44.5%
if 3.09999999999999985e-239 < A Initial program 66.8%
Taylor expanded in B around -inf 69.4%
associate--l+69.4%
div-sub70.3%
Simplified70.3%
Taylor expanded in C around 0 69.6%
(FPCore (A B C)
:precision binary64
(if (<= A -8.6e+60)
(* 180.0 (/ (atan (* B (/ 0.5 A))) PI))
(if (<= A 4.5e-173)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(* 180.0 (/ (atan (/ A (- B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -8.6e+60) {
tmp = 180.0 * (atan((B * (0.5 / A))) / ((double) M_PI));
} else if (A <= 4.5e-173) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((A / -B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -8.6e+60) {
tmp = 180.0 * (Math.atan((B * (0.5 / A))) / Math.PI);
} else if (A <= 4.5e-173) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((A / -B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -8.6e+60: tmp = 180.0 * (math.atan((B * (0.5 / A))) / math.pi) elif A <= 4.5e-173: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) else: tmp = 180.0 * (math.atan((A / -B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -8.6e+60) tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(0.5 / A))) / pi)); elseif (A <= 4.5e-173) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(A / Float64(-B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -8.6e+60) tmp = 180.0 * (atan((B * (0.5 / A))) / pi); elseif (A <= 4.5e-173) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); else tmp = 180.0 * (atan((A / -B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -8.6e+60], N[(180.0 * N[(N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.5e-173], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(A / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -8.6 \cdot 10^{+60}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 4.5 \cdot 10^{-173}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -8.59999999999999942e60Initial program 16.6%
Taylor expanded in A around -inf 83.7%
associate-*r/83.7%
Simplified83.7%
Taylor expanded in B around 0 83.7%
associate-*r/83.7%
*-commutative83.7%
associate-/l*83.6%
Simplified83.6%
if -8.59999999999999942e60 < A < 4.50000000000000018e-173Initial program 51.6%
Taylor expanded in B around -inf 45.6%
associate--l+45.6%
div-sub46.6%
Simplified46.6%
Taylor expanded in A around 0 46.5%
if 4.50000000000000018e-173 < A Initial program 71.7%
Taylor expanded in B around -inf 71.5%
associate--l+71.5%
div-sub72.6%
Simplified72.6%
Taylor expanded in A around inf 60.1%
associate-*r/60.1%
mul-1-neg60.1%
Simplified60.1%
Final simplification60.1%
(FPCore (A B C)
:precision binary64
(if (<= A -1e-80)
(* 180.0 (/ (atan (* B (/ 0.5 A))) PI))
(if (<= A 4.1e-124)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(* 180.0 (/ (atan (/ A (- B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1e-80) {
tmp = 180.0 * (atan((B * (0.5 / A))) / ((double) M_PI));
} else if (A <= 4.1e-124) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((A / -B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1e-80) {
tmp = 180.0 * (Math.atan((B * (0.5 / A))) / Math.PI);
} else if (A <= 4.1e-124) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((A / -B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1e-80: tmp = 180.0 * (math.atan((B * (0.5 / A))) / math.pi) elif A <= 4.1e-124: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) else: tmp = 180.0 * (math.atan((A / -B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1e-80) tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(0.5 / A))) / pi)); elseif (A <= 4.1e-124) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(A / Float64(-B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1e-80) tmp = 180.0 * (atan((B * (0.5 / A))) / pi); elseif (A <= 4.1e-124) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); else tmp = 180.0 * (atan((A / -B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1e-80], N[(180.0 * N[(N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.1e-124], 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[(A / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1 \cdot 10^{-80}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 4.1 \cdot 10^{-124}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -9.99999999999999961e-81Initial program 27.3%
Taylor expanded in A around -inf 67.6%
associate-*r/67.6%
Simplified67.6%
Taylor expanded in B around 0 67.6%
associate-*r/67.6%
*-commutative67.6%
associate-/l*67.6%
Simplified67.6%
if -9.99999999999999961e-81 < A < 4.1000000000000004e-124Initial program 53.2%
Taylor expanded in C around inf 42.4%
Taylor expanded in A around inf 42.4%
if 4.1000000000000004e-124 < A Initial program 73.9%
Taylor expanded in B around -inf 74.9%
associate--l+74.9%
div-sub76.1%
Simplified76.1%
Taylor expanded in A around inf 62.4%
associate-*r/62.4%
mul-1-neg62.4%
Simplified62.4%
Final simplification58.2%
(FPCore (A B C) :precision binary64 (if (<= A -2.7e+63) (* 180.0 (/ (atan (/ (* B 0.5) A)) PI)) (* 180.0 (/ (atan (+ (+ (/ (- C A) B) 2.0) -1.0)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.7e+63) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((((C - A) / B) + 2.0) + -1.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.7e+63) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((((C - A) / B) + 2.0) + -1.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.7e+63: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) else: tmp = 180.0 * (math.atan(((((C - A) / B) + 2.0) + -1.0)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.7e+63) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(Float64(C - A) / B) + 2.0) + -1.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.7e+63) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); else tmp = 180.0 * (atan(((((C - A) / B) + 2.0) + -1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.7e+63], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + 2.0), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.7 \cdot 10^{+63}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(\frac{C - A}{B} + 2\right) + -1\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.70000000000000017e63Initial program 16.6%
Taylor expanded in A around -inf 83.7%
associate-*r/83.7%
Simplified83.7%
if -2.70000000000000017e63 < A Initial program 61.1%
Taylor expanded in B around -inf 57.8%
associate--l+57.8%
div-sub58.8%
Simplified58.8%
expm1-log1p-u43.7%
expm1-undefine43.7%
Applied egg-rr43.7%
sub-neg43.7%
log1p-undefine43.7%
rem-exp-log58.8%
associate-+r+58.8%
metadata-eval58.8%
metadata-eval58.8%
Simplified58.8%
Final simplification64.6%
(FPCore (A B C) :precision binary64 (if (<= A -1.15e+61) (* 180.0 (/ (atan (/ (* B 0.5) A)) PI)) (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.15e+61) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.15e+61) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.15e+61: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) else: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.15e+61) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.15e+61) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); else tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.15e+61], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.15 \cdot 10^{+61}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.15e61Initial program 16.6%
Taylor expanded in A around -inf 83.7%
associate-*r/83.7%
Simplified83.7%
if -1.15e61 < A Initial program 61.1%
Taylor expanded in B around -inf 57.8%
associate--l+57.8%
div-sub58.8%
Simplified58.8%
Final simplification64.6%
(FPCore (A B C)
:precision binary64
(if (<= B -1.6e-65)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 8.6e-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.6e-65) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 8.6e-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.6e-65) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 8.6e-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.6e-65: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 8.6e-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.6e-65) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 8.6e-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.6e-65) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 8.6e-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.6e-65], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 8.6e-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.6 \cdot 10^{-65}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 8.6 \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.6e-65Initial program 52.7%
Taylor expanded in B around -inf 52.6%
if -1.6e-65 < B < 8.59999999999999974e-89Initial program 52.0%
Taylor expanded in C around inf 34.7%
Taylor expanded in B around 0 37.6%
distribute-rgt1-in37.6%
metadata-eval37.6%
mul0-lft37.6%
div037.6%
metadata-eval37.6%
Simplified37.6%
if 8.59999999999999974e-89 < B Initial program 46.0%
Taylor expanded in B around inf 50.9%
(FPCore (A B C) :precision binary64 (if (<= B 6.2e-90) (* 180.0 (/ (atan 0.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= 6.2e-90) {
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 <= 6.2e-90) {
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 <= 6.2e-90: 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 <= 6.2e-90) 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 <= 6.2e-90) 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, 6.2e-90], 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 6.2 \cdot 10^{-90}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < 6.2000000000000003e-90Initial program 52.3%
Taylor expanded in C around inf 32.6%
Taylor expanded in B around 0 22.8%
distribute-rgt1-in22.8%
metadata-eval22.8%
mul0-lft22.8%
div022.8%
metadata-eval22.8%
Simplified22.8%
if 6.2000000000000003e-90 < B Initial program 46.0%
Taylor expanded in B around inf 50.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 50.6%
Taylor expanded in B around inf 16.7%
herbie shell --seed 2024143
(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)))