
(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 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
(FPCore (A B C) :precision binary64 (if (<= C 2.2e+128) (/ (* (atan (/ (- (- C A) (hypot (- A C) B)) B)) 180.0) PI) (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= 2.2e+128) {
tmp = (atan((((C - A) - hypot((A - C), B)) / B)) * 180.0) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 2.2e+128) {
tmp = (Math.atan((((C - A) - Math.hypot((A - C), B)) / B)) * 180.0) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 2.2e+128: tmp = (math.atan((((C - A) - math.hypot((A - C), B)) / B)) * 180.0) / math.pi else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 2.2e+128) tmp = Float64(Float64(atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B)) * 180.0) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 2.2e+128) tmp = (atan((((C - A) - hypot((A - C), B)) / B)) * 180.0) / pi; else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 2.2e+128], N[(N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] * 180.0), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 2.2 \cdot 10^{+128}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right) \cdot 180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < 2.20000000000000017e128Initial program 61.2%
associate-*l/61.2%
*-lft-identity61.2%
+-commutative61.2%
unpow261.2%
unpow261.2%
hypot-define81.0%
Simplified81.0%
*-commutative81.0%
associate-*l/81.0%
hypot-undefine61.2%
unpow261.2%
unpow261.2%
+-commutative61.2%
unpow261.2%
unpow261.2%
hypot-define81.0%
Applied egg-rr81.0%
if 2.20000000000000017e128 < C Initial program 7.5%
Taylor expanded in C around inf 81.8%
Taylor expanded in A around inf 81.8%
(FPCore (A B C)
:precision binary64
(if (<= A -1.7e+113)
(/ (* 180.0 (atan (/ (* B 0.5) A))) PI)
(if (<= A 4.2e-11)
(/ (* 180.0 (atan (/ (- C (hypot B C)) B))) PI)
(* 180.0 (/ (atan (- (/ (hypot A B) (- B)) (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.7e+113) {
tmp = (180.0 * atan(((B * 0.5) / A))) / ((double) M_PI);
} else if (A <= 4.2e-11) {
tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((hypot(A, B) / -B) - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.7e+113) {
tmp = (180.0 * Math.atan(((B * 0.5) / A))) / Math.PI;
} else if (A <= 4.2e-11) {
tmp = (180.0 * Math.atan(((C - Math.hypot(B, C)) / B))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((Math.hypot(A, B) / -B) - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.7e+113: tmp = (180.0 * math.atan(((B * 0.5) / A))) / math.pi elif A <= 4.2e-11: tmp = (180.0 * math.atan(((C - math.hypot(B, C)) / B))) / math.pi else: tmp = 180.0 * (math.atan(((math.hypot(A, B) / -B) - (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.7e+113) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B * 0.5) / A))) / pi); elseif (A <= 4.2e-11) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(B, C)) / B))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(hypot(A, B) / Float64(-B)) - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.7e+113) tmp = (180.0 * atan(((B * 0.5) / A))) / pi; elseif (A <= 4.2e-11) tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / pi; else tmp = 180.0 * (atan(((hypot(A, B) / -B) - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.7e+113], N[(N[(180.0 * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 4.2e-11], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision] / (-B)), $MachinePrecision] - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.7 \cdot 10^{+113}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 4.2 \cdot 10^{-11}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\mathsf{hypot}\left(A, B\right)}{-B} - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.70000000000000009e113Initial program 15.8%
associate-*l/15.8%
*-lft-identity15.8%
+-commutative15.8%
unpow215.8%
unpow215.8%
hypot-define50.6%
Simplified50.6%
*-commutative50.6%
associate-*l/50.6%
hypot-undefine15.8%
unpow215.8%
unpow215.8%
+-commutative15.8%
unpow215.8%
unpow215.8%
hypot-define50.6%
Applied egg-rr50.6%
Taylor expanded in A around -inf 79.1%
associate-*r/79.1%
*-commutative79.1%
Simplified79.1%
if -1.70000000000000009e113 < A < 4.1999999999999997e-11Initial program 56.8%
associate-*l/56.8%
*-lft-identity56.8%
+-commutative56.8%
unpow256.8%
unpow256.8%
hypot-define76.9%
Simplified76.9%
*-commutative76.9%
associate-*l/76.9%
hypot-undefine56.8%
unpow256.8%
unpow256.8%
+-commutative56.8%
unpow256.8%
unpow256.8%
hypot-define76.9%
Applied egg-rr76.9%
Taylor expanded in A around 0 55.1%
unpow255.1%
unpow255.1%
hypot-define75.2%
Simplified75.2%
if 4.1999999999999997e-11 < A Initial program 73.5%
*-commutative73.5%
associate--l-73.5%
+-commutative73.5%
unpow273.5%
unpow273.5%
hypot-undefine92.1%
associate--r+92.1%
div-inv92.1%
div-sub88.8%
Applied egg-rr88.8%
Taylor expanded in C around 0 73.6%
distribute-lft-in73.6%
mul-1-neg73.6%
unsub-neg73.6%
mul-1-neg73.6%
associate-*l/73.6%
*-lft-identity73.6%
unpow273.6%
unpow273.6%
hypot-define89.1%
Simplified89.1%
Final simplification79.2%
(FPCore (A B C)
:precision binary64
(if (<= C -4.1e-51)
(* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))
(if (<= C 7.2e+127)
(* 180.0 (/ (atan (/ (+ A (hypot B A)) (- B))) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -4.1e-51) {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
} else if (C <= 7.2e+127) {
tmp = 180.0 * (atan(((A + hypot(B, A)) / -B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -4.1e-51) {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
} else if (C <= 7.2e+127) {
tmp = 180.0 * (Math.atan(((A + Math.hypot(B, A)) / -B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -4.1e-51: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) elif C <= 7.2e+127: tmp = 180.0 * (math.atan(((A + math.hypot(B, A)) / -B)) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -4.1e-51) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); elseif (C <= 7.2e+127) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + hypot(B, A)) / Float64(-B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -4.1e-51) tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); elseif (C <= 7.2e+127) tmp = 180.0 * (atan(((A + hypot(B, A)) / -B)) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -4.1e-51], 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], If[LessEqual[C, 7.2e+127], N[(180.0 * N[(N[ArcTan[N[(N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -4.1 \cdot 10^{-51}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 7.2 \cdot 10^{+127}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{-B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -4.09999999999999973e-51Initial program 78.4%
Simplified91.6%
if -4.09999999999999973e-51 < C < 7.19999999999999958e127Initial program 53.3%
Taylor expanded in C around 0 53.3%
mul-1-neg53.3%
distribute-neg-frac253.3%
+-commutative53.3%
unpow253.3%
unpow253.3%
hypot-define73.5%
Simplified73.5%
if 7.19999999999999958e127 < C Initial program 7.5%
Taylor expanded in C around inf 81.8%
Taylor expanded in A around inf 81.8%
(FPCore (A B C)
:precision binary64
(if (<= A -7.2e+112)
(/ (* 180.0 (atan (/ (* B 0.5) A))) PI)
(if (<= A 4.8e-11)
(/ (* 180.0 (atan (/ (- C (hypot B C)) B))) PI)
(* 180.0 (/ (atan (/ (+ A (hypot B A)) (- B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -7.2e+112) {
tmp = (180.0 * atan(((B * 0.5) / A))) / ((double) M_PI);
} else if (A <= 4.8e-11) {
tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((A + hypot(B, A)) / -B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -7.2e+112) {
tmp = (180.0 * Math.atan(((B * 0.5) / A))) / Math.PI;
} else if (A <= 4.8e-11) {
tmp = (180.0 * Math.atan(((C - Math.hypot(B, C)) / B))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((A + Math.hypot(B, A)) / -B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -7.2e+112: tmp = (180.0 * math.atan(((B * 0.5) / A))) / math.pi elif A <= 4.8e-11: tmp = (180.0 * math.atan(((C - math.hypot(B, C)) / B))) / math.pi else: tmp = 180.0 * (math.atan(((A + math.hypot(B, A)) / -B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -7.2e+112) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B * 0.5) / A))) / pi); elseif (A <= 4.8e-11) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(B, C)) / B))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + hypot(B, A)) / Float64(-B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -7.2e+112) tmp = (180.0 * atan(((B * 0.5) / A))) / pi; elseif (A <= 4.8e-11) tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / pi; else tmp = 180.0 * (atan(((A + hypot(B, A)) / -B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -7.2e+112], N[(N[(180.0 * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 4.8e-11], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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 -7.2 \cdot 10^{+112}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 4.8 \cdot 10^{-11}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{-B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -7.20000000000000001e112Initial program 15.8%
associate-*l/15.8%
*-lft-identity15.8%
+-commutative15.8%
unpow215.8%
unpow215.8%
hypot-define50.6%
Simplified50.6%
*-commutative50.6%
associate-*l/50.6%
hypot-undefine15.8%
unpow215.8%
unpow215.8%
+-commutative15.8%
unpow215.8%
unpow215.8%
hypot-define50.6%
Applied egg-rr50.6%
Taylor expanded in A around -inf 79.1%
associate-*r/79.1%
*-commutative79.1%
Simplified79.1%
if -7.20000000000000001e112 < A < 4.8000000000000002e-11Initial program 56.8%
associate-*l/56.8%
*-lft-identity56.8%
+-commutative56.8%
unpow256.8%
unpow256.8%
hypot-define76.9%
Simplified76.9%
*-commutative76.9%
associate-*l/76.9%
hypot-undefine56.8%
unpow256.8%
unpow256.8%
+-commutative56.8%
unpow256.8%
unpow256.8%
hypot-define76.9%
Applied egg-rr76.9%
Taylor expanded in A around 0 55.1%
unpow255.1%
unpow255.1%
hypot-define75.2%
Simplified75.2%
if 4.8000000000000002e-11 < A Initial program 73.5%
Taylor expanded in C around 0 73.6%
mul-1-neg73.6%
distribute-neg-frac273.6%
+-commutative73.6%
unpow273.6%
unpow273.6%
hypot-define89.1%
Simplified89.1%
Final simplification79.2%
(FPCore (A B C)
:precision binary64
(if (<= A -1.35e+113)
(/ (* 180.0 (atan (/ (* B 0.5) A))) PI)
(if (<= A 1.2e+29)
(/ (* 180.0 (atan (/ (- C (hypot B C)) B))) PI)
(/ (* 180.0 (atan (+ (/ (- C A) B) -1.0))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.35e+113) {
tmp = (180.0 * atan(((B * 0.5) / A))) / ((double) M_PI);
} else if (A <= 1.2e+29) {
tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / ((double) M_PI);
} else {
tmp = (180.0 * atan((((C - A) / B) + -1.0))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.35e+113) {
tmp = (180.0 * Math.atan(((B * 0.5) / A))) / Math.PI;
} else if (A <= 1.2e+29) {
tmp = (180.0 * Math.atan(((C - Math.hypot(B, C)) / B))) / Math.PI;
} else {
tmp = (180.0 * Math.atan((((C - A) / B) + -1.0))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.35e+113: tmp = (180.0 * math.atan(((B * 0.5) / A))) / math.pi elif A <= 1.2e+29: tmp = (180.0 * math.atan(((C - math.hypot(B, C)) / B))) / math.pi else: tmp = (180.0 * math.atan((((C - A) / B) + -1.0))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.35e+113) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B * 0.5) / A))) / pi); elseif (A <= 1.2e+29) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(B, C)) / B))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) / B) + -1.0))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.35e+113) tmp = (180.0 * atan(((B * 0.5) / A))) / pi; elseif (A <= 1.2e+29) tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / pi; else tmp = (180.0 * atan((((C - A) / B) + -1.0))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.35e+113], N[(N[(180.0 * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 1.2e+29], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.35 \cdot 10^{+113}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.2 \cdot 10^{+29}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.35000000000000006e113Initial program 15.8%
associate-*l/15.8%
*-lft-identity15.8%
+-commutative15.8%
unpow215.8%
unpow215.8%
hypot-define50.6%
Simplified50.6%
*-commutative50.6%
associate-*l/50.6%
hypot-undefine15.8%
unpow215.8%
unpow215.8%
+-commutative15.8%
unpow215.8%
unpow215.8%
hypot-define50.6%
Applied egg-rr50.6%
Taylor expanded in A around -inf 79.1%
associate-*r/79.1%
*-commutative79.1%
Simplified79.1%
if -1.35000000000000006e113 < A < 1.2e29Initial program 56.0%
associate-*l/56.0%
*-lft-identity56.0%
+-commutative56.0%
unpow256.0%
unpow256.0%
hypot-define76.7%
Simplified76.7%
*-commutative76.7%
associate-*l/76.7%
hypot-undefine56.0%
unpow256.0%
unpow256.0%
+-commutative56.0%
unpow256.0%
unpow256.0%
hypot-define76.7%
Applied egg-rr76.7%
Taylor expanded in A around 0 53.7%
unpow253.7%
unpow253.7%
hypot-define74.6%
Simplified74.6%
if 1.2e29 < A Initial program 78.1%
associate-*l/78.1%
*-lft-identity78.1%
+-commutative78.1%
unpow278.1%
unpow278.1%
hypot-define94.7%
Simplified94.7%
*-commutative94.7%
associate-*l/94.6%
hypot-undefine78.1%
unpow278.1%
unpow278.1%
+-commutative78.1%
unpow278.1%
unpow278.1%
hypot-define94.6%
Applied egg-rr94.6%
Taylor expanded in B around inf 77.9%
+-commutative77.9%
associate--r+77.9%
div-sub81.7%
Simplified81.7%
Final simplification76.9%
(FPCore (A B C)
:precision binary64
(if (<= A -4.5e+113)
(/ (* 180.0 (atan (/ (* B 0.5) A))) PI)
(if (<= A 4e+41)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(/ (* 180.0 (atan (+ (/ (- C A) B) -1.0))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4.5e+113) {
tmp = (180.0 * atan(((B * 0.5) / A))) / ((double) M_PI);
} else if (A <= 4e+41) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = (180.0 * atan((((C - A) / B) + -1.0))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4.5e+113) {
tmp = (180.0 * Math.atan(((B * 0.5) / A))) / Math.PI;
} else if (A <= 4e+41) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = (180.0 * Math.atan((((C - A) / B) + -1.0))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4.5e+113: tmp = (180.0 * math.atan(((B * 0.5) / A))) / math.pi elif A <= 4e+41: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = (180.0 * math.atan((((C - A) / B) + -1.0))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4.5e+113) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B * 0.5) / A))) / pi); elseif (A <= 4e+41) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) / B) + -1.0))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4.5e+113) tmp = (180.0 * atan(((B * 0.5) / A))) / pi; elseif (A <= 4e+41) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = (180.0 * atan((((C - A) / B) + -1.0))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4.5e+113], N[(N[(180.0 * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 4e+41], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4.5 \cdot 10^{+113}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 4 \cdot 10^{+41}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\
\end{array}
\end{array}
if A < -4.5000000000000001e113Initial program 15.8%
associate-*l/15.8%
*-lft-identity15.8%
+-commutative15.8%
unpow215.8%
unpow215.8%
hypot-define50.6%
Simplified50.6%
*-commutative50.6%
associate-*l/50.6%
hypot-undefine15.8%
unpow215.8%
unpow215.8%
+-commutative15.8%
unpow215.8%
unpow215.8%
hypot-define50.6%
Applied egg-rr50.6%
Taylor expanded in A around -inf 79.1%
associate-*r/79.1%
*-commutative79.1%
Simplified79.1%
if -4.5000000000000001e113 < A < 4.00000000000000002e41Initial program 56.0%
Taylor expanded in A around 0 53.7%
unpow253.7%
unpow253.7%
hypot-define74.6%
Simplified74.6%
if 4.00000000000000002e41 < A Initial program 78.1%
associate-*l/78.1%
*-lft-identity78.1%
+-commutative78.1%
unpow278.1%
unpow278.1%
hypot-define94.7%
Simplified94.7%
*-commutative94.7%
associate-*l/94.6%
hypot-undefine78.1%
unpow278.1%
unpow278.1%
+-commutative78.1%
unpow278.1%
unpow278.1%
hypot-define94.6%
Applied egg-rr94.6%
Taylor expanded in B around inf 77.9%
+-commutative77.9%
associate--r+77.9%
div-sub81.7%
Simplified81.7%
Final simplification76.9%
(FPCore (A B C) :precision binary64 (if (<= C 6.6e+127) (* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI)) (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= 6.6e+127) {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 6.6e+127) {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 6.6e+127: tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 6.6e+127) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 6.6e+127) tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 6.6e+127], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 6.6 \cdot 10^{+127}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < 6.59999999999999953e127Initial program 61.2%
associate-*l/61.2%
*-lft-identity61.2%
+-commutative61.2%
unpow261.2%
unpow261.2%
hypot-define81.0%
Simplified81.0%
if 6.59999999999999953e127 < C Initial program 7.5%
Taylor expanded in C around inf 81.8%
Taylor expanded in A around inf 81.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan 1.0) PI))))
(if (<= B -700.0)
t_0
(if (<= B -1.85e-75)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(if (<= B -1.05e-110)
t_0
(if (<= B 6e-175)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 5.4e+36)
(* 180.0 (/ (atan (* -0.5 (/ B C))) 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 <= -700.0) {
tmp = t_0;
} else if (B <= -1.85e-75) {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
} else if (B <= -1.05e-110) {
tmp = t_0;
} else if (B <= 6e-175) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 5.4e+36) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(1.0) / Math.PI);
double tmp;
if (B <= -700.0) {
tmp = t_0;
} else if (B <= -1.85e-75) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
} else if (B <= -1.05e-110) {
tmp = t_0;
} else if (B <= 6e-175) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 5.4e+36) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(1.0) / math.pi) tmp = 0 if B <= -700.0: tmp = t_0 elif B <= -1.85e-75: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) elif B <= -1.05e-110: tmp = t_0 elif B <= 6e-175: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 5.4e+36: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(1.0) / pi)) tmp = 0.0 if (B <= -700.0) tmp = t_0; elseif (B <= -1.85e-75) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); elseif (B <= -1.05e-110) tmp = t_0; elseif (B <= 6e-175) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 5.4e+36) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(1.0) / pi); tmp = 0.0; if (B <= -700.0) tmp = t_0; elseif (B <= -1.85e-75) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); elseif (B <= -1.05e-110) tmp = t_0; elseif (B <= 6e-175) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 5.4e+36) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -700.0], t$95$0, If[LessEqual[B, -1.85e-75], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.05e-110], t$95$0, If[LessEqual[B, 6e-175], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.4e+36], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{if}\;B \leq -700:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq -1.85 \cdot 10^{-75}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{elif}\;B \leq -1.05 \cdot 10^{-110}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 6 \cdot 10^{-175}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 5.4 \cdot 10^{+36}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -700 or -1.85000000000000012e-75 < B < -1.05000000000000001e-110Initial program 52.5%
Taylor expanded in B around -inf 56.8%
if -700 < B < -1.85000000000000012e-75Initial program 63.0%
Taylor expanded in A around inf 51.1%
if -1.05000000000000001e-110 < B < 6e-175Initial program 50.9%
Taylor expanded in C around inf 33.2%
associate-*r/33.2%
distribute-rgt1-in33.2%
metadata-eval33.2%
mul0-lft33.2%
metadata-eval33.2%
Simplified33.2%
if 6e-175 < B < 5.4000000000000002e36Initial program 53.2%
Taylor expanded in C around inf 38.5%
Taylor expanded in A around inf 38.5%
if 5.4000000000000002e36 < B Initial program 55.1%
Taylor expanded in B around inf 69.5%
Final simplification50.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (- 1.0 (/ A B))) PI))))
(if (<= C -5.3e-71)
(/ (* 180.0 (atan (+ (/ C B) -1.0))) PI)
(if (<= C 2.9e-230)
t_0
(if (<= C 8.2e-166)
(* 180.0 (/ 1.0 (/ PI (atan (/ (* B 0.5) A)))))
(if (<= C 510000000000.0)
t_0
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
double tmp;
if (C <= -5.3e-71) {
tmp = (180.0 * atan(((C / B) + -1.0))) / ((double) M_PI);
} else if (C <= 2.9e-230) {
tmp = t_0;
} else if (C <= 8.2e-166) {
tmp = 180.0 * (1.0 / (((double) M_PI) / atan(((B * 0.5) / A))));
} else if (C <= 510000000000.0) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
double tmp;
if (C <= -5.3e-71) {
tmp = (180.0 * Math.atan(((C / B) + -1.0))) / Math.PI;
} else if (C <= 2.9e-230) {
tmp = t_0;
} else if (C <= 8.2e-166) {
tmp = 180.0 * (1.0 / (Math.PI / Math.atan(((B * 0.5) / A))));
} else if (C <= 510000000000.0) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) tmp = 0 if C <= -5.3e-71: tmp = (180.0 * math.atan(((C / B) + -1.0))) / math.pi elif C <= 2.9e-230: tmp = t_0 elif C <= 8.2e-166: tmp = 180.0 * (1.0 / (math.pi / math.atan(((B * 0.5) / A)))) elif C <= 510000000000.0: tmp = t_0 else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)) tmp = 0.0 if (C <= -5.3e-71) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C / B) + -1.0))) / pi); elseif (C <= 2.9e-230) tmp = t_0; elseif (C <= 8.2e-166) tmp = Float64(180.0 * Float64(1.0 / Float64(pi / atan(Float64(Float64(B * 0.5) / A))))); elseif (C <= 510000000000.0) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((1.0 - (A / B))) / pi); tmp = 0.0; if (C <= -5.3e-71) tmp = (180.0 * atan(((C / B) + -1.0))) / pi; elseif (C <= 2.9e-230) tmp = t_0; elseif (C <= 8.2e-166) tmp = 180.0 * (1.0 / (pi / atan(((B * 0.5) / A)))); elseif (C <= 510000000000.0) tmp = t_0; else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -5.3e-71], N[(N[(180.0 * N[ArcTan[N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 2.9e-230], t$95$0, If[LessEqual[C, 8.2e-166], N[(180.0 * N[(1.0 / N[(Pi / N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 510000000000.0], t$95$0, N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -5.3 \cdot 10^{-71}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\
\mathbf{elif}\;C \leq 2.9 \cdot 10^{-230}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq 8.2 \cdot 10^{-166}:\\
\;\;\;\;180 \cdot \frac{1}{\frac{\pi}{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}}\\
\mathbf{elif}\;C \leq 510000000000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -5.29999999999999999e-71Initial program 76.5%
associate-*l/76.5%
*-lft-identity76.5%
+-commutative76.5%
unpow276.5%
unpow276.5%
hypot-define94.8%
Simplified94.8%
*-commutative94.8%
associate-*l/94.8%
hypot-undefine76.5%
unpow276.5%
unpow276.5%
+-commutative76.5%
unpow276.5%
unpow276.5%
hypot-define94.8%
Applied egg-rr94.8%
Taylor expanded in B around inf 79.6%
+-commutative79.6%
associate--r+79.6%
div-sub83.7%
Simplified83.7%
Taylor expanded in C around inf 78.9%
if -5.29999999999999999e-71 < C < 2.90000000000000005e-230 or 8.1999999999999995e-166 < C < 5.1e11Initial program 60.7%
Taylor expanded in C around 0 60.7%
mul-1-neg60.7%
distribute-neg-frac260.7%
+-commutative60.7%
unpow260.7%
unpow260.7%
hypot-define79.9%
Simplified79.9%
Taylor expanded in B around -inf 53.7%
neg-mul-153.7%
unsub-neg53.7%
Simplified53.7%
if 2.90000000000000005e-230 < C < 8.1999999999999995e-166Initial program 45.3%
Taylor expanded in A around -inf 53.1%
associate-*r/53.1%
Simplified53.1%
clear-num53.1%
inv-pow53.1%
associate-/l*53.1%
Applied egg-rr53.1%
unpow-153.1%
associate-*r/53.1%
*-commutative53.1%
Simplified53.1%
if 5.1e11 < C Initial program 20.3%
Taylor expanded in C around inf 68.0%
Taylor expanded in A around inf 68.0%
Final simplification64.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (- 1.0 (/ A B))) PI))))
(if (<= C -1.8e-70)
(/ (* 180.0 (atan (+ (/ C B) -1.0))) PI)
(if (<= C 3.05e-229)
t_0
(if (<= C 1.6e-166)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= C 600000000000.0)
t_0
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
double tmp;
if (C <= -1.8e-70) {
tmp = (180.0 * atan(((C / B) + -1.0))) / ((double) M_PI);
} else if (C <= 3.05e-229) {
tmp = t_0;
} else if (C <= 1.6e-166) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (C <= 600000000000.0) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
double tmp;
if (C <= -1.8e-70) {
tmp = (180.0 * Math.atan(((C / B) + -1.0))) / Math.PI;
} else if (C <= 3.05e-229) {
tmp = t_0;
} else if (C <= 1.6e-166) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (C <= 600000000000.0) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) tmp = 0 if C <= -1.8e-70: tmp = (180.0 * math.atan(((C / B) + -1.0))) / math.pi elif C <= 3.05e-229: tmp = t_0 elif C <= 1.6e-166: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif C <= 600000000000.0: tmp = t_0 else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)) tmp = 0.0 if (C <= -1.8e-70) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C / B) + -1.0))) / pi); elseif (C <= 3.05e-229) tmp = t_0; elseif (C <= 1.6e-166) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (C <= 600000000000.0) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((1.0 - (A / B))) / pi); tmp = 0.0; if (C <= -1.8e-70) tmp = (180.0 * atan(((C / B) + -1.0))) / pi; elseif (C <= 3.05e-229) tmp = t_0; elseif (C <= 1.6e-166) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (C <= 600000000000.0) tmp = t_0; else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -1.8e-70], N[(N[(180.0 * N[ArcTan[N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 3.05e-229], t$95$0, If[LessEqual[C, 1.6e-166], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 600000000000.0], t$95$0, N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -1.8 \cdot 10^{-70}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\
\mathbf{elif}\;C \leq 3.05 \cdot 10^{-229}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq 1.6 \cdot 10^{-166}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq 600000000000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.8000000000000001e-70Initial program 76.5%
associate-*l/76.5%
*-lft-identity76.5%
+-commutative76.5%
unpow276.5%
unpow276.5%
hypot-define94.8%
Simplified94.8%
*-commutative94.8%
associate-*l/94.8%
hypot-undefine76.5%
unpow276.5%
unpow276.5%
+-commutative76.5%
unpow276.5%
unpow276.5%
hypot-define94.8%
Applied egg-rr94.8%
Taylor expanded in B around inf 79.6%
+-commutative79.6%
associate--r+79.6%
div-sub83.7%
Simplified83.7%
Taylor expanded in C around inf 78.9%
if -1.8000000000000001e-70 < C < 3.0499999999999999e-229 or 1.6e-166 < C < 6e11Initial program 60.7%
Taylor expanded in C around 0 60.7%
mul-1-neg60.7%
distribute-neg-frac260.7%
+-commutative60.7%
unpow260.7%
unpow260.7%
hypot-define79.9%
Simplified79.9%
Taylor expanded in B around -inf 53.7%
neg-mul-153.7%
unsub-neg53.7%
Simplified53.7%
if 3.0499999999999999e-229 < C < 1.6e-166Initial program 45.3%
Taylor expanded in A around -inf 53.1%
associate-*r/53.1%
Simplified53.1%
if 6e11 < C Initial program 20.3%
Taylor expanded in C around inf 68.0%
Taylor expanded in A around inf 68.0%
Final simplification64.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (- 1.0 (/ A B))) PI))))
(if (<= C -2.6e+54)
(* 180.0 (/ (atan (/ (* C 2.0) B)) PI))
(if (<= C 1.42e-229)
t_0
(if (<= C 3.8e-163)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= C 410000000000.0)
t_0
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
double tmp;
if (C <= -2.6e+54) {
tmp = 180.0 * (atan(((C * 2.0) / B)) / ((double) M_PI));
} else if (C <= 1.42e-229) {
tmp = t_0;
} else if (C <= 3.8e-163) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (C <= 410000000000.0) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
double tmp;
if (C <= -2.6e+54) {
tmp = 180.0 * (Math.atan(((C * 2.0) / B)) / Math.PI);
} else if (C <= 1.42e-229) {
tmp = t_0;
} else if (C <= 3.8e-163) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (C <= 410000000000.0) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) tmp = 0 if C <= -2.6e+54: tmp = 180.0 * (math.atan(((C * 2.0) / B)) / math.pi) elif C <= 1.42e-229: tmp = t_0 elif C <= 3.8e-163: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif C <= 410000000000.0: tmp = t_0 else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)) tmp = 0.0 if (C <= -2.6e+54) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C * 2.0) / B)) / pi)); elseif (C <= 1.42e-229) tmp = t_0; elseif (C <= 3.8e-163) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (C <= 410000000000.0) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((1.0 - (A / B))) / pi); tmp = 0.0; if (C <= -2.6e+54) tmp = 180.0 * (atan(((C * 2.0) / B)) / pi); elseif (C <= 1.42e-229) tmp = t_0; elseif (C <= 3.8e-163) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (C <= 410000000000.0) tmp = t_0; else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -2.6e+54], N[(180.0 * N[(N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.42e-229], t$95$0, If[LessEqual[C, 3.8e-163], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 410000000000.0], t$95$0, N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -2.6 \cdot 10^{+54}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C \cdot 2}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.42 \cdot 10^{-229}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq 3.8 \cdot 10^{-163}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq 410000000000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -2.60000000000000007e54Initial program 87.3%
Taylor expanded in C around -inf 82.7%
associate-*r/82.7%
Simplified82.7%
if -2.60000000000000007e54 < C < 1.42000000000000004e-229 or 3.8e-163 < C < 4.1e11Initial program 59.7%
Taylor expanded in C around 0 56.7%
mul-1-neg56.7%
distribute-neg-frac256.7%
+-commutative56.7%
unpow256.7%
unpow256.7%
hypot-define78.2%
Simplified78.2%
Taylor expanded in B around -inf 49.9%
neg-mul-149.9%
unsub-neg49.9%
Simplified49.9%
if 1.42000000000000004e-229 < C < 3.8e-163Initial program 45.3%
Taylor expanded in A around -inf 53.1%
associate-*r/53.1%
Simplified53.1%
if 4.1e11 < C Initial program 20.3%
Taylor expanded in C around inf 68.0%
Taylor expanded in A around inf 68.0%
Final simplification61.2%
(FPCore (A B C)
:precision binary64
(if (<= B -5.6e-78)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(if (<= B 3.8e-279)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= B 3.8e-213)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(if (<= B 2.8e+36)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(* 180.0 (/ (atan -1.0) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5.6e-78) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else if (B <= 3.8e-279) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (B <= 3.8e-213) {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
} else if (B <= 2.8e+36) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -5.6e-78) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else if (B <= 3.8e-279) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (B <= 3.8e-213) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
} else if (B <= 2.8e+36) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5.6e-78: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) elif B <= 3.8e-279: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif B <= 3.8e-213: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) elif B <= 2.8e+36: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -5.6e-78) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); elseif (B <= 3.8e-279) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (B <= 3.8e-213) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); elseif (B <= 2.8e+36) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -5.6e-78) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); elseif (B <= 3.8e-279) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (B <= 3.8e-213) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); elseif (B <= 2.8e+36) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5.6e-78], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.8e-279], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.8e-213], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.8e+36], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -5.6 \cdot 10^{-78}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.8 \cdot 10^{-279}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.8 \cdot 10^{-213}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.8 \cdot 10^{+36}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -5.60000000000000047e-78Initial program 54.2%
Taylor expanded in C around 0 46.2%
mul-1-neg46.2%
distribute-neg-frac246.2%
+-commutative46.2%
unpow246.2%
unpow246.2%
hypot-define70.2%
Simplified70.2%
Taylor expanded in B around -inf 66.0%
neg-mul-166.0%
unsub-neg66.0%
Simplified66.0%
if -5.60000000000000047e-78 < B < 3.80000000000000033e-279Initial program 49.0%
Taylor expanded in A around -inf 55.8%
associate-*r/55.8%
Simplified55.8%
if 3.80000000000000033e-279 < B < 3.8e-213Initial program 79.0%
Taylor expanded in A around inf 62.6%
if 3.8e-213 < B < 2.8000000000000001e36Initial program 47.8%
Taylor expanded in C around inf 42.2%
Taylor expanded in A around inf 42.2%
if 2.8000000000000001e36 < B Initial program 55.1%
Taylor expanded in B around inf 69.5%
Final simplification59.9%
(FPCore (A B C)
:precision binary64
(if (<= B -8.4e-218)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(if (<= B 1.7e-286)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 3.2e-213)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(if (<= B 1.3e+36)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(* 180.0 (/ (atan -1.0) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -8.4e-218) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else if (B <= 1.7e-286) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 3.2e-213) {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
} else if (B <= 1.3e+36) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -8.4e-218) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else if (B <= 1.7e-286) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 3.2e-213) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
} else if (B <= 1.3e+36) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -8.4e-218: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) elif B <= 1.7e-286: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 3.2e-213: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) elif B <= 1.3e+36: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -8.4e-218) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); elseif (B <= 1.7e-286) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 3.2e-213) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); elseif (B <= 1.3e+36) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -8.4e-218) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); elseif (B <= 1.7e-286) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 3.2e-213) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); elseif (B <= 1.3e+36) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -8.4e-218], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.7e-286], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.2e-213], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.3e+36], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -8.4 \cdot 10^{-218}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.7 \cdot 10^{-286}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.2 \cdot 10^{-213}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.3 \cdot 10^{+36}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -8.39999999999999976e-218Initial program 53.4%
Taylor expanded in C around 0 41.3%
mul-1-neg41.3%
distribute-neg-frac241.3%
+-commutative41.3%
unpow241.3%
unpow241.3%
hypot-define62.3%
Simplified62.3%
Taylor expanded in B around -inf 56.0%
neg-mul-156.0%
unsub-neg56.0%
Simplified56.0%
if -8.39999999999999976e-218 < B < 1.7000000000000001e-286Initial program 45.7%
Taylor expanded in C around inf 51.9%
associate-*r/51.9%
distribute-rgt1-in51.9%
metadata-eval51.9%
mul0-lft51.9%
metadata-eval51.9%
Simplified51.9%
if 1.7000000000000001e-286 < B < 3.19999999999999972e-213Initial program 79.0%
Taylor expanded in A around inf 62.6%
if 3.19999999999999972e-213 < B < 1.3000000000000001e36Initial program 47.8%
Taylor expanded in C around inf 42.2%
Taylor expanded in A around inf 42.2%
if 1.3000000000000001e36 < B Initial program 55.1%
Taylor expanded in B around inf 69.5%
Final simplification56.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* (/ A B) -2.0)) PI))))
(if (<= B -1.5e-10)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -2.8e-216)
t_0
(if (<= B 6.8e-282)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 4.1e-81) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
double tmp;
if (B <= -1.5e-10) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -2.8e-216) {
tmp = t_0;
} else if (B <= 6.8e-282) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 4.1e-81) {
tmp = t_0;
} 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(((A / B) * -2.0)) / Math.PI);
double tmp;
if (B <= -1.5e-10) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -2.8e-216) {
tmp = t_0;
} else if (B <= 6.8e-282) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 4.1e-81) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) tmp = 0 if B <= -1.5e-10: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -2.8e-216: tmp = t_0 elif B <= 6.8e-282: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 4.1e-81: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)) tmp = 0.0 if (B <= -1.5e-10) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -2.8e-216) tmp = t_0; elseif (B <= 6.8e-282) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 4.1e-81) tmp = t_0; 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(((A / B) * -2.0)) / pi); tmp = 0.0; if (B <= -1.5e-10) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -2.8e-216) tmp = t_0; elseif (B <= 6.8e-282) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 4.1e-81) tmp = t_0; 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[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.5e-10], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.8e-216], t$95$0, If[LessEqual[B, 6.8e-282], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.1e-81], t$95$0, 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} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{if}\;B \leq -1.5 \cdot 10^{-10}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -2.8 \cdot 10^{-216}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 6.8 \cdot 10^{-282}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4.1 \cdot 10^{-81}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.5e-10Initial program 51.8%
Taylor expanded in B around -inf 58.9%
if -1.5e-10 < B < -2.8e-216 or 6.79999999999999997e-282 < B < 4.09999999999999984e-81Initial program 55.9%
Taylor expanded in A around inf 37.0%
if -2.8e-216 < B < 6.79999999999999997e-282Initial program 45.7%
Taylor expanded in C around inf 51.9%
associate-*r/51.9%
distribute-rgt1-in51.9%
metadata-eval51.9%
mul0-lft51.9%
metadata-eval51.9%
Simplified51.9%
if 4.09999999999999984e-81 < B Initial program 53.7%
Taylor expanded in B around inf 57.0%
Final simplification50.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* 180.0 (atan (+ (/ (- C A) B) 1.0))) PI)))
(if (<= B -3e-78)
t_0
(if (<= B 7.8e-289)
(* (atan (* B (/ 0.5 A))) (/ 180.0 PI))
(if (<= B 6.6e-93) t_0 (/ (* 180.0 (atan (+ (/ C B) -1.0))) PI))))))
double code(double A, double B, double C) {
double t_0 = (180.0 * atan((((C - A) / B) + 1.0))) / ((double) M_PI);
double tmp;
if (B <= -3e-78) {
tmp = t_0;
} else if (B <= 7.8e-289) {
tmp = atan((B * (0.5 / A))) * (180.0 / ((double) M_PI));
} else if (B <= 6.6e-93) {
tmp = t_0;
} else {
tmp = (180.0 * atan(((C / B) + -1.0))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 * Math.atan((((C - A) / B) + 1.0))) / Math.PI;
double tmp;
if (B <= -3e-78) {
tmp = t_0;
} else if (B <= 7.8e-289) {
tmp = Math.atan((B * (0.5 / A))) * (180.0 / Math.PI);
} else if (B <= 6.6e-93) {
tmp = t_0;
} else {
tmp = (180.0 * Math.atan(((C / B) + -1.0))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 * math.atan((((C - A) / B) + 1.0))) / math.pi tmp = 0 if B <= -3e-78: tmp = t_0 elif B <= 7.8e-289: tmp = math.atan((B * (0.5 / A))) * (180.0 / math.pi) elif B <= 6.6e-93: tmp = t_0 else: tmp = (180.0 * math.atan(((C / B) + -1.0))) / math.pi return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) / B) + 1.0))) / pi) tmp = 0.0 if (B <= -3e-78) tmp = t_0; elseif (B <= 7.8e-289) tmp = Float64(atan(Float64(B * Float64(0.5 / A))) * Float64(180.0 / pi)); elseif (B <= 6.6e-93) tmp = t_0; else tmp = Float64(Float64(180.0 * atan(Float64(Float64(C / B) + -1.0))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 * atan((((C - A) / B) + 1.0))) / pi; tmp = 0.0; if (B <= -3e-78) tmp = t_0; elseif (B <= 7.8e-289) tmp = atan((B * (0.5 / A))) * (180.0 / pi); elseif (B <= 6.6e-93) tmp = t_0; else tmp = (180.0 * atan(((C / B) + -1.0))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[B, -3e-78], t$95$0, If[LessEqual[B, 7.8e-289], N[(N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6.6e-93], t$95$0, N[(N[(180.0 * N[ArcTan[N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + 1\right)}{\pi}\\
\mathbf{if}\;B \leq -3 \cdot 10^{-78}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 7.8 \cdot 10^{-289}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;B \leq 6.6 \cdot 10^{-93}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -2.99999999999999988e-78 or 7.7999999999999997e-289 < B < 6.6000000000000003e-93Initial program 54.5%
associate-*l/54.5%
*-lft-identity54.5%
+-commutative54.5%
unpow254.5%
unpow254.5%
hypot-define78.0%
Simplified78.0%
*-commutative78.0%
associate-*l/77.9%
hypot-undefine54.5%
unpow254.5%
unpow254.5%
+-commutative54.5%
unpow254.5%
unpow254.5%
hypot-define77.9%
Applied egg-rr77.9%
Taylor expanded in B around -inf 63.4%
associate--l+63.4%
div-sub66.7%
Simplified66.7%
if -2.99999999999999988e-78 < B < 7.7999999999999997e-289Initial program 47.8%
associate-*l/47.8%
*-lft-identity47.8%
+-commutative47.8%
unpow247.8%
unpow247.8%
hypot-define71.0%
Simplified71.0%
*-commutative71.0%
associate-*l/71.0%
hypot-undefine47.8%
unpow247.8%
unpow247.8%
+-commutative47.8%
unpow247.8%
unpow247.8%
hypot-define71.0%
Applied egg-rr71.0%
Taylor expanded in A around -inf 57.2%
associate-*r/57.2%
*-commutative57.2%
Simplified57.2%
associate-/l*57.2%
associate-/l*57.2%
Applied egg-rr57.2%
if 6.6000000000000003e-93 < B Initial program 54.6%
associate-*l/54.6%
*-lft-identity54.6%
+-commutative54.6%
unpow254.6%
unpow254.6%
hypot-define75.2%
Simplified75.2%
*-commutative75.2%
associate-*l/75.2%
hypot-undefine54.6%
unpow254.6%
unpow254.6%
+-commutative54.6%
unpow254.6%
unpow254.6%
hypot-define75.2%
Applied egg-rr75.2%
Taylor expanded in B around inf 72.8%
+-commutative72.8%
associate--r+72.8%
div-sub72.8%
Simplified72.8%
Taylor expanded in C around inf 67.7%
Final simplification65.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ (/ (- C A) B) 1.0)) PI))))
(if (<= B -4.5e-78)
t_0
(if (<= B 2.95e-289)
(* (atan (* B (/ 0.5 A))) (/ 180.0 PI))
(if (<= B 6.5e-93) t_0 (/ (* 180.0 (atan (+ (/ C B) -1.0))) PI))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((((C - A) / B) + 1.0)) / ((double) M_PI));
double tmp;
if (B <= -4.5e-78) {
tmp = t_0;
} else if (B <= 2.95e-289) {
tmp = atan((B * (0.5 / A))) * (180.0 / ((double) M_PI));
} else if (B <= 6.5e-93) {
tmp = t_0;
} else {
tmp = (180.0 * atan(((C / B) + -1.0))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((((C - A) / B) + 1.0)) / Math.PI);
double tmp;
if (B <= -4.5e-78) {
tmp = t_0;
} else if (B <= 2.95e-289) {
tmp = Math.atan((B * (0.5 / A))) * (180.0 / Math.PI);
} else if (B <= 6.5e-93) {
tmp = t_0;
} else {
tmp = (180.0 * Math.atan(((C / B) + -1.0))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((((C - A) / B) + 1.0)) / math.pi) tmp = 0 if B <= -4.5e-78: tmp = t_0 elif B <= 2.95e-289: tmp = math.atan((B * (0.5 / A))) * (180.0 / math.pi) elif B <= 6.5e-93: tmp = t_0 else: tmp = (180.0 * math.atan(((C / B) + -1.0))) / math.pi return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) / B) + 1.0)) / pi)) tmp = 0.0 if (B <= -4.5e-78) tmp = t_0; elseif (B <= 2.95e-289) tmp = Float64(atan(Float64(B * Float64(0.5 / A))) * Float64(180.0 / pi)); elseif (B <= 6.5e-93) tmp = t_0; else tmp = Float64(Float64(180.0 * atan(Float64(Float64(C / B) + -1.0))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((((C - A) / B) + 1.0)) / pi); tmp = 0.0; if (B <= -4.5e-78) tmp = t_0; elseif (B <= 2.95e-289) tmp = atan((B * (0.5 / A))) * (180.0 / pi); elseif (B <= 6.5e-93) tmp = t_0; else tmp = (180.0 * atan(((C / B) + -1.0))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -4.5e-78], t$95$0, If[LessEqual[B, 2.95e-289], N[(N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6.5e-93], t$95$0, N[(N[(180.0 * N[ArcTan[N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + 1\right)}{\pi}\\
\mathbf{if}\;B \leq -4.5 \cdot 10^{-78}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 2.95 \cdot 10^{-289}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;B \leq 6.5 \cdot 10^{-93}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -4.5e-78 or 2.95000000000000016e-289 < B < 6.5e-93Initial program 54.5%
Taylor expanded in B around -inf 63.3%
associate--l+63.3%
div-sub66.7%
Simplified66.7%
if -4.5e-78 < B < 2.95000000000000016e-289Initial program 47.8%
associate-*l/47.8%
*-lft-identity47.8%
+-commutative47.8%
unpow247.8%
unpow247.8%
hypot-define71.0%
Simplified71.0%
*-commutative71.0%
associate-*l/71.0%
hypot-undefine47.8%
unpow247.8%
unpow247.8%
+-commutative47.8%
unpow247.8%
unpow247.8%
hypot-define71.0%
Applied egg-rr71.0%
Taylor expanded in A around -inf 57.2%
associate-*r/57.2%
*-commutative57.2%
Simplified57.2%
associate-/l*57.2%
associate-/l*57.2%
Applied egg-rr57.2%
if 6.5e-93 < B Initial program 54.6%
associate-*l/54.6%
*-lft-identity54.6%
+-commutative54.6%
unpow254.6%
unpow254.6%
hypot-define75.2%
Simplified75.2%
*-commutative75.2%
associate-*l/75.2%
hypot-undefine54.6%
unpow254.6%
unpow254.6%
+-commutative54.6%
unpow254.6%
unpow254.6%
hypot-define75.2%
Applied egg-rr75.2%
Taylor expanded in B around inf 72.8%
+-commutative72.8%
associate--r+72.8%
div-sub72.8%
Simplified72.8%
Taylor expanded in C around inf 67.7%
Final simplification65.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -2.8e-78)
(/ (* 180.0 (atan (+ t_0 1.0))) PI)
(if (<= B 2.7e-289)
(* (atan (* B (/ 0.5 A))) (/ 180.0 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 <= -2.8e-78) {
tmp = (180.0 * atan((t_0 + 1.0))) / ((double) M_PI);
} else if (B <= 2.7e-289) {
tmp = atan((B * (0.5 / A))) * (180.0 / ((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 <= -2.8e-78) {
tmp = (180.0 * Math.atan((t_0 + 1.0))) / Math.PI;
} else if (B <= 2.7e-289) {
tmp = Math.atan((B * (0.5 / A))) * (180.0 / 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 <= -2.8e-78: tmp = (180.0 * math.atan((t_0 + 1.0))) / math.pi elif B <= 2.7e-289: tmp = math.atan((B * (0.5 / A))) * (180.0 / 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 <= -2.8e-78) tmp = Float64(Float64(180.0 * atan(Float64(t_0 + 1.0))) / pi); elseif (B <= 2.7e-289) tmp = Float64(atan(Float64(B * Float64(0.5 / A))) * Float64(180.0 / pi)); else tmp = Float64(Float64(180.0 * 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 <= -2.8e-78) tmp = (180.0 * atan((t_0 + 1.0))) / pi; elseif (B <= 2.7e-289) tmp = atan((B * (0.5 / A))) * (180.0 / 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, -2.8e-78], N[(N[(180.0 * N[ArcTan[N[(t$95$0 + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 2.7e-289], N[(N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -2.8 \cdot 10^{-78}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(t\_0 + 1\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.7 \cdot 10^{-289}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(t\_0 + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -2.80000000000000024e-78Initial program 54.2%
associate-*l/54.2%
*-lft-identity54.2%
+-commutative54.2%
unpow254.2%
unpow254.2%
hypot-define78.5%
Simplified78.5%
*-commutative78.5%
associate-*l/78.5%
hypot-undefine54.2%
unpow254.2%
unpow254.2%
+-commutative54.2%
unpow254.2%
unpow254.2%
hypot-define78.5%
Applied egg-rr78.5%
Taylor expanded in B around -inf 74.3%
associate--l+74.3%
div-sub74.3%
Simplified74.3%
if -2.80000000000000024e-78 < B < 2.7e-289Initial program 47.8%
associate-*l/47.8%
*-lft-identity47.8%
+-commutative47.8%
unpow247.8%
unpow247.8%
hypot-define71.0%
Simplified71.0%
*-commutative71.0%
associate-*l/71.0%
hypot-undefine47.8%
unpow247.8%
unpow247.8%
+-commutative47.8%
unpow247.8%
unpow247.8%
hypot-define71.0%
Applied egg-rr71.0%
Taylor expanded in A around -inf 57.2%
associate-*r/57.2%
*-commutative57.2%
Simplified57.2%
associate-/l*57.2%
associate-/l*57.2%
Applied egg-rr57.2%
if 2.7e-289 < B Initial program 54.8%
associate-*l/54.8%
*-lft-identity54.8%
+-commutative54.8%
unpow254.8%
unpow254.8%
hypot-define75.7%
Simplified75.7%
*-commutative75.7%
associate-*l/75.7%
hypot-undefine54.8%
unpow254.8%
unpow254.8%
+-commutative54.8%
unpow254.8%
unpow254.8%
hypot-define75.7%
Applied egg-rr75.7%
Taylor expanded in B around inf 63.4%
+-commutative63.4%
associate--r+63.4%
div-sub66.5%
Simplified66.5%
Final simplification67.4%
(FPCore (A B C)
:precision binary64
(if (<= B -3e-111)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 4.8e-102)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3e-111) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 4.8e-102) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -3e-111) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 4.8e-102) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -3e-111: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 4.8e-102: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -3e-111) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 4.8e-102) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -3e-111) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 4.8e-102) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3e-111], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.8e-102], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -3 \cdot 10^{-111}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 4.8 \cdot 10^{-102}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -3.00000000000000008e-111Initial program 54.1%
Taylor expanded in B around -inf 50.0%
if -3.00000000000000008e-111 < B < 4.8e-102Initial program 50.6%
Taylor expanded in C around inf 32.6%
associate-*r/32.6%
distribute-rgt1-in32.6%
metadata-eval32.6%
mul0-lft32.6%
metadata-eval32.6%
Simplified32.6%
if 4.8e-102 < B Initial program 55.1%
Taylor expanded in B around inf 54.0%
(FPCore (A B C) :precision binary64 (if (<= B -3.8e-291) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3.8e-291) {
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 <= -3.8e-291) {
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 <= -3.8e-291: 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 <= -3.8e-291) 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 <= -3.8e-291) 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, -3.8e-291], 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 -3.8 \cdot 10^{-291}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -3.7999999999999998e-291Initial program 53.7%
Taylor expanded in B around -inf 39.9%
if -3.7999999999999998e-291 < B Initial program 53.2%
Taylor expanded in B around inf 40.4%
(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 53.5%
Taylor expanded in B around inf 23.0%
herbie shell --seed 2024105
(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)))