
(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 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
(FPCore (A B C)
:precision binary64
(let* ((t_0
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
(if (or (<= t_0 -0.2) (not (<= t_0 0.0)))
(/ 180.0 (/ 1.0 (/ (atan (/ (- (- C A) (hypot (- A C) B)) B)) PI)))
(/ (* 180.0 (atan (* 0.5 (/ B A)))) (cbrt (pow PI 3.0))))))
double code(double A, double B, double C) {
double t_0 = (1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
double tmp;
if ((t_0 <= -0.2) || !(t_0 <= 0.0)) {
tmp = 180.0 / (1.0 / (atan((((C - A) - hypot((A - C), B)) / B)) / ((double) M_PI)));
} else {
tmp = (180.0 * atan((0.5 * (B / A)))) / cbrt(pow(((double) M_PI), 3.0));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))));
double tmp;
if ((t_0 <= -0.2) || !(t_0 <= 0.0)) {
tmp = 180.0 / (1.0 / (Math.atan((((C - A) - Math.hypot((A - C), B)) / B)) / Math.PI));
} else {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.cbrt(Math.pow(Math.PI, 3.0));
}
return tmp;
}
function code(A, B, C) t_0 = Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))) tmp = 0.0 if ((t_0 <= -0.2) || !(t_0 <= 0.0)) tmp = Float64(180.0 / Float64(1.0 / Float64(atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B)) / pi))); else tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / cbrt((pi ^ 3.0))); end return tmp end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, -0.2], N[Not[LessEqual[t$95$0, 0.0]], $MachinePrecision]], N[(180.0 / N[(1.0 / N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
\mathbf{if}\;t_0 \leq -0.2 \lor \neg \left(t_0 \leq 0\right):\\
\;\;\;\;\frac{180}{\frac{1}{\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}{\pi}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\sqrt[3]{{\pi}^{3}}}\\
\end{array}
\end{array}
if (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < -0.20000000000000001 or 0.0 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) Initial program 60.5%
Applied egg-rr87.6%
clear-num87.6%
inv-pow87.6%
associate--l-82.9%
Applied egg-rr82.9%
Simplified87.6%
if -0.20000000000000001 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < 0.0Initial program 15.0%
Taylor expanded in A around -inf 60.2%
associate-*r/60.2%
Simplified60.2%
associate-*r/60.3%
*-un-lft-identity60.3%
times-frac60.3%
metadata-eval60.3%
Applied egg-rr60.3%
rem-cbrt-cube60.3%
Applied egg-rr60.3%
Final simplification84.0%
(FPCore (A B C)
:precision binary64
(if (<= A -2.4e+184)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A -5.8e+90)
(* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI))
(if (<= A -7.4e+31)
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
(/ 180.0 (/ 1.0 (/ (atan (/ (- (- C A) (hypot (- A C) B)) B)) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.4e+184) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= -5.8e+90) {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
} else if (A <= -7.4e+31) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else {
tmp = 180.0 / (1.0 / (atan((((C - A) - hypot((A - C), B)) / B)) / ((double) M_PI)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.4e+184) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= -5.8e+90) {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
} else if (A <= -7.4e+31) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else {
tmp = 180.0 / (1.0 / (Math.atan((((C - A) - Math.hypot((A - C), B)) / B)) / Math.PI));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.4e+184: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= -5.8e+90: tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi) elif A <= -7.4e+31: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi else: tmp = 180.0 / (1.0 / (math.atan((((C - A) - math.hypot((A - C), B)) / B)) / math.pi)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.4e+184) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= -5.8e+90) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); elseif (A <= -7.4e+31) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); else tmp = Float64(180.0 / Float64(1.0 / Float64(atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B)) / pi))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.4e+184) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= -5.8e+90) tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); elseif (A <= -7.4e+31) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; else tmp = 180.0 / (1.0 / (atan((((C - A) - hypot((A - C), B)) / B)) / pi)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.4e+184], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -5.8e+90], 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], If[LessEqual[A, -7.4e+31], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 / N[(1.0 / N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.4 \cdot 10^{+184}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -5.8 \cdot 10^{+90}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq -7.4 \cdot 10^{+31}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{1}{\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}{\pi}}}\\
\end{array}
\end{array}
if A < -2.39999999999999997e184Initial program 9.1%
Taylor expanded in A around -inf 87.6%
associate-*r/87.6%
Simplified87.6%
if -2.39999999999999997e184 < A < -5.8000000000000003e90Initial program 40.0%
associate-*l/40.0%
*-lft-identity40.0%
+-commutative40.0%
unpow240.0%
unpow240.0%
hypot-def76.3%
Simplified76.3%
if -5.8000000000000003e90 < A < -7.3999999999999996e31Initial program 30.1%
Taylor expanded in A around -inf 79.1%
associate-*r/79.1%
Simplified79.1%
associate-*r/79.2%
*-un-lft-identity79.2%
times-frac79.2%
metadata-eval79.2%
Applied egg-rr79.2%
if -7.3999999999999996e31 < A Initial program 64.0%
Applied egg-rr84.0%
clear-num84.0%
inv-pow84.0%
associate--l-84.0%
Applied egg-rr84.0%
Simplified84.0%
Final simplification83.5%
(FPCore (A B C)
:precision binary64
(if (<= A -1.15e+186)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (or (<= A -1.7e+88) (not (<= A -1.6e+29)))
(* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI))
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.15e+186) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if ((A <= -1.7e+88) || !(A <= -1.6e+29)) {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
} else {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.15e+186) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if ((A <= -1.7e+88) || !(A <= -1.6e+29)) {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
} else {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.15e+186: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif (A <= -1.7e+88) or not (A <= -1.6e+29): tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi) else: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.15e+186) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif ((A <= -1.7e+88) || !(A <= -1.6e+29)) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.15e+186) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif ((A <= -1.7e+88) || ~((A <= -1.6e+29))) tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); else tmp = (180.0 * atan((0.5 * (B / A)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.15e+186], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[A, -1.7e+88], N[Not[LessEqual[A, -1.6e+29]], $MachinePrecision]], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.15 \cdot 10^{+186}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -1.7 \cdot 10^{+88} \lor \neg \left(A \leq -1.6 \cdot 10^{+29}\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.15000000000000007e186Initial program 9.1%
Taylor expanded in A around -inf 87.6%
associate-*r/87.6%
Simplified87.6%
if -1.15000000000000007e186 < A < -1.70000000000000002e88 or -1.59999999999999993e29 < A Initial program 61.3%
associate-*l/61.3%
*-lft-identity61.3%
+-commutative61.3%
unpow261.3%
unpow261.3%
hypot-def83.1%
Simplified83.1%
if -1.70000000000000002e88 < A < -1.59999999999999993e29Initial program 30.1%
Taylor expanded in A around -inf 79.1%
associate-*r/79.1%
Simplified79.1%
associate-*r/79.2%
*-un-lft-identity79.2%
times-frac79.2%
metadata-eval79.2%
Applied egg-rr79.2%
Final simplification83.5%
(FPCore (A B C)
:precision binary64
(if (<= A -2.8e+184)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A -4.8e+88)
(* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI))
(if (<= A -1.1e+32)
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
(/ 180.0 (/ PI (atan (/ (- (- C A) (hypot (- A C) B)) B))))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.8e+184) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= -4.8e+88) {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
} else if (A <= -1.1e+32) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else {
tmp = 180.0 / (((double) M_PI) / atan((((C - A) - hypot((A - C), B)) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.8e+184) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= -4.8e+88) {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
} else if (A <= -1.1e+32) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else {
tmp = 180.0 / (Math.PI / Math.atan((((C - A) - Math.hypot((A - C), B)) / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.8e+184: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= -4.8e+88: tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi) elif A <= -1.1e+32: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi else: tmp = 180.0 / (math.pi / math.atan((((C - A) - math.hypot((A - C), B)) / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.8e+184) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= -4.8e+88) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); elseif (A <= -1.1e+32) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.8e+184) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= -4.8e+88) tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); elseif (A <= -1.1e+32) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; else tmp = 180.0 / (pi / atan((((C - A) - hypot((A - C), B)) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.8e+184], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -4.8e+88], 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], If[LessEqual[A, -1.1e+32], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.8 \cdot 10^{+184}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -4.8 \cdot 10^{+88}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq -1.1 \cdot 10^{+32}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}}\\
\end{array}
\end{array}
if A < -2.7999999999999999e184Initial program 9.1%
Taylor expanded in A around -inf 87.6%
associate-*r/87.6%
Simplified87.6%
if -2.7999999999999999e184 < A < -4.7999999999999998e88Initial program 40.0%
associate-*l/40.0%
*-lft-identity40.0%
+-commutative40.0%
unpow240.0%
unpow240.0%
hypot-def76.3%
Simplified76.3%
if -4.7999999999999998e88 < A < -1.1e32Initial program 30.1%
Taylor expanded in A around -inf 79.1%
associate-*r/79.1%
Simplified79.1%
associate-*r/79.2%
*-un-lft-identity79.2%
times-frac79.2%
metadata-eval79.2%
Applied egg-rr79.2%
if -1.1e32 < A Initial program 64.0%
Applied egg-rr84.0%
Final simplification83.5%
(FPCore (A B C) :precision binary64 (if (<= A -1.52e+31) (* 180.0 (/ (atan (/ (* B 0.5) A)) PI)) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.52e+31) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.52e+31) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.52e+31: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) else: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.52e+31) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.52e+31) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); else tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.52e+31], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.52 \cdot 10^{+31}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.5200000000000001e31Initial program 24.6%
Taylor expanded in A around -inf 73.1%
associate-*r/73.1%
Simplified73.1%
if -1.5200000000000001e31 < A Initial program 64.0%
Simplified84.0%
Final simplification81.4%
(FPCore (A B C)
:precision binary64
(if (<= A -1.02e+32)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 1300000000000.0)
(/ 180.0 (/ PI (atan (/ (- C (hypot B C)) B))))
(* 180.0 (/ (atan (/ (- (- A) (hypot B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.02e+32) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 1300000000000.0) {
tmp = 180.0 / (((double) M_PI) / atan(((C - hypot(B, C)) / B)));
} else {
tmp = 180.0 * (atan(((-A - hypot(B, A)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.02e+32) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 1300000000000.0) {
tmp = 180.0 / (Math.PI / Math.atan(((C - Math.hypot(B, C)) / B)));
} else {
tmp = 180.0 * (Math.atan(((-A - Math.hypot(B, A)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.02e+32: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 1300000000000.0: tmp = 180.0 / (math.pi / math.atan(((C - math.hypot(B, C)) / B))) else: tmp = 180.0 * (math.atan(((-A - math.hypot(B, A)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.02e+32) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 1300000000000.0) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(C - hypot(B, C)) / B)))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-A) - hypot(B, A)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.02e+32) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 1300000000000.0) tmp = 180.0 / (pi / atan(((C - hypot(B, C)) / B))); else tmp = 180.0 * (atan(((-A - hypot(B, A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.02e+32], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1300000000000.0], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[((-A) - N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.02 \cdot 10^{+32}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1300000000000:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.0199999999999999e32Initial program 24.6%
Taylor expanded in A around -inf 73.1%
associate-*r/73.1%
Simplified73.1%
if -1.0199999999999999e32 < A < 1.3e12Initial program 57.1%
Applied egg-rr80.0%
Taylor expanded in A around 0 55.7%
unpow255.7%
unpow255.7%
hypot-def78.6%
Simplified78.6%
if 1.3e12 < A Initial program 79.0%
Taylor expanded in C around 0 77.7%
associate-*r/77.7%
mul-1-neg77.7%
+-commutative77.7%
unpow277.7%
unpow277.7%
hypot-def91.0%
Simplified91.0%
Final simplification80.2%
(FPCore (A B C)
:precision binary64
(if (<= A -7.2e+29)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 35000000000000.0)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(/ 180.0 (/ PI (atan (/ (- (+ B C) A) B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -7.2e+29) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 35000000000000.0) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((((B + C) - A) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -7.2e+29) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 35000000000000.0) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((((B + C) - A) / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -7.2e+29: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 35000000000000.0: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((((B + C) - A) / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -7.2e+29) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 35000000000000.0) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(B + C) - A) / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -7.2e+29) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 35000000000000.0) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = 180.0 / (pi / atan((((B + C) - A) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -7.2e+29], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 35000000000000.0], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(B + C), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -7.2 \cdot 10^{+29}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 35000000000000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}}\\
\end{array}
\end{array}
if A < -7.19999999999999952e29Initial program 24.6%
Taylor expanded in A around -inf 73.1%
associate-*r/73.1%
Simplified73.1%
if -7.19999999999999952e29 < A < 3.5e13Initial program 57.1%
Taylor expanded in A around 0 55.7%
unpow255.7%
unpow255.7%
hypot-def78.6%
Simplified78.6%
if 3.5e13 < A Initial program 79.0%
Applied egg-rr92.8%
Taylor expanded in B around -inf 82.7%
Final simplification78.2%
(FPCore (A B C)
:precision binary64
(if (<= A -7.7e+28)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 26000000000000.0)
(/ 180.0 (/ PI (atan (/ (- C (hypot B C)) B))))
(/ 180.0 (/ PI (atan (/ (- (+ B C) A) B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -7.7e+28) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 26000000000000.0) {
tmp = 180.0 / (((double) M_PI) / atan(((C - hypot(B, C)) / B)));
} else {
tmp = 180.0 / (((double) M_PI) / atan((((B + C) - A) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -7.7e+28) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 26000000000000.0) {
tmp = 180.0 / (Math.PI / Math.atan(((C - Math.hypot(B, C)) / B)));
} else {
tmp = 180.0 / (Math.PI / Math.atan((((B + C) - A) / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -7.7e+28: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 26000000000000.0: tmp = 180.0 / (math.pi / math.atan(((C - math.hypot(B, C)) / B))) else: tmp = 180.0 / (math.pi / math.atan((((B + C) - A) / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -7.7e+28) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 26000000000000.0) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(C - hypot(B, C)) / B)))); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(B + C) - A) / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -7.7e+28) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 26000000000000.0) tmp = 180.0 / (pi / atan(((C - hypot(B, C)) / B))); else tmp = 180.0 / (pi / atan((((B + C) - A) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -7.7e+28], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 26000000000000.0], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(B + C), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -7.7 \cdot 10^{+28}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 26000000000000:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}}\\
\end{array}
\end{array}
if A < -7.6999999999999997e28Initial program 24.6%
Taylor expanded in A around -inf 73.1%
associate-*r/73.1%
Simplified73.1%
if -7.6999999999999997e28 < A < 2.6e13Initial program 57.1%
Applied egg-rr80.0%
Taylor expanded in A around 0 55.7%
unpow255.7%
unpow255.7%
hypot-def78.6%
Simplified78.6%
if 2.6e13 < A Initial program 79.0%
Applied egg-rr92.8%
Taylor expanded in B around -inf 82.7%
Final simplification78.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* 2.0 (/ C B))) PI)))
(t_1 (* 180.0 (/ (atan (/ 0.0 B)) PI))))
(if (<= B -4.7e+20)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -9.5e-128)
t_0
(if (<= B -1.4e-215)
t_1
(if (<= B -1.45e-253)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= B -2.85e-288)
t_1
(if (<= B 1.15e-112) t_0 (* 180.0 (/ (atan -1.0) PI))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
double t_1 = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
double tmp;
if (B <= -4.7e+20) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -9.5e-128) {
tmp = t_0;
} else if (B <= -1.4e-215) {
tmp = t_1;
} else if (B <= -1.45e-253) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (B <= -2.85e-288) {
tmp = t_1;
} else if (B <= 1.15e-112) {
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((2.0 * (C / B))) / Math.PI);
double t_1 = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
double tmp;
if (B <= -4.7e+20) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -9.5e-128) {
tmp = t_0;
} else if (B <= -1.4e-215) {
tmp = t_1;
} else if (B <= -1.45e-253) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (B <= -2.85e-288) {
tmp = t_1;
} else if (B <= 1.15e-112) {
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((2.0 * (C / B))) / math.pi) t_1 = 180.0 * (math.atan((0.0 / B)) / math.pi) tmp = 0 if B <= -4.7e+20: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -9.5e-128: tmp = t_0 elif B <= -1.4e-215: tmp = t_1 elif B <= -1.45e-253: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif B <= -2.85e-288: tmp = t_1 elif B <= 1.15e-112: 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(2.0 * Float64(C / B))) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)) tmp = 0.0 if (B <= -4.7e+20) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -9.5e-128) tmp = t_0; elseif (B <= -1.4e-215) tmp = t_1; elseif (B <= -1.45e-253) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (B <= -2.85e-288) tmp = t_1; elseif (B <= 1.15e-112) 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((2.0 * (C / B))) / pi); t_1 = 180.0 * (atan((0.0 / B)) / pi); tmp = 0.0; if (B <= -4.7e+20) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -9.5e-128) tmp = t_0; elseif (B <= -1.4e-215) tmp = t_1; elseif (B <= -1.45e-253) tmp = 180.0 * (atan((C / B)) / pi); elseif (B <= -2.85e-288) tmp = t_1; elseif (B <= 1.15e-112) 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[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -4.7e+20], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -9.5e-128], t$95$0, If[LessEqual[B, -1.4e-215], t$95$1, If[LessEqual[B, -1.45e-253], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.85e-288], t$95$1, If[LessEqual[B, 1.15e-112], 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(2 \cdot \frac{C}{B}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -4.7 \cdot 10^{+20}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -9.5 \cdot 10^{-128}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -1.4 \cdot 10^{-215}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq -1.45 \cdot 10^{-253}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq -2.85 \cdot 10^{-288}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq 1.15 \cdot 10^{-112}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -4.7e20Initial program 43.8%
Taylor expanded in B around -inf 61.6%
if -4.7e20 < B < -9.50000000000000006e-128 or -2.8499999999999999e-288 < B < 1.14999999999999995e-112Initial program 66.4%
Taylor expanded in C around -inf 42.1%
if -9.50000000000000006e-128 < B < -1.39999999999999993e-215 or -1.4499999999999999e-253 < B < -2.8499999999999999e-288Initial program 41.6%
Taylor expanded in C around inf 50.3%
associate-*r/50.3%
distribute-rgt1-in50.3%
metadata-eval50.3%
mul0-lft50.3%
metadata-eval50.3%
Simplified50.3%
if -1.39999999999999993e-215 < B < -1.4499999999999999e-253Initial program 100.0%
Simplified100.0%
add-cube-cbrt100.0%
pow3100.0%
hypot-udef100.0%
unpow2100.0%
unpow2100.0%
+-commutative100.0%
unpow2100.0%
unpow2100.0%
hypot-def100.0%
Applied egg-rr100.0%
Taylor expanded in C around inf 100.0%
if 1.14999999999999995e-112 < B Initial program 53.1%
Taylor expanded in B around inf 55.8%
Final simplification53.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ 180.0 (/ PI (atan (/ (+ B C) B)))))
(t_1 (* 180.0 (/ (atan -1.0) PI))))
(if (<= A -0.19)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A -1.4e-51)
t_0
(if (<= A -1.65e-96)
t_1
(if (<= A -7.2e-184)
t_0
(if (<= A -3.4e-247)
t_1
(if (<= A 170000000.0)
t_0
(/ 180.0 (/ PI (atan (/ (* A -2.0) B))))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 / (((double) M_PI) / atan(((B + C) / B)));
double t_1 = 180.0 * (atan(-1.0) / ((double) M_PI));
double tmp;
if (A <= -0.19) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= -1.4e-51) {
tmp = t_0;
} else if (A <= -1.65e-96) {
tmp = t_1;
} else if (A <= -7.2e-184) {
tmp = t_0;
} else if (A <= -3.4e-247) {
tmp = t_1;
} else if (A <= 170000000.0) {
tmp = t_0;
} else {
tmp = 180.0 / (((double) M_PI) / atan(((A * -2.0) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 / (Math.PI / Math.atan(((B + C) / B)));
double t_1 = 180.0 * (Math.atan(-1.0) / Math.PI);
double tmp;
if (A <= -0.19) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= -1.4e-51) {
tmp = t_0;
} else if (A <= -1.65e-96) {
tmp = t_1;
} else if (A <= -7.2e-184) {
tmp = t_0;
} else if (A <= -3.4e-247) {
tmp = t_1;
} else if (A <= 170000000.0) {
tmp = t_0;
} else {
tmp = 180.0 / (Math.PI / Math.atan(((A * -2.0) / B)));
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 / (math.pi / math.atan(((B + C) / B))) t_1 = 180.0 * (math.atan(-1.0) / math.pi) tmp = 0 if A <= -0.19: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= -1.4e-51: tmp = t_0 elif A <= -1.65e-96: tmp = t_1 elif A <= -7.2e-184: tmp = t_0 elif A <= -3.4e-247: tmp = t_1 elif A <= 170000000.0: tmp = t_0 else: tmp = 180.0 / (math.pi / math.atan(((A * -2.0) / B))) return tmp
function code(A, B, C) t_0 = Float64(180.0 / Float64(pi / atan(Float64(Float64(B + C) / B)))) t_1 = Float64(180.0 * Float64(atan(-1.0) / pi)) tmp = 0.0 if (A <= -0.19) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= -1.4e-51) tmp = t_0; elseif (A <= -1.65e-96) tmp = t_1; elseif (A <= -7.2e-184) tmp = t_0; elseif (A <= -3.4e-247) tmp = t_1; elseif (A <= 170000000.0) tmp = t_0; else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(A * -2.0) / B)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 / (pi / atan(((B + C) / B))); t_1 = 180.0 * (atan(-1.0) / pi); tmp = 0.0; if (A <= -0.19) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= -1.4e-51) tmp = t_0; elseif (A <= -1.65e-96) tmp = t_1; elseif (A <= -7.2e-184) tmp = t_0; elseif (A <= -3.4e-247) tmp = t_1; elseif (A <= 170000000.0) tmp = t_0; else tmp = 180.0 / (pi / atan(((A * -2.0) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 / N[(Pi / N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -0.19], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.4e-51], t$95$0, If[LessEqual[A, -1.65e-96], t$95$1, If[LessEqual[A, -7.2e-184], t$95$0, If[LessEqual[A, -3.4e-247], t$95$1, If[LessEqual[A, 170000000.0], t$95$0, N[(180.0 / N[(Pi / N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{B + C}{B}\right)}}\\
t_1 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{if}\;A \leq -0.19:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -1.4 \cdot 10^{-51}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -1.65 \cdot 10^{-96}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq -7.2 \cdot 10^{-184}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -3.4 \cdot 10^{-247}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 170000000:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}}\\
\end{array}
\end{array}
if A < -0.19Initial program 27.0%
Taylor expanded in A around -inf 67.6%
associate-*r/67.6%
Simplified67.6%
if -0.19 < A < -1.4e-51 or -1.64999999999999995e-96 < A < -7.2000000000000002e-184 or -3.4000000000000001e-247 < A < 1.7e8Initial program 61.3%
Applied egg-rr82.3%
Taylor expanded in B around -inf 58.7%
Taylor expanded in A around 0 56.7%
+-commutative56.7%
Simplified56.7%
if -1.4e-51 < A < -1.64999999999999995e-96 or -7.2000000000000002e-184 < A < -3.4000000000000001e-247Initial program 48.7%
Taylor expanded in B around inf 53.3%
if 1.7e8 < A Initial program 76.8%
Applied egg-rr93.0%
Taylor expanded in A around inf 70.4%
*-commutative70.4%
Simplified70.4%
Final simplification62.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ 180.0 (/ PI (atan (/ (+ B C) B)))))
(t_1 (* 180.0 (/ (atan -1.0) PI))))
(if (<= A -0.00095)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A -3.4e-51)
t_0
(if (<= A -7.2e-99)
t_1
(if (<= A -1e-182)
t_0
(if (<= A -3.1e-247)
t_1
(if (<= A 2.7e-109)
t_0
(/ 180.0 (/ PI (atan (/ (- B A) B))))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 / (((double) M_PI) / atan(((B + C) / B)));
double t_1 = 180.0 * (atan(-1.0) / ((double) M_PI));
double tmp;
if (A <= -0.00095) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= -3.4e-51) {
tmp = t_0;
} else if (A <= -7.2e-99) {
tmp = t_1;
} else if (A <= -1e-182) {
tmp = t_0;
} else if (A <= -3.1e-247) {
tmp = t_1;
} else if (A <= 2.7e-109) {
tmp = t_0;
} else {
tmp = 180.0 / (((double) M_PI) / atan(((B - A) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 / (Math.PI / Math.atan(((B + C) / B)));
double t_1 = 180.0 * (Math.atan(-1.0) / Math.PI);
double tmp;
if (A <= -0.00095) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= -3.4e-51) {
tmp = t_0;
} else if (A <= -7.2e-99) {
tmp = t_1;
} else if (A <= -1e-182) {
tmp = t_0;
} else if (A <= -3.1e-247) {
tmp = t_1;
} else if (A <= 2.7e-109) {
tmp = t_0;
} else {
tmp = 180.0 / (Math.PI / Math.atan(((B - A) / B)));
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 / (math.pi / math.atan(((B + C) / B))) t_1 = 180.0 * (math.atan(-1.0) / math.pi) tmp = 0 if A <= -0.00095: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= -3.4e-51: tmp = t_0 elif A <= -7.2e-99: tmp = t_1 elif A <= -1e-182: tmp = t_0 elif A <= -3.1e-247: tmp = t_1 elif A <= 2.7e-109: tmp = t_0 else: tmp = 180.0 / (math.pi / math.atan(((B - A) / B))) return tmp
function code(A, B, C) t_0 = Float64(180.0 / Float64(pi / atan(Float64(Float64(B + C) / B)))) t_1 = Float64(180.0 * Float64(atan(-1.0) / pi)) tmp = 0.0 if (A <= -0.00095) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= -3.4e-51) tmp = t_0; elseif (A <= -7.2e-99) tmp = t_1; elseif (A <= -1e-182) tmp = t_0; elseif (A <= -3.1e-247) tmp = t_1; elseif (A <= 2.7e-109) tmp = t_0; else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(B - A) / B)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 / (pi / atan(((B + C) / B))); t_1 = 180.0 * (atan(-1.0) / pi); tmp = 0.0; if (A <= -0.00095) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= -3.4e-51) tmp = t_0; elseif (A <= -7.2e-99) tmp = t_1; elseif (A <= -1e-182) tmp = t_0; elseif (A <= -3.1e-247) tmp = t_1; elseif (A <= 2.7e-109) tmp = t_0; else tmp = 180.0 / (pi / atan(((B - A) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 / N[(Pi / N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -0.00095], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -3.4e-51], t$95$0, If[LessEqual[A, -7.2e-99], t$95$1, If[LessEqual[A, -1e-182], t$95$0, If[LessEqual[A, -3.1e-247], t$95$1, If[LessEqual[A, 2.7e-109], t$95$0, N[(180.0 / N[(Pi / N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{B + C}{B}\right)}}\\
t_1 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{if}\;A \leq -0.00095:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -3.4 \cdot 10^{-51}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -7.2 \cdot 10^{-99}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq -1 \cdot 10^{-182}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -3.1 \cdot 10^{-247}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 2.7 \cdot 10^{-109}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{B - A}{B}\right)}}\\
\end{array}
\end{array}
if A < -9.49999999999999998e-4Initial program 27.0%
Taylor expanded in A around -inf 67.6%
associate-*r/67.6%
Simplified67.6%
if -9.49999999999999998e-4 < A < -3.40000000000000003e-51 or -7.2000000000000001e-99 < A < -1e-182 or -3.10000000000000015e-247 < A < 2.7e-109Initial program 60.0%
Applied egg-rr81.7%
Taylor expanded in B around -inf 58.7%
Taylor expanded in A around 0 57.5%
+-commutative57.5%
Simplified57.5%
if -3.40000000000000003e-51 < A < -7.2000000000000001e-99 or -1e-182 < A < -3.10000000000000015e-247Initial program 48.7%
Taylor expanded in B around inf 53.3%
if 2.7e-109 < A Initial program 74.5%
Applied egg-rr91.1%
Taylor expanded in B around -inf 75.2%
Taylor expanded in C around 0 73.3%
Final simplification64.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ C B)) PI)))
(t_1 (* 180.0 (/ (atan (/ 0.0 B)) PI))))
(if (<= B -2.3e+20)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -6.2e-128)
t_0
(if (<= B -1.42e-213)
t_1
(if (<= B -7.2e-246)
t_0
(if (<= B -4.5e-287)
t_1
(if (<= B 7.4e-116) t_0 (* 180.0 (/ (atan -1.0) PI))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((C / B)) / ((double) M_PI));
double t_1 = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
double tmp;
if (B <= -2.3e+20) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -6.2e-128) {
tmp = t_0;
} else if (B <= -1.42e-213) {
tmp = t_1;
} else if (B <= -7.2e-246) {
tmp = t_0;
} else if (B <= -4.5e-287) {
tmp = t_1;
} else if (B <= 7.4e-116) {
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((C / B)) / Math.PI);
double t_1 = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
double tmp;
if (B <= -2.3e+20) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -6.2e-128) {
tmp = t_0;
} else if (B <= -1.42e-213) {
tmp = t_1;
} else if (B <= -7.2e-246) {
tmp = t_0;
} else if (B <= -4.5e-287) {
tmp = t_1;
} else if (B <= 7.4e-116) {
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((C / B)) / math.pi) t_1 = 180.0 * (math.atan((0.0 / B)) / math.pi) tmp = 0 if B <= -2.3e+20: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -6.2e-128: tmp = t_0 elif B <= -1.42e-213: tmp = t_1 elif B <= -7.2e-246: tmp = t_0 elif B <= -4.5e-287: tmp = t_1 elif B <= 7.4e-116: 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(C / B)) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)) tmp = 0.0 if (B <= -2.3e+20) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -6.2e-128) tmp = t_0; elseif (B <= -1.42e-213) tmp = t_1; elseif (B <= -7.2e-246) tmp = t_0; elseif (B <= -4.5e-287) tmp = t_1; elseif (B <= 7.4e-116) 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((C / B)) / pi); t_1 = 180.0 * (atan((0.0 / B)) / pi); tmp = 0.0; if (B <= -2.3e+20) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -6.2e-128) tmp = t_0; elseif (B <= -1.42e-213) tmp = t_1; elseif (B <= -7.2e-246) tmp = t_0; elseif (B <= -4.5e-287) tmp = t_1; elseif (B <= 7.4e-116) 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[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -2.3e+20], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -6.2e-128], t$95$0, If[LessEqual[B, -1.42e-213], t$95$1, If[LessEqual[B, -7.2e-246], t$95$0, If[LessEqual[B, -4.5e-287], t$95$1, If[LessEqual[B, 7.4e-116], 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{C}{B}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -2.3 \cdot 10^{+20}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -6.2 \cdot 10^{-128}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -1.42 \cdot 10^{-213}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq -7.2 \cdot 10^{-246}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -4.5 \cdot 10^{-287}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq 7.4 \cdot 10^{-116}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.3e20Initial program 43.8%
Taylor expanded in B around -inf 61.6%
if -2.3e20 < B < -6.20000000000000005e-128 or -1.42000000000000002e-213 < B < -7.2000000000000004e-246 or -4.50000000000000017e-287 < B < 7.4000000000000005e-116Initial program 68.6%
Simplified74.2%
add-cube-cbrt70.1%
pow370.1%
hypot-udef67.6%
unpow267.6%
unpow267.6%
+-commutative67.6%
unpow267.6%
unpow267.6%
hypot-def70.1%
Applied egg-rr70.1%
Taylor expanded in C around inf 45.8%
if -6.20000000000000005e-128 < B < -1.42000000000000002e-213 or -7.2000000000000004e-246 < B < -4.50000000000000017e-287Initial program 41.6%
Taylor expanded in C around inf 50.3%
associate-*r/50.3%
distribute-rgt1-in50.3%
metadata-eval50.3%
mul0-lft50.3%
metadata-eval50.3%
Simplified50.3%
if 7.4000000000000005e-116 < B Initial program 53.1%
Taylor expanded in B around inf 55.8%
Final simplification53.5%
(FPCore (A B C)
:precision binary64
(if (<= B -6.6e-259)
(* 180.0 (/ (atan (/ (- C (- A B)) B)) PI))
(if (<= B -1.15e-297)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (or (<= B 2.3e+21) (not (<= B 4.2e+59)))
(* 180.0 (/ (atan (/ (- C (+ B A)) B)) PI))
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -6.6e-259) {
tmp = 180.0 * (atan(((C - (A - B)) / B)) / ((double) M_PI));
} else if (B <= -1.15e-297) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if ((B <= 2.3e+21) || !(B <= 4.2e+59)) {
tmp = 180.0 * (atan(((C - (B + A)) / B)) / ((double) M_PI));
} else {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -6.6e-259) {
tmp = 180.0 * (Math.atan(((C - (A - B)) / B)) / Math.PI);
} else if (B <= -1.15e-297) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if ((B <= 2.3e+21) || !(B <= 4.2e+59)) {
tmp = 180.0 * (Math.atan(((C - (B + A)) / B)) / Math.PI);
} else {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -6.6e-259: tmp = 180.0 * (math.atan(((C - (A - B)) / B)) / math.pi) elif B <= -1.15e-297: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif (B <= 2.3e+21) or not (B <= 4.2e+59): tmp = 180.0 * (math.atan(((C - (B + A)) / B)) / math.pi) else: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (B <= -6.6e-259) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A - B)) / B)) / pi)); elseif (B <= -1.15e-297) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif ((B <= 2.3e+21) || !(B <= 4.2e+59)) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(B + A)) / B)) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -6.6e-259) tmp = 180.0 * (atan(((C - (A - B)) / B)) / pi); elseif (B <= -1.15e-297) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif ((B <= 2.3e+21) || ~((B <= 4.2e+59))) tmp = 180.0 * (atan(((C - (B + A)) / B)) / pi); else tmp = (180.0 * atan((0.5 * (B / A)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -6.6e-259], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A - B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.15e-297], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, 2.3e+21], N[Not[LessEqual[B, 4.2e+59]], $MachinePrecision]], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -6.6 \cdot 10^{-259}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A - B\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq -1.15 \cdot 10^{-297}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.3 \cdot 10^{+21} \lor \neg \left(B \leq 4.2 \cdot 10^{+59}\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\end{array}
\end{array}
if B < -6.6e-259Initial program 52.5%
Simplified74.9%
Taylor expanded in B around -inf 68.3%
neg-mul-168.3%
unsub-neg68.3%
Simplified68.3%
if -6.6e-259 < B < -1.15e-297Initial program 51.6%
Taylor expanded in A around -inf 87.9%
associate-*r/87.9%
Simplified87.9%
if -1.15e-297 < B < 2.3e21 or 4.19999999999999968e59 < B Initial program 58.9%
Simplified77.7%
Taylor expanded in B around inf 73.1%
+-commutative73.1%
Simplified73.1%
if 2.3e21 < B < 4.19999999999999968e59Initial program 15.8%
Taylor expanded in A around -inf 65.3%
associate-*r/65.3%
Simplified65.3%
associate-*r/65.5%
*-un-lft-identity65.5%
times-frac65.5%
metadata-eval65.5%
Applied egg-rr65.5%
Final simplification71.2%
(FPCore (A B C)
:precision binary64
(if (<= B -4.9e-259)
(/ 180.0 (/ PI (atan (/ (- (+ B C) A) B))))
(if (<= B -1.48e-297)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (or (<= B 1.15e+20) (not (<= B 4.2e+59)))
(* 180.0 (/ (atan (/ (- C (+ B A)) B)) PI))
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -4.9e-259) {
tmp = 180.0 / (((double) M_PI) / atan((((B + C) - A) / B)));
} else if (B <= -1.48e-297) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if ((B <= 1.15e+20) || !(B <= 4.2e+59)) {
tmp = 180.0 * (atan(((C - (B + A)) / B)) / ((double) M_PI));
} else {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -4.9e-259) {
tmp = 180.0 / (Math.PI / Math.atan((((B + C) - A) / B)));
} else if (B <= -1.48e-297) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if ((B <= 1.15e+20) || !(B <= 4.2e+59)) {
tmp = 180.0 * (Math.atan(((C - (B + A)) / B)) / Math.PI);
} else {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -4.9e-259: tmp = 180.0 / (math.pi / math.atan((((B + C) - A) / B))) elif B <= -1.48e-297: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif (B <= 1.15e+20) or not (B <= 4.2e+59): tmp = 180.0 * (math.atan(((C - (B + A)) / B)) / math.pi) else: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (B <= -4.9e-259) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(B + C) - A) / B)))); elseif (B <= -1.48e-297) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif ((B <= 1.15e+20) || !(B <= 4.2e+59)) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(B + A)) / B)) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -4.9e-259) tmp = 180.0 / (pi / atan((((B + C) - A) / B))); elseif (B <= -1.48e-297) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif ((B <= 1.15e+20) || ~((B <= 4.2e+59))) tmp = 180.0 * (atan(((C - (B + A)) / B)) / pi); else tmp = (180.0 * atan((0.5 * (B / A)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -4.9e-259], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(B + C), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.48e-297], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, 1.15e+20], N[Not[LessEqual[B, 4.2e+59]], $MachinePrecision]], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -4.9 \cdot 10^{-259}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}}\\
\mathbf{elif}\;B \leq -1.48 \cdot 10^{-297}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.15 \cdot 10^{+20} \lor \neg \left(B \leq 4.2 \cdot 10^{+59}\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\end{array}
\end{array}
if B < -4.90000000000000023e-259Initial program 52.5%
Applied egg-rr77.9%
Taylor expanded in B around -inf 68.3%
if -4.90000000000000023e-259 < B < -1.4799999999999999e-297Initial program 51.6%
Taylor expanded in A around -inf 87.9%
associate-*r/87.9%
Simplified87.9%
if -1.4799999999999999e-297 < B < 1.15e20 or 4.19999999999999968e59 < B Initial program 58.9%
Simplified77.7%
Taylor expanded in B around inf 73.1%
+-commutative73.1%
Simplified73.1%
if 1.15e20 < B < 4.19999999999999968e59Initial program 15.8%
Taylor expanded in A around -inf 65.3%
associate-*r/65.3%
Simplified65.3%
associate-*r/65.5%
*-un-lft-identity65.5%
times-frac65.5%
metadata-eval65.5%
Applied egg-rr65.5%
Final simplification71.2%
(FPCore (A B C)
:precision binary64
(if (<= A -1.6e+31)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (or (<= A -4.6e-81) (not (<= A -1.18e-176)))
(* 180.0 (/ (atan (/ (- C (+ B A)) B)) PI))
(/ 180.0 (/ PI (atan (/ (+ B C) B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.6e+31) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if ((A <= -4.6e-81) || !(A <= -1.18e-176)) {
tmp = 180.0 * (atan(((C - (B + A)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan(((B + C) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.6e+31) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if ((A <= -4.6e-81) || !(A <= -1.18e-176)) {
tmp = 180.0 * (Math.atan(((C - (B + A)) / B)) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan(((B + C) / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.6e+31: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif (A <= -4.6e-81) or not (A <= -1.18e-176): tmp = 180.0 * (math.atan(((C - (B + A)) / B)) / math.pi) else: tmp = 180.0 / (math.pi / math.atan(((B + C) / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.6e+31) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif ((A <= -4.6e-81) || !(A <= -1.18e-176)) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(B + A)) / B)) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(B + C) / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.6e+31) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif ((A <= -4.6e-81) || ~((A <= -1.18e-176))) tmp = 180.0 * (atan(((C - (B + A)) / B)) / pi); else tmp = 180.0 / (pi / atan(((B + C) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.6e+31], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[A, -4.6e-81], N[Not[LessEqual[A, -1.18e-176]], $MachinePrecision]], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.6 \cdot 10^{+31}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -4.6 \cdot 10^{-81} \lor \neg \left(A \leq -1.18 \cdot 10^{-176}\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{B + C}{B}\right)}}\\
\end{array}
\end{array}
if A < -1.6e31Initial program 24.6%
Taylor expanded in A around -inf 73.1%
associate-*r/73.1%
Simplified73.1%
if -1.6e31 < A < -4.59999999999999982e-81 or -1.18e-176 < A Initial program 64.9%
Simplified84.4%
Taylor expanded in B around inf 65.9%
+-commutative65.9%
Simplified65.9%
if -4.59999999999999982e-81 < A < -1.18e-176Initial program 56.5%
Applied egg-rr80.8%
Taylor expanded in B around -inf 73.1%
Taylor expanded in A around 0 73.1%
+-commutative73.1%
Simplified73.1%
Final simplification68.2%
(FPCore (A B C)
:precision binary64
(if (<= B -2.4e+38)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -4.5e-301)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= B 1.16e-112)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.4e+38) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -4.5e-301) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (B <= 1.16e-112) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2.4e+38) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -4.5e-301) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (B <= 1.16e-112) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.4e+38: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -4.5e-301: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif B <= 1.16e-112: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2.4e+38) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -4.5e-301) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (B <= 1.16e-112) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2.4e+38) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -4.5e-301) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (B <= 1.16e-112) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.4e+38], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -4.5e-301], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.16e-112], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2.4 \cdot 10^{+38}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -4.5 \cdot 10^{-301}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.16 \cdot 10^{-112}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.40000000000000017e38Initial program 44.7%
Taylor expanded in B around -inf 66.0%
if -2.40000000000000017e38 < B < -4.5000000000000002e-301Initial program 58.2%
Taylor expanded in A around -inf 43.5%
associate-*r/43.5%
Simplified43.5%
if -4.5000000000000002e-301 < B < 1.16000000000000002e-112Initial program 63.1%
Taylor expanded in C around -inf 42.2%
if 1.16000000000000002e-112 < B Initial program 53.1%
Taylor expanded in B around inf 55.8%
Final simplification52.3%
(FPCore (A B C)
:precision binary64
(if (<= B -5.9e-128)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 4.9e-119)
(* 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 <= -5.9e-128) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 4.9e-119) {
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 <= -5.9e-128) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 4.9e-119) {
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 <= -5.9e-128: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 4.9e-119: 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 <= -5.9e-128) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 4.9e-119) 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 <= -5.9e-128) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 4.9e-119) 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, -5.9e-128], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.9e-119], 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 -5.9 \cdot 10^{-128}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 4.9 \cdot 10^{-119}:\\
\;\;\;\;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 < -5.90000000000000033e-128Initial program 52.6%
Taylor expanded in B around -inf 49.6%
if -5.90000000000000033e-128 < B < 4.9e-119Initial program 57.6%
Taylor expanded in C around inf 30.3%
associate-*r/30.3%
distribute-rgt1-in30.3%
metadata-eval30.3%
mul0-lft30.3%
metadata-eval30.3%
Simplified30.3%
if 4.9e-119 < B Initial program 53.6%
Taylor expanded in B around inf 55.4%
Final simplification46.0%
(FPCore (A B C) :precision binary64 (if (<= B -5e-310) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5e-310) {
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 <= -5e-310) {
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 <= -5e-310: 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 <= -5e-310) 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 <= -5e-310) 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, -5e-310], 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 -5 \cdot 10^{-310}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -4.999999999999985e-310Initial program 53.5%
Taylor expanded in B around -inf 38.6%
if -4.999999999999985e-310 < B Initial program 55.3%
Taylor expanded in B around inf 43.4%
Final simplification41.1%
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan -1.0) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(-1.0) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(-1.0) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(-1.0) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(-1.0) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(-1.0) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} -1}{\pi}
\end{array}
Initial program 54.5%
Taylor expanded in B around inf 23.3%
Final simplification23.3%
herbie shell --seed 2023320
(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)))