
(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 25 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 (exp (atan (/ (- (- C A) (hypot B (- C A))) B)))))
(if (<= t_0 -1e-29)
(* 2.0 (log (sqrt (pow t_1 (/ 180.0 PI)))))
(if (<= t_0 0.0)
(* (/ 180.0 PI) (atan (* B (/ -0.5 (- C A)))))
(* 2.0 (* (/ 180.0 (* 2.0 PI)) (log t_1)))))))
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 = exp(atan((((C - A) - hypot(B, (C - A))) / B)));
double tmp;
if (t_0 <= -1e-29) {
tmp = 2.0 * log(sqrt(pow(t_1, (180.0 / ((double) M_PI)))));
} else if (t_0 <= 0.0) {
tmp = (180.0 / ((double) M_PI)) * atan((B * (-0.5 / (C - A))));
} else {
tmp = 2.0 * ((180.0 / (2.0 * ((double) M_PI))) * log(t_1));
}
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 = Math.exp(Math.atan((((C - A) - Math.hypot(B, (C - A))) / B)));
double tmp;
if (t_0 <= -1e-29) {
tmp = 2.0 * Math.log(Math.sqrt(Math.pow(t_1, (180.0 / Math.PI))));
} else if (t_0 <= 0.0) {
tmp = (180.0 / Math.PI) * Math.atan((B * (-0.5 / (C - A))));
} else {
tmp = 2.0 * ((180.0 / (2.0 * Math.PI)) * Math.log(t_1));
}
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 = math.exp(math.atan((((C - A) - math.hypot(B, (C - A))) / B))) tmp = 0 if t_0 <= -1e-29: tmp = 2.0 * math.log(math.sqrt(math.pow(t_1, (180.0 / math.pi)))) elif t_0 <= 0.0: tmp = (180.0 / math.pi) * math.atan((B * (-0.5 / (C - A)))) else: tmp = 2.0 * ((180.0 / (2.0 * math.pi)) * math.log(t_1)) 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 = exp(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(C - A))) / B))) tmp = 0.0 if (t_0 <= -1e-29) tmp = Float64(2.0 * log(sqrt((t_1 ^ Float64(180.0 / pi))))); elseif (t_0 <= 0.0) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(-0.5 / Float64(C - A))))); else tmp = Float64(2.0 * Float64(Float64(180.0 / Float64(2.0 * pi)) * log(t_1))); 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 = exp(atan((((C - A) - hypot(B, (C - A))) / B))); tmp = 0.0; if (t_0 <= -1e-29) tmp = 2.0 * log(sqrt((t_1 ^ (180.0 / pi)))); elseif (t_0 <= 0.0) tmp = (180.0 / pi) * atan((B * (-0.5 / (C - A)))); else tmp = 2.0 * ((180.0 / (2.0 * pi)) * log(t_1)); 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[Exp[N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(C - A), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$0, -1e-29], N[(2.0 * N[Log[N[Sqrt[N[Power[t$95$1, N[(180.0 / Pi), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(-0.5 / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(180.0 / N[(2.0 * Pi), $MachinePrecision]), $MachinePrecision] * N[Log[t$95$1], $MachinePrecision]), $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 := e^{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right)}\\
\mathbf{if}\;t_0 \leq -1 \cdot 10^{-29}:\\
\;\;\;\;2 \cdot \log \left(\sqrt{{t_1}^{\left(\frac{180}{\pi}\right)}}\right)\\
\mathbf{elif}\;t_0 \leq 0:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{180}{2 \cdot \pi} \cdot \log t_1\right)\\
\end{array}
\end{array}
if (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < -9.99999999999999943e-30Initial program 66.1%
Simplified87.2%
div-sub84.7%
Applied egg-rr84.7%
add-log-exp84.8%
*-commutative84.8%
exp-prod84.7%
sub-div87.2%
Applied egg-rr87.2%
add-sqr-sqrt87.2%
log-prod87.2%
Applied egg-rr87.2%
Simplified91.2%
if -9.99999999999999943e-30 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < 0.0Initial program 9.7%
Simplified9.2%
Taylor expanded in B around 0 99.6%
associate-*r/99.6%
Simplified99.6%
div-inv99.6%
*-commutative99.6%
Applied egg-rr99.6%
add-exp-log92.4%
log-rec92.4%
Applied egg-rr92.4%
expm1-log1p-u92.4%
expm1-udef9.7%
associate-*l*9.7%
exp-neg9.7%
add-exp-log9.7%
Applied egg-rr9.7%
expm1-def99.6%
expm1-log1p99.6%
associate-*r/99.6%
metadata-eval99.6%
Simplified99.6%
if 0.0 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) Initial program 55.4%
Simplified78.7%
div-sub74.1%
Applied egg-rr74.1%
add-log-exp75.9%
*-commutative75.9%
exp-prod75.3%
sub-div79.8%
Applied egg-rr79.8%
sqr-pow79.8%
log-prod79.8%
Applied egg-rr79.8%
Simplified84.3%
Final simplification88.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
(if (or (<= t_0 -1e-29) (not (<= t_0 0.0)))
(*
2.0
(*
(/ 180.0 (* 2.0 PI))
(log (exp (atan (/ (- (- C A) (hypot B (- C A))) B))))))
(* (/ 180.0 PI) (atan (* B (/ -0.5 (- C A))))))))
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 tmp;
if ((t_0 <= -1e-29) || !(t_0 <= 0.0)) {
tmp = 2.0 * ((180.0 / (2.0 * ((double) M_PI))) * log(exp(atan((((C - A) - hypot(B, (C - A))) / B)))));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((B * (-0.5 / (C - A))));
}
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 tmp;
if ((t_0 <= -1e-29) || !(t_0 <= 0.0)) {
tmp = 2.0 * ((180.0 / (2.0 * Math.PI)) * Math.log(Math.exp(Math.atan((((C - A) - Math.hypot(B, (C - A))) / B)))));
} else {
tmp = (180.0 / Math.PI) * Math.atan((B * (-0.5 / (C - A))));
}
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)))) tmp = 0 if (t_0 <= -1e-29) or not (t_0 <= 0.0): tmp = 2.0 * ((180.0 / (2.0 * math.pi)) * math.log(math.exp(math.atan((((C - A) - math.hypot(B, (C - A))) / B))))) else: tmp = (180.0 / math.pi) * math.atan((B * (-0.5 / (C - A)))) 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))))) tmp = 0.0 if ((t_0 <= -1e-29) || !(t_0 <= 0.0)) tmp = Float64(2.0 * Float64(Float64(180.0 / Float64(2.0 * pi)) * log(exp(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(C - A))) / B)))))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(-0.5 / Float64(C - A))))); 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)))); tmp = 0.0; if ((t_0 <= -1e-29) || ~((t_0 <= 0.0))) tmp = 2.0 * ((180.0 / (2.0 * pi)) * log(exp(atan((((C - A) - hypot(B, (C - A))) / B))))); else tmp = (180.0 / pi) * atan((B * (-0.5 / (C - A)))); 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]}, If[Or[LessEqual[t$95$0, -1e-29], N[Not[LessEqual[t$95$0, 0.0]], $MachinePrecision]], N[(2.0 * N[(N[(180.0 / N[(2.0 * Pi), $MachinePrecision]), $MachinePrecision] * N[Log[N[Exp[N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(C - A), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(-0.5 / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $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)\\
\mathbf{if}\;t_0 \leq -1 \cdot 10^{-29} \lor \neg \left(t_0 \leq 0\right):\\
\;\;\;\;2 \cdot \left(\frac{180}{2 \cdot \pi} \cdot \log \left(e^{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right)}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)\\
\end{array}
\end{array}
if (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < -9.99999999999999943e-30 or 0.0 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) Initial program 61.0%
Simplified83.1%
div-sub79.6%
Applied egg-rr79.6%
add-log-exp80.5%
*-commutative80.5%
exp-prod80.2%
sub-div83.7%
Applied egg-rr83.7%
sqr-pow83.7%
log-prod83.7%
Applied egg-rr83.7%
Simplified87.9%
if -9.99999999999999943e-30 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < 0.0Initial program 9.7%
Simplified9.2%
Taylor expanded in B around 0 99.6%
associate-*r/99.6%
Simplified99.6%
div-inv99.6%
*-commutative99.6%
Applied egg-rr99.6%
add-exp-log92.4%
log-rec92.4%
Applied egg-rr92.4%
expm1-log1p-u92.4%
expm1-udef9.7%
associate-*l*9.7%
exp-neg9.7%
add-exp-log9.7%
Applied egg-rr9.7%
expm1-def99.6%
expm1-log1p99.6%
associate-*r/99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification88.9%
(FPCore (A B C) :precision binary64 (if (<= A -9e+130) (* (/ 180.0 PI) (atan (* B (/ 0.5 A)))) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -9e+130) {
tmp = (180.0 / ((double) M_PI)) * atan((B * (0.5 / A)));
} 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 <= -9e+130) {
tmp = (180.0 / Math.PI) * Math.atan((B * (0.5 / A)));
} 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 <= -9e+130: tmp = (180.0 / math.pi) * math.atan((B * (0.5 / A))) 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 <= -9e+130) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(0.5 / A)))); 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 <= -9e+130) tmp = (180.0 / pi) * atan((B * (0.5 / A))); 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, -9e+130], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $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 -9 \cdot 10^{+130}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A}\right)\\
\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 < -9.00000000000000078e130Initial program 8.5%
Simplified8.5%
Taylor expanded in A around -inf 90.9%
associate-*r/90.9%
Simplified90.9%
clear-num90.7%
inv-pow90.7%
associate-/l*90.8%
Applied egg-rr90.8%
unpow-190.8%
associate-/r/90.8%
Simplified90.8%
Taylor expanded in A around 0 90.9%
associate-*r/90.8%
associate-*r/90.8%
*-commutative90.8%
associate-*r/90.8%
associate-*l/91.0%
Simplified91.0%
if -9.00000000000000078e130 < A Initial program 62.7%
Simplified84.7%
Final simplification85.4%
(FPCore (A B C) :precision binary64 (if (<= A -1.15e+130) (* (/ 180.0 PI) (atan (* B (/ 0.5 A)))) (* (/ 180.0 PI) (atan (/ (- C (+ A (hypot B (- C A)))) B)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.15e+130) {
tmp = (180.0 / ((double) M_PI)) * atan((B * (0.5 / A)));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (A + hypot(B, (C - A)))) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.15e+130) {
tmp = (180.0 / Math.PI) * Math.atan((B * (0.5 / A)));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - (A + Math.hypot(B, (C - A)))) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.15e+130: tmp = (180.0 / math.pi) * math.atan((B * (0.5 / A))) else: tmp = (180.0 / math.pi) * math.atan(((C - (A + math.hypot(B, (C - A)))) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.15e+130) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(0.5 / A)))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A + hypot(B, Float64(C - A)))) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.15e+130) tmp = (180.0 / pi) * atan((B * (0.5 / A))); else tmp = (180.0 / pi) * atan(((C - (A + hypot(B, (C - A)))) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.15e+130], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(C - A), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.15 \cdot 10^{+130}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, C - A\right)\right)}{B}\right)\\
\end{array}
\end{array}
if A < -1.15000000000000011e130Initial program 8.5%
Simplified8.5%
Taylor expanded in A around -inf 90.9%
associate-*r/90.9%
Simplified90.9%
clear-num90.7%
inv-pow90.7%
associate-/l*90.8%
Applied egg-rr90.8%
unpow-190.8%
associate-/r/90.8%
Simplified90.8%
Taylor expanded in A around 0 90.9%
associate-*r/90.8%
associate-*r/90.8%
*-commutative90.8%
associate-*r/90.8%
associate-*l/91.0%
Simplified91.0%
if -1.15000000000000011e130 < A Initial program 62.7%
Simplified84.7%
Final simplification85.4%
(FPCore (A B C)
:precision binary64
(if (<= A -3e+127)
(* (/ 180.0 PI) (atan (* B (/ 0.5 A))))
(if (<= A 9.2e-97)
(* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B)))
(* 180.0 (/ (atan (/ (- (- A) (hypot B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3e+127) {
tmp = (180.0 / ((double) M_PI)) * atan((B * (0.5 / A)));
} else if (A <= 9.2e-97) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / B));
} else {
tmp = 180.0 * (atan(((-A - hypot(B, A)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3e+127) {
tmp = (180.0 / Math.PI) * Math.atan((B * (0.5 / A)));
} else if (A <= 9.2e-97) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / B));
} else {
tmp = 180.0 * (Math.atan(((-A - Math.hypot(B, A)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3e+127: tmp = (180.0 / math.pi) * math.atan((B * (0.5 / A))) elif A <= 9.2e-97: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / B)) else: tmp = 180.0 * (math.atan(((-A - math.hypot(B, A)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3e+127) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(0.5 / A)))); elseif (A <= 9.2e-97) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / B))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-A) - hypot(B, A)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3e+127) tmp = (180.0 / pi) * atan((B * (0.5 / A))); elseif (A <= 9.2e-97) tmp = (180.0 / pi) * atan(((C - hypot(B, C)) / B)); else tmp = 180.0 * (atan(((-A - hypot(B, A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3e+127], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 9.2e-97], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[((-A) - N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3 \cdot 10^{+127}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A}\right)\\
\mathbf{elif}\;A \leq 9.2 \cdot 10^{-97}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.0000000000000002e127Initial program 8.5%
Simplified8.5%
Taylor expanded in A around -inf 90.9%
associate-*r/90.9%
Simplified90.9%
clear-num90.7%
inv-pow90.7%
associate-/l*90.8%
Applied egg-rr90.8%
unpow-190.8%
associate-/r/90.8%
Simplified90.8%
Taylor expanded in A around 0 90.9%
associate-*r/90.8%
associate-*r/90.8%
*-commutative90.8%
associate-*r/90.8%
associate-*l/91.0%
Simplified91.0%
if -3.0000000000000002e127 < A < 9.19999999999999976e-97Initial program 53.6%
Simplified80.8%
add-log-exp80.8%
Applied egg-rr80.8%
Taylor expanded in A around 0 51.7%
unpow251.7%
unpow251.7%
hypot-def79.1%
Simplified79.1%
if 9.19999999999999976e-97 < A Initial program 79.4%
Simplified79.4%
Taylor expanded in C around 0 79.3%
associate-*r/79.3%
mul-1-neg79.3%
+-commutative79.3%
unpow279.3%
unpow279.3%
hypot-def90.4%
Simplified90.4%
Final simplification84.0%
(FPCore (A B C)
:precision binary64
(if (<= A -2.1e+127)
(* (/ 180.0 PI) (atan (* B (/ 0.5 A))))
(if (<= A 3.5e-94)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.1e+127) {
tmp = (180.0 / ((double) M_PI)) * atan((B * (0.5 / A)));
} else if (A <= 3.5e-94) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.1e+127) {
tmp = (180.0 / Math.PI) * Math.atan((B * (0.5 / A)));
} else if (A <= 3.5e-94) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.1e+127: tmp = (180.0 / math.pi) * math.atan((B * (0.5 / A))) elif A <= 3.5e-94: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.1e+127) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(0.5 / A)))); elseif (A <= 3.5e-94) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.1e+127) tmp = (180.0 / pi) * atan((B * (0.5 / A))); elseif (A <= 3.5e-94) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.1e+127], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.5e-94], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.1 \cdot 10^{+127}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A}\right)\\
\mathbf{elif}\;A \leq 3.5 \cdot 10^{-94}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.09999999999999992e127Initial program 8.5%
Simplified8.5%
Taylor expanded in A around -inf 90.9%
associate-*r/90.9%
Simplified90.9%
clear-num90.7%
inv-pow90.7%
associate-/l*90.8%
Applied egg-rr90.8%
unpow-190.8%
associate-/r/90.8%
Simplified90.8%
Taylor expanded in A around 0 90.9%
associate-*r/90.8%
associate-*r/90.8%
*-commutative90.8%
associate-*r/90.8%
associate-*l/91.0%
Simplified91.0%
if -2.09999999999999992e127 < A < 3.49999999999999998e-94Initial program 53.9%
Simplified53.9%
Taylor expanded in A around 0 52.0%
unpow252.0%
unpow252.0%
hypot-def79.2%
Simplified79.2%
if 3.49999999999999998e-94 < A Initial program 79.1%
Simplified79.1%
Taylor expanded in B around inf 85.8%
+-commutative85.8%
associate--r+85.8%
div-sub85.9%
Simplified85.9%
Taylor expanded in C around 0 86.0%
associate-*r/86.0%
neg-mul-186.0%
Simplified86.0%
Final simplification82.6%
(FPCore (A B C)
:precision binary64
(if (<= A -5.4e+129)
(* (/ 180.0 PI) (atan (* B (/ 0.5 A))))
(if (<= A 3.5e-94)
(* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B)))
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -5.4e+129) {
tmp = (180.0 / ((double) M_PI)) * atan((B * (0.5 / A)));
} else if (A <= 3.5e-94) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / B));
} else {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -5.4e+129) {
tmp = (180.0 / Math.PI) * Math.atan((B * (0.5 / A)));
} else if (A <= 3.5e-94) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / B));
} else {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -5.4e+129: tmp = (180.0 / math.pi) * math.atan((B * (0.5 / A))) elif A <= 3.5e-94: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / B)) else: tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -5.4e+129) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(0.5 / A)))); elseif (A <= 3.5e-94) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / B))); else tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -5.4e+129) tmp = (180.0 / pi) * atan((B * (0.5 / A))); elseif (A <= 3.5e-94) tmp = (180.0 / pi) * atan(((C - hypot(B, C)) / B)); else tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -5.4e+129], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.5e-94], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -5.4 \cdot 10^{+129}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A}\right)\\
\mathbf{elif}\;A \leq 3.5 \cdot 10^{-94}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.4000000000000002e129Initial program 8.5%
Simplified8.5%
Taylor expanded in A around -inf 90.9%
associate-*r/90.9%
Simplified90.9%
clear-num90.7%
inv-pow90.7%
associate-/l*90.8%
Applied egg-rr90.8%
unpow-190.8%
associate-/r/90.8%
Simplified90.8%
Taylor expanded in A around 0 90.9%
associate-*r/90.8%
associate-*r/90.8%
*-commutative90.8%
associate-*r/90.8%
associate-*l/91.0%
Simplified91.0%
if -5.4000000000000002e129 < A < 3.49999999999999998e-94Initial program 53.9%
Simplified80.9%
add-log-exp80.9%
Applied egg-rr80.9%
Taylor expanded in A around 0 52.0%
unpow252.0%
unpow252.0%
hypot-def79.2%
Simplified79.2%
if 3.49999999999999998e-94 < A Initial program 79.1%
Simplified79.1%
Taylor expanded in B around inf 85.8%
+-commutative85.8%
associate--r+85.8%
div-sub85.9%
Simplified85.9%
Taylor expanded in C around 0 86.0%
associate-*r/86.0%
neg-mul-186.0%
Simplified86.0%
Final simplification82.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan 1.0) PI))))
(if (<= B -3e+69)
t_0
(if (<= B -2.9e+20)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= B -1e-63)
t_0
(if (<= B -7e-203)
(* (/ 180.0 PI) (atan (* -0.5 (/ B C))))
(if (<= B 1.32e-216)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= B 4.6e-13)
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI))
(* 180.0 (/ (atan -1.0) PI))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(1.0) / ((double) M_PI));
double tmp;
if (B <= -3e+69) {
tmp = t_0;
} else if (B <= -2.9e+20) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (B <= -1e-63) {
tmp = t_0;
} else if (B <= -7e-203) {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
} else if (B <= 1.32e-216) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (B <= 4.6e-13) {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(1.0) / Math.PI);
double tmp;
if (B <= -3e+69) {
tmp = t_0;
} else if (B <= -2.9e+20) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (B <= -1e-63) {
tmp = t_0;
} else if (B <= -7e-203) {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
} else if (B <= 1.32e-216) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (B <= 4.6e-13) {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(1.0) / math.pi) tmp = 0 if B <= -3e+69: tmp = t_0 elif B <= -2.9e+20: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif B <= -1e-63: tmp = t_0 elif B <= -7e-203: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) elif B <= 1.32e-216: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif B <= 4.6e-13: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(1.0) / pi)) tmp = 0.0 if (B <= -3e+69) tmp = t_0; elseif (B <= -2.9e+20) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (B <= -1e-63) tmp = t_0; elseif (B <= -7e-203) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); elseif (B <= 1.32e-216) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (B <= 4.6e-13) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(1.0) / pi); tmp = 0.0; if (B <= -3e+69) tmp = t_0; elseif (B <= -2.9e+20) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (B <= -1e-63) tmp = t_0; elseif (B <= -7e-203) tmp = (180.0 / pi) * atan((-0.5 * (B / C))); elseif (B <= 1.32e-216) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (B <= 4.6e-13) tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -3e+69], t$95$0, If[LessEqual[B, -2.9e+20], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1e-63], t$95$0, If[LessEqual[B, -7e-203], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.32e-216], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.6e-13], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{if}\;B \leq -3 \cdot 10^{+69}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -2.9 \cdot 10^{+20}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;B \leq -1 \cdot 10^{-63}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -7 \cdot 10^{-203}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\mathbf{elif}\;B \leq 1.32 \cdot 10^{-216}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4.6 \cdot 10^{-13}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.99999999999999983e69 or -2.9e20 < B < -1.00000000000000007e-63Initial program 52.9%
Simplified52.9%
Taylor expanded in B around -inf 64.1%
if -2.99999999999999983e69 < B < -2.9e20Initial program 45.3%
Simplified45.3%
Taylor expanded in A around -inf 72.1%
associate-*r/72.1%
Simplified72.1%
if -1.00000000000000007e-63 < B < -7.0000000000000003e-203Initial program 44.1%
Simplified63.8%
Taylor expanded in B around 0 55.9%
associate-*r/55.9%
Simplified55.9%
Taylor expanded in C around inf 55.9%
if -7.0000000000000003e-203 < B < 1.31999999999999997e-216Initial program 62.9%
Simplified62.8%
Taylor expanded in C around -inf 55.0%
if 1.31999999999999997e-216 < B < 4.59999999999999958e-13Initial program 75.6%
Simplified75.5%
Taylor expanded in A around inf 48.9%
associate-*r/48.9%
*-commutative48.9%
Simplified48.9%
if 4.59999999999999958e-13 < B Initial program 49.7%
Simplified49.7%
Taylor expanded in B around inf 67.8%
Final simplification60.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan 1.0) PI))))
(if (<= B -3e+69)
t_0
(if (<= B -2.9e+20)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= B -2.6e-61)
t_0
(if (<= B -1.25e-203)
(* (/ 180.0 PI) (atan (* -0.5 (/ B C))))
(if (<= B 1.9e-214)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= B 5e-15)
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI))
(* 180.0 (/ (atan -1.0) PI))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(1.0) / ((double) M_PI));
double tmp;
if (B <= -3e+69) {
tmp = t_0;
} else if (B <= -2.9e+20) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (B <= -2.6e-61) {
tmp = t_0;
} else if (B <= -1.25e-203) {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
} else if (B <= 1.9e-214) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (B <= 5e-15) {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(1.0) / Math.PI);
double tmp;
if (B <= -3e+69) {
tmp = t_0;
} else if (B <= -2.9e+20) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (B <= -2.6e-61) {
tmp = t_0;
} else if (B <= -1.25e-203) {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
} else if (B <= 1.9e-214) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (B <= 5e-15) {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(1.0) / math.pi) tmp = 0 if B <= -3e+69: tmp = t_0 elif B <= -2.9e+20: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif B <= -2.6e-61: tmp = t_0 elif B <= -1.25e-203: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) elif B <= 1.9e-214: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif B <= 5e-15: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(1.0) / pi)) tmp = 0.0 if (B <= -3e+69) tmp = t_0; elseif (B <= -2.9e+20) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (B <= -2.6e-61) tmp = t_0; elseif (B <= -1.25e-203) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); elseif (B <= 1.9e-214) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (B <= 5e-15) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(1.0) / pi); tmp = 0.0; if (B <= -3e+69) tmp = t_0; elseif (B <= -2.9e+20) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (B <= -2.6e-61) tmp = t_0; elseif (B <= -1.25e-203) tmp = (180.0 / pi) * atan((-0.5 * (B / C))); elseif (B <= 1.9e-214) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (B <= 5e-15) tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -3e+69], t$95$0, If[LessEqual[B, -2.9e+20], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.6e-61], t$95$0, If[LessEqual[B, -1.25e-203], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.9e-214], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5e-15], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{if}\;B \leq -3 \cdot 10^{+69}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -2.9 \cdot 10^{+20}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;B \leq -2.6 \cdot 10^{-61}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -1.25 \cdot 10^{-203}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\mathbf{elif}\;B \leq 1.9 \cdot 10^{-214}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 5 \cdot 10^{-15}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.99999999999999983e69 or -2.9e20 < B < -2.6000000000000001e-61Initial program 52.9%
Simplified52.9%
Taylor expanded in B around -inf 64.1%
if -2.99999999999999983e69 < B < -2.9e20Initial program 45.3%
Simplified44.7%
add-log-exp45.0%
Applied egg-rr45.0%
Taylor expanded in A around -inf 72.2%
if -2.6000000000000001e-61 < B < -1.25e-203Initial program 44.1%
Simplified63.8%
Taylor expanded in B around 0 55.9%
associate-*r/55.9%
Simplified55.9%
Taylor expanded in C around inf 55.9%
if -1.25e-203 < B < 1.9000000000000001e-214Initial program 62.9%
Simplified62.8%
Taylor expanded in C around -inf 55.0%
if 1.9000000000000001e-214 < B < 4.99999999999999999e-15Initial program 75.6%
Simplified75.5%
Taylor expanded in A around inf 48.9%
associate-*r/48.9%
*-commutative48.9%
Simplified48.9%
if 4.99999999999999999e-15 < B Initial program 49.7%
Simplified49.7%
Taylor expanded in B around inf 67.8%
Final simplification60.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan 1.0) PI))))
(if (<= B -3.1e+69)
t_0
(if (<= B -1.8e+18)
(* (/ 180.0 PI) (atan (* B (/ 0.5 A))))
(if (<= B -3.75e-62)
t_0
(if (<= B -3.1e-203)
(* (/ 180.0 PI) (atan (* -0.5 (/ B C))))
(if (<= B 1.9e-213)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= B 6.2e-13)
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI))
(* 180.0 (/ (atan -1.0) PI))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(1.0) / ((double) M_PI));
double tmp;
if (B <= -3.1e+69) {
tmp = t_0;
} else if (B <= -1.8e+18) {
tmp = (180.0 / ((double) M_PI)) * atan((B * (0.5 / A)));
} else if (B <= -3.75e-62) {
tmp = t_0;
} else if (B <= -3.1e-203) {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
} else if (B <= 1.9e-213) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (B <= 6.2e-13) {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(1.0) / Math.PI);
double tmp;
if (B <= -3.1e+69) {
tmp = t_0;
} else if (B <= -1.8e+18) {
tmp = (180.0 / Math.PI) * Math.atan((B * (0.5 / A)));
} else if (B <= -3.75e-62) {
tmp = t_0;
} else if (B <= -3.1e-203) {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
} else if (B <= 1.9e-213) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (B <= 6.2e-13) {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(1.0) / math.pi) tmp = 0 if B <= -3.1e+69: tmp = t_0 elif B <= -1.8e+18: tmp = (180.0 / math.pi) * math.atan((B * (0.5 / A))) elif B <= -3.75e-62: tmp = t_0 elif B <= -3.1e-203: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) elif B <= 1.9e-213: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif B <= 6.2e-13: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(1.0) / pi)) tmp = 0.0 if (B <= -3.1e+69) tmp = t_0; elseif (B <= -1.8e+18) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(0.5 / A)))); elseif (B <= -3.75e-62) tmp = t_0; elseif (B <= -3.1e-203) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); elseif (B <= 1.9e-213) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (B <= 6.2e-13) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(1.0) / pi); tmp = 0.0; if (B <= -3.1e+69) tmp = t_0; elseif (B <= -1.8e+18) tmp = (180.0 / pi) * atan((B * (0.5 / A))); elseif (B <= -3.75e-62) tmp = t_0; elseif (B <= -3.1e-203) tmp = (180.0 / pi) * atan((-0.5 * (B / C))); elseif (B <= 1.9e-213) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (B <= 6.2e-13) tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -3.1e+69], t$95$0, If[LessEqual[B, -1.8e+18], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -3.75e-62], t$95$0, If[LessEqual[B, -3.1e-203], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.9e-213], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6.2e-13], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{if}\;B \leq -3.1 \cdot 10^{+69}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -1.8 \cdot 10^{+18}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A}\right)\\
\mathbf{elif}\;B \leq -3.75 \cdot 10^{-62}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -3.1 \cdot 10^{-203}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\mathbf{elif}\;B \leq 1.9 \cdot 10^{-213}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 6.2 \cdot 10^{-13}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -3.0999999999999998e69 or -1.8e18 < B < -3.75000000000000015e-62Initial program 52.9%
Simplified52.9%
Taylor expanded in B around -inf 64.1%
if -3.0999999999999998e69 < B < -1.8e18Initial program 45.3%
Simplified45.3%
Taylor expanded in A around -inf 72.1%
associate-*r/72.1%
Simplified72.1%
clear-num72.1%
inv-pow72.1%
associate-/l*72.2%
Applied egg-rr72.2%
unpow-172.2%
associate-/r/72.2%
Simplified72.2%
Taylor expanded in A around 0 72.1%
associate-*r/72.2%
associate-*r/72.2%
*-commutative72.2%
associate-*r/72.4%
associate-*l/72.4%
Simplified72.4%
if -3.75000000000000015e-62 < B < -3.09999999999999977e-203Initial program 44.1%
Simplified63.8%
Taylor expanded in B around 0 55.9%
associate-*r/55.9%
Simplified55.9%
Taylor expanded in C around inf 55.9%
if -3.09999999999999977e-203 < B < 1.9e-213Initial program 62.9%
Simplified62.8%
Taylor expanded in C around -inf 55.0%
if 1.9e-213 < B < 6.1999999999999998e-13Initial program 75.6%
Simplified75.5%
Taylor expanded in A around inf 48.9%
associate-*r/48.9%
*-commutative48.9%
Simplified48.9%
if 6.1999999999999998e-13 < B Initial program 49.7%
Simplified49.7%
Taylor expanded in B around inf 67.8%
Final simplification60.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan 1.0) PI))))
(if (<= B -4.5e+70)
t_0
(if (<= B -2.5e+19)
(* (/ 180.0 PI) (atan (* B (/ 0.5 A))))
(if (<= B -7.5e-62)
t_0
(if (<= B -2.7e-207)
(* (/ 180.0 PI) (atan (/ (* B -0.5) C)))
(if (<= B 4.2e-216)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= B 8e-15)
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI))
(* 180.0 (/ (atan -1.0) PI))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(1.0) / ((double) M_PI));
double tmp;
if (B <= -4.5e+70) {
tmp = t_0;
} else if (B <= -2.5e+19) {
tmp = (180.0 / ((double) M_PI)) * atan((B * (0.5 / A)));
} else if (B <= -7.5e-62) {
tmp = t_0;
} else if (B <= -2.7e-207) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / C));
} else if (B <= 4.2e-216) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (B <= 8e-15) {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(1.0) / Math.PI);
double tmp;
if (B <= -4.5e+70) {
tmp = t_0;
} else if (B <= -2.5e+19) {
tmp = (180.0 / Math.PI) * Math.atan((B * (0.5 / A)));
} else if (B <= -7.5e-62) {
tmp = t_0;
} else if (B <= -2.7e-207) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / C));
} else if (B <= 4.2e-216) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (B <= 8e-15) {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(1.0) / math.pi) tmp = 0 if B <= -4.5e+70: tmp = t_0 elif B <= -2.5e+19: tmp = (180.0 / math.pi) * math.atan((B * (0.5 / A))) elif B <= -7.5e-62: tmp = t_0 elif B <= -2.7e-207: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / C)) elif B <= 4.2e-216: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif B <= 8e-15: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(1.0) / pi)) tmp = 0.0 if (B <= -4.5e+70) tmp = t_0; elseif (B <= -2.5e+19) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(0.5 / A)))); elseif (B <= -7.5e-62) tmp = t_0; elseif (B <= -2.7e-207) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / C))); elseif (B <= 4.2e-216) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (B <= 8e-15) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(1.0) / pi); tmp = 0.0; if (B <= -4.5e+70) tmp = t_0; elseif (B <= -2.5e+19) tmp = (180.0 / pi) * atan((B * (0.5 / A))); elseif (B <= -7.5e-62) tmp = t_0; elseif (B <= -2.7e-207) tmp = (180.0 / pi) * atan(((B * -0.5) / C)); elseif (B <= 4.2e-216) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (B <= 8e-15) tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -4.5e+70], t$95$0, If[LessEqual[B, -2.5e+19], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -7.5e-62], t$95$0, If[LessEqual[B, -2.7e-207], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.2e-216], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 8e-15], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{if}\;B \leq -4.5 \cdot 10^{+70}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -2.5 \cdot 10^{+19}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A}\right)\\
\mathbf{elif}\;B \leq -7.5 \cdot 10^{-62}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -2.7 \cdot 10^{-207}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\
\mathbf{elif}\;B \leq 4.2 \cdot 10^{-216}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 8 \cdot 10^{-15}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -4.4999999999999999e70 or -2.5e19 < B < -7.5000000000000003e-62Initial program 52.9%
Simplified52.9%
Taylor expanded in B around -inf 64.1%
if -4.4999999999999999e70 < B < -2.5e19Initial program 45.3%
Simplified45.3%
Taylor expanded in A around -inf 72.1%
associate-*r/72.1%
Simplified72.1%
clear-num72.1%
inv-pow72.1%
associate-/l*72.2%
Applied egg-rr72.2%
unpow-172.2%
associate-/r/72.2%
Simplified72.2%
Taylor expanded in A around 0 72.1%
associate-*r/72.2%
associate-*r/72.2%
*-commutative72.2%
associate-*r/72.4%
associate-*l/72.4%
Simplified72.4%
if -7.5000000000000003e-62 < B < -2.7e-207Initial program 44.1%
Simplified63.8%
Taylor expanded in B around 0 55.9%
associate-*r/55.9%
Simplified55.9%
div-inv56.0%
*-commutative56.0%
Applied egg-rr56.0%
Taylor expanded in C around inf 55.9%
associate-*r/55.9%
*-commutative55.9%
Simplified55.9%
if -2.7e-207 < B < 4.2000000000000003e-216Initial program 62.9%
Simplified62.8%
Taylor expanded in C around -inf 55.0%
if 4.2000000000000003e-216 < B < 8.0000000000000006e-15Initial program 75.6%
Simplified75.5%
Taylor expanded in A around inf 48.9%
associate-*r/48.9%
*-commutative48.9%
Simplified48.9%
if 8.0000000000000006e-15 < B Initial program 49.7%
Simplified49.7%
Taylor expanded in B around inf 67.8%
Final simplification60.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan 1.0) PI))))
(if (<= B -3e+69)
t_0
(if (<= B -3.2e+20)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= B -1.25e-55)
t_0
(if (<= B 2.75e-213)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= B 4.8e-14)
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(1.0) / ((double) M_PI));
double tmp;
if (B <= -3e+69) {
tmp = t_0;
} else if (B <= -3.2e+20) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (B <= -1.25e-55) {
tmp = t_0;
} else if (B <= 2.75e-213) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (B <= 4.8e-14) {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(1.0) / Math.PI);
double tmp;
if (B <= -3e+69) {
tmp = t_0;
} else if (B <= -3.2e+20) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (B <= -1.25e-55) {
tmp = t_0;
} else if (B <= 2.75e-213) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (B <= 4.8e-14) {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(1.0) / math.pi) tmp = 0 if B <= -3e+69: tmp = t_0 elif B <= -3.2e+20: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif B <= -1.25e-55: tmp = t_0 elif B <= 2.75e-213: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif B <= 4.8e-14: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(1.0) / pi)) tmp = 0.0 if (B <= -3e+69) tmp = t_0; elseif (B <= -3.2e+20) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (B <= -1.25e-55) tmp = t_0; elseif (B <= 2.75e-213) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (B <= 4.8e-14) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(1.0) / pi); tmp = 0.0; if (B <= -3e+69) tmp = t_0; elseif (B <= -3.2e+20) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (B <= -1.25e-55) tmp = t_0; elseif (B <= 2.75e-213) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (B <= 4.8e-14) tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -3e+69], t$95$0, If[LessEqual[B, -3.2e+20], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.25e-55], t$95$0, If[LessEqual[B, 2.75e-213], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.8e-14], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{if}\;B \leq -3 \cdot 10^{+69}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -3.2 \cdot 10^{+20}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;B \leq -1.25 \cdot 10^{-55}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 2.75 \cdot 10^{-213}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4.8 \cdot 10^{-14}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.99999999999999983e69 or -3.2e20 < B < -1.25e-55Initial program 52.2%
Simplified52.2%
Taylor expanded in B around -inf 64.7%
if -2.99999999999999983e69 < B < -3.2e20Initial program 45.3%
Simplified45.3%
Taylor expanded in A around -inf 72.1%
associate-*r/72.1%
Simplified72.1%
if -1.25e-55 < B < 2.75000000000000004e-213Initial program 55.2%
Simplified55.1%
Taylor expanded in C around -inf 39.8%
if 2.75000000000000004e-213 < B < 4.8e-14Initial program 75.6%
Simplified75.5%
Taylor expanded in A around inf 48.9%
associate-*r/48.9%
*-commutative48.9%
Simplified48.9%
if 4.8e-14 < B Initial program 49.7%
Simplified49.7%
Taylor expanded in B around inf 67.8%
Final simplification55.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan 1.0) PI))))
(if (<= B -3e+69)
t_0
(if (<= B -2.3e+19)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= B -4e-57)
t_0
(if (<= B 4.3e-32)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(1.0) / ((double) M_PI));
double tmp;
if (B <= -3e+69) {
tmp = t_0;
} else if (B <= -2.3e+19) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (B <= -4e-57) {
tmp = t_0;
} else if (B <= 4.3e-32) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(1.0) / Math.PI);
double tmp;
if (B <= -3e+69) {
tmp = t_0;
} else if (B <= -2.3e+19) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (B <= -4e-57) {
tmp = t_0;
} else if (B <= 4.3e-32) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(1.0) / math.pi) tmp = 0 if B <= -3e+69: tmp = t_0 elif B <= -2.3e+19: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif B <= -4e-57: tmp = t_0 elif B <= 4.3e-32: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(1.0) / pi)) tmp = 0.0 if (B <= -3e+69) tmp = t_0; elseif (B <= -2.3e+19) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (B <= -4e-57) tmp = t_0; elseif (B <= 4.3e-32) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(1.0) / pi); tmp = 0.0; if (B <= -3e+69) tmp = t_0; elseif (B <= -2.3e+19) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (B <= -4e-57) tmp = t_0; elseif (B <= 4.3e-32) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -3e+69], t$95$0, If[LessEqual[B, -2.3e+19], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -4e-57], t$95$0, If[LessEqual[B, 4.3e-32], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{if}\;B \leq -3 \cdot 10^{+69}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -2.3 \cdot 10^{+19}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;B \leq -4 \cdot 10^{-57}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 4.3 \cdot 10^{-32}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.99999999999999983e69 or -2.3e19 < B < -3.99999999999999982e-57Initial program 52.2%
Simplified52.2%
Taylor expanded in B around -inf 64.7%
if -2.99999999999999983e69 < B < -2.3e19Initial program 45.3%
Simplified45.3%
Taylor expanded in A around -inf 72.1%
associate-*r/72.1%
Simplified72.1%
if -3.99999999999999982e-57 < B < 4.2999999999999999e-32Initial program 62.7%
Simplified62.6%
Taylor expanded in C around -inf 38.0%
if 4.2999999999999999e-32 < B Initial program 51.3%
Simplified51.3%
Taylor expanded in B around inf 66.3%
Final simplification53.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ (+ B C) B)))))
(if (<= B -6.5e-102)
t_0
(if (<= B -1.05e-201)
(* (/ 180.0 PI) (atan (* -0.5 (/ B C))))
(if (<= B 5.6e-216)
t_0
(if (<= B 2.4e-15)
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI))
(* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(((B + C) / B));
double tmp;
if (B <= -6.5e-102) {
tmp = t_0;
} else if (B <= -1.05e-201) {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
} else if (B <= 5.6e-216) {
tmp = t_0;
} else if (B <= 2.4e-15) {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan(((B + C) / B));
double tmp;
if (B <= -6.5e-102) {
tmp = t_0;
} else if (B <= -1.05e-201) {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
} else if (B <= 5.6e-216) {
tmp = t_0;
} else if (B <= 2.4e-15) {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan(((B + C) / B)) tmp = 0 if B <= -6.5e-102: tmp = t_0 elif B <= -1.05e-201: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) elif B <= 5.6e-216: tmp = t_0 elif B <= 2.4e-15: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B + C) / B))) tmp = 0.0 if (B <= -6.5e-102) tmp = t_0; elseif (B <= -1.05e-201) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); elseif (B <= 5.6e-216) tmp = t_0; elseif (B <= 2.4e-15) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan(((B + C) / B)); tmp = 0.0; if (B <= -6.5e-102) tmp = t_0; elseif (B <= -1.05e-201) tmp = (180.0 / pi) * atan((-0.5 * (B / C))); elseif (B <= 5.6e-216) tmp = t_0; elseif (B <= 2.4e-15) tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -6.5e-102], t$95$0, If[LessEqual[B, -1.05e-201], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.6e-216], t$95$0, If[LessEqual[B, 2.4e-15], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\
\mathbf{if}\;B \leq -6.5 \cdot 10^{-102}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -1.05 \cdot 10^{-201}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\mathbf{elif}\;B \leq 5.6 \cdot 10^{-216}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 2.4 \cdot 10^{-15}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -6.5000000000000003e-102 or -1.05000000000000006e-201 < B < 5.6e-216Initial program 56.6%
Simplified76.3%
add-log-exp77.1%
Applied egg-rr77.1%
Taylor expanded in A around 0 47.8%
unpow247.8%
unpow247.8%
hypot-def66.6%
Simplified66.6%
Taylor expanded in B around -inf 61.3%
+-commutative61.3%
Simplified61.3%
if -6.5000000000000003e-102 < B < -1.05000000000000006e-201Initial program 30.7%
Simplified56.2%
Taylor expanded in B around 0 67.9%
associate-*r/67.9%
Simplified67.9%
Taylor expanded in C around inf 67.9%
if 5.6e-216 < B < 2.39999999999999995e-15Initial program 75.6%
Simplified75.5%
Taylor expanded in A around inf 48.9%
associate-*r/48.9%
*-commutative48.9%
Simplified48.9%
if 2.39999999999999995e-15 < B Initial program 49.7%
Simplified49.7%
Taylor expanded in B around inf 67.8%
Final simplification61.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ (+ B C) B)))))
(if (<= B -6.5e-102)
t_0
(if (<= B -8.5e-202)
(* (/ 180.0 PI) (atan (* -0.5 (/ B C))))
(if (<= B 9.2e-217)
t_0
(if (<= B 1.45e-133)
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI))
(* (/ 180.0 PI) (atan (/ (- C B) B)))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(((B + C) / B));
double tmp;
if (B <= -6.5e-102) {
tmp = t_0;
} else if (B <= -8.5e-202) {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
} else if (B <= 9.2e-217) {
tmp = t_0;
} else if (B <= 1.45e-133) {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C - B) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan(((B + C) / B));
double tmp;
if (B <= -6.5e-102) {
tmp = t_0;
} else if (B <= -8.5e-202) {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
} else if (B <= 9.2e-217) {
tmp = t_0;
} else if (B <= 1.45e-133) {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - B) / B));
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan(((B + C) / B)) tmp = 0 if B <= -6.5e-102: tmp = t_0 elif B <= -8.5e-202: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) elif B <= 9.2e-217: tmp = t_0 elif B <= 1.45e-133: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) else: tmp = (180.0 / math.pi) * math.atan(((C - B) / B)) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B + C) / B))) tmp = 0.0 if (B <= -6.5e-102) tmp = t_0; elseif (B <= -8.5e-202) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); elseif (B <= 9.2e-217) tmp = t_0; elseif (B <= 1.45e-133) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - B) / B))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan(((B + C) / B)); tmp = 0.0; if (B <= -6.5e-102) tmp = t_0; elseif (B <= -8.5e-202) tmp = (180.0 / pi) * atan((-0.5 * (B / C))); elseif (B <= 9.2e-217) tmp = t_0; elseif (B <= 1.45e-133) tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); else tmp = (180.0 / pi) * atan(((C - B) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -6.5e-102], t$95$0, If[LessEqual[B, -8.5e-202], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 9.2e-217], t$95$0, If[LessEqual[B, 1.45e-133], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\
\mathbf{if}\;B \leq -6.5 \cdot 10^{-102}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -8.5 \cdot 10^{-202}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\mathbf{elif}\;B \leq 9.2 \cdot 10^{-217}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 1.45 \cdot 10^{-133}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\
\end{array}
\end{array}
if B < -6.5000000000000003e-102 or -8.49999999999999963e-202 < B < 9.20000000000000019e-217Initial program 56.6%
Simplified76.3%
add-log-exp77.1%
Applied egg-rr77.1%
Taylor expanded in A around 0 47.8%
unpow247.8%
unpow247.8%
hypot-def66.6%
Simplified66.6%
Taylor expanded in B around -inf 61.3%
+-commutative61.3%
Simplified61.3%
if -6.5000000000000003e-102 < B < -8.49999999999999963e-202Initial program 30.7%
Simplified56.2%
Taylor expanded in B around 0 67.9%
associate-*r/67.9%
Simplified67.9%
Taylor expanded in C around inf 67.9%
if 9.20000000000000019e-217 < B < 1.4499999999999999e-133Initial program 76.1%
Simplified76.2%
Taylor expanded in A around inf 57.0%
associate-*r/57.0%
*-commutative57.0%
Simplified57.0%
if 1.4499999999999999e-133 < B Initial program 57.4%
Simplified80.5%
add-log-exp80.7%
Applied egg-rr80.7%
Taylor expanded in A around 0 49.2%
unpow249.2%
unpow249.2%
hypot-def69.9%
Simplified69.9%
Taylor expanded in C around 0 67.6%
mul-1-neg67.6%
unsub-neg67.6%
Simplified67.6%
Final simplification63.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))
(if (<= B -6.2e-102)
t_0
(if (<= B -1.35e-200)
(* (/ 180.0 PI) (atan (* -0.5 (/ B C))))
(if (<= B 1.2e-72) t_0 (* 180.0 (/ (atan (- -1.0 (/ A B))) PI)))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
double tmp;
if (B <= -6.2e-102) {
tmp = t_0;
} else if (B <= -1.35e-200) {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
} else if (B <= 1.2e-72) {
tmp = t_0;
} 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 t_0 = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
double tmp;
if (B <= -6.2e-102) {
tmp = t_0;
} else if (B <= -1.35e-200) {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
} else if (B <= 1.2e-72) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) tmp = 0 if B <= -6.2e-102: tmp = t_0 elif B <= -1.35e-200: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) elif B <= 1.2e-72: tmp = t_0 else: tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)) tmp = 0.0 if (B <= -6.2e-102) tmp = t_0; elseif (B <= -1.35e-200) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); elseif (B <= 1.2e-72) tmp = t_0; 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) t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); tmp = 0.0; if (B <= -6.2e-102) tmp = t_0; elseif (B <= -1.35e-200) tmp = (180.0 / pi) * atan((-0.5 * (B / C))); elseif (B <= 1.2e-72) tmp = t_0; else tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -6.2e-102], t$95$0, If[LessEqual[B, -1.35e-200], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.2e-72], t$95$0, N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -6.2 \cdot 10^{-102}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -1.35 \cdot 10^{-200}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\mathbf{elif}\;B \leq 1.2 \cdot 10^{-72}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -6.20000000000000026e-102 or -1.3500000000000001e-200 < B < 1.2e-72Initial program 60.7%
Simplified60.6%
Taylor expanded in B around -inf 69.2%
associate--l+69.2%
div-sub71.1%
Simplified71.1%
if -6.20000000000000026e-102 < B < -1.3500000000000001e-200Initial program 27.0%
Simplified53.6%
Taylor expanded in B around 0 71.8%
associate-*r/71.8%
Simplified71.8%
Taylor expanded in C around inf 66.4%
if 1.2e-72 < B Initial program 54.5%
Simplified54.4%
Taylor expanded in B around inf 78.1%
+-commutative78.1%
associate--r+78.1%
div-sub78.1%
Simplified78.1%
Taylor expanded in C around 0 73.9%
associate-*r/73.9%
neg-mul-173.9%
Simplified73.9%
Final simplification71.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -6.4e-102)
(* 180.0 (/ (atan (+ 1.0 t_0)) PI))
(if (<= B -3.1e-199)
(* (/ 180.0 PI) (atan (* -0.5 (/ B C))))
(* 180.0 (/ (atan (+ t_0 -1.0)) PI))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -6.4e-102) {
tmp = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
} else if (B <= -3.1e-199) {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
} else {
tmp = 180.0 * (atan((t_0 + -1.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -6.4e-102) {
tmp = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
} else if (B <= -3.1e-199) {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
} else {
tmp = 180.0 * (Math.atan((t_0 + -1.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= -6.4e-102: tmp = 180.0 * (math.atan((1.0 + t_0)) / math.pi) elif B <= -3.1e-199: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) else: tmp = 180.0 * (math.atan((t_0 + -1.0)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= -6.4e-102) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)); elseif (B <= -3.1e-199) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); else tmp = Float64(180.0 * Float64(atan(Float64(t_0 + -1.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= -6.4e-102) tmp = 180.0 * (atan((1.0 + t_0)) / pi); elseif (B <= -3.1e-199) tmp = (180.0 / pi) * atan((-0.5 * (B / C))); else tmp = 180.0 * (atan((t_0 + -1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -6.4e-102], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -3.1e-199], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -6.4 \cdot 10^{-102}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t_0\right)}{\pi}\\
\mathbf{elif}\;B \leq -3.1 \cdot 10^{-199}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(t_0 + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -6.39999999999999973e-102Initial program 53.8%
Simplified53.7%
Taylor expanded in B around -inf 75.5%
associate--l+75.5%
div-sub75.5%
Simplified75.5%
if -6.39999999999999973e-102 < B < -3.10000000000000012e-199Initial program 27.0%
Simplified53.6%
Taylor expanded in B around 0 71.8%
associate-*r/71.8%
Simplified71.8%
Taylor expanded in C around inf 66.4%
if -3.10000000000000012e-199 < B Initial program 61.6%
Simplified61.5%
Taylor expanded in B around inf 71.0%
+-commutative71.0%
associate--r+71.0%
div-sub73.0%
Simplified73.0%
Final simplification73.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -6.4e-102)
(* 180.0 (/ (atan (+ 1.0 t_0)) PI))
(if (<= B -3e-200)
(* 180.0 (/ (atan (/ (* B -0.5) (- C A))) PI))
(* 180.0 (/ (atan (+ t_0 -1.0)) PI))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -6.4e-102) {
tmp = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
} else if (B <= -3e-200) {
tmp = 180.0 * (atan(((B * -0.5) / (C - A))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((t_0 + -1.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -6.4e-102) {
tmp = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
} else if (B <= -3e-200) {
tmp = 180.0 * (Math.atan(((B * -0.5) / (C - A))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((t_0 + -1.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= -6.4e-102: tmp = 180.0 * (math.atan((1.0 + t_0)) / math.pi) elif B <= -3e-200: tmp = 180.0 * (math.atan(((B * -0.5) / (C - A))) / math.pi) else: tmp = 180.0 * (math.atan((t_0 + -1.0)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= -6.4e-102) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)); elseif (B <= -3e-200) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / Float64(C - A))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(t_0 + -1.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= -6.4e-102) tmp = 180.0 * (atan((1.0 + t_0)) / pi); elseif (B <= -3e-200) tmp = 180.0 * (atan(((B * -0.5) / (C - A))) / pi); else tmp = 180.0 * (atan((t_0 + -1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -6.4e-102], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -3e-200], N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -6.4 \cdot 10^{-102}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t_0\right)}{\pi}\\
\mathbf{elif}\;B \leq -3 \cdot 10^{-200}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(t_0 + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -6.39999999999999973e-102Initial program 53.8%
Simplified53.7%
Taylor expanded in B around -inf 75.5%
associate--l+75.5%
div-sub75.5%
Simplified75.5%
if -6.39999999999999973e-102 < B < -2.99999999999999995e-200Initial program 27.0%
Simplified53.6%
Taylor expanded in B around 0 71.8%
associate-*r/71.8%
Simplified71.8%
Taylor expanded in B around 0 71.4%
*-commutative71.4%
associate-*l/71.4%
Simplified71.4%
if -2.99999999999999995e-200 < B Initial program 61.6%
Simplified61.5%
Taylor expanded in B around inf 71.0%
+-commutative71.0%
associate--r+71.0%
div-sub73.0%
Simplified73.0%
Final simplification73.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -6.8e-102)
(* 180.0 (/ (atan (+ 1.0 t_0)) PI))
(if (<= B -5.5e-201)
(* (/ 180.0 PI) (atan (* B (/ -0.5 (- C A)))))
(* 180.0 (/ (atan (+ t_0 -1.0)) PI))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -6.8e-102) {
tmp = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
} else if (B <= -5.5e-201) {
tmp = (180.0 / ((double) M_PI)) * atan((B * (-0.5 / (C - A))));
} else {
tmp = 180.0 * (atan((t_0 + -1.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -6.8e-102) {
tmp = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
} else if (B <= -5.5e-201) {
tmp = (180.0 / Math.PI) * Math.atan((B * (-0.5 / (C - A))));
} else {
tmp = 180.0 * (Math.atan((t_0 + -1.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= -6.8e-102: tmp = 180.0 * (math.atan((1.0 + t_0)) / math.pi) elif B <= -5.5e-201: tmp = (180.0 / math.pi) * math.atan((B * (-0.5 / (C - A)))) else: tmp = 180.0 * (math.atan((t_0 + -1.0)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= -6.8e-102) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)); elseif (B <= -5.5e-201) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(-0.5 / Float64(C - A))))); else tmp = Float64(180.0 * Float64(atan(Float64(t_0 + -1.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= -6.8e-102) tmp = 180.0 * (atan((1.0 + t_0)) / pi); elseif (B <= -5.5e-201) tmp = (180.0 / pi) * atan((B * (-0.5 / (C - A)))); else tmp = 180.0 * (atan((t_0 + -1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -6.8e-102], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -5.5e-201], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(-0.5 / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -6.8 \cdot 10^{-102}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t_0\right)}{\pi}\\
\mathbf{elif}\;B \leq -5.5 \cdot 10^{-201}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(t_0 + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -6.80000000000000026e-102Initial program 53.8%
Simplified53.7%
Taylor expanded in B around -inf 75.5%
associate--l+75.5%
div-sub75.5%
Simplified75.5%
if -6.80000000000000026e-102 < B < -5.50000000000000034e-201Initial program 27.0%
Simplified53.6%
Taylor expanded in B around 0 71.8%
associate-*r/71.8%
Simplified71.8%
div-inv71.9%
*-commutative71.9%
Applied egg-rr71.9%
add-exp-log68.0%
log-rec68.0%
Applied egg-rr68.0%
expm1-log1p-u68.0%
expm1-udef36.8%
associate-*l*36.8%
exp-neg36.8%
add-exp-log37.5%
Applied egg-rr37.5%
expm1-def71.9%
expm1-log1p71.9%
associate-*r/71.9%
metadata-eval71.9%
Simplified71.9%
if -5.50000000000000034e-201 < B Initial program 61.6%
Simplified61.5%
Taylor expanded in B around inf 71.0%
+-commutative71.0%
associate--r+71.0%
div-sub73.0%
Simplified73.0%
Final simplification73.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -6.2e-102)
(* 180.0 (/ (atan (+ 1.0 t_0)) PI))
(if (<= B -1.05e-199)
(* (/ 180.0 PI) (atan (* B (/ -0.5 (- C A)))))
(* (/ 180.0 PI) (atan (+ t_0 -1.0)))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -6.2e-102) {
tmp = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
} else if (B <= -1.05e-199) {
tmp = (180.0 / ((double) M_PI)) * atan((B * (-0.5 / (C - A))));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((t_0 + -1.0));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -6.2e-102) {
tmp = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
} else if (B <= -1.05e-199) {
tmp = (180.0 / Math.PI) * Math.atan((B * (-0.5 / (C - A))));
} else {
tmp = (180.0 / Math.PI) * Math.atan((t_0 + -1.0));
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= -6.2e-102: tmp = 180.0 * (math.atan((1.0 + t_0)) / math.pi) elif B <= -1.05e-199: tmp = (180.0 / math.pi) * math.atan((B * (-0.5 / (C - A)))) else: tmp = (180.0 / math.pi) * math.atan((t_0 + -1.0)) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= -6.2e-102) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)); elseif (B <= -1.05e-199) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(-0.5 / Float64(C - A))))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(t_0 + -1.0))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= -6.2e-102) tmp = 180.0 * (atan((1.0 + t_0)) / pi); elseif (B <= -1.05e-199) tmp = (180.0 / pi) * atan((B * (-0.5 / (C - A)))); else tmp = (180.0 / pi) * atan((t_0 + -1.0)); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -6.2e-102], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.05e-199], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(-0.5 / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -6.2 \cdot 10^{-102}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t_0\right)}{\pi}\\
\mathbf{elif}\;B \leq -1.05 \cdot 10^{-199}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(t_0 + -1\right)\\
\end{array}
\end{array}
if B < -6.20000000000000026e-102Initial program 53.8%
Simplified53.7%
Taylor expanded in B around -inf 75.5%
associate--l+75.5%
div-sub75.5%
Simplified75.5%
if -6.20000000000000026e-102 < B < -1.05000000000000001e-199Initial program 27.0%
Simplified53.6%
Taylor expanded in B around 0 71.8%
associate-*r/71.8%
Simplified71.8%
div-inv71.9%
*-commutative71.9%
Applied egg-rr71.9%
add-exp-log68.0%
log-rec68.0%
Applied egg-rr68.0%
expm1-log1p-u68.0%
expm1-udef36.8%
associate-*l*36.8%
exp-neg36.8%
add-exp-log37.5%
Applied egg-rr37.5%
expm1-def71.9%
expm1-log1p71.9%
associate-*r/71.9%
metadata-eval71.9%
Simplified71.9%
if -1.05000000000000001e-199 < B Initial program 61.6%
Simplified78.1%
add-log-exp78.1%
Applied egg-rr78.1%
Taylor expanded in B around inf 71.0%
+-commutative71.0%
associate--r+71.0%
div-sub73.0%
Simplified73.0%
Final simplification73.8%
(FPCore (A B C)
:precision binary64
(if (<= B -3.3e-58)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 2.6e-30)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3.3e-58) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 2.6e-30) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -3.3e-58) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 2.6e-30) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -3.3e-58: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 2.6e-30: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -3.3e-58) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 2.6e-30) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -3.3e-58) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 2.6e-30) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3.3e-58], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.6e-30], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $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.3 \cdot 10^{-58}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 2.6 \cdot 10^{-30}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -3.30000000000000026e-58Initial program 51.6%
Simplified51.6%
Taylor expanded in B around -inf 59.7%
if -3.30000000000000026e-58 < B < 2.59999999999999987e-30Initial program 62.7%
Simplified62.6%
Taylor expanded in C around -inf 38.0%
if 2.59999999999999987e-30 < B Initial program 51.3%
Simplified51.3%
Taylor expanded in B around inf 66.3%
Final simplification51.6%
(FPCore (A B C)
:precision binary64
(if (<= C -7.5e-86)
(* (/ 180.0 PI) (atan (/ (+ B C) B)))
(if (<= C 380.0)
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI))
(* (/ 180.0 PI) (atan (/ (* B -0.5) C))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -7.5e-86) {
tmp = (180.0 / ((double) M_PI)) * atan(((B + C) / B));
} else if (C <= 380.0) {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / C));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -7.5e-86) {
tmp = (180.0 / Math.PI) * Math.atan(((B + C) / B));
} else if (C <= 380.0) {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / C));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -7.5e-86: tmp = (180.0 / math.pi) * math.atan(((B + C) / B)) elif C <= 380.0: tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) else: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / C)) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -7.5e-86) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B + C) / B))); elseif (C <= 380.0) tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / C))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -7.5e-86) tmp = (180.0 / pi) * atan(((B + C) / B)); elseif (C <= 380.0) tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); else tmp = (180.0 / pi) * atan(((B * -0.5) / C)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -7.5e-86], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 380.0], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -7.5 \cdot 10^{-86}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\
\mathbf{elif}\;C \leq 380:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\
\end{array}
\end{array}
if C < -7.50000000000000055e-86Initial program 78.8%
Simplified90.8%
add-log-exp90.7%
Applied egg-rr90.7%
Taylor expanded in A around 0 76.5%
unpow276.5%
unpow276.5%
hypot-def87.0%
Simplified87.0%
Taylor expanded in B around -inf 78.2%
+-commutative78.2%
Simplified78.2%
if -7.50000000000000055e-86 < C < 380Initial program 61.9%
Simplified61.8%
Taylor expanded in B around inf 58.7%
+-commutative58.7%
associate--r+58.7%
div-sub58.7%
Simplified58.7%
Taylor expanded in C around 0 57.5%
associate-*r/57.5%
neg-mul-157.5%
Simplified57.5%
if 380 < C Initial program 18.7%
Simplified47.7%
Taylor expanded in B around 0 74.5%
associate-*r/74.5%
Simplified74.5%
div-inv74.5%
*-commutative74.5%
Applied egg-rr74.5%
Taylor expanded in C around inf 65.3%
associate-*r/65.3%
*-commutative65.3%
Simplified65.3%
Final simplification65.0%
(FPCore (A B C)
:precision binary64
(if (<= B -7.2e-65)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 5e-166)
(* (/ 180.0 PI) (atan 0.0))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -7.2e-65) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 5e-166) {
tmp = (180.0 / ((double) M_PI)) * atan(0.0);
} 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 <= -7.2e-65) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 5e-166) {
tmp = (180.0 / Math.PI) * Math.atan(0.0);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -7.2e-65: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 5e-166: tmp = (180.0 / math.pi) * math.atan(0.0) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -7.2e-65) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 5e-166) tmp = Float64(Float64(180.0 / pi) * atan(0.0)); 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 <= -7.2e-65) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 5e-166) tmp = (180.0 / pi) * atan(0.0); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -7.2e-65], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5e-166], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -7.2 \cdot 10^{-65}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 5 \cdot 10^{-166}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -7.1999999999999996e-65Initial program 52.8%
Simplified52.8%
Taylor expanded in B around -inf 58.6%
if -7.1999999999999996e-65 < B < 5e-166Initial program 55.5%
Simplified67.9%
add-log-exp70.2%
Applied egg-rr70.2%
Taylor expanded in C around inf 28.1%
distribute-rgt1-in28.1%
metadata-eval28.1%
associate-*r/12.9%
mul0-lft28.1%
metadata-eval28.1%
Simplified28.1%
if 5e-166 < B Initial program 60.3%
Simplified60.2%
Taylor expanded in B around inf 51.9%
Final simplification46.5%
(FPCore (A B C) :precision binary64 (if (<= B -8.8e-303) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -8.8e-303) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -8.8e-303) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -8.8e-303: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -8.8e-303) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -8.8e-303) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -8.8e-303], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -8.8 \cdot 10^{-303}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -8.80000000000000055e-303Initial program 52.1%
Simplified52.0%
Taylor expanded in B around -inf 43.2%
if -8.80000000000000055e-303 < B Initial program 60.5%
Simplified60.5%
Taylor expanded in B around inf 41.1%
Final simplification42.1%
(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 56.5%
Simplified56.5%
Taylor expanded in B around inf 22.7%
Final simplification22.7%
herbie shell --seed 2023271
(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)))