
(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 16 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
(* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (hypot (- C A) B)))) PI)))
(t_1
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
(if (<= t_1 -5e-39)
t_0
(if (<= t_1 0.0)
(* (/ 1.0 PI) (/ (atan (/ (* B 0.5) (- A C))) 0.005555555555555556))
t_0))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((1.0 / B) * ((C - A) - hypot((C - A), B)))) / ((double) M_PI));
double t_1 = (1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
double tmp;
if (t_1 <= -5e-39) {
tmp = t_0;
} else if (t_1 <= 0.0) {
tmp = (1.0 / ((double) M_PI)) * (atan(((B * 0.5) / (A - C))) / 0.005555555555555556);
} else {
tmp = t_0;
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.hypot((C - A), B)))) / Math.PI);
double t_1 = (1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))));
double tmp;
if (t_1 <= -5e-39) {
tmp = t_0;
} else if (t_1 <= 0.0) {
tmp = (1.0 / Math.PI) * (Math.atan(((B * 0.5) / (A - C))) / 0.005555555555555556);
} else {
tmp = t_0;
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.hypot((C - A), B)))) / math.pi) t_1 = (1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))) tmp = 0 if t_1 <= -5e-39: tmp = t_0 elif t_1 <= 0.0: tmp = (1.0 / math.pi) * (math.atan(((B * 0.5) / (A - C))) / 0.005555555555555556) else: tmp = t_0 return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - hypot(Float64(C - A), B)))) / pi)) t_1 = Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))) tmp = 0.0 if (t_1 <= -5e-39) tmp = t_0; elseif (t_1 <= 0.0) tmp = Float64(Float64(1.0 / pi) * Float64(atan(Float64(Float64(B * 0.5) / Float64(A - C))) / 0.005555555555555556)); else tmp = t_0; end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((1.0 / B) * ((C - A) - hypot((C - A), B)))) / pi); t_1 = (1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))); tmp = 0.0; if (t_1 <= -5e-39) tmp = t_0; elseif (t_1 <= 0.0) tmp = (1.0 / pi) * (atan(((B * 0.5) / (A - C))) / 0.005555555555555556); else tmp = t_0; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(C - A), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = 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[LessEqual[t$95$1, -5e-39], t$95$0, If[LessEqual[t$95$1, 0.0], N[(N[(1.0 / Pi), $MachinePrecision] * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / N[(A - C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / 0.005555555555555556), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \mathsf{hypot}\left(C - A, B\right)\right)\right)}{\pi}\\
t_1 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-39}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{1}{\pi} \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A - C}\right)}{0.005555555555555556}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -4.9999999999999998e-39 or -0.0 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) Initial program 62.2%
Applied egg-rr83.4%
if -4.9999999999999998e-39 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -0.0Initial program 19.6%
Applied egg-rr19.6%
Taylor expanded in B around 0
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
associate-*r/N/A
*-lowering-*.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-frac2N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-lft-inN/A
mul-1-negN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
/-lowering-/.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f6499.4
Simplified99.4%
associate-*r/N/A
*-rgt-identityN/A
times-fracN/A
/-rgt-identityN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f64N/A
atan-lowering-atan.f64N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
div-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
--lowering--.f6499.4
Applied egg-rr99.4%
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f64N/A
/-lowering-/.f64N/A
atan-lowering-atan.f64N/A
associate-/l/N/A
/-lowering-/.f64N/A
div-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-eval99.6
Applied egg-rr99.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)))
(t_1
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
(if (<= t_1 -2e+33)
t_0
(if (<= t_1 -0.5)
(* 180.0 (/ (atan -1.0) PI))
(if (<= t_1 0.0)
(* (/ 1.0 PI) (/ (atan (/ (* B 0.5) (- A C))) 0.005555555555555556))
t_0)))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
double t_1 = (1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
double tmp;
if (t_1 <= -2e+33) {
tmp = t_0;
} else if (t_1 <= -0.5) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (t_1 <= 0.0) {
tmp = (1.0 / ((double) M_PI)) * (atan(((B * 0.5) / (A - C))) / 0.005555555555555556);
} else {
tmp = t_0;
}
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 t_1 = (1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))));
double tmp;
if (t_1 <= -2e+33) {
tmp = t_0;
} else if (t_1 <= -0.5) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (t_1 <= 0.0) {
tmp = (1.0 / Math.PI) * (Math.atan(((B * 0.5) / (A - C))) / 0.005555555555555556);
} else {
tmp = t_0;
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) t_1 = (1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))) tmp = 0 if t_1 <= -2e+33: tmp = t_0 elif t_1 <= -0.5: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif t_1 <= 0.0: tmp = (1.0 / math.pi) * (math.atan(((B * 0.5) / (A - C))) / 0.005555555555555556) else: tmp = t_0 return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)) t_1 = Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))) tmp = 0.0 if (t_1 <= -2e+33) tmp = t_0; elseif (t_1 <= -0.5) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (t_1 <= 0.0) tmp = Float64(Float64(1.0 / pi) * Float64(atan(Float64(Float64(B * 0.5) / Float64(A - C))) / 0.005555555555555556)); else tmp = t_0; end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); t_1 = (1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))); tmp = 0.0; if (t_1 <= -2e+33) tmp = t_0; elseif (t_1 <= -0.5) tmp = 180.0 * (atan(-1.0) / pi); elseif (t_1 <= 0.0) tmp = (1.0 / pi) * (atan(((B * 0.5) / (A - C))) / 0.005555555555555556); else tmp = t_0; 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]}, Block[{t$95$1 = 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[LessEqual[t$95$1, -2e+33], t$95$0, If[LessEqual[t$95$1, -0.5], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(N[(1.0 / Pi), $MachinePrecision] * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / N[(A - C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / 0.005555555555555556), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
t_1 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+33}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;t\_1 \leq -0.5:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{1}{\pi} \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A - C}\right)}{0.005555555555555556}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -1.9999999999999999e33 or -0.0 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) Initial program 60.5%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6464.2
Simplified64.2%
if -1.9999999999999999e33 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -0.5Initial program 100.0%
Taylor expanded in B around inf
Simplified100.0%
if -0.5 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -0.0Initial program 19.2%
Applied egg-rr21.6%
Taylor expanded in B around 0
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
associate-*r/N/A
*-lowering-*.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-frac2N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-lft-inN/A
mul-1-negN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
/-lowering-/.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f6497.5
Simplified97.5%
associate-*r/N/A
*-rgt-identityN/A
times-fracN/A
/-rgt-identityN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f64N/A
atan-lowering-atan.f64N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
div-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
--lowering--.f6497.4
Applied egg-rr97.4%
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f64N/A
/-lowering-/.f64N/A
atan-lowering-atan.f64N/A
associate-/l/N/A
/-lowering-/.f64N/A
div-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-eval97.7
Applied egg-rr97.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)))
(t_1
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
(if (<= t_1 -2e+33)
t_0
(if (<= t_1 -0.5)
(* 180.0 (/ (atan -1.0) PI))
(if (<= t_1 0.0) (* 180.0 (/ (atan (* B (/ 0.5 (- A C)))) PI)) t_0)))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
double t_1 = (1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
double tmp;
if (t_1 <= -2e+33) {
tmp = t_0;
} else if (t_1 <= -0.5) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (t_1 <= 0.0) {
tmp = 180.0 * (atan((B * (0.5 / (A - C)))) / ((double) M_PI));
} else {
tmp = t_0;
}
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 t_1 = (1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))));
double tmp;
if (t_1 <= -2e+33) {
tmp = t_0;
} else if (t_1 <= -0.5) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (t_1 <= 0.0) {
tmp = 180.0 * (Math.atan((B * (0.5 / (A - C)))) / Math.PI);
} else {
tmp = t_0;
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) t_1 = (1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))) tmp = 0 if t_1 <= -2e+33: tmp = t_0 elif t_1 <= -0.5: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif t_1 <= 0.0: tmp = 180.0 * (math.atan((B * (0.5 / (A - C)))) / math.pi) else: tmp = t_0 return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)) t_1 = Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))) tmp = 0.0 if (t_1 <= -2e+33) tmp = t_0; elseif (t_1 <= -0.5) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (t_1 <= 0.0) tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(0.5 / Float64(A - C)))) / pi)); else tmp = t_0; end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); t_1 = (1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))); tmp = 0.0; if (t_1 <= -2e+33) tmp = t_0; elseif (t_1 <= -0.5) tmp = 180.0 * (atan(-1.0) / pi); elseif (t_1 <= 0.0) tmp = 180.0 * (atan((B * (0.5 / (A - C)))) / pi); else tmp = t_0; 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]}, Block[{t$95$1 = 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[LessEqual[t$95$1, -2e+33], t$95$0, If[LessEqual[t$95$1, -0.5], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(180.0 * N[(N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
t_1 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+33}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;t\_1 \leq -0.5:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -1.9999999999999999e33 or -0.0 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) Initial program 60.5%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6464.2
Simplified64.2%
if -1.9999999999999999e33 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -0.5Initial program 100.0%
Taylor expanded in B around inf
Simplified100.0%
if -0.5 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -0.0Initial program 19.2%
Applied egg-rr21.6%
Taylor expanded in B around 0
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
associate-*r/N/A
*-lowering-*.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-frac2N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-lft-inN/A
mul-1-negN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
/-lowering-/.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f6497.5
Simplified97.5%
(FPCore (A B C)
:precision binary64
(if (<= A -5.2e+79)
(* (/ 1.0 PI) (/ (atan (/ (* B 0.5) (- A C))) 0.005555555555555556))
(if (<= A 3.7e-29)
(* 180.0 (/ (atan (/ (- C (hypot C B)) B)) PI))
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -5.2e+79) {
tmp = (1.0 / ((double) M_PI)) * (atan(((B * 0.5) / (A - C))) / 0.005555555555555556);
} else if (A <= 3.7e-29) {
tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -5.2e+79) {
tmp = (1.0 / Math.PI) * (Math.atan(((B * 0.5) / (A - C))) / 0.005555555555555556);
} else if (A <= 3.7e-29) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(C, B)) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -5.2e+79: tmp = (1.0 / math.pi) * (math.atan(((B * 0.5) / (A - C))) / 0.005555555555555556) elif A <= 3.7e-29: tmp = 180.0 * (math.atan(((C - math.hypot(C, B)) / B)) / math.pi) else: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -5.2e+79) tmp = Float64(Float64(1.0 / pi) * Float64(atan(Float64(Float64(B * 0.5) / Float64(A - C))) / 0.005555555555555556)); elseif (A <= 3.7e-29) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(C, B)) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -5.2e+79) tmp = (1.0 / pi) * (atan(((B * 0.5) / (A - C))) / 0.005555555555555556); elseif (A <= 3.7e-29) tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / pi); else tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -5.2e+79], N[(N[(1.0 / Pi), $MachinePrecision] * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / N[(A - C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / 0.005555555555555556), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.7e-29], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -5.2 \cdot 10^{+79}:\\
\;\;\;\;\frac{1}{\pi} \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A - C}\right)}{0.005555555555555556}\\
\mathbf{elif}\;A \leq 3.7 \cdot 10^{-29}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.20000000000000029e79Initial program 19.3%
Applied egg-rr49.5%
Taylor expanded in B around 0
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
associate-*r/N/A
*-lowering-*.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-frac2N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-lft-inN/A
mul-1-negN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
/-lowering-/.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f6481.8
Simplified81.8%
associate-*r/N/A
*-rgt-identityN/A
times-fracN/A
/-rgt-identityN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f64N/A
atan-lowering-atan.f64N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
div-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
--lowering--.f6482.0
Applied egg-rr82.0%
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f64N/A
/-lowering-/.f64N/A
atan-lowering-atan.f64N/A
associate-/l/N/A
/-lowering-/.f64N/A
div-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-eval82.1
Applied egg-rr82.1%
if -5.20000000000000029e79 < A < 3.6999999999999997e-29Initial program 53.2%
Taylor expanded in A around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6452.2
Simplified52.2%
+-commutativeN/A
accelerator-lowering-hypot.f6469.6
Applied egg-rr69.6%
if 3.6999999999999997e-29 < A Initial program 79.2%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6478.0
Simplified78.0%
(FPCore (A B C)
:precision binary64
(if (<= A -6.2e+78)
(/ (atan (/ B (* A 2.0))) (* PI 0.005555555555555556))
(if (<= A 4100000000.0)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -6.2e+78) {
tmp = atan((B / (A * 2.0))) / (((double) M_PI) * 0.005555555555555556);
} else if (A <= 4100000000.0) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -6.2e+78) {
tmp = Math.atan((B / (A * 2.0))) / (Math.PI * 0.005555555555555556);
} else if (A <= 4100000000.0) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -6.2e+78: tmp = math.atan((B / (A * 2.0))) / (math.pi * 0.005555555555555556) elif A <= 4100000000.0: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -6.2e+78) tmp = Float64(atan(Float64(B / Float64(A * 2.0))) / Float64(pi * 0.005555555555555556)); elseif (A <= 4100000000.0) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -6.2e+78) tmp = atan((B / (A * 2.0))) / (pi * 0.005555555555555556); elseif (A <= 4100000000.0) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -6.2e+78], N[(N[ArcTan[N[(B / N[(A * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4100000000.0], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -6.2 \cdot 10^{+78}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B}{A \cdot 2}\right)}{\pi \cdot 0.005555555555555556}\\
\mathbf{elif}\;A \leq 4100000000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -6.2e78Initial program 19.3%
Applied egg-rr49.5%
Taylor expanded in B around 0
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
associate-*r/N/A
*-lowering-*.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-frac2N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-lft-inN/A
mul-1-negN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
/-lowering-/.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f6481.8
Simplified81.8%
Taylor expanded in A around inf
/-lowering-/.f6477.4
Simplified77.4%
*-commutativeN/A
div-invN/A
associate-*l*N/A
associate-/r/N/A
un-div-invN/A
/-lowering-/.f64N/A
atan-lowering-atan.f64N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
div-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
div-invN/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
metadata-eval77.6
Applied egg-rr77.6%
if -6.2e78 < A < 4.1e9Initial program 56.1%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6450.6
Simplified50.6%
Taylor expanded in A around 0
+-lowering-+.f64N/A
/-lowering-/.f6448.8
Simplified48.8%
if 4.1e9 < A Initial program 77.0%
Taylor expanded in A around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6471.7
Simplified71.7%
Final simplification59.5%
(FPCore (A B C)
:precision binary64
(if (<= A -1.95e+80)
(* (/ 180.0 PI) (atan (/ B (* A 2.0))))
(if (<= A 1250000000.0)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.95e+80) {
tmp = (180.0 / ((double) M_PI)) * atan((B / (A * 2.0)));
} else if (A <= 1250000000.0) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.95e+80) {
tmp = (180.0 / Math.PI) * Math.atan((B / (A * 2.0)));
} else if (A <= 1250000000.0) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.95e+80: tmp = (180.0 / math.pi) * math.atan((B / (A * 2.0))) elif A <= 1250000000.0: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.95e+80) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B / Float64(A * 2.0)))); elseif (A <= 1250000000.0) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.95e+80) tmp = (180.0 / pi) * atan((B / (A * 2.0))); elseif (A <= 1250000000.0) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.95e+80], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B / N[(A * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1250000000.0], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.95 \cdot 10^{+80}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B}{A \cdot 2}\right)\\
\mathbf{elif}\;A \leq 1250000000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.94999999999999999e80Initial program 19.3%
Applied egg-rr49.5%
Taylor expanded in B around 0
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
associate-*r/N/A
*-lowering-*.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-frac2N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-lft-inN/A
mul-1-negN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
/-lowering-/.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f6481.8
Simplified81.8%
Taylor expanded in A around inf
/-lowering-/.f6477.4
Simplified77.4%
clear-numN/A
un-div-invN/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f64N/A
atan-lowering-atan.f64N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
div-invN/A
metadata-evalN/A
*-lowering-*.f6477.6
Applied egg-rr77.6%
if -1.94999999999999999e80 < A < 1.25e9Initial program 56.1%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6450.6
Simplified50.6%
Taylor expanded in A around 0
+-lowering-+.f64N/A
/-lowering-/.f6448.8
Simplified48.8%
if 1.25e9 < A Initial program 77.0%
Taylor expanded in A around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6471.7
Simplified71.7%
Final simplification59.5%
(FPCore (A B C)
:precision binary64
(if (<= A -1.04e+80)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 2300000000.0)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.04e+80) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 2300000000.0) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.04e+80) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 2300000000.0) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.04e+80: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 2300000000.0: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.04e+80) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 2300000000.0) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.04e+80) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 2300000000.0) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.04e+80], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2300000000.0], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.04 \cdot 10^{+80}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2300000000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.04000000000000006e80Initial program 19.3%
Taylor expanded in A around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6477.5
Simplified77.5%
if -1.04000000000000006e80 < A < 2.3e9Initial program 56.1%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6450.6
Simplified50.6%
Taylor expanded in A around 0
+-lowering-+.f64N/A
/-lowering-/.f6448.8
Simplified48.8%
if 2.3e9 < A Initial program 77.0%
Taylor expanded in A around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6471.7
Simplified71.7%
Final simplification59.5%
(FPCore (A B C)
:precision binary64
(if (<= A -2.35e+79)
(* 180.0 (/ (atan (* B (/ 0.5 A))) PI))
(if (<= A 2400000000.0)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.35e+79) {
tmp = 180.0 * (atan((B * (0.5 / A))) / ((double) M_PI));
} else if (A <= 2400000000.0) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.35e+79) {
tmp = 180.0 * (Math.atan((B * (0.5 / A))) / Math.PI);
} else if (A <= 2400000000.0) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.35e+79: tmp = 180.0 * (math.atan((B * (0.5 / A))) / math.pi) elif A <= 2400000000.0: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.35e+79) tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(0.5 / A))) / pi)); elseif (A <= 2400000000.0) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.35e+79) tmp = 180.0 * (atan((B * (0.5 / A))) / pi); elseif (A <= 2400000000.0) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.35e+79], N[(180.0 * N[(N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2400000000.0], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.35 \cdot 10^{+79}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2400000000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.35000000000000011e79Initial program 19.3%
Applied egg-rr49.5%
Taylor expanded in B around 0
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
associate-*r/N/A
*-lowering-*.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-frac2N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-lft-inN/A
mul-1-negN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
/-lowering-/.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f6481.8
Simplified81.8%
Taylor expanded in A around inf
/-lowering-/.f6477.4
Simplified77.4%
if -2.35000000000000011e79 < A < 2.4e9Initial program 56.1%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6450.6
Simplified50.6%
Taylor expanded in A around 0
+-lowering-+.f64N/A
/-lowering-/.f6448.8
Simplified48.8%
if 2.4e9 < A Initial program 77.0%
Taylor expanded in A around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6471.7
Simplified71.7%
Final simplification59.5%
(FPCore (A B C)
:precision binary64
(if (<= A -1.8e+82)
(* 180.0 (/ (atan (* B (/ 0.5 A))) PI))
(if (<= A 4200000000.0)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(* -180.0 (/ (atan (/ A B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.8e+82) {
tmp = 180.0 * (atan((B * (0.5 / A))) / ((double) M_PI));
} else if (A <= 4200000000.0) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else {
tmp = -180.0 * (atan((A / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.8e+82) {
tmp = 180.0 * (Math.atan((B * (0.5 / A))) / Math.PI);
} else if (A <= 4200000000.0) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else {
tmp = -180.0 * (Math.atan((A / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.8e+82: tmp = 180.0 * (math.atan((B * (0.5 / A))) / math.pi) elif A <= 4200000000.0: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) else: tmp = -180.0 * (math.atan((A / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.8e+82) tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(0.5 / A))) / pi)); elseif (A <= 4200000000.0) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); else tmp = Float64(-180.0 * Float64(atan(Float64(A / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.8e+82) tmp = 180.0 * (atan((B * (0.5 / A))) / pi); elseif (A <= 4200000000.0) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); else tmp = -180.0 * (atan((A / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.8e+82], N[(180.0 * N[(N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4200000000.0], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(-180.0 * N[(N[ArcTan[N[(A / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.8 \cdot 10^{+82}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 4200000000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;-180 \cdot \frac{\tan^{-1} \left(\frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.80000000000000007e82Initial program 19.3%
Applied egg-rr49.5%
Taylor expanded in B around 0
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
associate-*r/N/A
*-lowering-*.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-frac2N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-lft-inN/A
mul-1-negN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
/-lowering-/.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f6481.8
Simplified81.8%
Taylor expanded in A around inf
/-lowering-/.f6477.4
Simplified77.4%
if -1.80000000000000007e82 < A < 4.2e9Initial program 56.1%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6450.6
Simplified50.6%
Taylor expanded in A around 0
+-lowering-+.f64N/A
/-lowering-/.f6448.8
Simplified48.8%
if 4.2e9 < A Initial program 77.0%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6475.8
Simplified75.8%
Taylor expanded in A around inf
mul-1-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
neg-lowering-neg.f6470.9
Simplified70.9%
frac-2negN/A
associate-*r/N/A
neg-mul-1N/A
times-fracN/A
metadata-evalN/A
metadata-evalN/A
*-lowering-*.f64N/A
metadata-evalN/A
/-lowering-/.f64N/A
distribute-frac-neg2N/A
atan-negN/A
remove-double-negN/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6470.9
Applied egg-rr70.9%
(FPCore (A B C)
:precision binary64
(if (<= A -9.8e+156)
(* 180.0 (/ (atan 0.0) PI))
(if (<= A 10600000.0)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(* -180.0 (/ (atan (/ A B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -9.8e+156) {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
} else if (A <= 10600000.0) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else {
tmp = -180.0 * (atan((A / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -9.8e+156) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else if (A <= 10600000.0) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else {
tmp = -180.0 * (Math.atan((A / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -9.8e+156: tmp = 180.0 * (math.atan(0.0) / math.pi) elif A <= 10600000.0: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) else: tmp = -180.0 * (math.atan((A / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -9.8e+156) tmp = Float64(180.0 * Float64(atan(0.0) / pi)); elseif (A <= 10600000.0) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); else tmp = Float64(-180.0 * Float64(atan(Float64(A / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -9.8e+156) tmp = 180.0 * (atan(0.0) / pi); elseif (A <= 10600000.0) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); else tmp = -180.0 * (atan((A / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -9.8e+156], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 10600000.0], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(-180.0 * N[(N[ArcTan[N[(A / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -9.8 \cdot 10^{+156}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{elif}\;A \leq 10600000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;-180 \cdot \frac{\tan^{-1} \left(\frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -9.79999999999999938e156Initial program 8.0%
Taylor expanded in C around inf
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
div0N/A
metadata-eval38.0
Simplified38.0%
if -9.79999999999999938e156 < A < 1.06e7Initial program 54.9%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6450.0
Simplified50.0%
Taylor expanded in A around 0
+-lowering-+.f64N/A
/-lowering-/.f6448.4
Simplified48.4%
if 1.06e7 < A Initial program 77.3%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6474.7
Simplified74.7%
Taylor expanded in A around inf
mul-1-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
neg-lowering-neg.f6469.9
Simplified69.9%
frac-2negN/A
associate-*r/N/A
neg-mul-1N/A
times-fracN/A
metadata-evalN/A
metadata-evalN/A
*-lowering-*.f64N/A
metadata-evalN/A
/-lowering-/.f64N/A
distribute-frac-neg2N/A
atan-negN/A
remove-double-negN/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6469.9
Applied egg-rr69.9%
(FPCore (A B C)
:precision binary64
(if (<= C -9.8e-116)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= C -2.1e-272)
(* -180.0 (/ (atan (/ A B)) PI))
(if (<= C 1.45e+105)
(* 180.0 (/ (atan 1.0) PI))
(* 180.0 (/ (atan 0.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -9.8e-116) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (C <= -2.1e-272) {
tmp = -180.0 * (atan((A / B)) / ((double) M_PI));
} else if (C <= 1.45e+105) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -9.8e-116) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (C <= -2.1e-272) {
tmp = -180.0 * (Math.atan((A / B)) / Math.PI);
} else if (C <= 1.45e+105) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -9.8e-116: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif C <= -2.1e-272: tmp = -180.0 * (math.atan((A / B)) / math.pi) elif C <= 1.45e+105: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(0.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -9.8e-116) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (C <= -2.1e-272) tmp = Float64(-180.0 * Float64(atan(Float64(A / B)) / pi)); elseif (C <= 1.45e+105) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(0.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -9.8e-116) tmp = 180.0 * (atan((C / B)) / pi); elseif (C <= -2.1e-272) tmp = -180.0 * (atan((A / B)) / pi); elseif (C <= 1.45e+105) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(0.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -9.8e-116], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -2.1e-272], N[(-180.0 * N[(N[ArcTan[N[(A / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.45e+105], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -9.8 \cdot 10^{-116}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -2.1 \cdot 10^{-272}:\\
\;\;\;\;-180 \cdot \frac{\tan^{-1} \left(\frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.45 \cdot 10^{+105}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\end{array}
\end{array}
if C < -9.79999999999999955e-116Initial program 73.4%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6470.3
Simplified70.3%
Taylor expanded in C around inf
/-lowering-/.f6460.1
Simplified60.1%
if -9.79999999999999955e-116 < C < -2.09999999999999987e-272Initial program 77.2%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6468.8
Simplified68.8%
Taylor expanded in A around inf
mul-1-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
neg-lowering-neg.f6454.5
Simplified54.5%
frac-2negN/A
associate-*r/N/A
neg-mul-1N/A
times-fracN/A
metadata-evalN/A
metadata-evalN/A
*-lowering-*.f64N/A
metadata-evalN/A
/-lowering-/.f64N/A
distribute-frac-neg2N/A
atan-negN/A
remove-double-negN/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6454.5
Applied egg-rr54.5%
if -2.09999999999999987e-272 < C < 1.45000000000000005e105Initial program 46.6%
Taylor expanded in B around -inf
Simplified31.6%
if 1.45000000000000005e105 < C Initial program 24.4%
Taylor expanded in C around inf
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
div0N/A
metadata-eval33.7
Simplified33.7%
(FPCore (A B C)
:precision binary64
(if (<= B -1.15e-19)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 5.2e+49)
(* -180.0 (/ (atan (/ A B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.15e-19) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 5.2e+49) {
tmp = -180.0 * (atan((A / 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 <= -1.15e-19) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 5.2e+49) {
tmp = -180.0 * (Math.atan((A / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.15e-19: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 5.2e+49: tmp = -180.0 * (math.atan((A / 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 <= -1.15e-19) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 5.2e+49) tmp = Float64(-180.0 * Float64(atan(Float64(A / 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 <= -1.15e-19) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 5.2e+49) tmp = -180.0 * (atan((A / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.15e-19], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.2e+49], N[(-180.0 * N[(N[ArcTan[N[(A / 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 -1.15 \cdot 10^{-19}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 5.2 \cdot 10^{+49}:\\
\;\;\;\;-180 \cdot \frac{\tan^{-1} \left(\frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.1499999999999999e-19Initial program 52.8%
Taylor expanded in B around -inf
Simplified49.1%
if -1.1499999999999999e-19 < B < 5.19999999999999977e49Initial program 59.4%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6452.7
Simplified52.7%
Taylor expanded in A around inf
mul-1-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
neg-lowering-neg.f6432.8
Simplified32.8%
frac-2negN/A
associate-*r/N/A
neg-mul-1N/A
times-fracN/A
metadata-evalN/A
metadata-evalN/A
*-lowering-*.f64N/A
metadata-evalN/A
/-lowering-/.f64N/A
distribute-frac-neg2N/A
atan-negN/A
remove-double-negN/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6432.8
Applied egg-rr32.8%
if 5.19999999999999977e49 < B Initial program 49.2%
Taylor expanded in B around inf
Simplified62.1%
(FPCore (A B C) :precision binary64 (if (<= C 1.3e+56) (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)) (* (/ 180.0 PI) (atan (/ B (* C -2.0))))))
double code(double A, double B, double C) {
double tmp;
if (C <= 1.3e+56) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((B / (C * -2.0)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 1.3e+56) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan((B / (C * -2.0)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 1.3e+56: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) else: tmp = (180.0 / math.pi) * math.atan((B / (C * -2.0))) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 1.3e+56) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(B / Float64(C * -2.0)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 1.3e+56) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); else tmp = (180.0 / pi) * atan((B / (C * -2.0))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 1.3e+56], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B / N[(C * -2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 1.3 \cdot 10^{+56}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B}{C \cdot -2}\right)\\
\end{array}
\end{array}
if C < 1.30000000000000005e56Initial program 64.6%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6462.1
Simplified62.1%
if 1.30000000000000005e56 < C Initial program 25.5%
Taylor expanded in A around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6423.8
Simplified23.8%
Taylor expanded in C around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6480.9
Simplified80.9%
associate-*r/N/A
*-rgt-identityN/A
times-fracN/A
/-rgt-identityN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f64N/A
atan-lowering-atan.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
div-invN/A
metadata-evalN/A
metadata-evalN/A
*-lowering-*.f64N/A
metadata-eval81.1
Applied egg-rr81.1%
(FPCore (A B C)
:precision binary64
(if (<= B -2.8e-102)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 3.8e-122)
(* 180.0 (/ (atan 0.0) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.8e-102) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 3.8e-122) {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2.8e-102) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 3.8e-122) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.8e-102: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 3.8e-122: tmp = 180.0 * (math.atan(0.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2.8e-102) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 3.8e-122) tmp = Float64(180.0 * Float64(atan(0.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2.8e-102) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 3.8e-122) tmp = 180.0 * (atan(0.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.8e-102], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.8e-122], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2.8 \cdot 10^{-102}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 3.8 \cdot 10^{-122}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.80000000000000013e-102Initial program 58.5%
Taylor expanded in B around -inf
Simplified44.9%
if -2.80000000000000013e-102 < B < 3.8000000000000001e-122Initial program 54.5%
Taylor expanded in C around inf
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
div0N/A
metadata-eval31.4
Simplified31.4%
if 3.8000000000000001e-122 < B Initial program 53.2%
Taylor expanded in B around inf
Simplified42.8%
(FPCore (A B C) :precision binary64 (if (<= B 3e-119) (* 180.0 (/ (atan 0.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= 3e-119) {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 3e-119) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 3e-119: tmp = 180.0 * (math.atan(0.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 3e-119) tmp = Float64(180.0 * Float64(atan(0.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 3e-119) tmp = 180.0 * (atan(0.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 3e-119], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 3 \cdot 10^{-119}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < 3.0000000000000002e-119Initial program 56.8%
Taylor expanded in C around inf
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
div0N/A
metadata-eval15.7
Simplified15.7%
if 3.0000000000000002e-119 < B Initial program 53.2%
Taylor expanded in B around inf
Simplified42.8%
(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 55.6%
Taylor expanded in B around inf
Simplified17.0%
herbie shell --seed 2024199
(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)))