
(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.5) (not (<= t_0 0.0)))
(* (atan (/ (- (- C A) (hypot B (- C A))) B)) (/ 180.0 PI))
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A)))))))
double code(double A, double B, double C) {
double t_0 = (1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
double tmp;
if ((t_0 <= -0.5) || !(t_0 <= 0.0)) {
tmp = atan((((C - A) - hypot(B, (C - A))) / B)) * (180.0 / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))));
double tmp;
if ((t_0 <= -0.5) || !(t_0 <= 0.0)) {
tmp = Math.atan((((C - A) - Math.hypot(B, (C - A))) / B)) * (180.0 / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
}
return tmp;
}
def code(A, B, C): t_0 = (1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))) tmp = 0 if (t_0 <= -0.5) or not (t_0 <= 0.0): tmp = math.atan((((C - A) - math.hypot(B, (C - A))) / B)) * (180.0 / math.pi) else: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) return tmp
function code(A, B, C) t_0 = Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))) tmp = 0.0 if ((t_0 <= -0.5) || !(t_0 <= 0.0)) tmp = Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(C - A))) / B)) * Float64(180.0 / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))); tmp = 0.0; if ((t_0 <= -0.5) || ~((t_0 <= 0.0))) tmp = atan((((C - A) - hypot(B, (C - A))) / B)) * (180.0 / pi); else tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, -0.5], N[Not[LessEqual[t$95$0, 0.0]], $MachinePrecision]], N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(C - A), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
\mathbf{if}\;t_0 \leq -0.5 \lor \neg \left(t_0 \leq 0\right):\\
\;\;\;\;\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\end{array}
\end{array}
if (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < -0.5 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.3%
associate-*r/60.3%
associate-*l/60.4%
*-commutative60.4%
Simplified87.3%
if -0.5 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < 0.0Initial program 20.4%
associate-*r/20.4%
associate-*l/20.4%
*-commutative20.4%
Simplified20.4%
Taylor expanded in B around 0 99.1%
associate-*r/99.1%
Simplified99.1%
Final simplification89.4%
(FPCore (A B C)
:precision binary64
(if (<= C -3.6e-110)
(* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B)))
(if (<= C -3.4e-166)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= C 1050000000.0)
(* (/ 180.0 PI) (atan (/ (- (- A) (hypot A B)) B)))
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -3.6e-110) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / B));
} else if (C <= -3.4e-166) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (C <= 1050000000.0) {
tmp = (180.0 / ((double) M_PI)) * atan(((-A - hypot(A, B)) / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -3.6e-110) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / B));
} else if (C <= -3.4e-166) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (C <= 1050000000.0) {
tmp = (180.0 / Math.PI) * Math.atan(((-A - Math.hypot(A, B)) / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -3.6e-110: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / B)) elif C <= -3.4e-166: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif C <= 1050000000.0: tmp = (180.0 / math.pi) * math.atan(((-A - math.hypot(A, B)) / B)) else: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -3.6e-110) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / B))); elseif (C <= -3.4e-166) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (C <= 1050000000.0) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(Float64(-A) - hypot(A, B)) / B))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -3.6e-110) tmp = (180.0 / pi) * atan(((C - hypot(B, C)) / B)); elseif (C <= -3.4e-166) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (C <= 1050000000.0) tmp = (180.0 / pi) * atan(((-A - hypot(A, B)) / B)); else tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -3.6e-110], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -3.4e-166], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1050000000.0], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[((-A) - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -3.6 \cdot 10^{-110}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
\mathbf{elif}\;C \leq -3.4 \cdot 10^{-166}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;C \leq 1050000000:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(A, B\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\end{array}
\end{array}
if C < -3.59999999999999995e-110Initial program 78.2%
associate-*r/78.2%
associate-*l/78.2%
*-commutative78.2%
Simplified94.3%
Taylor expanded in A around 0 73.3%
unpow273.3%
unpow273.3%
hypot-def87.0%
Simplified87.0%
if -3.59999999999999995e-110 < C < -3.3999999999999997e-166Initial program 36.6%
associate-*r/36.6%
associate-*l/36.6%
*-commutative36.6%
Simplified36.5%
Taylor expanded in A around -inf 76.5%
if -3.3999999999999997e-166 < C < 1.05e9Initial program 52.5%
associate-*r/52.5%
associate-*l/52.5%
*-commutative52.5%
Simplified79.8%
Taylor expanded in C around 0 50.6%
mul-1-neg50.6%
+-commutative50.6%
unpow250.6%
unpow250.6%
hypot-def78.0%
Simplified78.0%
if 1.05e9 < C Initial program 23.2%
associate-*r/23.2%
associate-*l/23.2%
*-commutative23.2%
Simplified51.5%
Taylor expanded in B around 0 79.1%
associate-*r/79.1%
Simplified79.1%
Final simplification81.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B)))))
(if (<= C -3.6e-110)
t_0
(if (<= C -3.4e-166)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= C 105000000.0)
t_0
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A)))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / B));
double tmp;
if (C <= -3.6e-110) {
tmp = t_0;
} else if (C <= -3.4e-166) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (C <= 105000000.0) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / B));
double tmp;
if (C <= -3.6e-110) {
tmp = t_0;
} else if (C <= -3.4e-166) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (C <= 105000000.0) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / B)) tmp = 0 if C <= -3.6e-110: tmp = t_0 elif C <= -3.4e-166: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif C <= 105000000.0: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / B))) tmp = 0.0 if (C <= -3.6e-110) tmp = t_0; elseif (C <= -3.4e-166) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (C <= 105000000.0) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan(((C - hypot(B, C)) / B)); tmp = 0.0; if (C <= -3.6e-110) tmp = t_0; elseif (C <= -3.4e-166) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (C <= 105000000.0) tmp = t_0; else tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -3.6e-110], t$95$0, If[LessEqual[C, -3.4e-166], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 105000000.0], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
\mathbf{if}\;C \leq -3.6 \cdot 10^{-110}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq -3.4 \cdot 10^{-166}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;C \leq 105000000:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\end{array}
\end{array}
if C < -3.59999999999999995e-110 or -3.3999999999999997e-166 < C < 1.05e8Initial program 65.9%
associate-*r/65.9%
associate-*l/65.9%
*-commutative65.9%
Simplified87.3%
Taylor expanded in A around 0 56.9%
unpow256.9%
unpow256.9%
hypot-def76.5%
Simplified76.5%
if -3.59999999999999995e-110 < C < -3.3999999999999997e-166Initial program 36.6%
associate-*r/36.6%
associate-*l/36.6%
*-commutative36.6%
Simplified36.5%
Taylor expanded in A around -inf 76.5%
if 1.05e8 < C Initial program 23.2%
associate-*r/23.2%
associate-*l/23.2%
*-commutative23.2%
Simplified51.5%
Taylor expanded in B around 0 79.1%
associate-*r/79.1%
Simplified79.1%
Final simplification77.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (* B 0.5) A)) PI)))
(t_1 (* (/ 180.0 PI) (atan 1.0))))
(if (<= C -3800.0)
(/ (* 180.0 (atan (/ C B))) PI)
(if (<= C -4.1e-275)
t_0
(if (<= C 1.3e-272)
t_1
(if (<= C 9.5e-168)
t_0
(if (<= C 5.4e-115)
(* (/ 180.0 PI) (atan -1.0))
(if (or (<= C 3.8e-56) (not (<= C 62000000.0)))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
t_1))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
double t_1 = (180.0 / ((double) M_PI)) * atan(1.0);
double tmp;
if (C <= -3800.0) {
tmp = (180.0 * atan((C / B))) / ((double) M_PI);
} else if (C <= -4.1e-275) {
tmp = t_0;
} else if (C <= 1.3e-272) {
tmp = t_1;
} else if (C <= 9.5e-168) {
tmp = t_0;
} else if (C <= 5.4e-115) {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
} else if ((C <= 3.8e-56) || !(C <= 62000000.0)) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
double t_1 = (180.0 / Math.PI) * Math.atan(1.0);
double tmp;
if (C <= -3800.0) {
tmp = (180.0 * Math.atan((C / B))) / Math.PI;
} else if (C <= -4.1e-275) {
tmp = t_0;
} else if (C <= 1.3e-272) {
tmp = t_1;
} else if (C <= 9.5e-168) {
tmp = t_0;
} else if (C <= 5.4e-115) {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
} else if ((C <= 3.8e-56) || !(C <= 62000000.0)) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else {
tmp = t_1;
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) t_1 = (180.0 / math.pi) * math.atan(1.0) tmp = 0 if C <= -3800.0: tmp = (180.0 * math.atan((C / B))) / math.pi elif C <= -4.1e-275: tmp = t_0 elif C <= 1.3e-272: tmp = t_1 elif C <= 9.5e-168: tmp = t_0 elif C <= 5.4e-115: tmp = (180.0 / math.pi) * math.atan(-1.0) elif (C <= 3.8e-56) or not (C <= 62000000.0): tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) else: tmp = t_1 return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)) t_1 = Float64(Float64(180.0 / pi) * atan(1.0)) tmp = 0.0 if (C <= -3800.0) tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi); elseif (C <= -4.1e-275) tmp = t_0; elseif (C <= 1.3e-272) tmp = t_1; elseif (C <= 9.5e-168) tmp = t_0; elseif (C <= 5.4e-115) tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); elseif ((C <= 3.8e-56) || !(C <= 62000000.0)) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); else tmp = t_1; end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((B * 0.5) / A)) / pi); t_1 = (180.0 / pi) * atan(1.0); tmp = 0.0; if (C <= -3800.0) tmp = (180.0 * atan((C / B))) / pi; elseif (C <= -4.1e-275) tmp = t_0; elseif (C <= 1.3e-272) tmp = t_1; elseif (C <= 9.5e-168) tmp = t_0; elseif (C <= 5.4e-115) tmp = (180.0 / pi) * atan(-1.0); elseif ((C <= 3.8e-56) || ~((C <= 62000000.0))) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); else tmp = t_1; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -3800.0], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, -4.1e-275], t$95$0, If[LessEqual[C, 1.3e-272], t$95$1, If[LessEqual[C, 9.5e-168], t$95$0, If[LessEqual[C, 5.4e-115], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[C, 3.8e-56], N[Not[LessEqual[C, 62000000.0]], $MachinePrecision]], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
t_1 := \frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{if}\;C \leq -3800:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -4.1 \cdot 10^{-275}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 1.3 \cdot 10^{-272}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;C \leq 9.5 \cdot 10^{-168}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 5.4 \cdot 10^{-115}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\mathbf{elif}\;C \leq 3.8 \cdot 10^{-56} \lor \neg \left(C \leq 62000000\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if C < -3800Initial program 85.4%
associate-*r/85.4%
unpow285.4%
Simplified85.4%
*-commutative85.4%
+-commutative85.4%
unpow285.4%
hypot-udef98.2%
associate--r+97.2%
div-inv97.2%
div-sub97.2%
frac-sub71.5%
Applied egg-rr71.5%
Taylor expanded in B around -inf 65.9%
unpow265.9%
associate-*r*65.9%
distribute-rgt-out65.9%
mul-1-neg65.9%
cancel-sign-sub-inv65.9%
metadata-eval65.9%
*-lft-identity65.9%
+-commutative65.9%
mul-1-neg65.9%
sub-neg65.9%
Simplified65.9%
Taylor expanded in C around inf 70.8%
if -3800 < C < -4.09999999999999975e-275 or 1.29999999999999996e-272 < C < 9.49999999999999918e-168Initial program 53.4%
associate-*r/53.4%
associate-*l/53.4%
*-commutative53.4%
Simplified68.5%
Taylor expanded in B around 0 24.4%
unpow224.4%
Simplified24.4%
Taylor expanded in C around -inf 42.2%
associate-*r/42.2%
mul-1-neg42.2%
sub-neg42.2%
Simplified42.2%
Taylor expanded in A around inf 47.7%
associate-*r/47.7%
*-commutative47.7%
Simplified47.7%
if -4.09999999999999975e-275 < C < 1.29999999999999996e-272 or 3.8000000000000002e-56 < C < 6.2e7Initial program 54.1%
associate-*r/54.0%
associate-*l/54.1%
*-commutative54.1%
Simplified93.9%
Taylor expanded in B around -inf 49.5%
if 9.49999999999999918e-168 < C < 5.4e-115Initial program 32.3%
associate-*r/32.3%
associate-*l/32.3%
*-commutative32.3%
Simplified100.0%
Taylor expanded in B around inf 70.1%
if 5.4e-115 < C < 3.8000000000000002e-56 or 6.2e7 < C Initial program 27.2%
associate-*r/27.2%
associate-*l/27.2%
*-commutative27.2%
Simplified53.3%
Taylor expanded in B around 0 53.5%
unpow253.5%
Simplified53.5%
Taylor expanded in C around -inf 74.6%
associate-*r/74.7%
mul-1-neg74.7%
sub-neg74.7%
Simplified74.7%
Taylor expanded in A around 0 66.1%
Final simplification60.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (* 0.5 (/ B A)))))
(t_1 (* (/ 180.0 PI) (atan 1.0))))
(if (<= C -2550.0)
(/ (* 180.0 (atan (/ C B))) PI)
(if (<= C -3.1e-275)
t_0
(if (<= C 5.2e-272)
t_1
(if (<= C 1e-168)
t_0
(if (<= C 3.2e-115)
(* (/ 180.0 PI) (atan -1.0))
(if (or (<= C 1.52e-55) (not (<= C 4500.0)))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
t_1))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
double t_1 = (180.0 / ((double) M_PI)) * atan(1.0);
double tmp;
if (C <= -2550.0) {
tmp = (180.0 * atan((C / B))) / ((double) M_PI);
} else if (C <= -3.1e-275) {
tmp = t_0;
} else if (C <= 5.2e-272) {
tmp = t_1;
} else if (C <= 1e-168) {
tmp = t_0;
} else if (C <= 3.2e-115) {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
} else if ((C <= 1.52e-55) || !(C <= 4500.0)) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
double t_1 = (180.0 / Math.PI) * Math.atan(1.0);
double tmp;
if (C <= -2550.0) {
tmp = (180.0 * Math.atan((C / B))) / Math.PI;
} else if (C <= -3.1e-275) {
tmp = t_0;
} else if (C <= 5.2e-272) {
tmp = t_1;
} else if (C <= 1e-168) {
tmp = t_0;
} else if (C <= 3.2e-115) {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
} else if ((C <= 1.52e-55) || !(C <= 4500.0)) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else {
tmp = t_1;
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan((0.5 * (B / A))) t_1 = (180.0 / math.pi) * math.atan(1.0) tmp = 0 if C <= -2550.0: tmp = (180.0 * math.atan((C / B))) / math.pi elif C <= -3.1e-275: tmp = t_0 elif C <= 5.2e-272: tmp = t_1 elif C <= 1e-168: tmp = t_0 elif C <= 3.2e-115: tmp = (180.0 / math.pi) * math.atan(-1.0) elif (C <= 1.52e-55) or not (C <= 4500.0): tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) else: tmp = t_1 return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))) t_1 = Float64(Float64(180.0 / pi) * atan(1.0)) tmp = 0.0 if (C <= -2550.0) tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi); elseif (C <= -3.1e-275) tmp = t_0; elseif (C <= 5.2e-272) tmp = t_1; elseif (C <= 1e-168) tmp = t_0; elseif (C <= 3.2e-115) tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); elseif ((C <= 1.52e-55) || !(C <= 4500.0)) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); else tmp = t_1; end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan((0.5 * (B / A))); t_1 = (180.0 / pi) * atan(1.0); tmp = 0.0; if (C <= -2550.0) tmp = (180.0 * atan((C / B))) / pi; elseif (C <= -3.1e-275) tmp = t_0; elseif (C <= 5.2e-272) tmp = t_1; elseif (C <= 1e-168) tmp = t_0; elseif (C <= 3.2e-115) tmp = (180.0 / pi) * atan(-1.0); elseif ((C <= 1.52e-55) || ~((C <= 4500.0))) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); else tmp = t_1; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -2550.0], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, -3.1e-275], t$95$0, If[LessEqual[C, 5.2e-272], t$95$1, If[LessEqual[C, 1e-168], t$95$0, If[LessEqual[C, 3.2e-115], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[C, 1.52e-55], N[Not[LessEqual[C, 4500.0]], $MachinePrecision]], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
t_1 := \frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{if}\;C \leq -2550:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -3.1 \cdot 10^{-275}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 5.2 \cdot 10^{-272}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;C \leq 10^{-168}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 3.2 \cdot 10^{-115}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\mathbf{elif}\;C \leq 1.52 \cdot 10^{-55} \lor \neg \left(C \leq 4500\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if C < -2550Initial program 85.4%
associate-*r/85.4%
unpow285.4%
Simplified85.4%
*-commutative85.4%
+-commutative85.4%
unpow285.4%
hypot-udef98.2%
associate--r+97.2%
div-inv97.2%
div-sub97.2%
frac-sub71.5%
Applied egg-rr71.5%
Taylor expanded in B around -inf 65.9%
unpow265.9%
associate-*r*65.9%
distribute-rgt-out65.9%
mul-1-neg65.9%
cancel-sign-sub-inv65.9%
metadata-eval65.9%
*-lft-identity65.9%
+-commutative65.9%
mul-1-neg65.9%
sub-neg65.9%
Simplified65.9%
Taylor expanded in C around inf 70.8%
if -2550 < C < -3.1e-275 or 5.19999999999999983e-272 < C < 1e-168Initial program 53.4%
associate-*r/53.4%
associate-*l/53.4%
*-commutative53.4%
Simplified68.5%
Taylor expanded in A around -inf 47.8%
if -3.1e-275 < C < 5.19999999999999983e-272 or 1.5200000000000001e-55 < C < 4500Initial program 54.1%
associate-*r/54.0%
associate-*l/54.1%
*-commutative54.1%
Simplified93.9%
Taylor expanded in B around -inf 49.5%
if 1e-168 < C < 3.2e-115Initial program 32.3%
associate-*r/32.3%
associate-*l/32.3%
*-commutative32.3%
Simplified100.0%
Taylor expanded in B around inf 70.1%
if 3.2e-115 < C < 1.5200000000000001e-55 or 4500 < C Initial program 27.2%
associate-*r/27.2%
associate-*l/27.2%
*-commutative27.2%
Simplified53.3%
Taylor expanded in B around 0 53.5%
unpow253.5%
Simplified53.5%
Taylor expanded in C around -inf 74.6%
associate-*r/74.7%
mul-1-neg74.7%
sub-neg74.7%
Simplified74.7%
Taylor expanded in A around 0 66.1%
Final simplification60.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (* 0.5 (/ B A)))))
(t_1 (* (/ 180.0 PI) (atan 1.0))))
(if (<= C -3500.0)
(/ (* 180.0 (atan (/ C B))) PI)
(if (<= C -3.7e-275)
t_0
(if (<= C 1.12e-272)
t_1
(if (<= C 8.5e-172)
t_0
(if (<= C 1.9e-115)
(* (/ 180.0 PI) (atan -1.0))
(if (or (<= C 5.2e-56) (not (<= C 1400000.0)))
(* (/ 180.0 PI) (atan (/ (* B -0.5) C)))
t_1))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
double t_1 = (180.0 / ((double) M_PI)) * atan(1.0);
double tmp;
if (C <= -3500.0) {
tmp = (180.0 * atan((C / B))) / ((double) M_PI);
} else if (C <= -3.7e-275) {
tmp = t_0;
} else if (C <= 1.12e-272) {
tmp = t_1;
} else if (C <= 8.5e-172) {
tmp = t_0;
} else if (C <= 1.9e-115) {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
} else if ((C <= 5.2e-56) || !(C <= 1400000.0)) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / C));
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
double t_1 = (180.0 / Math.PI) * Math.atan(1.0);
double tmp;
if (C <= -3500.0) {
tmp = (180.0 * Math.atan((C / B))) / Math.PI;
} else if (C <= -3.7e-275) {
tmp = t_0;
} else if (C <= 1.12e-272) {
tmp = t_1;
} else if (C <= 8.5e-172) {
tmp = t_0;
} else if (C <= 1.9e-115) {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
} else if ((C <= 5.2e-56) || !(C <= 1400000.0)) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / C));
} else {
tmp = t_1;
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan((0.5 * (B / A))) t_1 = (180.0 / math.pi) * math.atan(1.0) tmp = 0 if C <= -3500.0: tmp = (180.0 * math.atan((C / B))) / math.pi elif C <= -3.7e-275: tmp = t_0 elif C <= 1.12e-272: tmp = t_1 elif C <= 8.5e-172: tmp = t_0 elif C <= 1.9e-115: tmp = (180.0 / math.pi) * math.atan(-1.0) elif (C <= 5.2e-56) or not (C <= 1400000.0): tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / C)) else: tmp = t_1 return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))) t_1 = Float64(Float64(180.0 / pi) * atan(1.0)) tmp = 0.0 if (C <= -3500.0) tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi); elseif (C <= -3.7e-275) tmp = t_0; elseif (C <= 1.12e-272) tmp = t_1; elseif (C <= 8.5e-172) tmp = t_0; elseif (C <= 1.9e-115) tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); elseif ((C <= 5.2e-56) || !(C <= 1400000.0)) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / C))); else tmp = t_1; end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan((0.5 * (B / A))); t_1 = (180.0 / pi) * atan(1.0); tmp = 0.0; if (C <= -3500.0) tmp = (180.0 * atan((C / B))) / pi; elseif (C <= -3.7e-275) tmp = t_0; elseif (C <= 1.12e-272) tmp = t_1; elseif (C <= 8.5e-172) tmp = t_0; elseif (C <= 1.9e-115) tmp = (180.0 / pi) * atan(-1.0); elseif ((C <= 5.2e-56) || ~((C <= 1400000.0))) tmp = (180.0 / pi) * atan(((B * -0.5) / C)); else tmp = t_1; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -3500.0], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, -3.7e-275], t$95$0, If[LessEqual[C, 1.12e-272], t$95$1, If[LessEqual[C, 8.5e-172], t$95$0, If[LessEqual[C, 1.9e-115], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[C, 5.2e-56], N[Not[LessEqual[C, 1400000.0]], $MachinePrecision]], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
t_1 := \frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{if}\;C \leq -3500:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -3.7 \cdot 10^{-275}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 1.12 \cdot 10^{-272}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;C \leq 8.5 \cdot 10^{-172}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 1.9 \cdot 10^{-115}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\mathbf{elif}\;C \leq 5.2 \cdot 10^{-56} \lor \neg \left(C \leq 1400000\right):\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if C < -3500Initial program 85.4%
associate-*r/85.4%
unpow285.4%
Simplified85.4%
*-commutative85.4%
+-commutative85.4%
unpow285.4%
hypot-udef98.2%
associate--r+97.2%
div-inv97.2%
div-sub97.2%
frac-sub71.5%
Applied egg-rr71.5%
Taylor expanded in B around -inf 65.9%
unpow265.9%
associate-*r*65.9%
distribute-rgt-out65.9%
mul-1-neg65.9%
cancel-sign-sub-inv65.9%
metadata-eval65.9%
*-lft-identity65.9%
+-commutative65.9%
mul-1-neg65.9%
sub-neg65.9%
Simplified65.9%
Taylor expanded in C around inf 70.8%
if -3500 < C < -3.69999999999999971e-275 or 1.11999999999999994e-272 < C < 8.49999999999999963e-172Initial program 53.4%
associate-*r/53.4%
associate-*l/53.4%
*-commutative53.4%
Simplified68.5%
Taylor expanded in A around -inf 47.8%
if -3.69999999999999971e-275 < C < 1.11999999999999994e-272 or 5.19999999999999994e-56 < C < 1.4e6Initial program 54.1%
associate-*r/54.0%
associate-*l/54.1%
*-commutative54.1%
Simplified93.9%
Taylor expanded in B around -inf 49.5%
if 8.49999999999999963e-172 < C < 1.89999999999999996e-115Initial program 32.3%
associate-*r/32.3%
associate-*l/32.3%
*-commutative32.3%
Simplified100.0%
Taylor expanded in B around inf 70.1%
if 1.89999999999999996e-115 < C < 5.19999999999999994e-56 or 1.4e6 < C Initial program 27.2%
associate-*r/27.2%
associate-*l/27.2%
*-commutative27.2%
Simplified53.3%
Taylor expanded in B around 0 53.5%
unpow253.5%
Simplified53.5%
Taylor expanded in C around inf 66.2%
associate-*r/66.2%
Simplified66.2%
Final simplification60.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (* 0.5 (/ B A)))))
(t_1 (* (/ 180.0 PI) (atan 1.0))))
(if (<= C -2400.0)
(* (/ 180.0 PI) (atan (/ (* C 2.0) B)))
(if (<= C -4.5e-275)
t_0
(if (<= C 2.8e-272)
t_1
(if (<= C 6.2e-172)
t_0
(if (<= C 4.8e-116)
(* (/ 180.0 PI) (atan -1.0))
(if (or (<= C 2.7e-55) (not (<= C 700.0)))
(* (/ 180.0 PI) (atan (/ (* B -0.5) C)))
t_1))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
double t_1 = (180.0 / ((double) M_PI)) * atan(1.0);
double tmp;
if (C <= -2400.0) {
tmp = (180.0 / ((double) M_PI)) * atan(((C * 2.0) / B));
} else if (C <= -4.5e-275) {
tmp = t_0;
} else if (C <= 2.8e-272) {
tmp = t_1;
} else if (C <= 6.2e-172) {
tmp = t_0;
} else if (C <= 4.8e-116) {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
} else if ((C <= 2.7e-55) || !(C <= 700.0)) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / C));
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
double t_1 = (180.0 / Math.PI) * Math.atan(1.0);
double tmp;
if (C <= -2400.0) {
tmp = (180.0 / Math.PI) * Math.atan(((C * 2.0) / B));
} else if (C <= -4.5e-275) {
tmp = t_0;
} else if (C <= 2.8e-272) {
tmp = t_1;
} else if (C <= 6.2e-172) {
tmp = t_0;
} else if (C <= 4.8e-116) {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
} else if ((C <= 2.7e-55) || !(C <= 700.0)) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / C));
} else {
tmp = t_1;
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan((0.5 * (B / A))) t_1 = (180.0 / math.pi) * math.atan(1.0) tmp = 0 if C <= -2400.0: tmp = (180.0 / math.pi) * math.atan(((C * 2.0) / B)) elif C <= -4.5e-275: tmp = t_0 elif C <= 2.8e-272: tmp = t_1 elif C <= 6.2e-172: tmp = t_0 elif C <= 4.8e-116: tmp = (180.0 / math.pi) * math.atan(-1.0) elif (C <= 2.7e-55) or not (C <= 700.0): tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / C)) else: tmp = t_1 return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))) t_1 = Float64(Float64(180.0 / pi) * atan(1.0)) tmp = 0.0 if (C <= -2400.0) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C * 2.0) / B))); elseif (C <= -4.5e-275) tmp = t_0; elseif (C <= 2.8e-272) tmp = t_1; elseif (C <= 6.2e-172) tmp = t_0; elseif (C <= 4.8e-116) tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); elseif ((C <= 2.7e-55) || !(C <= 700.0)) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / C))); else tmp = t_1; end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan((0.5 * (B / A))); t_1 = (180.0 / pi) * atan(1.0); tmp = 0.0; if (C <= -2400.0) tmp = (180.0 / pi) * atan(((C * 2.0) / B)); elseif (C <= -4.5e-275) tmp = t_0; elseif (C <= 2.8e-272) tmp = t_1; elseif (C <= 6.2e-172) tmp = t_0; elseif (C <= 4.8e-116) tmp = (180.0 / pi) * atan(-1.0); elseif ((C <= 2.7e-55) || ~((C <= 700.0))) tmp = (180.0 / pi) * atan(((B * -0.5) / C)); else tmp = t_1; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -2400.0], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -4.5e-275], t$95$0, If[LessEqual[C, 2.8e-272], t$95$1, If[LessEqual[C, 6.2e-172], t$95$0, If[LessEqual[C, 4.8e-116], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[C, 2.7e-55], N[Not[LessEqual[C, 700.0]], $MachinePrecision]], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
t_1 := \frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{if}\;C \leq -2400:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C \cdot 2}{B}\right)\\
\mathbf{elif}\;C \leq -4.5 \cdot 10^{-275}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 2.8 \cdot 10^{-272}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;C \leq 6.2 \cdot 10^{-172}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 4.8 \cdot 10^{-116}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\mathbf{elif}\;C \leq 2.7 \cdot 10^{-55} \lor \neg \left(C \leq 700\right):\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if C < -2400Initial program 85.4%
associate-*r/85.4%
associate-*l/85.4%
*-commutative85.4%
Simplified98.2%
Taylor expanded in C around -inf 71.6%
if -2400 < C < -4.49999999999999978e-275 or 2.79999999999999994e-272 < C < 6.2000000000000005e-172Initial program 53.4%
associate-*r/53.4%
associate-*l/53.4%
*-commutative53.4%
Simplified68.5%
Taylor expanded in A around -inf 47.8%
if -4.49999999999999978e-275 < C < 2.79999999999999994e-272 or 2.70000000000000004e-55 < C < 700Initial program 54.1%
associate-*r/54.0%
associate-*l/54.1%
*-commutative54.1%
Simplified93.9%
Taylor expanded in B around -inf 49.5%
if 6.2000000000000005e-172 < C < 4.79999999999999986e-116Initial program 32.3%
associate-*r/32.3%
associate-*l/32.3%
*-commutative32.3%
Simplified100.0%
Taylor expanded in B around inf 70.1%
if 4.79999999999999986e-116 < C < 2.70000000000000004e-55 or 700 < C Initial program 27.2%
associate-*r/27.2%
associate-*l/27.2%
*-commutative27.2%
Simplified53.3%
Taylor expanded in B around 0 53.5%
unpow253.5%
Simplified53.5%
Taylor expanded in C around inf 66.2%
associate-*r/66.2%
Simplified66.2%
Final simplification60.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (* 0.5 (/ B A)))))
(t_1 (/ (* 180.0 (atan (/ (+ B C) B))) PI)))
(if (<= C -1.65e-64)
t_1
(if (<= C -6.2e-251)
t_0
(if (<= C 1.6e-271)
t_1
(if (<= C 1.1e-171)
t_0
(if (<= C 3.8e-116)
(* (/ 180.0 PI) (atan -1.0))
(if (or (<= C 4.8e-56) (not (<= C 700.0)))
(* (/ 180.0 PI) (atan (/ (* B -0.5) C)))
(* (/ 180.0 PI) (atan 1.0))))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
double t_1 = (180.0 * atan(((B + C) / B))) / ((double) M_PI);
double tmp;
if (C <= -1.65e-64) {
tmp = t_1;
} else if (C <= -6.2e-251) {
tmp = t_0;
} else if (C <= 1.6e-271) {
tmp = t_1;
} else if (C <= 1.1e-171) {
tmp = t_0;
} else if (C <= 3.8e-116) {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
} else if ((C <= 4.8e-56) || !(C <= 700.0)) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / C));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
double t_1 = (180.0 * Math.atan(((B + C) / B))) / Math.PI;
double tmp;
if (C <= -1.65e-64) {
tmp = t_1;
} else if (C <= -6.2e-251) {
tmp = t_0;
} else if (C <= 1.6e-271) {
tmp = t_1;
} else if (C <= 1.1e-171) {
tmp = t_0;
} else if (C <= 3.8e-116) {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
} else if ((C <= 4.8e-56) || !(C <= 700.0)) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / C));
} else {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan((0.5 * (B / A))) t_1 = (180.0 * math.atan(((B + C) / B))) / math.pi tmp = 0 if C <= -1.65e-64: tmp = t_1 elif C <= -6.2e-251: tmp = t_0 elif C <= 1.6e-271: tmp = t_1 elif C <= 1.1e-171: tmp = t_0 elif C <= 3.8e-116: tmp = (180.0 / math.pi) * math.atan(-1.0) elif (C <= 4.8e-56) or not (C <= 700.0): tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / C)) else: tmp = (180.0 / math.pi) * math.atan(1.0) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))) t_1 = Float64(Float64(180.0 * atan(Float64(Float64(B + C) / B))) / pi) tmp = 0.0 if (C <= -1.65e-64) tmp = t_1; elseif (C <= -6.2e-251) tmp = t_0; elseif (C <= 1.6e-271) tmp = t_1; elseif (C <= 1.1e-171) tmp = t_0; elseif (C <= 3.8e-116) tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); elseif ((C <= 4.8e-56) || !(C <= 700.0)) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / C))); else tmp = Float64(Float64(180.0 / pi) * atan(1.0)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan((0.5 * (B / A))); t_1 = (180.0 * atan(((B + C) / B))) / pi; tmp = 0.0; if (C <= -1.65e-64) tmp = t_1; elseif (C <= -6.2e-251) tmp = t_0; elseif (C <= 1.6e-271) tmp = t_1; elseif (C <= 1.1e-171) tmp = t_0; elseif (C <= 3.8e-116) tmp = (180.0 / pi) * atan(-1.0); elseif ((C <= 4.8e-56) || ~((C <= 700.0))) tmp = (180.0 / pi) * atan(((B * -0.5) / C)); else tmp = (180.0 / pi) * atan(1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[C, -1.65e-64], t$95$1, If[LessEqual[C, -6.2e-251], t$95$0, If[LessEqual[C, 1.6e-271], t$95$1, If[LessEqual[C, 1.1e-171], t$95$0, If[LessEqual[C, 3.8e-116], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[C, 4.8e-56], N[Not[LessEqual[C, 700.0]], $MachinePrecision]], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
t_1 := \frac{180 \cdot \tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -1.65 \cdot 10^{-64}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;C \leq -6.2 \cdot 10^{-251}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 1.6 \cdot 10^{-271}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;C \leq 1.1 \cdot 10^{-171}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 3.8 \cdot 10^{-116}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\mathbf{elif}\;C \leq 4.8 \cdot 10^{-56} \lor \neg \left(C \leq 700\right):\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\end{array}
\end{array}
if C < -1.65e-64 or -6.20000000000000006e-251 < C < 1.59999999999999989e-271Initial program 80.3%
associate-*r/80.3%
unpow280.3%
Simplified80.3%
*-commutative80.3%
+-commutative80.3%
unpow280.3%
hypot-udef97.6%
associate--r+95.3%
div-inv95.3%
div-sub95.3%
frac-sub66.5%
Applied egg-rr66.5%
Taylor expanded in B around -inf 57.6%
unpow257.6%
associate-*r*57.6%
distribute-rgt-out57.6%
mul-1-neg57.6%
cancel-sign-sub-inv57.6%
metadata-eval57.6%
*-lft-identity57.6%
+-commutative57.6%
mul-1-neg57.6%
sub-neg57.6%
Simplified57.6%
Taylor expanded in A around 0 68.2%
if -1.65e-64 < C < -6.20000000000000006e-251 or 1.59999999999999989e-271 < C < 1.1000000000000001e-171Initial program 46.7%
associate-*r/46.8%
associate-*l/46.8%
*-commutative46.8%
Simplified60.2%
Taylor expanded in A around -inf 53.5%
if 1.1000000000000001e-171 < C < 3.8000000000000001e-116Initial program 32.3%
associate-*r/32.3%
associate-*l/32.3%
*-commutative32.3%
Simplified100.0%
Taylor expanded in B around inf 70.1%
if 3.8000000000000001e-116 < C < 4.80000000000000001e-56 or 700 < C Initial program 27.2%
associate-*r/27.2%
associate-*l/27.2%
*-commutative27.2%
Simplified53.3%
Taylor expanded in B around 0 53.5%
unpow253.5%
Simplified53.5%
Taylor expanded in C around inf 66.2%
associate-*r/66.2%
Simplified66.2%
if 4.80000000000000001e-56 < C < 700Initial program 38.9%
associate-*r/38.9%
associate-*l/38.9%
*-commutative38.9%
Simplified86.5%
Taylor expanded in B around -inf 52.3%
Final simplification63.9%
(FPCore (A B C)
:precision binary64
(if (<= B -1.28e-54)
(/ (* 180.0 (atan (/ (+ B C) B))) PI)
(if (or (<= B 9.6e-301) (and (not (<= B 4.4e-163)) (<= B 4.5e-101)))
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))
(* (/ 180.0 PI) (atan (/ (- C (+ B A)) B))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.28e-54) {
tmp = (180.0 * atan(((B + C) / B))) / ((double) M_PI);
} else if ((B <= 9.6e-301) || (!(B <= 4.4e-163) && (B <= 4.5e-101))) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (B + A)) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.28e-54) {
tmp = (180.0 * Math.atan(((B + C) / B))) / Math.PI;
} else if ((B <= 9.6e-301) || (!(B <= 4.4e-163) && (B <= 4.5e-101))) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - (B + A)) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.28e-54: tmp = (180.0 * math.atan(((B + C) / B))) / math.pi elif (B <= 9.6e-301) or (not (B <= 4.4e-163) and (B <= 4.5e-101)): tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) else: tmp = (180.0 / math.pi) * math.atan(((C - (B + A)) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.28e-54) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B + C) / B))) / pi); elseif ((B <= 9.6e-301) || (!(B <= 4.4e-163) && (B <= 4.5e-101))) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(B + A)) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.28e-54) tmp = (180.0 * atan(((B + C) / B))) / pi; elseif ((B <= 9.6e-301) || (~((B <= 4.4e-163)) && (B <= 4.5e-101))) tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); else tmp = (180.0 / pi) * atan(((C - (B + A)) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.28e-54], N[(N[(180.0 * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[Or[LessEqual[B, 9.6e-301], And[N[Not[LessEqual[B, 4.4e-163]], $MachinePrecision], LessEqual[B, 4.5e-101]]], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.28 \cdot 10^{-54}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 9.6 \cdot 10^{-301} \lor \neg \left(B \leq 4.4 \cdot 10^{-163}\right) \land B \leq 4.5 \cdot 10^{-101}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\
\end{array}
\end{array}
if B < -1.2800000000000001e-54Initial program 57.3%
associate-*r/57.3%
unpow257.3%
Simplified57.3%
*-commutative57.3%
+-commutative57.3%
unpow257.3%
hypot-udef82.6%
associate--r+82.5%
div-inv82.5%
div-sub82.5%
frac-sub42.6%
Applied egg-rr42.6%
Taylor expanded in B around -inf 40.9%
unpow240.9%
associate-*r*40.9%
distribute-rgt-out40.9%
mul-1-neg40.9%
cancel-sign-sub-inv40.9%
metadata-eval40.9%
*-lft-identity40.9%
+-commutative40.9%
mul-1-neg40.9%
sub-neg40.9%
Simplified40.9%
Taylor expanded in A around 0 74.7%
if -1.2800000000000001e-54 < B < 9.59999999999999964e-301 or 4.40000000000000022e-163 < B < 4.4999999999999998e-101Initial program 45.6%
associate-*r/45.6%
associate-*l/45.6%
*-commutative45.6%
Simplified62.4%
Taylor expanded in B around 0 66.3%
associate-*r/66.3%
Simplified66.3%
if 9.59999999999999964e-301 < B < 4.40000000000000022e-163 or 4.4999999999999998e-101 < B Initial program 55.7%
associate-*r/55.7%
associate-*l/55.7%
associate-*l/55.7%
*-lft-identity55.7%
sub-neg55.7%
associate-+l-55.5%
sub-neg55.5%
remove-double-neg55.5%
+-commutative55.5%
unpow255.5%
unpow255.5%
hypot-def78.4%
Simplified78.4%
Taylor expanded in B around inf 73.9%
Final simplification72.0%
(FPCore (A B C)
:precision binary64
(if (<= B -5e-53)
(* (/ 180.0 PI) (atan (/ (+ C (- B A)) B)))
(if (or (<= B 9.2e-297) (and (not (<= B 1.05e-162)) (<= B 2.7e-103)))
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))
(* (/ 180.0 PI) (atan (/ (- C (+ B A)) B))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5e-53) {
tmp = (180.0 / ((double) M_PI)) * atan(((C + (B - A)) / B));
} else if ((B <= 9.2e-297) || (!(B <= 1.05e-162) && (B <= 2.7e-103))) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (B + A)) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -5e-53) {
tmp = (180.0 / Math.PI) * Math.atan(((C + (B - A)) / B));
} else if ((B <= 9.2e-297) || (!(B <= 1.05e-162) && (B <= 2.7e-103))) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - (B + A)) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5e-53: tmp = (180.0 / math.pi) * math.atan(((C + (B - A)) / B)) elif (B <= 9.2e-297) or (not (B <= 1.05e-162) and (B <= 2.7e-103)): tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) else: tmp = (180.0 / math.pi) * math.atan(((C - (B + A)) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -5e-53) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C + Float64(B - A)) / B))); elseif ((B <= 9.2e-297) || (!(B <= 1.05e-162) && (B <= 2.7e-103))) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(B + A)) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -5e-53) tmp = (180.0 / pi) * atan(((C + (B - A)) / B)); elseif ((B <= 9.2e-297) || (~((B <= 1.05e-162)) && (B <= 2.7e-103))) tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); else tmp = (180.0 / pi) * atan(((C - (B + A)) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5e-53], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, 9.2e-297], And[N[Not[LessEqual[B, 1.05e-162]], $MachinePrecision], LessEqual[B, 2.7e-103]]], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -5 \cdot 10^{-53}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)\\
\mathbf{elif}\;B \leq 9.2 \cdot 10^{-297} \lor \neg \left(B \leq 1.05 \cdot 10^{-162}\right) \land B \leq 2.7 \cdot 10^{-103}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\
\end{array}
\end{array}
if B < -5e-53Initial program 57.3%
associate-*r/57.3%
associate-*l/57.3%
associate-*l/57.3%
*-lft-identity57.3%
sub-neg57.3%
associate-+l-57.3%
sub-neg57.3%
remove-double-neg57.3%
+-commutative57.3%
unpow257.3%
unpow257.3%
hypot-def82.6%
Simplified82.6%
Taylor expanded in B around -inf 80.5%
neg-mul-180.5%
unsub-neg80.5%
Simplified80.5%
if -5e-53 < B < 9.1999999999999996e-297 or 1.05e-162 < B < 2.7000000000000001e-103Initial program 45.6%
associate-*r/45.6%
associate-*l/45.6%
*-commutative45.6%
Simplified62.4%
Taylor expanded in B around 0 66.3%
associate-*r/66.3%
Simplified66.3%
if 9.1999999999999996e-297 < B < 1.05e-162 or 2.7000000000000001e-103 < B Initial program 55.7%
associate-*r/55.7%
associate-*l/55.7%
associate-*l/55.7%
*-lft-identity55.7%
sub-neg55.7%
associate-+l-55.5%
sub-neg55.5%
remove-double-neg55.5%
+-commutative55.5%
unpow255.5%
unpow255.5%
hypot-def78.4%
Simplified78.4%
Taylor expanded in B around inf 73.9%
Final simplification73.6%
(FPCore (A B C)
:precision binary64
(if (<= C -1.65e-64)
(/ (* 180.0 (atan (/ (+ B C) B))) PI)
(if (<= C -5.4e-275)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= C 2.15e-271)
(/ (* 180.0 (atan (/ (- B A) B))) PI)
(* 180.0 (/ (atan (* B (/ 0.5 (- A C)))) PI))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.65e-64) {
tmp = (180.0 * atan(((B + C) / B))) / ((double) M_PI);
} else if (C <= -5.4e-275) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (C <= 2.15e-271) {
tmp = (180.0 * atan(((B - A) / B))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((B * (0.5 / (A - C)))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.65e-64) {
tmp = (180.0 * Math.atan(((B + C) / B))) / Math.PI;
} else if (C <= -5.4e-275) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (C <= 2.15e-271) {
tmp = (180.0 * Math.atan(((B - A) / B))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((B * (0.5 / (A - C)))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.65e-64: tmp = (180.0 * math.atan(((B + C) / B))) / math.pi elif C <= -5.4e-275: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif C <= 2.15e-271: tmp = (180.0 * math.atan(((B - A) / B))) / math.pi else: tmp = 180.0 * (math.atan((B * (0.5 / (A - C)))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.65e-64) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B + C) / B))) / pi); elseif (C <= -5.4e-275) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (C <= 2.15e-271) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B - A) / B))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(0.5 / Float64(A - C)))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.65e-64) tmp = (180.0 * atan(((B + C) / B))) / pi; elseif (C <= -5.4e-275) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (C <= 2.15e-271) tmp = (180.0 * atan(((B - A) / B))) / pi; else tmp = 180.0 * (atan((B * (0.5 / (A - C)))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.65e-64], N[(N[(180.0 * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, -5.4e-275], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.15e-271], N[(N[(180.0 * N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.65 \cdot 10^{-64}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -5.4 \cdot 10^{-275}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;C \leq 2.15 \cdot 10^{-271}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.65e-64Initial program 82.1%
associate-*r/82.1%
unpow282.1%
Simplified82.1%
*-commutative82.1%
+-commutative82.1%
unpow282.1%
hypot-udef97.0%
associate--r+94.1%
div-inv94.1%
div-sub94.1%
frac-sub68.8%
Applied egg-rr68.8%
Taylor expanded in B around -inf 64.1%
unpow264.1%
associate-*r*64.1%
distribute-rgt-out64.1%
mul-1-neg64.1%
cancel-sign-sub-inv64.1%
metadata-eval64.1%
*-lft-identity64.1%
+-commutative64.1%
mul-1-neg64.1%
sub-neg64.1%
Simplified64.1%
Taylor expanded in A around 0 74.5%
if -1.65e-64 < C < -5.39999999999999987e-275Initial program 54.0%
associate-*r/54.0%
associate-*l/54.0%
*-commutative54.0%
Simplified64.3%
Taylor expanded in A around -inf 49.8%
if -5.39999999999999987e-275 < C < 2.15e-271Initial program 66.5%
associate-*r/66.5%
unpow266.5%
Simplified66.5%
*-commutative66.5%
+-commutative66.5%
unpow266.5%
hypot-udef99.9%
associate--r+99.9%
div-inv99.9%
div-sub99.9%
frac-sub52.8%
Applied egg-rr52.8%
Taylor expanded in B around -inf 39.1%
unpow239.1%
associate-*r*39.1%
distribute-rgt-out39.1%
mul-1-neg39.1%
cancel-sign-sub-inv39.1%
metadata-eval39.1%
*-lft-identity39.1%
+-commutative39.1%
mul-1-neg39.1%
sub-neg39.1%
Simplified39.1%
Taylor expanded in C around 0 68.8%
if 2.15e-271 < C Initial program 30.5%
associate-*r/30.6%
associate-*l/30.6%
*-commutative30.6%
Simplified60.5%
Taylor expanded in B around 0 44.7%
unpow244.7%
Simplified44.7%
Taylor expanded in C around -inf 63.6%
associate-*r/63.6%
mul-1-neg63.6%
sub-neg63.6%
Simplified63.6%
associate-*r/63.6%
associate-/l*62.2%
Applied egg-rr62.2%
associate-*r/62.2%
associate-/r/63.6%
Simplified63.6%
Final simplification65.3%
(FPCore (A B C)
:precision binary64
(if (<= C -2.1e-64)
(/ (* 180.0 (atan (/ (+ B C) B))) PI)
(if (<= C -7.6e-275)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= C 2.15e-271)
(/ (* 180.0 (atan (/ (- B A) B))) PI)
(* 180.0 (/ (atan (/ (* B 0.5) (- A C))) PI))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -2.1e-64) {
tmp = (180.0 * atan(((B + C) / B))) / ((double) M_PI);
} else if (C <= -7.6e-275) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (C <= 2.15e-271) {
tmp = (180.0 * atan(((B - A) / B))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((B * 0.5) / (A - C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -2.1e-64) {
tmp = (180.0 * Math.atan(((B + C) / B))) / Math.PI;
} else if (C <= -7.6e-275) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (C <= 2.15e-271) {
tmp = (180.0 * Math.atan(((B - A) / B))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((B * 0.5) / (A - C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -2.1e-64: tmp = (180.0 * math.atan(((B + C) / B))) / math.pi elif C <= -7.6e-275: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif C <= 2.15e-271: tmp = (180.0 * math.atan(((B - A) / B))) / math.pi else: tmp = 180.0 * (math.atan(((B * 0.5) / (A - C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -2.1e-64) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B + C) / B))) / pi); elseif (C <= -7.6e-275) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (C <= 2.15e-271) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B - A) / B))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / Float64(A - C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -2.1e-64) tmp = (180.0 * atan(((B + C) / B))) / pi; elseif (C <= -7.6e-275) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (C <= 2.15e-271) tmp = (180.0 * atan(((B - A) / B))) / pi; else tmp = 180.0 * (atan(((B * 0.5) / (A - C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -2.1e-64], N[(N[(180.0 * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, -7.6e-275], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.15e-271], N[(N[(180.0 * N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / N[(A - C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -2.1 \cdot 10^{-64}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -7.6 \cdot 10^{-275}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;C \leq 2.15 \cdot 10^{-271}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A - C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -2.10000000000000011e-64Initial program 82.1%
associate-*r/82.1%
unpow282.1%
Simplified82.1%
*-commutative82.1%
+-commutative82.1%
unpow282.1%
hypot-udef97.0%
associate--r+94.1%
div-inv94.1%
div-sub94.1%
frac-sub68.8%
Applied egg-rr68.8%
Taylor expanded in B around -inf 64.1%
unpow264.1%
associate-*r*64.1%
distribute-rgt-out64.1%
mul-1-neg64.1%
cancel-sign-sub-inv64.1%
metadata-eval64.1%
*-lft-identity64.1%
+-commutative64.1%
mul-1-neg64.1%
sub-neg64.1%
Simplified64.1%
Taylor expanded in A around 0 74.5%
if -2.10000000000000011e-64 < C < -7.59999999999999943e-275Initial program 54.0%
associate-*r/54.0%
associate-*l/54.0%
*-commutative54.0%
Simplified64.3%
Taylor expanded in A around -inf 49.8%
if -7.59999999999999943e-275 < C < 2.15e-271Initial program 66.5%
associate-*r/66.5%
unpow266.5%
Simplified66.5%
*-commutative66.5%
+-commutative66.5%
unpow266.5%
hypot-udef99.9%
associate--r+99.9%
div-inv99.9%
div-sub99.9%
frac-sub52.8%
Applied egg-rr52.8%
Taylor expanded in B around -inf 39.1%
unpow239.1%
associate-*r*39.1%
distribute-rgt-out39.1%
mul-1-neg39.1%
cancel-sign-sub-inv39.1%
metadata-eval39.1%
*-lft-identity39.1%
+-commutative39.1%
mul-1-neg39.1%
sub-neg39.1%
Simplified39.1%
Taylor expanded in C around 0 68.8%
if 2.15e-271 < C Initial program 30.5%
associate-*r/30.6%
associate-*l/30.6%
*-commutative30.6%
Simplified60.5%
Taylor expanded in B around 0 44.7%
unpow244.7%
Simplified44.7%
Taylor expanded in C around -inf 63.6%
associate-*r/63.6%
mul-1-neg63.6%
sub-neg63.6%
Simplified63.6%
Final simplification65.3%
(FPCore (A B C)
:precision binary64
(if (<= C -2.7e-64)
(/ (* 180.0 (atan (/ (+ B C) B))) PI)
(if (<= C -5.8e-275)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= C 2.15e-271)
(/ (* 180.0 (atan (/ (- B A) B))) PI)
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -2.7e-64) {
tmp = (180.0 * atan(((B + C) / B))) / ((double) M_PI);
} else if (C <= -5.8e-275) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (C <= 2.15e-271) {
tmp = (180.0 * atan(((B - A) / B))) / ((double) M_PI);
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -2.7e-64) {
tmp = (180.0 * Math.atan(((B + C) / B))) / Math.PI;
} else if (C <= -5.8e-275) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (C <= 2.15e-271) {
tmp = (180.0 * Math.atan(((B - A) / B))) / Math.PI;
} else {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -2.7e-64: tmp = (180.0 * math.atan(((B + C) / B))) / math.pi elif C <= -5.8e-275: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif C <= 2.15e-271: tmp = (180.0 * math.atan(((B - A) / B))) / math.pi else: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -2.7e-64) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B + C) / B))) / pi); elseif (C <= -5.8e-275) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (C <= 2.15e-271) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B - A) / B))) / pi); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -2.7e-64) tmp = (180.0 * atan(((B + C) / B))) / pi; elseif (C <= -5.8e-275) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (C <= 2.15e-271) tmp = (180.0 * atan(((B - A) / B))) / pi; else tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -2.7e-64], N[(N[(180.0 * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, -5.8e-275], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.15e-271], N[(N[(180.0 * N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -2.7 \cdot 10^{-64}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -5.8 \cdot 10^{-275}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;C \leq 2.15 \cdot 10^{-271}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\end{array}
\end{array}
if C < -2.69999999999999986e-64Initial program 82.1%
associate-*r/82.1%
unpow282.1%
Simplified82.1%
*-commutative82.1%
+-commutative82.1%
unpow282.1%
hypot-udef97.0%
associate--r+94.1%
div-inv94.1%
div-sub94.1%
frac-sub68.8%
Applied egg-rr68.8%
Taylor expanded in B around -inf 64.1%
unpow264.1%
associate-*r*64.1%
distribute-rgt-out64.1%
mul-1-neg64.1%
cancel-sign-sub-inv64.1%
metadata-eval64.1%
*-lft-identity64.1%
+-commutative64.1%
mul-1-neg64.1%
sub-neg64.1%
Simplified64.1%
Taylor expanded in A around 0 74.5%
if -2.69999999999999986e-64 < C < -5.800000000000001e-275Initial program 54.0%
associate-*r/54.0%
associate-*l/54.0%
*-commutative54.0%
Simplified64.3%
Taylor expanded in A around -inf 49.8%
if -5.800000000000001e-275 < C < 2.15e-271Initial program 66.5%
associate-*r/66.5%
unpow266.5%
Simplified66.5%
*-commutative66.5%
+-commutative66.5%
unpow266.5%
hypot-udef99.9%
associate--r+99.9%
div-inv99.9%
div-sub99.9%
frac-sub52.8%
Applied egg-rr52.8%
Taylor expanded in B around -inf 39.1%
unpow239.1%
associate-*r*39.1%
distribute-rgt-out39.1%
mul-1-neg39.1%
cancel-sign-sub-inv39.1%
metadata-eval39.1%
*-lft-identity39.1%
+-commutative39.1%
mul-1-neg39.1%
sub-neg39.1%
Simplified39.1%
Taylor expanded in C around 0 68.8%
if 2.15e-271 < C Initial program 30.5%
associate-*r/30.6%
associate-*l/30.6%
*-commutative30.6%
Simplified60.5%
Taylor expanded in B around 0 63.7%
associate-*r/63.7%
Simplified63.7%
Final simplification65.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* 180.0 (atan (/ C B))) PI)))
(if (<= B -7.5e-35)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B -4e-292)
t_0
(if (<= B 5.3e-289)
(* (/ 180.0 PI) (atan (/ 0.0 B)))
(if (<= B 4.2e-69) t_0 (* (/ 180.0 PI) (atan -1.0))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 * atan((C / B))) / ((double) M_PI);
double tmp;
if (B <= -7.5e-35) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= -4e-292) {
tmp = t_0;
} else if (B <= 5.3e-289) {
tmp = (180.0 / ((double) M_PI)) * atan((0.0 / B));
} else if (B <= 4.2e-69) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 * Math.atan((C / B))) / Math.PI;
double tmp;
if (B <= -7.5e-35) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= -4e-292) {
tmp = t_0;
} else if (B <= 5.3e-289) {
tmp = (180.0 / Math.PI) * Math.atan((0.0 / B));
} else if (B <= 4.2e-69) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 * math.atan((C / B))) / math.pi tmp = 0 if B <= -7.5e-35: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= -4e-292: tmp = t_0 elif B <= 5.3e-289: tmp = (180.0 / math.pi) * math.atan((0.0 / B)) elif B <= 4.2e-69: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 * atan(Float64(C / B))) / pi) tmp = 0.0 if (B <= -7.5e-35) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= -4e-292) tmp = t_0; elseif (B <= 5.3e-289) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.0 / B))); elseif (B <= 4.2e-69) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 * atan((C / B))) / pi; tmp = 0.0; if (B <= -7.5e-35) tmp = (180.0 / pi) * atan(1.0); elseif (B <= -4e-292) tmp = t_0; elseif (B <= 5.3e-289) tmp = (180.0 / pi) * atan((0.0 / B)); elseif (B <= 4.2e-69) tmp = t_0; else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[B, -7.5e-35], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -4e-292], t$95$0, If[LessEqual[B, 5.3e-289], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.2e-69], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -7.5 \cdot 10^{-35}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq -4 \cdot 10^{-292}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 5.3 \cdot 10^{-289}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0}{B}\right)\\
\mathbf{elif}\;B \leq 4.2 \cdot 10^{-69}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -7.5e-35Initial program 54.2%
associate-*r/54.2%
associate-*l/54.2%
*-commutative54.2%
Simplified81.3%
Taylor expanded in B around -inf 61.0%
if -7.5e-35 < B < -4.0000000000000002e-292 or 5.3e-289 < B < 4.1999999999999999e-69Initial program 58.7%
associate-*r/58.7%
unpow258.7%
Simplified58.7%
*-commutative58.7%
+-commutative58.7%
unpow258.7%
hypot-udef70.9%
associate--r+65.9%
div-inv65.9%
div-sub53.1%
frac-sub55.5%
Applied egg-rr55.5%
Taylor expanded in B around -inf 46.4%
unpow246.4%
associate-*r*46.4%
distribute-rgt-out46.4%
mul-1-neg46.4%
cancel-sign-sub-inv46.4%
metadata-eval46.4%
*-lft-identity46.4%
+-commutative46.4%
mul-1-neg46.4%
sub-neg46.4%
Simplified46.4%
Taylor expanded in C around inf 35.8%
if -4.0000000000000002e-292 < B < 5.3e-289Initial program 46.9%
associate-*r/46.9%
associate-*l/46.9%
*-commutative46.9%
Simplified79.2%
Taylor expanded in C around inf 57.7%
distribute-rgt1-in57.7%
metadata-eval57.7%
mul0-lft57.7%
metadata-eval57.7%
Simplified57.7%
if 4.1999999999999999e-69 < B Initial program 46.7%
associate-*r/46.7%
associate-*l/46.7%
*-commutative46.7%
Simplified76.0%
Taylor expanded in B around inf 58.9%
Final simplification50.5%
(FPCore (A B C)
:precision binary64
(if (<= C -5.5e-64)
(/ (* 180.0 (atan (/ (+ B C) B))) PI)
(if (<= C -7.6e-275)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= C 40000.0)
(/ (* 180.0 (atan (/ (- B A) B))) PI)
(* (/ 180.0 PI) (atan (/ (* B -0.5) C)))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -5.5e-64) {
tmp = (180.0 * atan(((B + C) / B))) / ((double) M_PI);
} else if (C <= -7.6e-275) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (C <= 40000.0) {
tmp = (180.0 * atan(((B - A) / B))) / ((double) M_PI);
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / C));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -5.5e-64) {
tmp = (180.0 * Math.atan(((B + C) / B))) / Math.PI;
} else if (C <= -7.6e-275) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (C <= 40000.0) {
tmp = (180.0 * Math.atan(((B - A) / B))) / Math.PI;
} else {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / C));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -5.5e-64: tmp = (180.0 * math.atan(((B + C) / B))) / math.pi elif C <= -7.6e-275: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif C <= 40000.0: tmp = (180.0 * math.atan(((B - A) / B))) / math.pi else: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / C)) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -5.5e-64) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B + C) / B))) / pi); elseif (C <= -7.6e-275) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (C <= 40000.0) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B - A) / B))) / pi); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / C))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -5.5e-64) tmp = (180.0 * atan(((B + C) / B))) / pi; elseif (C <= -7.6e-275) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (C <= 40000.0) tmp = (180.0 * atan(((B - A) / B))) / pi; else tmp = (180.0 / pi) * atan(((B * -0.5) / C)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -5.5e-64], N[(N[(180.0 * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, -7.6e-275], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 40000.0], N[(N[(180.0 * N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -5.5 \cdot 10^{-64}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -7.6 \cdot 10^{-275}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;C \leq 40000:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\
\end{array}
\end{array}
if C < -5.4999999999999999e-64Initial program 82.1%
associate-*r/82.1%
unpow282.1%
Simplified82.1%
*-commutative82.1%
+-commutative82.1%
unpow282.1%
hypot-udef97.0%
associate--r+94.1%
div-inv94.1%
div-sub94.1%
frac-sub68.8%
Applied egg-rr68.8%
Taylor expanded in B around -inf 64.1%
unpow264.1%
associate-*r*64.1%
distribute-rgt-out64.1%
mul-1-neg64.1%
cancel-sign-sub-inv64.1%
metadata-eval64.1%
*-lft-identity64.1%
+-commutative64.1%
mul-1-neg64.1%
sub-neg64.1%
Simplified64.1%
Taylor expanded in A around 0 74.5%
if -5.4999999999999999e-64 < C < -7.59999999999999943e-275Initial program 54.0%
associate-*r/54.0%
associate-*l/54.0%
*-commutative54.0%
Simplified64.3%
Taylor expanded in A around -inf 49.8%
if -7.59999999999999943e-275 < C < 4e4Initial program 47.3%
associate-*r/47.3%
unpow247.3%
Simplified47.3%
*-commutative47.3%
+-commutative47.3%
unpow247.3%
hypot-udef79.7%
associate--r+75.0%
div-inv75.0%
div-sub75.0%
frac-sub36.7%
Applied egg-rr36.7%
Taylor expanded in B around -inf 25.9%
unpow225.9%
associate-*r*25.9%
distribute-rgt-out25.9%
mul-1-neg25.9%
cancel-sign-sub-inv25.9%
metadata-eval25.9%
*-lft-identity25.9%
+-commutative25.9%
mul-1-neg25.9%
sub-neg25.9%
Simplified25.9%
Taylor expanded in C around 0 47.8%
if 4e4 < C Initial program 23.2%
associate-*r/23.2%
associate-*l/23.2%
*-commutative23.2%
Simplified51.5%
Taylor expanded in B around 0 58.8%
unpow258.8%
Simplified58.8%
Taylor expanded in C around inf 71.4%
associate-*r/71.4%
Simplified71.4%
Final simplification62.9%
(FPCore (A B C)
:precision binary64
(if (<= C -1.75e-18)
(/ (* 180.0 (atan (/ C B))) PI)
(if (<= C 8.4e-116)
(* (/ 180.0 PI) (atan -1.0))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.75e-18) {
tmp = (180.0 * atan((C / B))) / ((double) M_PI);
} else if (C <= 8.4e-116) {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.75e-18) {
tmp = (180.0 * Math.atan((C / B))) / Math.PI;
} else if (C <= 8.4e-116) {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.75e-18: tmp = (180.0 * math.atan((C / B))) / math.pi elif C <= 8.4e-116: tmp = (180.0 / math.pi) * math.atan(-1.0) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.75e-18) tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi); elseif (C <= 8.4e-116) tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.75e-18) tmp = (180.0 * atan((C / B))) / pi; elseif (C <= 8.4e-116) tmp = (180.0 / pi) * atan(-1.0); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.75e-18], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 8.4e-116], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.75 \cdot 10^{-18}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 8.4 \cdot 10^{-116}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.7499999999999999e-18Initial program 84.6%
associate-*r/84.6%
unpow284.6%
Simplified84.6%
*-commutative84.6%
+-commutative84.6%
unpow284.6%
hypot-udef96.6%
associate--r+94.7%
div-inv94.7%
div-sub94.7%
frac-sub70.4%
Applied egg-rr70.4%
Taylor expanded in B around -inf 65.1%
unpow265.1%
associate-*r*65.1%
distribute-rgt-out65.1%
mul-1-neg65.1%
cancel-sign-sub-inv65.1%
metadata-eval65.1%
*-lft-identity65.1%
+-commutative65.1%
mul-1-neg65.1%
sub-neg65.1%
Simplified65.1%
Taylor expanded in C around inf 68.6%
if -1.7499999999999999e-18 < C < 8.3999999999999996e-116Initial program 53.7%
associate-*r/53.7%
associate-*l/53.8%
*-commutative53.8%
Simplified76.8%
Taylor expanded in B around inf 32.9%
if 8.3999999999999996e-116 < C Initial program 28.9%
associate-*r/28.9%
associate-*l/28.9%
*-commutative28.9%
Simplified58.1%
Taylor expanded in B around 0 49.3%
unpow249.3%
Simplified49.3%
Taylor expanded in C around -inf 68.3%
associate-*r/68.3%
mul-1-neg68.3%
sub-neg68.3%
Simplified68.3%
Taylor expanded in A around 0 59.7%
Final simplification53.3%
(FPCore (A B C)
:precision binary64
(if (<= B -1.8e-60)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B 1.2e-135)
(* (/ 180.0 PI) (atan (/ 0.0 B)))
(* (/ 180.0 PI) (atan -1.0)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.8e-60) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= 1.2e-135) {
tmp = (180.0 / ((double) M_PI)) * atan((0.0 / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.8e-60) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= 1.2e-135) {
tmp = (180.0 / Math.PI) * Math.atan((0.0 / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.8e-60: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= 1.2e-135: tmp = (180.0 / math.pi) * math.atan((0.0 / B)) else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.8e-60) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= 1.2e-135) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.0 / B))); else tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.8e-60) tmp = (180.0 / pi) * atan(1.0); elseif (B <= 1.2e-135) tmp = (180.0 / pi) * atan((0.0 / B)); else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.8e-60], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.2e-135], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.8 \cdot 10^{-60}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq 1.2 \cdot 10^{-135}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -1.8e-60Initial program 56.6%
associate-*r/56.6%
associate-*l/56.6%
*-commutative56.6%
Simplified81.5%
Taylor expanded in B around -inf 57.4%
if -1.8e-60 < B < 1.1999999999999999e-135Initial program 54.1%
associate-*r/54.1%
associate-*l/54.1%
*-commutative54.1%
Simplified71.3%
Taylor expanded in C around inf 29.1%
distribute-rgt1-in29.1%
metadata-eval29.1%
mul0-lft29.1%
metadata-eval29.1%
Simplified29.1%
if 1.1999999999999999e-135 < B Initial program 50.0%
associate-*r/50.1%
associate-*l/50.1%
*-commutative50.1%
Simplified74.8%
Taylor expanded in B around inf 54.0%
Final simplification46.6%
(FPCore (A B C) :precision binary64 (if (<= B -1.45e-301) (* (/ 180.0 PI) (atan 1.0)) (* (/ 180.0 PI) (atan -1.0))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.45e-301) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.45e-301) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.45e-301: tmp = (180.0 / math.pi) * math.atan(1.0) else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.45e-301) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); else tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.45e-301) tmp = (180.0 / pi) * atan(1.0); else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.45e-301], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.45 \cdot 10^{-301}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -1.44999999999999992e-301Initial program 55.7%
associate-*r/55.7%
associate-*l/55.7%
*-commutative55.7%
Simplified74.8%
Taylor expanded in B around -inf 38.4%
if -1.44999999999999992e-301 < B Initial program 51.1%
associate-*r/51.1%
associate-*l/51.1%
*-commutative51.1%
Simplified76.3%
Taylor expanded in B around inf 41.9%
Final simplification40.2%
(FPCore (A B C) :precision binary64 (* (/ 180.0 PI) (atan -1.0)))
double code(double A, double B, double C) {
return (180.0 / ((double) M_PI)) * atan(-1.0);
}
public static double code(double A, double B, double C) {
return (180.0 / Math.PI) * Math.atan(-1.0);
}
def code(A, B, C): return (180.0 / math.pi) * math.atan(-1.0)
function code(A, B, C) return Float64(Float64(180.0 / pi) * atan(-1.0)) end
function tmp = code(A, B, C) tmp = (180.0 / pi) * atan(-1.0); end
code[A_, B_, C_] := N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{180}{\pi} \cdot \tan^{-1} -1
\end{array}
Initial program 53.3%
associate-*r/53.3%
associate-*l/53.3%
*-commutative53.3%
Simplified75.6%
Taylor expanded in B around inf 22.5%
Final simplification22.5%
herbie shell --seed 2023178
(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)))