
(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 15 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))
(/ (atan (/ B (/ (- C A) -0.5))) (* PI 0.005555555555555556)))))
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 = atan((B / ((C - A) / -0.5))) / (((double) M_PI) * 0.005555555555555556);
}
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 = Math.atan((B / ((C - A) / -0.5))) / (Math.PI * 0.005555555555555556);
}
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 = math.atan((B / ((C - A) / -0.5))) / (math.pi * 0.005555555555555556) 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(atan(Float64(B / Float64(Float64(C - A) / -0.5))) / Float64(pi * 0.005555555555555556)); 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 = atan((B / ((C - A) / -0.5))) / (pi * 0.005555555555555556); 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[ArcTan[N[(B / N[(N[(C - A), $MachinePrecision] / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi * 0.005555555555555556), $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{\tan^{-1} \left(\frac{B}{\frac{C - A}{-0.5}}\right)}{\pi \cdot 0.005555555555555556}\\
\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 55.3%
associate-*r/55.3%
associate-*l/55.3%
*-commutative55.3%
Simplified83.2%
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 10.0%
associate-*r/10.0%
associate-*l/10.0%
*-commutative10.0%
Simplified10.0%
Taylor expanded in B around 0 98.7%
associate-*r/98.7%
Simplified98.7%
add-log-exp10.6%
*-commutative10.6%
Applied egg-rr10.6%
clear-num10.6%
un-div-inv10.6%
add-log-exp98.8%
*-commutative98.8%
*-un-lft-identity98.8%
times-frac98.7%
metadata-eval98.7%
div-inv98.7%
metadata-eval98.7%
Applied egg-rr98.7%
*-commutative98.7%
associate-/r/98.8%
Simplified98.8%
Final simplification85.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ (- (- A) (hypot A B)) B)))))
(if (<= C -5e+21)
(* (/ 180.0 PI) (atan (/ (+ C (- B A)) B)))
(if (<= C 4.6e-298)
t_0
(if (<= C 2.6e-268)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= C 1e+24)
t_0
(/ (atan (/ B (/ (- C A) -0.5))) (* PI 0.005555555555555556))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(((-A - hypot(A, B)) / B));
double tmp;
if (C <= -5e+21) {
tmp = (180.0 / ((double) M_PI)) * atan(((C + (B - A)) / B));
} else if (C <= 4.6e-298) {
tmp = t_0;
} else if (C <= 2.6e-268) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (C <= 1e+24) {
tmp = t_0;
} else {
tmp = atan((B / ((C - A) / -0.5))) / (((double) M_PI) * 0.005555555555555556);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan(((-A - Math.hypot(A, B)) / B));
double tmp;
if (C <= -5e+21) {
tmp = (180.0 / Math.PI) * Math.atan(((C + (B - A)) / B));
} else if (C <= 4.6e-298) {
tmp = t_0;
} else if (C <= 2.6e-268) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (C <= 1e+24) {
tmp = t_0;
} else {
tmp = Math.atan((B / ((C - A) / -0.5))) / (Math.PI * 0.005555555555555556);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan(((-A - math.hypot(A, B)) / B)) tmp = 0 if C <= -5e+21: tmp = (180.0 / math.pi) * math.atan(((C + (B - A)) / B)) elif C <= 4.6e-298: tmp = t_0 elif C <= 2.6e-268: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif C <= 1e+24: tmp = t_0 else: tmp = math.atan((B / ((C - A) / -0.5))) / (math.pi * 0.005555555555555556) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(Float64(-A) - hypot(A, B)) / B))) tmp = 0.0 if (C <= -5e+21) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C + Float64(B - A)) / B))); elseif (C <= 4.6e-298) tmp = t_0; elseif (C <= 2.6e-268) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (C <= 1e+24) tmp = t_0; else tmp = Float64(atan(Float64(B / Float64(Float64(C - A) / -0.5))) / Float64(pi * 0.005555555555555556)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan(((-A - hypot(A, B)) / B)); tmp = 0.0; if (C <= -5e+21) tmp = (180.0 / pi) * atan(((C + (B - A)) / B)); elseif (C <= 4.6e-298) tmp = t_0; elseif (C <= 2.6e-268) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (C <= 1e+24) tmp = t_0; else tmp = atan((B / ((C - A) / -0.5))) / (pi * 0.005555555555555556); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[((-A) - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -5e+21], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 4.6e-298], t$95$0, If[LessEqual[C, 2.6e-268], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1e+24], t$95$0, N[(N[ArcTan[N[(B / N[(N[(C - A), $MachinePrecision] / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(A, B\right)}{B}\right)\\
\mathbf{if}\;C \leq -5 \cdot 10^{+21}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)\\
\mathbf{elif}\;C \leq 4.6 \cdot 10^{-298}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 2.6 \cdot 10^{-268}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;C \leq 10^{+24}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B}{\frac{C - A}{-0.5}}\right)}{\pi \cdot 0.005555555555555556}\\
\end{array}
\end{array}
if C < -5e21Initial program 72.9%
associate-*r/72.9%
associate-*l/72.9%
associate-*l/72.9%
*-lft-identity72.9%
sub-neg72.9%
associate-+l-72.9%
sub-neg72.9%
remove-double-neg72.9%
+-commutative72.9%
unpow272.9%
unpow272.9%
hypot-def92.8%
Simplified92.8%
Taylor expanded in B around -inf 85.2%
neg-mul-185.2%
unsub-neg85.2%
Simplified85.2%
if -5e21 < C < 4.6000000000000001e-298 or 2.60000000000000002e-268 < C < 9.9999999999999998e23Initial program 56.8%
associate-*r/56.8%
associate-*l/56.8%
*-commutative56.8%
Simplified82.4%
Taylor expanded in C around 0 55.1%
mul-1-neg55.1%
+-commutative55.1%
unpow255.1%
unpow255.1%
hypot-def80.7%
Simplified80.7%
if 4.6000000000000001e-298 < C < 2.60000000000000002e-268Initial program 25.7%
associate-*r/25.7%
associate-*l/25.7%
*-commutative25.7%
Simplified36.5%
Taylor expanded in A around -inf 81.6%
if 9.9999999999999998e23 < C Initial program 19.5%
associate-*r/19.5%
associate-*l/19.5%
*-commutative19.5%
Simplified45.4%
Taylor expanded in B around 0 78.3%
associate-*r/78.3%
Simplified78.3%
add-log-exp24.4%
*-commutative24.4%
Applied egg-rr24.4%
clear-num24.4%
un-div-inv24.4%
add-log-exp78.3%
*-commutative78.3%
*-un-lft-identity78.3%
times-frac78.3%
metadata-eval78.3%
div-inv78.3%
metadata-eval78.3%
Applied egg-rr78.3%
*-commutative78.3%
associate-/r/78.3%
Simplified78.3%
Final simplification81.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (* -0.5 (/ B C))))))
(if (<= B -1.02e-75)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B 2.3e-187)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= B 5e-131)
t_0
(if (<= B 7.8e-131)
(* (/ 180.0 PI) (atan (/ 0.0 B)))
(if (or (<= B 3.3e-32) (not (<= B 8.5e+53)))
(* (/ 180.0 PI) (atan -1.0))
t_0)))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
double tmp;
if (B <= -1.02e-75) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= 2.3e-187) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (B <= 5e-131) {
tmp = t_0;
} else if (B <= 7.8e-131) {
tmp = (180.0 / ((double) M_PI)) * atan((0.0 / B));
} else if ((B <= 3.3e-32) || !(B <= 8.5e+53)) {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
} else {
tmp = t_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 / C)));
double tmp;
if (B <= -1.02e-75) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= 2.3e-187) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (B <= 5e-131) {
tmp = t_0;
} else if (B <= 7.8e-131) {
tmp = (180.0 / Math.PI) * Math.atan((0.0 / B));
} else if ((B <= 3.3e-32) || !(B <= 8.5e+53)) {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
} else {
tmp = t_0;
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) tmp = 0 if B <= -1.02e-75: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= 2.3e-187: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif B <= 5e-131: tmp = t_0 elif B <= 7.8e-131: tmp = (180.0 / math.pi) * math.atan((0.0 / B)) elif (B <= 3.3e-32) or not (B <= 8.5e+53): tmp = (180.0 / math.pi) * math.atan(-1.0) else: tmp = t_0 return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))) tmp = 0.0 if (B <= -1.02e-75) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= 2.3e-187) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (B <= 5e-131) tmp = t_0; elseif (B <= 7.8e-131) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.0 / B))); elseif ((B <= 3.3e-32) || !(B <= 8.5e+53)) tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); else tmp = t_0; end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan((-0.5 * (B / C))); tmp = 0.0; if (B <= -1.02e-75) tmp = (180.0 / pi) * atan(1.0); elseif (B <= 2.3e-187) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (B <= 5e-131) tmp = t_0; elseif (B <= 7.8e-131) tmp = (180.0 / pi) * atan((0.0 / B)); elseif ((B <= 3.3e-32) || ~((B <= 8.5e+53))) tmp = (180.0 / pi) * atan(-1.0); else tmp = t_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 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.02e-75], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.3e-187], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5e-131], t$95$0, If[LessEqual[B, 7.8e-131], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, 3.3e-32], N[Not[LessEqual[B, 8.5e+53]], $MachinePrecision]], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\mathbf{if}\;B \leq -1.02 \cdot 10^{-75}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq 2.3 \cdot 10^{-187}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;B \leq 5 \cdot 10^{-131}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 7.8 \cdot 10^{-131}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0}{B}\right)\\
\mathbf{elif}\;B \leq 3.3 \cdot 10^{-32} \lor \neg \left(B \leq 8.5 \cdot 10^{+53}\right):\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if B < -1.01999999999999997e-75Initial program 50.5%
associate-*r/50.4%
associate-*l/50.5%
*-commutative50.5%
Simplified76.2%
Taylor expanded in B around -inf 55.7%
if -1.01999999999999997e-75 < B < 2.29999999999999998e-187Initial program 54.0%
associate-*r/54.0%
associate-*l/54.0%
*-commutative54.0%
Simplified73.5%
Taylor expanded in A around -inf 36.0%
if 2.29999999999999998e-187 < B < 5.0000000000000004e-131 or 3.30000000000000025e-32 < B < 8.5000000000000002e53Initial program 45.4%
associate-*r/45.4%
associate-*l/45.4%
*-commutative45.4%
Simplified49.6%
Taylor expanded in B around 0 57.4%
associate-*r/57.4%
Simplified57.4%
Taylor expanded in C around inf 53.8%
if 5.0000000000000004e-131 < B < 7.80000000000000039e-131Initial program 3.1%
associate-*r/3.1%
associate-*l/3.1%
*-commutative3.1%
Simplified100.0%
Taylor expanded in C around inf 100.0%
distribute-rgt1-in100.0%
metadata-eval100.0%
mul0-lft100.0%
metadata-eval100.0%
Simplified100.0%
if 7.80000000000000039e-131 < B < 3.30000000000000025e-32 or 8.5000000000000002e53 < B Initial program 45.1%
associate-*r/45.1%
associate-*l/45.1%
*-commutative45.1%
Simplified79.7%
Taylor expanded in B around inf 60.3%
Final simplification51.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (* -0.5 (/ B C))))))
(if (<= B -1.55e-76)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B 3.9e-186)
(* (/ 180.0 PI) (atan (/ (* B 0.5) A)))
(if (<= B 5.8e-133)
t_0
(if (<= B 6.8e-130)
(* (/ 180.0 PI) (atan (/ 0.0 B)))
(if (or (<= B 3.1e-33) (not (<= B 1.1e+55)))
(* (/ 180.0 PI) (atan -1.0))
t_0)))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
double tmp;
if (B <= -1.55e-76) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= 3.9e-186) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * 0.5) / A));
} else if (B <= 5.8e-133) {
tmp = t_0;
} else if (B <= 6.8e-130) {
tmp = (180.0 / ((double) M_PI)) * atan((0.0 / B));
} else if ((B <= 3.1e-33) || !(B <= 1.1e+55)) {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
} else {
tmp = t_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 / C)));
double tmp;
if (B <= -1.55e-76) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= 3.9e-186) {
tmp = (180.0 / Math.PI) * Math.atan(((B * 0.5) / A));
} else if (B <= 5.8e-133) {
tmp = t_0;
} else if (B <= 6.8e-130) {
tmp = (180.0 / Math.PI) * Math.atan((0.0 / B));
} else if ((B <= 3.1e-33) || !(B <= 1.1e+55)) {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
} else {
tmp = t_0;
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) tmp = 0 if B <= -1.55e-76: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= 3.9e-186: tmp = (180.0 / math.pi) * math.atan(((B * 0.5) / A)) elif B <= 5.8e-133: tmp = t_0 elif B <= 6.8e-130: tmp = (180.0 / math.pi) * math.atan((0.0 / B)) elif (B <= 3.1e-33) or not (B <= 1.1e+55): tmp = (180.0 / math.pi) * math.atan(-1.0) else: tmp = t_0 return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))) tmp = 0.0 if (B <= -1.55e-76) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= 3.9e-186) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * 0.5) / A))); elseif (B <= 5.8e-133) tmp = t_0; elseif (B <= 6.8e-130) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.0 / B))); elseif ((B <= 3.1e-33) || !(B <= 1.1e+55)) tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); else tmp = t_0; end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan((-0.5 * (B / C))); tmp = 0.0; if (B <= -1.55e-76) tmp = (180.0 / pi) * atan(1.0); elseif (B <= 3.9e-186) tmp = (180.0 / pi) * atan(((B * 0.5) / A)); elseif (B <= 5.8e-133) tmp = t_0; elseif (B <= 6.8e-130) tmp = (180.0 / pi) * atan((0.0 / B)); elseif ((B <= 3.1e-33) || ~((B <= 1.1e+55))) tmp = (180.0 / pi) * atan(-1.0); else tmp = t_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 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.55e-76], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.9e-186], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.8e-133], t$95$0, If[LessEqual[B, 6.8e-130], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, 3.1e-33], N[Not[LessEqual[B, 1.1e+55]], $MachinePrecision]], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\mathbf{if}\;B \leq -1.55 \cdot 10^{-76}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq 3.9 \cdot 10^{-186}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
\mathbf{elif}\;B \leq 5.8 \cdot 10^{-133}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 6.8 \cdot 10^{-130}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0}{B}\right)\\
\mathbf{elif}\;B \leq 3.1 \cdot 10^{-33} \lor \neg \left(B \leq 1.1 \cdot 10^{+55}\right):\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if B < -1.54999999999999985e-76Initial program 50.5%
associate-*r/50.4%
associate-*l/50.5%
*-commutative50.5%
Simplified76.2%
Taylor expanded in B around -inf 55.7%
if -1.54999999999999985e-76 < B < 3.9000000000000001e-186Initial program 54.0%
associate-*r/54.0%
associate-*l/54.0%
*-commutative54.0%
Simplified73.5%
Taylor expanded in A around -inf 36.0%
associate-*r/36.0%
Applied egg-rr36.0%
if 3.9000000000000001e-186 < B < 5.7999999999999997e-133 or 3.09999999999999997e-33 < B < 1.10000000000000005e55Initial program 45.4%
associate-*r/45.4%
associate-*l/45.4%
*-commutative45.4%
Simplified49.6%
Taylor expanded in B around 0 57.4%
associate-*r/57.4%
Simplified57.4%
Taylor expanded in C around inf 53.8%
if 5.7999999999999997e-133 < B < 6.8000000000000001e-130Initial program 3.1%
associate-*r/3.1%
associate-*l/3.1%
*-commutative3.1%
Simplified100.0%
Taylor expanded in C around inf 100.0%
distribute-rgt1-in100.0%
metadata-eval100.0%
mul0-lft100.0%
metadata-eval100.0%
Simplified100.0%
if 6.8000000000000001e-130 < B < 3.09999999999999997e-33 or 1.10000000000000005e55 < B Initial program 45.1%
associate-*r/45.1%
associate-*l/45.1%
*-commutative45.1%
Simplified79.7%
Taylor expanded in B around inf 60.3%
Final simplification51.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan -1.0))))
(if (<= C -1.2e-32)
(* (/ 180.0 PI) (atan (/ (* C 2.0) B)))
(if (<= C -6e-191)
t_0
(if (<= C 4.3e-224)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= C 4.7e-11)
(* (/ 180.0 PI) (atan 1.0))
(if (<= C 1e+22) t_0 (* (/ 180.0 PI) (atan (* -0.5 (/ B C)))))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(-1.0);
double tmp;
if (C <= -1.2e-32) {
tmp = (180.0 / ((double) M_PI)) * atan(((C * 2.0) / B));
} else if (C <= -6e-191) {
tmp = t_0;
} else if (C <= 4.3e-224) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (C <= 4.7e-11) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (C <= 1e+22) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan(-1.0);
double tmp;
if (C <= -1.2e-32) {
tmp = (180.0 / Math.PI) * Math.atan(((C * 2.0) / B));
} else if (C <= -6e-191) {
tmp = t_0;
} else if (C <= 4.3e-224) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (C <= 4.7e-11) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (C <= 1e+22) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan(-1.0) tmp = 0 if C <= -1.2e-32: tmp = (180.0 / math.pi) * math.atan(((C * 2.0) / B)) elif C <= -6e-191: tmp = t_0 elif C <= 4.3e-224: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif C <= 4.7e-11: tmp = (180.0 / math.pi) * math.atan(1.0) elif C <= 1e+22: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(-1.0)) tmp = 0.0 if (C <= -1.2e-32) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C * 2.0) / B))); elseif (C <= -6e-191) tmp = t_0; elseif (C <= 4.3e-224) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (C <= 4.7e-11) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (C <= 1e+22) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan(-1.0); tmp = 0.0; if (C <= -1.2e-32) tmp = (180.0 / pi) * atan(((C * 2.0) / B)); elseif (C <= -6e-191) tmp = t_0; elseif (C <= 4.3e-224) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (C <= 4.7e-11) tmp = (180.0 / pi) * atan(1.0); elseif (C <= 1e+22) tmp = t_0; else tmp = (180.0 / pi) * atan((-0.5 * (B / C))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -1.2e-32], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -6e-191], t$95$0, If[LessEqual[C, 4.3e-224], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 4.7e-11], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1e+22], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} -1\\
\mathbf{if}\;C \leq -1.2 \cdot 10^{-32}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C \cdot 2}{B}\right)\\
\mathbf{elif}\;C \leq -6 \cdot 10^{-191}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 4.3 \cdot 10^{-224}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;C \leq 4.7 \cdot 10^{-11}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;C \leq 10^{+22}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\end{array}
\end{array}
if C < -1.2000000000000001e-32Initial program 69.5%
associate-*r/69.5%
associate-*l/69.5%
*-commutative69.5%
Simplified91.8%
Taylor expanded in C around -inf 60.0%
if -1.2000000000000001e-32 < C < -6.0000000000000001e-191 or 4.69999999999999993e-11 < C < 1e22Initial program 59.6%
associate-*r/59.6%
associate-*l/59.6%
*-commutative59.6%
Simplified86.8%
Taylor expanded in B around inf 43.6%
if -6.0000000000000001e-191 < C < 4.3e-224Initial program 46.7%
associate-*r/46.7%
associate-*l/46.7%
*-commutative46.7%
Simplified66.6%
Taylor expanded in A around -inf 46.0%
if 4.3e-224 < C < 4.69999999999999993e-11Initial program 57.9%
associate-*r/57.9%
associate-*l/57.9%
*-commutative57.9%
Simplified83.2%
Taylor expanded in B around -inf 38.6%
if 1e22 < C Initial program 19.5%
associate-*r/19.5%
associate-*l/19.5%
*-commutative19.5%
Simplified45.4%
Taylor expanded in B around 0 78.3%
associate-*r/78.3%
Simplified78.3%
Taylor expanded in C around inf 68.5%
Final simplification53.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A)))))
(t_1 (* (/ 180.0 PI) (atan (/ (+ C (- B A)) B)))))
(if (<= B -3.4e+28)
t_1
(if (<= B -15000000000.0)
t_0
(if (<= B -7.5e-73)
t_1
(if (<= B -2.3e-288)
t_0
(* (/ 180.0 PI) (atan (/ (- C (+ B A)) B)))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
double t_1 = (180.0 / ((double) M_PI)) * atan(((C + (B - A)) / B));
double tmp;
if (B <= -3.4e+28) {
tmp = t_1;
} else if (B <= -15000000000.0) {
tmp = t_0;
} else if (B <= -7.5e-73) {
tmp = t_1;
} else if (B <= -2.3e-288) {
tmp = t_0;
} 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 t_0 = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
double t_1 = (180.0 / Math.PI) * Math.atan(((C + (B - A)) / B));
double tmp;
if (B <= -3.4e+28) {
tmp = t_1;
} else if (B <= -15000000000.0) {
tmp = t_0;
} else if (B <= -7.5e-73) {
tmp = t_1;
} else if (B <= -2.3e-288) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - (B + A)) / B));
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) t_1 = (180.0 / math.pi) * math.atan(((C + (B - A)) / B)) tmp = 0 if B <= -3.4e+28: tmp = t_1 elif B <= -15000000000.0: tmp = t_0 elif B <= -7.5e-73: tmp = t_1 elif B <= -2.3e-288: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan(((C - (B + A)) / B)) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))) t_1 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C + Float64(B - A)) / B))) tmp = 0.0 if (B <= -3.4e+28) tmp = t_1; elseif (B <= -15000000000.0) tmp = t_0; elseif (B <= -7.5e-73) tmp = t_1; elseif (B <= -2.3e-288) tmp = t_0; 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) t_0 = (180.0 / pi) * atan(((B * -0.5) / (C - A))); t_1 = (180.0 / pi) * atan(((C + (B - A)) / B)); tmp = 0.0; if (B <= -3.4e+28) tmp = t_1; elseif (B <= -15000000000.0) tmp = t_0; elseif (B <= -7.5e-73) tmp = t_1; elseif (B <= -2.3e-288) tmp = t_0; else tmp = (180.0 / pi) * atan(((C - (B + A)) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -3.4e+28], t$95$1, If[LessEqual[B, -15000000000.0], t$95$0, If[LessEqual[B, -7.5e-73], t$95$1, If[LessEqual[B, -2.3e-288], t$95$0, 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}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)\\
\mathbf{if}\;B \leq -3.4 \cdot 10^{+28}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq -15000000000:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -7.5 \cdot 10^{-73}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq -2.3 \cdot 10^{-288}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\
\end{array}
\end{array}
if B < -3.4e28 or -1.5e10 < B < -7.5e-73Initial program 53.8%
associate-*r/53.8%
associate-*l/53.8%
associate-*l/53.8%
*-lft-identity53.8%
sub-neg53.8%
associate-+l-53.8%
sub-neg53.8%
remove-double-neg53.8%
+-commutative53.8%
unpow253.8%
unpow253.8%
hypot-def82.5%
Simplified82.5%
Taylor expanded in B around -inf 80.5%
neg-mul-180.5%
unsub-neg80.5%
Simplified80.5%
if -3.4e28 < B < -1.5e10 or -7.5e-73 < B < -2.3e-288Initial program 36.9%
associate-*r/36.9%
associate-*l/36.9%
*-commutative36.9%
Simplified56.9%
Taylor expanded in B around 0 66.9%
associate-*r/66.9%
Simplified66.9%
if -2.3e-288 < B Initial program 51.0%
associate-*r/51.0%
associate-*l/51.0%
associate-*l/51.0%
*-lft-identity51.0%
sub-neg51.0%
associate-+l-50.9%
sub-neg50.9%
remove-double-neg50.9%
+-commutative50.9%
unpow250.9%
unpow250.9%
hypot-def71.3%
Simplified71.3%
Taylor expanded in B around inf 65.7%
Final simplification70.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ (+ C (- B A)) B)))))
(if (<= B -1.56e+28)
t_0
(if (<= B -1100000000000.0)
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))
(if (<= B -1.3e-74)
t_0
(if (<= B -1.4e-288)
(/ (atan (/ B (/ (- C A) -0.5))) (* PI 0.005555555555555556))
(* (/ 180.0 PI) (atan (/ (- C (+ B A)) B)))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(((C + (B - A)) / B));
double tmp;
if (B <= -1.56e+28) {
tmp = t_0;
} else if (B <= -1100000000000.0) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
} else if (B <= -1.3e-74) {
tmp = t_0;
} else if (B <= -1.4e-288) {
tmp = atan((B / ((C - A) / -0.5))) / (((double) M_PI) * 0.005555555555555556);
} 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 t_0 = (180.0 / Math.PI) * Math.atan(((C + (B - A)) / B));
double tmp;
if (B <= -1.56e+28) {
tmp = t_0;
} else if (B <= -1100000000000.0) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
} else if (B <= -1.3e-74) {
tmp = t_0;
} else if (B <= -1.4e-288) {
tmp = Math.atan((B / ((C - A) / -0.5))) / (Math.PI * 0.005555555555555556);
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - (B + A)) / B));
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan(((C + (B - A)) / B)) tmp = 0 if B <= -1.56e+28: tmp = t_0 elif B <= -1100000000000.0: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) elif B <= -1.3e-74: tmp = t_0 elif B <= -1.4e-288: tmp = math.atan((B / ((C - A) / -0.5))) / (math.pi * 0.005555555555555556) else: tmp = (180.0 / math.pi) * math.atan(((C - (B + A)) / B)) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C + Float64(B - A)) / B))) tmp = 0.0 if (B <= -1.56e+28) tmp = t_0; elseif (B <= -1100000000000.0) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); elseif (B <= -1.3e-74) tmp = t_0; elseif (B <= -1.4e-288) tmp = Float64(atan(Float64(B / Float64(Float64(C - A) / -0.5))) / Float64(pi * 0.005555555555555556)); 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) t_0 = (180.0 / pi) * atan(((C + (B - A)) / B)); tmp = 0.0; if (B <= -1.56e+28) tmp = t_0; elseif (B <= -1100000000000.0) tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); elseif (B <= -1.3e-74) tmp = t_0; elseif (B <= -1.4e-288) tmp = atan((B / ((C - A) / -0.5))) / (pi * 0.005555555555555556); else tmp = (180.0 / pi) * atan(((C - (B + A)) / B)); 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[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.56e+28], t$95$0, If[LessEqual[B, -1100000000000.0], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.3e-74], t$95$0, If[LessEqual[B, -1.4e-288], N[(N[ArcTan[N[(B / N[(N[(C - A), $MachinePrecision] / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi * 0.005555555555555556), $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}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)\\
\mathbf{if}\;B \leq -1.56 \cdot 10^{+28}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -1100000000000:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{elif}\;B \leq -1.3 \cdot 10^{-74}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -1.4 \cdot 10^{-288}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B}{\frac{C - A}{-0.5}}\right)}{\pi \cdot 0.005555555555555556}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\
\end{array}
\end{array}
if B < -1.5599999999999999e28 or -1.1e12 < B < -1.3e-74Initial program 53.8%
associate-*r/53.8%
associate-*l/53.8%
associate-*l/53.8%
*-lft-identity53.8%
sub-neg53.8%
associate-+l-53.8%
sub-neg53.8%
remove-double-neg53.8%
+-commutative53.8%
unpow253.8%
unpow253.8%
hypot-def82.5%
Simplified82.5%
Taylor expanded in B around -inf 80.5%
neg-mul-180.5%
unsub-neg80.5%
Simplified80.5%
if -1.5599999999999999e28 < B < -1.1e12Initial program 25.2%
associate-*r/25.2%
associate-*l/25.2%
*-commutative25.2%
Simplified26.2%
Taylor expanded in B around 0 79.8%
associate-*r/79.8%
Simplified79.8%
if -1.3e-74 < B < -1.4e-288Initial program 39.6%
associate-*r/39.6%
associate-*l/39.6%
*-commutative39.6%
Simplified64.2%
Taylor expanded in B around 0 63.9%
associate-*r/63.9%
Simplified63.9%
add-log-exp28.5%
*-commutative28.5%
Applied egg-rr28.5%
clear-num28.5%
un-div-inv28.5%
add-log-exp63.9%
*-commutative63.9%
*-un-lft-identity63.9%
times-frac63.9%
metadata-eval63.9%
div-inv63.9%
metadata-eval63.9%
Applied egg-rr63.9%
*-commutative63.9%
associate-/r/63.9%
Simplified63.9%
if -1.4e-288 < B Initial program 51.0%
associate-*r/51.0%
associate-*l/51.0%
associate-*l/51.0%
*-lft-identity51.0%
sub-neg51.0%
associate-+l-50.9%
sub-neg50.9%
remove-double-neg50.9%
+-commutative50.9%
unpow250.9%
unpow250.9%
hypot-def71.3%
Simplified71.3%
Taylor expanded in B around inf 65.7%
Final simplification70.7%
(FPCore (A B C)
:precision binary64
(if (<= B -1.05e-74)
(* (/ 180.0 PI) (atan 1.0))
(if (or (<= B 1.7e-105) (and (not (<= B 4.7e-31)) (<= B 8.5e+53)))
(* (/ 180.0 PI) (atan (* -0.5 (/ B C))))
(* (/ 180.0 PI) (atan -1.0)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.05e-74) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if ((B <= 1.7e-105) || (!(B <= 4.7e-31) && (B <= 8.5e+53))) {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
} 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.05e-74) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if ((B <= 1.7e-105) || (!(B <= 4.7e-31) && (B <= 8.5e+53))) {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.05e-74: tmp = (180.0 / math.pi) * math.atan(1.0) elif (B <= 1.7e-105) or (not (B <= 4.7e-31) and (B <= 8.5e+53)): tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.05e-74) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif ((B <= 1.7e-105) || (!(B <= 4.7e-31) && (B <= 8.5e+53))) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); 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.05e-74) tmp = (180.0 / pi) * atan(1.0); elseif ((B <= 1.7e-105) || (~((B <= 4.7e-31)) && (B <= 8.5e+53))) tmp = (180.0 / pi) * atan((-0.5 * (B / C))); else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.05e-74], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, 1.7e-105], And[N[Not[LessEqual[B, 4.7e-31]], $MachinePrecision], LessEqual[B, 8.5e+53]]], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $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.05 \cdot 10^{-74}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq 1.7 \cdot 10^{-105} \lor \neg \left(B \leq 4.7 \cdot 10^{-31}\right) \land B \leq 8.5 \cdot 10^{+53}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -1.05e-74Initial program 51.0%
associate-*r/51.0%
associate-*l/51.0%
*-commutative51.0%
Simplified77.0%
Taylor expanded in B around -inf 56.2%
if -1.05e-74 < B < 1.69999999999999996e-105 or 4.69999999999999987e-31 < B < 8.5000000000000002e53Initial program 50.5%
associate-*r/50.5%
associate-*l/50.5%
*-commutative50.5%
Simplified66.7%
Taylor expanded in B around 0 53.9%
associate-*r/53.9%
Simplified53.9%
Taylor expanded in C around inf 35.2%
if 1.69999999999999996e-105 < B < 4.69999999999999987e-31 or 8.5000000000000002e53 < B Initial program 44.9%
associate-*r/44.9%
associate-*l/44.9%
*-commutative44.9%
Simplified79.0%
Taylor expanded in B around inf 61.8%
Final simplification49.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan -1.0))))
(if (<= A -9.5e-216)
(* 180.0 (/ (atan (/ (* B -0.5) (- C A))) PI))
(if (<= A -2.3e-264)
t_0
(if (<= A -2.15e-302)
(* (/ 180.0 PI) (atan (/ (* C 2.0) B)))
(if (<= A 3e-57) 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(-1.0);
double tmp;
if (A <= -9.5e-216) {
tmp = 180.0 * (atan(((B * -0.5) / (C - A))) / ((double) M_PI));
} else if (A <= -2.3e-264) {
tmp = t_0;
} else if (A <= -2.15e-302) {
tmp = (180.0 / ((double) M_PI)) * atan(((C * 2.0) / B));
} else if (A <= 3e-57) {
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(-1.0);
double tmp;
if (A <= -9.5e-216) {
tmp = 180.0 * (Math.atan(((B * -0.5) / (C - A))) / Math.PI);
} else if (A <= -2.3e-264) {
tmp = t_0;
} else if (A <= -2.15e-302) {
tmp = (180.0 / Math.PI) * Math.atan(((C * 2.0) / B));
} else if (A <= 3e-57) {
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(-1.0) tmp = 0 if A <= -9.5e-216: tmp = 180.0 * (math.atan(((B * -0.5) / (C - A))) / math.pi) elif A <= -2.3e-264: tmp = t_0 elif A <= -2.15e-302: tmp = (180.0 / math.pi) * math.atan(((C * 2.0) / B)) elif A <= 3e-57: 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(Float64(180.0 / pi) * atan(-1.0)) tmp = 0.0 if (A <= -9.5e-216) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / Float64(C - A))) / pi)); elseif (A <= -2.3e-264) tmp = t_0; elseif (A <= -2.15e-302) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C * 2.0) / B))); elseif (A <= 3e-57) tmp = t_0; else tmp = Float64(Float64(180.0 / 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(-1.0); tmp = 0.0; if (A <= -9.5e-216) tmp = 180.0 * (atan(((B * -0.5) / (C - A))) / pi); elseif (A <= -2.3e-264) tmp = t_0; elseif (A <= -2.15e-302) tmp = (180.0 / pi) * atan(((C * 2.0) / B)); elseif (A <= 3e-57) 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[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -9.5e-216], N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2.3e-264], t$95$0, If[LessEqual[A, -2.15e-302], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3e-57], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} -1\\
\mathbf{if}\;A \leq -9.5 \cdot 10^{-216}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -2.3 \cdot 10^{-264}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -2.15 \cdot 10^{-302}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C \cdot 2}{B}\right)\\
\mathbf{elif}\;A \leq 3 \cdot 10^{-57}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A \cdot -2}{B}\right)\\
\end{array}
\end{array}
if A < -9.49999999999999943e-216Initial program 28.0%
associate-*r/28.0%
associate-*l/28.0%
*-commutative28.0%
Simplified56.4%
Taylor expanded in B around 0 64.7%
associate-*r/64.7%
Simplified64.7%
Taylor expanded in B around 0 64.6%
associate-*r/64.6%
associate-*r/64.7%
*-commutative64.7%
associate-*r/64.6%
Simplified64.6%
if -9.49999999999999943e-216 < A < -2.30000000000000012e-264 or -2.1500000000000001e-302 < A < 3.00000000000000001e-57Initial program 60.3%
associate-*r/60.3%
associate-*l/60.3%
*-commutative60.3%
Simplified86.3%
Taylor expanded in B around inf 44.0%
if -2.30000000000000012e-264 < A < -2.1500000000000001e-302Initial program 50.3%
associate-*r/50.3%
associate-*l/50.3%
*-commutative50.3%
Simplified73.9%
Taylor expanded in C around -inf 47.0%
if 3.00000000000000001e-57 < A Initial program 70.6%
associate-*r/70.6%
associate-*l/70.6%
*-commutative70.6%
Simplified86.8%
Taylor expanded in A around inf 64.5%
*-commutative64.5%
Simplified64.5%
Final simplification58.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan -1.0))))
(if (<= A -2.7e-222)
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))
(if (<= A -1.95e-263)
t_0
(if (<= A -2.5e-302)
(* (/ 180.0 PI) (atan (/ (* C 2.0) B)))
(if (<= A 3.9e-58) 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(-1.0);
double tmp;
if (A <= -2.7e-222) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
} else if (A <= -1.95e-263) {
tmp = t_0;
} else if (A <= -2.5e-302) {
tmp = (180.0 / ((double) M_PI)) * atan(((C * 2.0) / B));
} else if (A <= 3.9e-58) {
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(-1.0);
double tmp;
if (A <= -2.7e-222) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
} else if (A <= -1.95e-263) {
tmp = t_0;
} else if (A <= -2.5e-302) {
tmp = (180.0 / Math.PI) * Math.atan(((C * 2.0) / B));
} else if (A <= 3.9e-58) {
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(-1.0) tmp = 0 if A <= -2.7e-222: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) elif A <= -1.95e-263: tmp = t_0 elif A <= -2.5e-302: tmp = (180.0 / math.pi) * math.atan(((C * 2.0) / B)) elif A <= 3.9e-58: 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(Float64(180.0 / pi) * atan(-1.0)) tmp = 0.0 if (A <= -2.7e-222) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); elseif (A <= -1.95e-263) tmp = t_0; elseif (A <= -2.5e-302) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C * 2.0) / B))); elseif (A <= 3.9e-58) tmp = t_0; else tmp = Float64(Float64(180.0 / 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(-1.0); tmp = 0.0; if (A <= -2.7e-222) tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); elseif (A <= -1.95e-263) tmp = t_0; elseif (A <= -2.5e-302) tmp = (180.0 / pi) * atan(((C * 2.0) / B)); elseif (A <= 3.9e-58) 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[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -2.7e-222], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.95e-263], t$95$0, If[LessEqual[A, -2.5e-302], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.9e-58], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} -1\\
\mathbf{if}\;A \leq -2.7 \cdot 10^{-222}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{elif}\;A \leq -1.95 \cdot 10^{-263}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -2.5 \cdot 10^{-302}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C \cdot 2}{B}\right)\\
\mathbf{elif}\;A \leq 3.9 \cdot 10^{-58}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A \cdot -2}{B}\right)\\
\end{array}
\end{array}
if A < -2.7e-222Initial program 28.0%
associate-*r/28.0%
associate-*l/28.0%
*-commutative28.0%
Simplified56.4%
Taylor expanded in B around 0 64.7%
associate-*r/64.7%
Simplified64.7%
if -2.7e-222 < A < -1.94999999999999985e-263 or -2.50000000000000017e-302 < A < 3.89999999999999992e-58Initial program 60.3%
associate-*r/60.3%
associate-*l/60.3%
*-commutative60.3%
Simplified86.3%
Taylor expanded in B around inf 44.0%
if -1.94999999999999985e-263 < A < -2.50000000000000017e-302Initial program 50.3%
associate-*r/50.3%
associate-*l/50.3%
*-commutative50.3%
Simplified73.9%
Taylor expanded in C around -inf 47.0%
if 3.89999999999999992e-58 < A Initial program 70.6%
associate-*r/70.6%
associate-*l/70.6%
*-commutative70.6%
Simplified86.8%
Taylor expanded in A around inf 64.5%
*-commutative64.5%
Simplified64.5%
Final simplification58.6%
(FPCore (A B C)
:precision binary64
(if (<= B -2.3e-75)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B -8.2e-287)
(* (/ 180.0 PI) (atan (/ (* B 0.5) A)))
(if (<= B 1.3e-98)
(* (/ 180.0 PI) (atan (/ (* A -2.0) B)))
(* (/ 180.0 PI) (atan -1.0))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.3e-75) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= -8.2e-287) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * 0.5) / A));
} else if (B <= 1.3e-98) {
tmp = (180.0 / ((double) M_PI)) * atan(((A * -2.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 <= -2.3e-75) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= -8.2e-287) {
tmp = (180.0 / Math.PI) * Math.atan(((B * 0.5) / A));
} else if (B <= 1.3e-98) {
tmp = (180.0 / Math.PI) * Math.atan(((A * -2.0) / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.3e-75: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= -8.2e-287: tmp = (180.0 / math.pi) * math.atan(((B * 0.5) / A)) elif B <= 1.3e-98: tmp = (180.0 / math.pi) * math.atan(((A * -2.0) / B)) else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2.3e-75) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= -8.2e-287) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * 0.5) / A))); elseif (B <= 1.3e-98) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(A * -2.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 <= -2.3e-75) tmp = (180.0 / pi) * atan(1.0); elseif (B <= -8.2e-287) tmp = (180.0 / pi) * atan(((B * 0.5) / A)); elseif (B <= 1.3e-98) tmp = (180.0 / pi) * atan(((A * -2.0) / B)); else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.3e-75], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -8.2e-287], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.3e-98], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / 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 -2.3 \cdot 10^{-75}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq -8.2 \cdot 10^{-287}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
\mathbf{elif}\;B \leq 1.3 \cdot 10^{-98}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A \cdot -2}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -2.3e-75Initial program 50.5%
associate-*r/50.4%
associate-*l/50.5%
*-commutative50.5%
Simplified76.2%
Taylor expanded in B around -inf 55.7%
if -2.3e-75 < B < -8.2000000000000004e-287Initial program 41.6%
associate-*r/41.6%
associate-*l/41.6%
*-commutative41.6%
Simplified67.4%
Taylor expanded in A around -inf 40.6%
associate-*r/40.6%
Applied egg-rr40.6%
if -8.2000000000000004e-287 < B < 1.30000000000000007e-98Initial program 60.9%
associate-*r/60.9%
associate-*l/60.9%
*-commutative60.9%
Simplified75.4%
Taylor expanded in A around inf 44.3%
*-commutative44.3%
Simplified44.3%
if 1.30000000000000007e-98 < B Initial program 44.6%
associate-*r/44.6%
associate-*l/44.6%
*-commutative44.6%
Simplified71.8%
Taylor expanded in B around inf 55.1%
Final simplification51.3%
(FPCore (A B C) :precision binary64 (if (<= A -9.5e-217) (* (/ 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 (A <= -9.5e-217) {
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 (A <= -9.5e-217) {
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 A <= -9.5e-217: 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 (A <= -9.5e-217) 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 (A <= -9.5e-217) 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[A, -9.5e-217], 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}\;A \leq -9.5 \cdot 10^{-217}:\\
\;\;\;\;\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 A < -9.5000000000000001e-217Initial program 28.0%
associate-*r/28.0%
associate-*l/28.0%
*-commutative28.0%
Simplified56.4%
Taylor expanded in B around 0 64.7%
associate-*r/64.7%
Simplified64.7%
if -9.5000000000000001e-217 < A Initial program 64.5%
associate-*r/64.5%
associate-*l/64.5%
associate-*l/64.5%
*-lft-identity64.5%
sub-neg64.5%
associate-+l-64.5%
sub-neg64.5%
remove-double-neg64.5%
+-commutative64.5%
unpow264.5%
unpow264.5%
hypot-def85.7%
Simplified85.7%
Taylor expanded in B around inf 66.5%
Final simplification65.7%
(FPCore (A B C)
:precision binary64
(if (<= B -3.7e-142)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B 1.15e-198)
(* (/ 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 <= -3.7e-142) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= 1.15e-198) {
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 <= -3.7e-142) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= 1.15e-198) {
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 <= -3.7e-142: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= 1.15e-198: 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 <= -3.7e-142) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= 1.15e-198) 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 <= -3.7e-142) tmp = (180.0 / pi) * atan(1.0); elseif (B <= 1.15e-198) 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, -3.7e-142], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.15e-198], 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 -3.7 \cdot 10^{-142}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq 1.15 \cdot 10^{-198}:\\
\;\;\;\;\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 < -3.69999999999999986e-142Initial program 49.7%
associate-*r/49.7%
associate-*l/49.7%
*-commutative49.7%
Simplified73.1%
Taylor expanded in B around -inf 51.2%
if -3.69999999999999986e-142 < B < 1.15000000000000007e-198Initial program 56.5%
associate-*r/56.5%
associate-*l/56.5%
*-commutative56.5%
Simplified80.7%
Taylor expanded in C around inf 30.4%
distribute-rgt1-in30.4%
metadata-eval30.4%
mul0-lft30.4%
metadata-eval30.4%
Simplified30.4%
if 1.15000000000000007e-198 < B Initial program 45.1%
associate-*r/45.1%
associate-*l/45.1%
*-commutative45.1%
Simplified70.0%
Taylor expanded in B around inf 47.7%
Final simplification45.6%
(FPCore (A B C) :precision binary64 (if (<= B -5e-310) (* (/ 180.0 PI) (atan 1.0)) (* (/ 180.0 PI) (atan -1.0))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5e-310) {
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 <= -5e-310) {
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 <= -5e-310: 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 <= -5e-310) 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 <= -5e-310) 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, -5e-310], 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 -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -4.999999999999985e-310Initial program 49.2%
associate-*r/49.2%
associate-*l/49.2%
*-commutative49.2%
Simplified74.4%
Taylor expanded in B around -inf 41.7%
if -4.999999999999985e-310 < B Initial program 49.3%
associate-*r/49.3%
associate-*l/49.3%
*-commutative49.3%
Simplified72.4%
Taylor expanded in B around inf 41.8%
Final simplification41.8%
(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 49.3%
associate-*r/49.3%
associate-*l/49.3%
*-commutative49.3%
Simplified73.4%
Taylor expanded in B around inf 20.8%
Final simplification20.8%
herbie shell --seed 2023230
(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)))