
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
(FPCore (A B C) :precision binary64 (if (<= A -4.8e+126) (* (atan (* 0.5 (/ B A))) (/ 180.0 PI)) (/ (* 180.0 (atan (/ (- (- C A) (hypot (- A C) B)) B))) PI)))
double code(double A, double B, double C) {
double tmp;
if (A <= -4.8e+126) {
tmp = atan((0.5 * (B / A))) * (180.0 / ((double) M_PI));
} else {
tmp = (180.0 * atan((((C - A) - hypot((A - C), B)) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4.8e+126) {
tmp = Math.atan((0.5 * (B / A))) * (180.0 / Math.PI);
} else {
tmp = (180.0 * Math.atan((((C - A) - Math.hypot((A - C), B)) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4.8e+126: tmp = math.atan((0.5 * (B / A))) * (180.0 / math.pi) else: tmp = (180.0 * math.atan((((C - A) - math.hypot((A - C), B)) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4.8e+126) tmp = Float64(atan(Float64(0.5 * Float64(B / A))) * Float64(180.0 / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4.8e+126) tmp = atan((0.5 * (B / A))) * (180.0 / pi); else tmp = (180.0 * atan((((C - A) - hypot((A - C), B)) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4.8e+126], N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4.8 \cdot 10^{+126}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -4.80000000000000024e126Initial program 16.8%
associate-*r/16.8%
associate-*l/16.8%
*-un-lft-identity16.8%
unpow216.8%
unpow216.8%
hypot-define47.1%
Applied egg-rr47.1%
Taylor expanded in A around -inf 79.0%
*-commutative79.0%
associate-/l*79.3%
Applied egg-rr79.3%
if -4.80000000000000024e126 < A Initial program 60.2%
associate-*r/60.2%
associate-*l/60.2%
*-un-lft-identity60.2%
unpow260.2%
unpow260.2%
hypot-define84.5%
Applied egg-rr84.5%
Final simplification83.6%
(FPCore (A B C)
:precision binary64
(if (<= C -1.05e+107)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
(if (<= C 5.2e+125)
(/ (* (atan (/ (+ A (hypot B A)) B)) -180.0) PI)
(/ (atan (/ (* B -0.5) C)) (* PI 0.005555555555555556)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.05e+107) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else if (C <= 5.2e+125) {
tmp = (atan(((A + hypot(B, A)) / B)) * -180.0) / ((double) M_PI);
} else {
tmp = atan(((B * -0.5) / C)) / (((double) M_PI) * 0.005555555555555556);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.05e+107) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else if (C <= 5.2e+125) {
tmp = (Math.atan(((A + Math.hypot(B, A)) / B)) * -180.0) / Math.PI;
} else {
tmp = Math.atan(((B * -0.5) / C)) / (Math.PI * 0.005555555555555556);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.05e+107: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) elif C <= 5.2e+125: tmp = (math.atan(((A + math.hypot(B, A)) / B)) * -180.0) / math.pi else: tmp = math.atan(((B * -0.5) / C)) / (math.pi * 0.005555555555555556) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.05e+107) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); elseif (C <= 5.2e+125) tmp = Float64(Float64(atan(Float64(Float64(A + hypot(B, A)) / B)) * -180.0) / pi); else tmp = Float64(atan(Float64(Float64(B * -0.5) / C)) / Float64(pi * 0.005555555555555556)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.05e+107) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); elseif (C <= 5.2e+125) tmp = (atan(((A + hypot(B, A)) / B)) * -180.0) / pi; else tmp = atan(((B * -0.5) / C)) / (pi * 0.005555555555555556); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.05e+107], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 5.2e+125], N[(N[(N[ArcTan[N[(N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] * -180.0), $MachinePrecision] / Pi), $MachinePrecision], N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.05 \cdot 10^{+107}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 5.2 \cdot 10^{+125}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{B}\right) \cdot -180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi \cdot 0.005555555555555556}\\
\end{array}
\end{array}
if C < -1.05e107Initial program 80.3%
Taylor expanded in B around -inf 82.1%
associate--l+82.1%
div-sub84.4%
Simplified84.4%
if -1.05e107 < C < 5.20000000000000006e125Initial program 54.3%
associate-*r/54.3%
associate-*l/54.3%
*-un-lft-identity54.3%
unpow254.3%
unpow254.3%
hypot-define81.2%
Applied egg-rr81.2%
Taylor expanded in C around 0 49.9%
mul-1-neg49.9%
distribute-neg-frac249.9%
unpow249.9%
unpow249.9%
hypot-define77.1%
Simplified77.1%
distribute-frac-neg277.1%
atan-neg77.1%
add-sqr-sqrt37.2%
sqrt-unprod23.4%
sqr-neg23.4%
sqrt-unprod4.7%
add-sqr-sqrt9.2%
distribute-rgt-neg-in9.2%
neg-sub09.2%
add-sqr-sqrt4.7%
sqrt-unprod23.4%
sqr-neg23.4%
sqrt-unprod37.2%
add-sqr-sqrt77.1%
Applied egg-rr77.1%
neg-sub077.1%
*-commutative77.1%
distribute-rgt-neg-in77.1%
*-lft-identity77.1%
*-lft-identity77.1%
hypot-undefine49.9%
unpow249.9%
unpow249.9%
+-commutative49.9%
unpow249.9%
unpow249.9%
hypot-define77.1%
metadata-eval77.1%
Simplified77.1%
if 5.20000000000000006e125 < C Initial program 15.0%
Taylor expanded in C around inf 82.9%
Taylor expanded in A around inf 82.9%
*-commutative82.9%
associate-*l/83.1%
+-rgt-identity83.1%
fma-define83.1%
mul0-lft78.0%
associate-/l*78.0%
Simplified83.0%
clear-num83.0%
un-div-inv83.0%
associate-*r/83.1%
div-inv83.1%
metadata-eval83.1%
Applied egg-rr83.1%
Final simplification79.3%
(FPCore (A B C) :precision binary64 (if (<= A -3.5e+102) (* (atan (* 0.5 (/ B A))) (/ 180.0 PI)) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.5e+102) {
tmp = atan((0.5 * (B / A))) * (180.0 / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.5e+102) {
tmp = Math.atan((0.5 * (B / A))) * (180.0 / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.5e+102: tmp = math.atan((0.5 * (B / A))) * (180.0 / math.pi) else: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.5e+102) tmp = Float64(atan(Float64(0.5 * Float64(B / A))) * Float64(180.0 / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.5e+102) tmp = atan((0.5 * (B / A))) * (180.0 / pi); else tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.5e+102], N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.5 \cdot 10^{+102}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.50000000000000011e102Initial program 21.8%
associate-*r/21.8%
associate-*l/21.8%
*-un-lft-identity21.8%
unpow221.8%
unpow221.8%
hypot-define50.7%
Applied egg-rr50.7%
Taylor expanded in A around -inf 77.6%
*-commutative77.6%
associate-/l*77.8%
Applied egg-rr77.8%
if -3.50000000000000011e102 < A Initial program 60.1%
Simplified84.0%
Final simplification82.8%
(FPCore (A B C) :precision binary64 (if (<= A -5.1e+125) (* (atan (* 0.5 (/ B A))) (/ 180.0 PI)) (* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -5.1e+125) {
tmp = atan((0.5 * (B / A))) * (180.0 / ((double) M_PI));
} else {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -5.1e+125) {
tmp = Math.atan((0.5 * (B / A))) * (180.0 / Math.PI);
} else {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -5.1e+125: tmp = math.atan((0.5 * (B / A))) * (180.0 / math.pi) else: tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -5.1e+125) tmp = Float64(atan(Float64(0.5 * Float64(B / A))) * Float64(180.0 / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -5.1e+125) tmp = atan((0.5 * (B / A))) * (180.0 / pi); else tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -5.1e+125], N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -5.1 \cdot 10^{+125}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.0999999999999998e125Initial program 16.8%
associate-*r/16.8%
associate-*l/16.8%
*-un-lft-identity16.8%
unpow216.8%
unpow216.8%
hypot-define47.1%
Applied egg-rr47.1%
Taylor expanded in A around -inf 79.0%
*-commutative79.0%
associate-/l*79.3%
Applied egg-rr79.3%
if -5.0999999999999998e125 < A Initial program 60.2%
associate-*l/60.2%
*-lft-identity60.2%
+-commutative60.2%
unpow260.2%
unpow260.2%
hypot-define84.5%
Simplified84.5%
Final simplification83.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* 180.0 (atan (- 1.0 (/ A B)))) PI))
(t_1 (/ (* 180.0 (atan (+ (/ C B) -1.0))) PI)))
(if (<= C -28500000000.0)
t_1
(if (<= C -6.8e-74)
t_0
(if (<= C -2.9e-103)
t_1
(if (<= C -3.9e-140)
(* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))
(if (<= C 4e-168)
t_0
(if (<= C 1e-118)
(/ (* -180.0 (atan (+ 1.0 (/ A B)))) PI)
(if (<= C 1.9e+16)
t_0
(/
(atan (/ (* B -0.5) C))
(* PI 0.005555555555555556)))))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 * atan((1.0 - (A / B)))) / ((double) M_PI);
double t_1 = (180.0 * atan(((C / B) + -1.0))) / ((double) M_PI);
double tmp;
if (C <= -28500000000.0) {
tmp = t_1;
} else if (C <= -6.8e-74) {
tmp = t_0;
} else if (C <= -2.9e-103) {
tmp = t_1;
} else if (C <= -3.9e-140) {
tmp = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
} else if (C <= 4e-168) {
tmp = t_0;
} else if (C <= 1e-118) {
tmp = (-180.0 * atan((1.0 + (A / B)))) / ((double) M_PI);
} else if (C <= 1.9e+16) {
tmp = t_0;
} else {
tmp = atan(((B * -0.5) / C)) / (((double) M_PI) * 0.005555555555555556);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 * Math.atan((1.0 - (A / B)))) / Math.PI;
double t_1 = (180.0 * Math.atan(((C / B) + -1.0))) / Math.PI;
double tmp;
if (C <= -28500000000.0) {
tmp = t_1;
} else if (C <= -6.8e-74) {
tmp = t_0;
} else if (C <= -2.9e-103) {
tmp = t_1;
} else if (C <= -3.9e-140) {
tmp = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
} else if (C <= 4e-168) {
tmp = t_0;
} else if (C <= 1e-118) {
tmp = (-180.0 * Math.atan((1.0 + (A / B)))) / Math.PI;
} else if (C <= 1.9e+16) {
tmp = t_0;
} else {
tmp = Math.atan(((B * -0.5) / C)) / (Math.PI * 0.005555555555555556);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 * math.atan((1.0 - (A / B)))) / math.pi t_1 = (180.0 * math.atan(((C / B) + -1.0))) / math.pi tmp = 0 if C <= -28500000000.0: tmp = t_1 elif C <= -6.8e-74: tmp = t_0 elif C <= -2.9e-103: tmp = t_1 elif C <= -3.9e-140: tmp = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) elif C <= 4e-168: tmp = t_0 elif C <= 1e-118: tmp = (-180.0 * math.atan((1.0 + (A / B)))) / math.pi elif C <= 1.9e+16: tmp = t_0 else: tmp = math.atan(((B * -0.5) / C)) / (math.pi * 0.005555555555555556) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 * atan(Float64(1.0 - Float64(A / B)))) / pi) t_1 = Float64(Float64(180.0 * atan(Float64(Float64(C / B) + -1.0))) / pi) tmp = 0.0 if (C <= -28500000000.0) tmp = t_1; elseif (C <= -6.8e-74) tmp = t_0; elseif (C <= -2.9e-103) tmp = t_1; elseif (C <= -3.9e-140) tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi)); elseif (C <= 4e-168) tmp = t_0; elseif (C <= 1e-118) tmp = Float64(Float64(-180.0 * atan(Float64(1.0 + Float64(A / B)))) / pi); elseif (C <= 1.9e+16) tmp = t_0; else tmp = Float64(atan(Float64(Float64(B * -0.5) / C)) / Float64(pi * 0.005555555555555556)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 * atan((1.0 - (A / B)))) / pi; t_1 = (180.0 * atan(((C / B) + -1.0))) / pi; tmp = 0.0; if (C <= -28500000000.0) tmp = t_1; elseif (C <= -6.8e-74) tmp = t_0; elseif (C <= -2.9e-103) tmp = t_1; elseif (C <= -3.9e-140) tmp = 180.0 * (atan(((0.5 * B) / A)) / pi); elseif (C <= 4e-168) tmp = t_0; elseif (C <= 1e-118) tmp = (-180.0 * atan((1.0 + (A / B)))) / pi; elseif (C <= 1.9e+16) tmp = t_0; else tmp = atan(((B * -0.5) / C)) / (pi * 0.005555555555555556); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 * N[ArcTan[N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[C, -28500000000.0], t$95$1, If[LessEqual[C, -6.8e-74], t$95$0, If[LessEqual[C, -2.9e-103], t$95$1, If[LessEqual[C, -3.9e-140], N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 4e-168], t$95$0, If[LessEqual[C, 1e-118], N[(N[(-180.0 * N[ArcTan[N[(1.0 + N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 1.9e+16], t$95$0, N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180 \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
t_1 := \frac{180 \cdot \tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\
\mathbf{if}\;C \leq -28500000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;C \leq -6.8 \cdot 10^{-74}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq -2.9 \cdot 10^{-103}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;C \leq -3.9 \cdot 10^{-140}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq 4 \cdot 10^{-168}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq 10^{-118}:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(1 + \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.9 \cdot 10^{+16}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi \cdot 0.005555555555555556}\\
\end{array}
\end{array}
if C < -2.85e10 or -6.8000000000000001e-74 < C < -2.8999999999999999e-103Initial program 73.0%
associate-*r/73.0%
associate-*l/73.0%
*-un-lft-identity73.0%
unpow273.0%
unpow273.0%
hypot-define89.8%
Applied egg-rr89.8%
Taylor expanded in B around inf 77.4%
+-commutative77.4%
associate--r+77.4%
div-sub78.9%
Simplified78.9%
Taylor expanded in C around inf 77.8%
if -2.85e10 < C < -6.8000000000000001e-74 or -3.90000000000000019e-140 < C < 4.0000000000000002e-168 or 9.99999999999999985e-119 < C < 1.9e16Initial program 61.1%
associate-*r/61.1%
associate-*l/61.1%
*-un-lft-identity61.1%
unpow261.1%
unpow261.1%
hypot-define85.9%
Applied egg-rr85.9%
Taylor expanded in C around 0 58.4%
mul-1-neg58.4%
distribute-neg-frac258.4%
unpow258.4%
unpow258.4%
hypot-define83.4%
Simplified83.4%
Taylor expanded in B around -inf 60.6%
neg-mul-160.6%
unsub-neg60.6%
Simplified60.6%
if -2.8999999999999999e-103 < C < -3.90000000000000019e-140Initial program 53.0%
Taylor expanded in A around -inf 63.3%
associate-*r/63.3%
Simplified63.3%
if 4.0000000000000002e-168 < C < 9.99999999999999985e-119Initial program 50.5%
associate-*r/50.5%
associate-*l/50.5%
*-un-lft-identity50.5%
unpow250.5%
unpow250.5%
hypot-define76.5%
Applied egg-rr76.5%
Taylor expanded in C around 0 50.5%
mul-1-neg50.5%
distribute-neg-frac250.5%
unpow250.5%
unpow250.5%
hypot-define76.7%
Simplified76.7%
distribute-frac-neg276.7%
atan-neg76.7%
add-sqr-sqrt57.1%
sqrt-unprod27.8%
sqr-neg27.8%
sqrt-unprod0.9%
add-sqr-sqrt2.4%
distribute-rgt-neg-in2.4%
neg-sub02.4%
add-sqr-sqrt0.9%
sqrt-unprod27.8%
sqr-neg27.8%
sqrt-unprod57.1%
add-sqr-sqrt76.7%
Applied egg-rr76.7%
neg-sub076.7%
*-commutative76.7%
distribute-rgt-neg-in76.7%
*-lft-identity76.7%
*-lft-identity76.7%
hypot-undefine50.5%
unpow250.5%
unpow250.5%
+-commutative50.5%
unpow250.5%
unpow250.5%
hypot-define76.7%
metadata-eval76.7%
Simplified76.7%
Taylor expanded in A around 0 70.0%
if 1.9e16 < C Initial program 19.8%
Taylor expanded in C around inf 68.1%
Taylor expanded in A around inf 68.1%
*-commutative68.1%
associate-*l/68.2%
+-rgt-identity68.2%
fma-define68.2%
mul0-lft65.0%
associate-/l*65.0%
Simplified68.1%
clear-num68.1%
un-div-inv68.1%
associate-*r/68.2%
div-inv68.2%
metadata-eval68.2%
Applied egg-rr68.2%
Final simplification67.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))
(if (<= B -9e-87)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -4.8e-189)
t_0
(if (<= B -4.3e-237)
(* 180.0 (/ (atan (* (/ C B) 2.0)) PI))
(if (<= B 9.6e-241)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 4.2e-101)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(if (<= B 2.6e+36) t_0 (* 180.0 (/ (atan -1.0) PI))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
double tmp;
if (B <= -9e-87) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -4.8e-189) {
tmp = t_0;
} else if (B <= -4.3e-237) {
tmp = 180.0 * (atan(((C / B) * 2.0)) / ((double) M_PI));
} else if (B <= 9.6e-241) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 4.2e-101) {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
} else if (B <= 2.6e+36) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
double tmp;
if (B <= -9e-87) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -4.8e-189) {
tmp = t_0;
} else if (B <= -4.3e-237) {
tmp = 180.0 * (Math.atan(((C / B) * 2.0)) / Math.PI);
} else if (B <= 9.6e-241) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 4.2e-101) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
} else if (B <= 2.6e+36) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) tmp = 0 if B <= -9e-87: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -4.8e-189: tmp = t_0 elif B <= -4.3e-237: tmp = 180.0 * (math.atan(((C / B) * 2.0)) / math.pi) elif B <= 9.6e-241: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 4.2e-101: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) elif B <= 2.6e+36: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)) tmp = 0.0 if (B <= -9e-87) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -4.8e-189) tmp = t_0; elseif (B <= -4.3e-237) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) * 2.0)) / pi)); elseif (B <= 9.6e-241) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 4.2e-101) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); elseif (B <= 2.6e+36) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((-0.5 * (B / C))) / pi); tmp = 0.0; if (B <= -9e-87) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -4.8e-189) tmp = t_0; elseif (B <= -4.3e-237) tmp = 180.0 * (atan(((C / B) * 2.0)) / pi); elseif (B <= 9.6e-241) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 4.2e-101) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); elseif (B <= 2.6e+36) tmp = t_0; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -9e-87], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -4.8e-189], t$95$0, If[LessEqual[B, -4.3e-237], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 9.6e-241], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.2e-101], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.6e+36], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{if}\;B \leq -9 \cdot 10^{-87}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -4.8 \cdot 10^{-189}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq -4.3 \cdot 10^{-237}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\
\mathbf{elif}\;B \leq 9.6 \cdot 10^{-241}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4.2 \cdot 10^{-101}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.6 \cdot 10^{+36}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -8.99999999999999915e-87Initial program 56.1%
Taylor expanded in B around -inf 59.4%
if -8.99999999999999915e-87 < B < -4.7999999999999997e-189 or 4.20000000000000031e-101 < B < 2.6000000000000001e36Initial program 38.8%
Taylor expanded in C around inf 48.7%
Taylor expanded in A around inf 48.7%
if -4.7999999999999997e-189 < B < -4.29999999999999982e-237Initial program 73.6%
Taylor expanded in C around -inf 72.3%
if -4.29999999999999982e-237 < B < 9.6e-241Initial program 57.1%
Taylor expanded in C around inf 49.1%
associate-*r/49.1%
distribute-rgt1-in49.1%
metadata-eval49.1%
mul0-lft49.1%
metadata-eval49.1%
Simplified49.1%
if 9.6e-241 < B < 4.20000000000000031e-101Initial program 63.4%
Taylor expanded in A around inf 46.6%
if 2.6000000000000001e36 < B Initial program 48.5%
Taylor expanded in B around inf 69.1%
Final simplification57.7%
(FPCore (A B C)
:precision binary64
(if (<= B -1.15e-81)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -6.1e-192)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= B -2.25e-238)
(* 180.0 (/ (atan (* (/ C B) 2.0)) PI))
(if (<= B 5.4e-241)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 8.8e-111)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(if (<= B 4.6e+69)
(* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))
(* 180.0 (/ (atan -1.0) PI)))))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.15e-81) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -6.1e-192) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (B <= -2.25e-238) {
tmp = 180.0 * (atan(((C / B) * 2.0)) / ((double) M_PI));
} else if (B <= 5.4e-241) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 8.8e-111) {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
} else if (B <= 4.6e+69) {
tmp = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.15e-81) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -6.1e-192) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (B <= -2.25e-238) {
tmp = 180.0 * (Math.atan(((C / B) * 2.0)) / Math.PI);
} else if (B <= 5.4e-241) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 8.8e-111) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
} else if (B <= 4.6e+69) {
tmp = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.15e-81: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -6.1e-192: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif B <= -2.25e-238: tmp = 180.0 * (math.atan(((C / B) * 2.0)) / math.pi) elif B <= 5.4e-241: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 8.8e-111: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) elif B <= 4.6e+69: tmp = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.15e-81) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -6.1e-192) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (B <= -2.25e-238) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) * 2.0)) / pi)); elseif (B <= 5.4e-241) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 8.8e-111) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); elseif (B <= 4.6e+69) tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.15e-81) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -6.1e-192) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (B <= -2.25e-238) tmp = 180.0 * (atan(((C / B) * 2.0)) / pi); elseif (B <= 5.4e-241) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 8.8e-111) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); elseif (B <= 4.6e+69) tmp = 180.0 * (atan(((0.5 * B) / A)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.15e-81], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -6.1e-192], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.25e-238], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.4e-241], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 8.8e-111], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.6e+69], N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.15 \cdot 10^{-81}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -6.1 \cdot 10^{-192}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;B \leq -2.25 \cdot 10^{-238}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\
\mathbf{elif}\;B \leq 5.4 \cdot 10^{-241}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 8.8 \cdot 10^{-111}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{elif}\;B \leq 4.6 \cdot 10^{+69}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.14999999999999996e-81Initial program 56.1%
Taylor expanded in B around -inf 59.4%
if -1.14999999999999996e-81 < B < -6.0999999999999999e-192Initial program 44.3%
Taylor expanded in C around inf 54.6%
Taylor expanded in A around inf 54.6%
if -6.0999999999999999e-192 < B < -2.24999999999999998e-238Initial program 73.6%
Taylor expanded in C around -inf 72.3%
if -2.24999999999999998e-238 < B < 5.3999999999999998e-241Initial program 57.1%
Taylor expanded in C around inf 49.1%
associate-*r/49.1%
distribute-rgt1-in49.1%
metadata-eval49.1%
mul0-lft49.1%
metadata-eval49.1%
Simplified49.1%
if 5.3999999999999998e-241 < B < 8.8e-111Initial program 64.3%
Taylor expanded in A around inf 49.5%
if 8.8e-111 < B < 4.60000000000000033e69Initial program 44.6%
Taylor expanded in A around -inf 47.6%
associate-*r/47.6%
Simplified47.6%
if 4.60000000000000033e69 < B Initial program 44.5%
Taylor expanded in B around inf 71.9%
Final simplification58.5%
(FPCore (A B C)
:precision binary64
(if (<= B -1.9e-83)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -7.4e-189)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= B -9.8e-238)
(* 180.0 (/ (atan (* (/ C B) 2.0)) PI))
(if (<= B 7.2e-242)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 8.5e-111)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(if (<= B 4.7e+69)
(* (atan (* 0.5 (/ B A))) (/ 180.0 PI))
(* 180.0 (/ (atan -1.0) PI)))))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.9e-83) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -7.4e-189) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (B <= -9.8e-238) {
tmp = 180.0 * (atan(((C / B) * 2.0)) / ((double) M_PI));
} else if (B <= 7.2e-242) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 8.5e-111) {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
} else if (B <= 4.7e+69) {
tmp = atan((0.5 * (B / A))) * (180.0 / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.9e-83) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -7.4e-189) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (B <= -9.8e-238) {
tmp = 180.0 * (Math.atan(((C / B) * 2.0)) / Math.PI);
} else if (B <= 7.2e-242) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 8.5e-111) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
} else if (B <= 4.7e+69) {
tmp = Math.atan((0.5 * (B / A))) * (180.0 / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.9e-83: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -7.4e-189: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif B <= -9.8e-238: tmp = 180.0 * (math.atan(((C / B) * 2.0)) / math.pi) elif B <= 7.2e-242: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 8.5e-111: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) elif B <= 4.7e+69: tmp = math.atan((0.5 * (B / A))) * (180.0 / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.9e-83) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -7.4e-189) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (B <= -9.8e-238) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) * 2.0)) / pi)); elseif (B <= 7.2e-242) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 8.5e-111) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); elseif (B <= 4.7e+69) tmp = Float64(atan(Float64(0.5 * Float64(B / A))) * Float64(180.0 / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.9e-83) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -7.4e-189) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (B <= -9.8e-238) tmp = 180.0 * (atan(((C / B) * 2.0)) / pi); elseif (B <= 7.2e-242) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 8.5e-111) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); elseif (B <= 4.7e+69) tmp = atan((0.5 * (B / A))) * (180.0 / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.9e-83], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -7.4e-189], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -9.8e-238], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7.2e-242], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 8.5e-111], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.7e+69], N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.9 \cdot 10^{-83}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -7.4 \cdot 10^{-189}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;B \leq -9.8 \cdot 10^{-238}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\
\mathbf{elif}\;B \leq 7.2 \cdot 10^{-242}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 8.5 \cdot 10^{-111}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{elif}\;B \leq 4.7 \cdot 10^{+69}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.89999999999999988e-83Initial program 56.1%
Taylor expanded in B around -inf 59.4%
if -1.89999999999999988e-83 < B < -7.40000000000000039e-189Initial program 44.3%
Taylor expanded in C around inf 54.6%
Taylor expanded in A around inf 54.6%
if -7.40000000000000039e-189 < B < -9.7999999999999996e-238Initial program 73.6%
Taylor expanded in C around -inf 72.3%
if -9.7999999999999996e-238 < B < 7.20000000000000028e-242Initial program 57.1%
Taylor expanded in C around inf 49.1%
associate-*r/49.1%
distribute-rgt1-in49.1%
metadata-eval49.1%
mul0-lft49.1%
metadata-eval49.1%
Simplified49.1%
if 7.20000000000000028e-242 < B < 8.5000000000000003e-111Initial program 64.3%
Taylor expanded in A around inf 49.5%
if 8.5000000000000003e-111 < B < 4.69999999999999996e69Initial program 44.6%
associate-*r/44.6%
associate-*l/44.6%
*-un-lft-identity44.6%
unpow244.6%
unpow244.6%
hypot-define56.5%
Applied egg-rr56.5%
Taylor expanded in A around -inf 47.5%
*-commutative47.5%
associate-/l*47.6%
Applied egg-rr47.6%
if 4.69999999999999996e69 < B Initial program 44.5%
Taylor expanded in B around inf 71.9%
Final simplification58.5%
(FPCore (A B C)
:precision binary64
(if (<= B -1.2e-80)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -1.54e-189)
(* (/ 180.0 PI) (atan (* B (/ -0.5 C))))
(if (<= B -7.1e-239)
(* 180.0 (/ (atan (* (/ C B) 2.0)) PI))
(if (<= B 2.25e-241)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 1.3e-110)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(if (<= B 4.6e+69)
(* (atan (* 0.5 (/ B A))) (/ 180.0 PI))
(* 180.0 (/ (atan -1.0) PI)))))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.2e-80) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -1.54e-189) {
tmp = (180.0 / ((double) M_PI)) * atan((B * (-0.5 / C)));
} else if (B <= -7.1e-239) {
tmp = 180.0 * (atan(((C / B) * 2.0)) / ((double) M_PI));
} else if (B <= 2.25e-241) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 1.3e-110) {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
} else if (B <= 4.6e+69) {
tmp = atan((0.5 * (B / A))) * (180.0 / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.2e-80) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -1.54e-189) {
tmp = (180.0 / Math.PI) * Math.atan((B * (-0.5 / C)));
} else if (B <= -7.1e-239) {
tmp = 180.0 * (Math.atan(((C / B) * 2.0)) / Math.PI);
} else if (B <= 2.25e-241) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 1.3e-110) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
} else if (B <= 4.6e+69) {
tmp = Math.atan((0.5 * (B / A))) * (180.0 / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.2e-80: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -1.54e-189: tmp = (180.0 / math.pi) * math.atan((B * (-0.5 / C))) elif B <= -7.1e-239: tmp = 180.0 * (math.atan(((C / B) * 2.0)) / math.pi) elif B <= 2.25e-241: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 1.3e-110: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) elif B <= 4.6e+69: tmp = math.atan((0.5 * (B / A))) * (180.0 / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.2e-80) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -1.54e-189) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(-0.5 / C)))); elseif (B <= -7.1e-239) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) * 2.0)) / pi)); elseif (B <= 2.25e-241) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 1.3e-110) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); elseif (B <= 4.6e+69) tmp = Float64(atan(Float64(0.5 * Float64(B / A))) * Float64(180.0 / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.2e-80) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -1.54e-189) tmp = (180.0 / pi) * atan((B * (-0.5 / C))); elseif (B <= -7.1e-239) tmp = 180.0 * (atan(((C / B) * 2.0)) / pi); elseif (B <= 2.25e-241) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 1.3e-110) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); elseif (B <= 4.6e+69) tmp = atan((0.5 * (B / A))) * (180.0 / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.2e-80], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.54e-189], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -7.1e-239], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.25e-241], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.3e-110], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.6e+69], N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.2 \cdot 10^{-80}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -1.54 \cdot 10^{-189}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)\\
\mathbf{elif}\;B \leq -7.1 \cdot 10^{-239}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.25 \cdot 10^{-241}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.3 \cdot 10^{-110}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{elif}\;B \leq 4.6 \cdot 10^{+69}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.2e-80Initial program 56.1%
Taylor expanded in B around -inf 59.4%
if -1.2e-80 < B < -1.54000000000000005e-189Initial program 44.3%
Taylor expanded in C around inf 54.6%
Taylor expanded in A around inf 54.6%
*-commutative54.6%
associate-*l/54.5%
+-rgt-identity54.5%
fma-define54.5%
mul0-lft43.3%
associate-/l*43.4%
Simplified54.7%
if -1.54000000000000005e-189 < B < -7.0999999999999997e-239Initial program 73.6%
Taylor expanded in C around -inf 72.3%
if -7.0999999999999997e-239 < B < 2.2499999999999999e-241Initial program 57.1%
Taylor expanded in C around inf 49.1%
associate-*r/49.1%
distribute-rgt1-in49.1%
metadata-eval49.1%
mul0-lft49.1%
metadata-eval49.1%
Simplified49.1%
if 2.2499999999999999e-241 < B < 1.29999999999999995e-110Initial program 64.3%
Taylor expanded in A around inf 49.5%
if 1.29999999999999995e-110 < B < 4.60000000000000033e69Initial program 44.6%
associate-*r/44.6%
associate-*l/44.6%
*-un-lft-identity44.6%
unpow244.6%
unpow244.6%
hypot-define56.5%
Applied egg-rr56.5%
Taylor expanded in A around -inf 47.5%
*-commutative47.5%
associate-/l*47.6%
Applied egg-rr47.6%
if 4.60000000000000033e69 < B Initial program 44.5%
Taylor expanded in B around inf 71.9%
Final simplification58.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* 180.0 (atan (- 1.0 (/ A B)))) PI)))
(if (<= C -1.95e+123)
(* 180.0 (/ (atan (* (/ C B) 2.0)) PI))
(if (<= C -6.5e+83)
(* (atan (* 0.5 (/ B A))) (/ 180.0 PI))
(if (<= C -1.1e+22)
(* 180.0 (/ (atan -1.0) PI))
(if (<= C -1.18e-54)
t_0
(if (<= C -1.05e-142)
(* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))
(if (<= C 1.9e+16)
t_0
(/ (atan (/ (* B -0.5) C)) (* PI 0.005555555555555556))))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 * atan((1.0 - (A / B)))) / ((double) M_PI);
double tmp;
if (C <= -1.95e+123) {
tmp = 180.0 * (atan(((C / B) * 2.0)) / ((double) M_PI));
} else if (C <= -6.5e+83) {
tmp = atan((0.5 * (B / A))) * (180.0 / ((double) M_PI));
} else if (C <= -1.1e+22) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (C <= -1.18e-54) {
tmp = t_0;
} else if (C <= -1.05e-142) {
tmp = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
} else if (C <= 1.9e+16) {
tmp = t_0;
} else {
tmp = atan(((B * -0.5) / C)) / (((double) M_PI) * 0.005555555555555556);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 * Math.atan((1.0 - (A / B)))) / Math.PI;
double tmp;
if (C <= -1.95e+123) {
tmp = 180.0 * (Math.atan(((C / B) * 2.0)) / Math.PI);
} else if (C <= -6.5e+83) {
tmp = Math.atan((0.5 * (B / A))) * (180.0 / Math.PI);
} else if (C <= -1.1e+22) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (C <= -1.18e-54) {
tmp = t_0;
} else if (C <= -1.05e-142) {
tmp = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
} else if (C <= 1.9e+16) {
tmp = t_0;
} else {
tmp = Math.atan(((B * -0.5) / C)) / (Math.PI * 0.005555555555555556);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 * math.atan((1.0 - (A / B)))) / math.pi tmp = 0 if C <= -1.95e+123: tmp = 180.0 * (math.atan(((C / B) * 2.0)) / math.pi) elif C <= -6.5e+83: tmp = math.atan((0.5 * (B / A))) * (180.0 / math.pi) elif C <= -1.1e+22: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif C <= -1.18e-54: tmp = t_0 elif C <= -1.05e-142: tmp = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) elif C <= 1.9e+16: tmp = t_0 else: tmp = math.atan(((B * -0.5) / C)) / (math.pi * 0.005555555555555556) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 * atan(Float64(1.0 - Float64(A / B)))) / pi) tmp = 0.0 if (C <= -1.95e+123) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) * 2.0)) / pi)); elseif (C <= -6.5e+83) tmp = Float64(atan(Float64(0.5 * Float64(B / A))) * Float64(180.0 / pi)); elseif (C <= -1.1e+22) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (C <= -1.18e-54) tmp = t_0; elseif (C <= -1.05e-142) tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi)); elseif (C <= 1.9e+16) tmp = t_0; else tmp = Float64(atan(Float64(Float64(B * -0.5) / C)) / Float64(pi * 0.005555555555555556)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 * atan((1.0 - (A / B)))) / pi; tmp = 0.0; if (C <= -1.95e+123) tmp = 180.0 * (atan(((C / B) * 2.0)) / pi); elseif (C <= -6.5e+83) tmp = atan((0.5 * (B / A))) * (180.0 / pi); elseif (C <= -1.1e+22) tmp = 180.0 * (atan(-1.0) / pi); elseif (C <= -1.18e-54) tmp = t_0; elseif (C <= -1.05e-142) tmp = 180.0 * (atan(((0.5 * B) / A)) / pi); elseif (C <= 1.9e+16) tmp = t_0; else tmp = atan(((B * -0.5) / C)) / (pi * 0.005555555555555556); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[C, -1.95e+123], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -6.5e+83], N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -1.1e+22], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -1.18e-54], t$95$0, If[LessEqual[C, -1.05e-142], N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.9e+16], t$95$0, N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180 \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -1.95 \cdot 10^{+123}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\
\mathbf{elif}\;C \leq -6.5 \cdot 10^{+83}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;C \leq -1.1 \cdot 10^{+22}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;C \leq -1.18 \cdot 10^{-54}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq -1.05 \cdot 10^{-142}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.9 \cdot 10^{+16}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi \cdot 0.005555555555555556}\\
\end{array}
\end{array}
if C < -1.94999999999999996e123Initial program 81.6%
Taylor expanded in C around -inf 77.9%
if -1.94999999999999996e123 < C < -6.5000000000000003e83Initial program 31.8%
associate-*r/31.8%
associate-*l/31.8%
*-un-lft-identity31.8%
unpow231.8%
unpow231.8%
hypot-define64.3%
Applied egg-rr64.3%
Taylor expanded in A around -inf 67.4%
*-commutative67.4%
associate-/l*67.4%
Applied egg-rr67.4%
if -6.5000000000000003e83 < C < -1.1e22Initial program 74.1%
Taylor expanded in B around inf 55.3%
if -1.1e22 < C < -1.17999999999999996e-54 or -1.05e-142 < C < 1.9e16Initial program 59.6%
associate-*r/59.6%
associate-*l/59.6%
*-un-lft-identity59.6%
unpow259.6%
unpow259.6%
hypot-define84.3%
Applied egg-rr84.3%
Taylor expanded in C around 0 58.1%
mul-1-neg58.1%
distribute-neg-frac258.1%
unpow258.1%
unpow258.1%
hypot-define82.9%
Simplified82.9%
Taylor expanded in B around -inf 57.5%
neg-mul-157.5%
unsub-neg57.5%
Simplified57.5%
if -1.17999999999999996e-54 < C < -1.05e-142Initial program 56.6%
Taylor expanded in A around -inf 53.9%
associate-*r/53.9%
Simplified53.9%
if 1.9e16 < C Initial program 19.8%
Taylor expanded in C around inf 68.1%
Taylor expanded in A around inf 68.1%
*-commutative68.1%
associate-*l/68.2%
+-rgt-identity68.2%
fma-define68.2%
mul0-lft65.0%
associate-/l*65.0%
Simplified68.1%
clear-num68.1%
un-div-inv68.1%
associate-*r/68.2%
div-inv68.2%
metadata-eval68.2%
Applied egg-rr68.2%
Final simplification63.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* 180.0 (atan (- 1.0 (/ A B)))) PI))
(t_1 (/ (* 180.0 (atan (+ (/ C B) -1.0))) PI)))
(if (<= C -6500000000.0)
t_1
(if (<= C -1.6e-78)
t_0
(if (<= C -1.4e-103)
t_1
(if (<= C -1.9e-139)
(* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))
(if (<= C 1.85e+17)
t_0
(/ (atan (/ (* B -0.5) C)) (* PI 0.005555555555555556)))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 * atan((1.0 - (A / B)))) / ((double) M_PI);
double t_1 = (180.0 * atan(((C / B) + -1.0))) / ((double) M_PI);
double tmp;
if (C <= -6500000000.0) {
tmp = t_1;
} else if (C <= -1.6e-78) {
tmp = t_0;
} else if (C <= -1.4e-103) {
tmp = t_1;
} else if (C <= -1.9e-139) {
tmp = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
} else if (C <= 1.85e+17) {
tmp = t_0;
} else {
tmp = atan(((B * -0.5) / C)) / (((double) M_PI) * 0.005555555555555556);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 * Math.atan((1.0 - (A / B)))) / Math.PI;
double t_1 = (180.0 * Math.atan(((C / B) + -1.0))) / Math.PI;
double tmp;
if (C <= -6500000000.0) {
tmp = t_1;
} else if (C <= -1.6e-78) {
tmp = t_0;
} else if (C <= -1.4e-103) {
tmp = t_1;
} else if (C <= -1.9e-139) {
tmp = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
} else if (C <= 1.85e+17) {
tmp = t_0;
} else {
tmp = Math.atan(((B * -0.5) / C)) / (Math.PI * 0.005555555555555556);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 * math.atan((1.0 - (A / B)))) / math.pi t_1 = (180.0 * math.atan(((C / B) + -1.0))) / math.pi tmp = 0 if C <= -6500000000.0: tmp = t_1 elif C <= -1.6e-78: tmp = t_0 elif C <= -1.4e-103: tmp = t_1 elif C <= -1.9e-139: tmp = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) elif C <= 1.85e+17: tmp = t_0 else: tmp = math.atan(((B * -0.5) / C)) / (math.pi * 0.005555555555555556) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 * atan(Float64(1.0 - Float64(A / B)))) / pi) t_1 = Float64(Float64(180.0 * atan(Float64(Float64(C / B) + -1.0))) / pi) tmp = 0.0 if (C <= -6500000000.0) tmp = t_1; elseif (C <= -1.6e-78) tmp = t_0; elseif (C <= -1.4e-103) tmp = t_1; elseif (C <= -1.9e-139) tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi)); elseif (C <= 1.85e+17) tmp = t_0; else tmp = Float64(atan(Float64(Float64(B * -0.5) / C)) / Float64(pi * 0.005555555555555556)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 * atan((1.0 - (A / B)))) / pi; t_1 = (180.0 * atan(((C / B) + -1.0))) / pi; tmp = 0.0; if (C <= -6500000000.0) tmp = t_1; elseif (C <= -1.6e-78) tmp = t_0; elseif (C <= -1.4e-103) tmp = t_1; elseif (C <= -1.9e-139) tmp = 180.0 * (atan(((0.5 * B) / A)) / pi); elseif (C <= 1.85e+17) tmp = t_0; else tmp = atan(((B * -0.5) / C)) / (pi * 0.005555555555555556); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 * N[ArcTan[N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[C, -6500000000.0], t$95$1, If[LessEqual[C, -1.6e-78], t$95$0, If[LessEqual[C, -1.4e-103], t$95$1, If[LessEqual[C, -1.9e-139], N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.85e+17], t$95$0, N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180 \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
t_1 := \frac{180 \cdot \tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\
\mathbf{if}\;C \leq -6500000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;C \leq -1.6 \cdot 10^{-78}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq -1.4 \cdot 10^{-103}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;C \leq -1.9 \cdot 10^{-139}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.85 \cdot 10^{+17}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi \cdot 0.005555555555555556}\\
\end{array}
\end{array}
if C < -6.5e9 or -1.6e-78 < C < -1.40000000000000011e-103Initial program 73.0%
associate-*r/73.0%
associate-*l/73.0%
*-un-lft-identity73.0%
unpow273.0%
unpow273.0%
hypot-define89.8%
Applied egg-rr89.8%
Taylor expanded in B around inf 77.4%
+-commutative77.4%
associate--r+77.4%
div-sub78.9%
Simplified78.9%
Taylor expanded in C around inf 77.8%
if -6.5e9 < C < -1.6e-78 or -1.90000000000000004e-139 < C < 1.85e17Initial program 59.6%
associate-*r/59.6%
associate-*l/59.6%
*-un-lft-identity59.6%
unpow259.6%
unpow259.6%
hypot-define84.6%
Applied egg-rr84.6%
Taylor expanded in C around 0 57.3%
mul-1-neg57.3%
distribute-neg-frac257.3%
unpow257.3%
unpow257.3%
hypot-define82.5%
Simplified82.5%
Taylor expanded in B around -inf 57.6%
neg-mul-157.6%
unsub-neg57.6%
Simplified57.6%
if -1.40000000000000011e-103 < C < -1.90000000000000004e-139Initial program 53.0%
Taylor expanded in A around -inf 63.3%
associate-*r/63.3%
Simplified63.3%
if 1.85e17 < C Initial program 19.8%
Taylor expanded in C around inf 68.1%
Taylor expanded in A around inf 68.1%
*-commutative68.1%
associate-*l/68.2%
+-rgt-identity68.2%
fma-define68.2%
mul0-lft65.0%
associate-/l*65.0%
Simplified68.1%
clear-num68.1%
un-div-inv68.1%
associate-*r/68.2%
div-inv68.2%
metadata-eval68.2%
Applied egg-rr68.2%
Final simplification65.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -1.85e-277)
(/ (* 180.0 (atan (+ 1.0 t_0))) PI)
(if (<= B 8e-244)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 1.35e-49)
(/ (* 180.0 (atan (+ t_0 -1.0))) PI)
(if (<= B 3.6e+27)
(* (atan (* 0.5 (/ B A))) (/ 180.0 PI))
(* 180.0 (/ (atan (+ (/ C B) (- -1.0 (/ A B)))) PI))))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -1.85e-277) {
tmp = (180.0 * atan((1.0 + t_0))) / ((double) M_PI);
} else if (B <= 8e-244) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 1.35e-49) {
tmp = (180.0 * atan((t_0 + -1.0))) / ((double) M_PI);
} else if (B <= 3.6e+27) {
tmp = atan((0.5 * (B / A))) * (180.0 / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -1.85e-277) {
tmp = (180.0 * Math.atan((1.0 + t_0))) / Math.PI;
} else if (B <= 8e-244) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 1.35e-49) {
tmp = (180.0 * Math.atan((t_0 + -1.0))) / Math.PI;
} else if (B <= 3.6e+27) {
tmp = Math.atan((0.5 * (B / A))) * (180.0 / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C / B) + (-1.0 - (A / B)))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= -1.85e-277: tmp = (180.0 * math.atan((1.0 + t_0))) / math.pi elif B <= 8e-244: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 1.35e-49: tmp = (180.0 * math.atan((t_0 + -1.0))) / math.pi elif B <= 3.6e+27: tmp = math.atan((0.5 * (B / A))) * (180.0 / math.pi) else: tmp = 180.0 * (math.atan(((C / B) + (-1.0 - (A / B)))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= -1.85e-277) tmp = Float64(Float64(180.0 * atan(Float64(1.0 + t_0))) / pi); elseif (B <= 8e-244) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 1.35e-49) tmp = Float64(Float64(180.0 * atan(Float64(t_0 + -1.0))) / pi); elseif (B <= 3.6e+27) tmp = Float64(atan(Float64(0.5 * Float64(B / A))) * Float64(180.0 / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + Float64(-1.0 - Float64(A / B)))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= -1.85e-277) tmp = (180.0 * atan((1.0 + t_0))) / pi; elseif (B <= 8e-244) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 1.35e-49) tmp = (180.0 * atan((t_0 + -1.0))) / pi; elseif (B <= 3.6e+27) tmp = atan((0.5 * (B / A))) * (180.0 / pi); else tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -1.85e-277], N[(N[(180.0 * N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 8e-244], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.35e-49], N[(N[(180.0 * N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 3.6e+27], N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -1.85 \cdot 10^{-277}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + t\_0\right)}{\pi}\\
\mathbf{elif}\;B \leq 8 \cdot 10^{-244}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.35 \cdot 10^{-49}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(t\_0 + -1\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.6 \cdot 10^{+27}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.84999999999999992e-277Initial program 54.8%
associate-*r/54.8%
associate-*l/54.8%
*-un-lft-identity54.8%
unpow254.8%
unpow254.8%
hypot-define78.1%
Applied egg-rr78.1%
Taylor expanded in B around -inf 70.8%
associate--l+70.8%
div-sub70.8%
Simplified70.8%
if -1.84999999999999992e-277 < B < 7.9999999999999994e-244Initial program 61.7%
Taylor expanded in C around inf 68.3%
associate-*r/68.3%
distribute-rgt1-in68.3%
metadata-eval68.3%
mul0-lft68.3%
metadata-eval68.3%
Simplified68.3%
if 7.9999999999999994e-244 < B < 1.35e-49Initial program 59.9%
associate-*r/59.9%
associate-*l/59.9%
*-un-lft-identity59.9%
unpow259.9%
unpow259.9%
hypot-define78.9%
Applied egg-rr78.9%
Taylor expanded in B around inf 56.7%
+-commutative56.7%
associate--r+56.7%
div-sub59.5%
Simplified59.5%
if 1.35e-49 < B < 3.59999999999999983e27Initial program 26.3%
associate-*r/26.3%
associate-*l/26.3%
*-un-lft-identity26.3%
unpow226.3%
unpow226.3%
hypot-define38.6%
Applied egg-rr38.6%
Taylor expanded in A around -inf 54.5%
*-commutative54.5%
associate-/l*54.6%
Applied egg-rr54.6%
if 3.59999999999999983e27 < B Initial program 49.4%
Taylor expanded in B around inf 85.3%
Final simplification71.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -8.5e-277)
(/ (* 180.0 (atan (+ 1.0 t_0))) PI)
(if (<= B 8.5e-244)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (or (<= B 1.62e-49) (not (<= B 3.6e+27)))
(/ (* 180.0 (atan (+ t_0 -1.0))) PI)
(* (atan (* 0.5 (/ B A))) (/ 180.0 PI)))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -8.5e-277) {
tmp = (180.0 * atan((1.0 + t_0))) / ((double) M_PI);
} else if (B <= 8.5e-244) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if ((B <= 1.62e-49) || !(B <= 3.6e+27)) {
tmp = (180.0 * atan((t_0 + -1.0))) / ((double) M_PI);
} else {
tmp = atan((0.5 * (B / A))) * (180.0 / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -8.5e-277) {
tmp = (180.0 * Math.atan((1.0 + t_0))) / Math.PI;
} else if (B <= 8.5e-244) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if ((B <= 1.62e-49) || !(B <= 3.6e+27)) {
tmp = (180.0 * Math.atan((t_0 + -1.0))) / Math.PI;
} else {
tmp = Math.atan((0.5 * (B / A))) * (180.0 / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= -8.5e-277: tmp = (180.0 * math.atan((1.0 + t_0))) / math.pi elif B <= 8.5e-244: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif (B <= 1.62e-49) or not (B <= 3.6e+27): tmp = (180.0 * math.atan((t_0 + -1.0))) / math.pi else: tmp = math.atan((0.5 * (B / A))) * (180.0 / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= -8.5e-277) tmp = Float64(Float64(180.0 * atan(Float64(1.0 + t_0))) / pi); elseif (B <= 8.5e-244) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif ((B <= 1.62e-49) || !(B <= 3.6e+27)) tmp = Float64(Float64(180.0 * atan(Float64(t_0 + -1.0))) / pi); else tmp = Float64(atan(Float64(0.5 * Float64(B / A))) * Float64(180.0 / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= -8.5e-277) tmp = (180.0 * atan((1.0 + t_0))) / pi; elseif (B <= 8.5e-244) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif ((B <= 1.62e-49) || ~((B <= 3.6e+27))) tmp = (180.0 * atan((t_0 + -1.0))) / pi; else tmp = atan((0.5 * (B / A))) * (180.0 / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -8.5e-277], N[(N[(180.0 * N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 8.5e-244], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, 1.62e-49], N[Not[LessEqual[B, 3.6e+27]], $MachinePrecision]], N[(N[(180.0 * N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -8.5 \cdot 10^{-277}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + t\_0\right)}{\pi}\\
\mathbf{elif}\;B \leq 8.5 \cdot 10^{-244}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.62 \cdot 10^{-49} \lor \neg \left(B \leq 3.6 \cdot 10^{+27}\right):\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(t\_0 + -1\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\
\end{array}
\end{array}
if B < -8.4999999999999998e-277Initial program 54.8%
associate-*r/54.8%
associate-*l/54.8%
*-un-lft-identity54.8%
unpow254.8%
unpow254.8%
hypot-define78.1%
Applied egg-rr78.1%
Taylor expanded in B around -inf 70.8%
associate--l+70.8%
div-sub70.8%
Simplified70.8%
if -8.4999999999999998e-277 < B < 8.4999999999999999e-244Initial program 61.7%
Taylor expanded in C around inf 68.3%
associate-*r/68.3%
distribute-rgt1-in68.3%
metadata-eval68.3%
mul0-lft68.3%
metadata-eval68.3%
Simplified68.3%
if 8.4999999999999999e-244 < B < 1.62e-49 or 3.59999999999999983e27 < B Initial program 53.3%
associate-*r/53.3%
associate-*l/53.3%
*-un-lft-identity53.3%
unpow253.3%
unpow253.3%
hypot-define83.4%
Applied egg-rr83.4%
Taylor expanded in B around inf 74.6%
+-commutative74.6%
associate--r+74.6%
div-sub75.6%
Simplified75.6%
if 1.62e-49 < B < 3.59999999999999983e27Initial program 26.3%
associate-*r/26.3%
associate-*l/26.3%
*-un-lft-identity26.3%
unpow226.3%
unpow226.3%
hypot-define38.6%
Applied egg-rr38.6%
Taylor expanded in A around -inf 54.5%
*-commutative54.5%
associate-/l*54.6%
Applied egg-rr54.6%
Final simplification71.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))
(if (<= B -2.6e-84)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 6e-242)
t_0
(if (<= B 3.45e-99)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(if (<= B 3.4e+36) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
double tmp;
if (B <= -2.6e-84) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 6e-242) {
tmp = t_0;
} else if (B <= 3.45e-99) {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
} else if (B <= 3.4e+36) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
double tmp;
if (B <= -2.6e-84) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 6e-242) {
tmp = t_0;
} else if (B <= 3.45e-99) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
} else if (B <= 3.4e+36) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) tmp = 0 if B <= -2.6e-84: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 6e-242: tmp = t_0 elif B <= 3.45e-99: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) elif B <= 3.4e+36: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)) tmp = 0.0 if (B <= -2.6e-84) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 6e-242) tmp = t_0; elseif (B <= 3.45e-99) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); elseif (B <= 3.4e+36) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((-0.5 * (B / C))) / pi); tmp = 0.0; if (B <= -2.6e-84) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 6e-242) tmp = t_0; elseif (B <= 3.45e-99) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); elseif (B <= 3.4e+36) tmp = t_0; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -2.6e-84], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6e-242], t$95$0, If[LessEqual[B, 3.45e-99], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.4e+36], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{if}\;B \leq -2.6 \cdot 10^{-84}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 6 \cdot 10^{-242}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 3.45 \cdot 10^{-99}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.4 \cdot 10^{+36}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.6e-84Initial program 56.1%
Taylor expanded in B around -inf 59.4%
if -2.6e-84 < B < 6e-242 or 3.4500000000000002e-99 < B < 3.3999999999999998e36Initial program 47.9%
Taylor expanded in C around inf 44.0%
Taylor expanded in A around inf 44.0%
if 6e-242 < B < 3.4500000000000002e-99Initial program 63.4%
Taylor expanded in A around inf 46.6%
if 3.3999999999999998e36 < B Initial program 48.5%
Taylor expanded in B around inf 69.1%
Final simplification55.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))
(if (<= B -7.2e-277)
t_0
(if (<= B 4.6e-241)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 1.4e-105)
t_0
(if (<= B 2.1e+30)
(* (atan (* 0.5 (/ B A))) (/ 180.0 PI))
(/ (* -180.0 (atan (+ 1.0 (/ A B)))) PI)))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
double tmp;
if (B <= -7.2e-277) {
tmp = t_0;
} else if (B <= 4.6e-241) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 1.4e-105) {
tmp = t_0;
} else if (B <= 2.1e+30) {
tmp = atan((0.5 * (B / A))) * (180.0 / ((double) M_PI));
} else {
tmp = (-180.0 * atan((1.0 + (A / B)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
double tmp;
if (B <= -7.2e-277) {
tmp = t_0;
} else if (B <= 4.6e-241) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 1.4e-105) {
tmp = t_0;
} else if (B <= 2.1e+30) {
tmp = Math.atan((0.5 * (B / A))) * (180.0 / Math.PI);
} else {
tmp = (-180.0 * Math.atan((1.0 + (A / B)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) tmp = 0 if B <= -7.2e-277: tmp = t_0 elif B <= 4.6e-241: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 1.4e-105: tmp = t_0 elif B <= 2.1e+30: tmp = math.atan((0.5 * (B / A))) * (180.0 / math.pi) else: tmp = (-180.0 * math.atan((1.0 + (A / B)))) / math.pi return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)) tmp = 0.0 if (B <= -7.2e-277) tmp = t_0; elseif (B <= 4.6e-241) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 1.4e-105) tmp = t_0; elseif (B <= 2.1e+30) tmp = Float64(atan(Float64(0.5 * Float64(B / A))) * Float64(180.0 / pi)); else tmp = Float64(Float64(-180.0 * atan(Float64(1.0 + Float64(A / B)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); tmp = 0.0; if (B <= -7.2e-277) tmp = t_0; elseif (B <= 4.6e-241) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 1.4e-105) tmp = t_0; elseif (B <= 2.1e+30) tmp = atan((0.5 * (B / A))) * (180.0 / pi); else tmp = (-180.0 * atan((1.0 + (A / B)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -7.2e-277], t$95$0, If[LessEqual[B, 4.6e-241], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.4e-105], t$95$0, If[LessEqual[B, 2.1e+30], N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(-180.0 * N[ArcTan[N[(1.0 + N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -7.2 \cdot 10^{-277}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 4.6 \cdot 10^{-241}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.4 \cdot 10^{-105}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 2.1 \cdot 10^{+30}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(1 + \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -7.19999999999999968e-277 or 4.5999999999999999e-241 < B < 1.4e-105Initial program 56.5%
Taylor expanded in B around -inf 68.3%
associate--l+68.3%
div-sub68.9%
Simplified68.9%
if -7.19999999999999968e-277 < B < 4.5999999999999999e-241Initial program 61.7%
Taylor expanded in C around inf 68.3%
associate-*r/68.3%
distribute-rgt1-in68.3%
metadata-eval68.3%
mul0-lft68.3%
metadata-eval68.3%
Simplified68.3%
if 1.4e-105 < B < 2.1e30Initial program 33.3%
associate-*r/33.3%
associate-*l/33.3%
*-un-lft-identity33.3%
unpow233.3%
unpow233.3%
hypot-define48.5%
Applied egg-rr48.5%
Taylor expanded in A around -inf 47.8%
*-commutative47.8%
associate-/l*47.9%
Applied egg-rr47.9%
if 2.1e30 < B Initial program 49.4%
associate-*r/49.4%
associate-*l/49.4%
*-un-lft-identity49.4%
unpow249.4%
unpow249.4%
hypot-define86.1%
Applied egg-rr86.1%
Taylor expanded in C around 0 42.5%
mul-1-neg42.5%
distribute-neg-frac242.5%
unpow242.5%
unpow242.5%
hypot-define77.9%
Simplified77.9%
distribute-frac-neg277.9%
atan-neg77.9%
add-sqr-sqrt77.6%
sqrt-unprod28.6%
sqr-neg28.6%
sqrt-unprod0.0%
add-sqr-sqrt1.8%
distribute-rgt-neg-in1.8%
neg-sub01.8%
add-sqr-sqrt0.0%
sqrt-unprod28.6%
sqr-neg28.6%
sqrt-unprod77.6%
add-sqr-sqrt77.9%
Applied egg-rr77.9%
neg-sub077.9%
*-commutative77.9%
distribute-rgt-neg-in77.9%
*-lft-identity77.9%
*-lft-identity77.9%
hypot-undefine42.5%
unpow242.5%
unpow242.5%
+-commutative42.5%
unpow242.5%
unpow242.5%
hypot-define77.9%
metadata-eval77.9%
Simplified77.9%
Taylor expanded in A around 0 77.2%
Final simplification68.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (atan (+ 1.0 (/ (- C A) B)))))
(if (<= B -1.9e-275)
(/ (* 180.0 t_0) PI)
(if (<= B 1.4e-242)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 1.45e-105)
(* 180.0 (/ t_0 PI))
(if (<= B 1.4e+33)
(* (atan (* 0.5 (/ B A))) (/ 180.0 PI))
(/ (* -180.0 (atan (+ 1.0 (/ A B)))) PI)))))))
double code(double A, double B, double C) {
double t_0 = atan((1.0 + ((C - A) / B)));
double tmp;
if (B <= -1.9e-275) {
tmp = (180.0 * t_0) / ((double) M_PI);
} else if (B <= 1.4e-242) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 1.45e-105) {
tmp = 180.0 * (t_0 / ((double) M_PI));
} else if (B <= 1.4e+33) {
tmp = atan((0.5 * (B / A))) * (180.0 / ((double) M_PI));
} else {
tmp = (-180.0 * atan((1.0 + (A / B)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = Math.atan((1.0 + ((C - A) / B)));
double tmp;
if (B <= -1.9e-275) {
tmp = (180.0 * t_0) / Math.PI;
} else if (B <= 1.4e-242) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 1.45e-105) {
tmp = 180.0 * (t_0 / Math.PI);
} else if (B <= 1.4e+33) {
tmp = Math.atan((0.5 * (B / A))) * (180.0 / Math.PI);
} else {
tmp = (-180.0 * Math.atan((1.0 + (A / B)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = math.atan((1.0 + ((C - A) / B))) tmp = 0 if B <= -1.9e-275: tmp = (180.0 * t_0) / math.pi elif B <= 1.4e-242: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 1.45e-105: tmp = 180.0 * (t_0 / math.pi) elif B <= 1.4e+33: tmp = math.atan((0.5 * (B / A))) * (180.0 / math.pi) else: tmp = (-180.0 * math.atan((1.0 + (A / B)))) / math.pi return tmp
function code(A, B, C) t_0 = atan(Float64(1.0 + Float64(Float64(C - A) / B))) tmp = 0.0 if (B <= -1.9e-275) tmp = Float64(Float64(180.0 * t_0) / pi); elseif (B <= 1.4e-242) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 1.45e-105) tmp = Float64(180.0 * Float64(t_0 / pi)); elseif (B <= 1.4e+33) tmp = Float64(atan(Float64(0.5 * Float64(B / A))) * Float64(180.0 / pi)); else tmp = Float64(Float64(-180.0 * atan(Float64(1.0 + Float64(A / B)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = atan((1.0 + ((C - A) / B))); tmp = 0.0; if (B <= -1.9e-275) tmp = (180.0 * t_0) / pi; elseif (B <= 1.4e-242) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 1.45e-105) tmp = 180.0 * (t_0 / pi); elseif (B <= 1.4e+33) tmp = atan((0.5 * (B / A))) * (180.0 / pi); else tmp = (-180.0 * atan((1.0 + (A / B)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[B, -1.9e-275], N[(N[(180.0 * t$95$0), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 1.4e-242], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.45e-105], N[(180.0 * N[(t$95$0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.4e+33], N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(-180.0 * N[ArcTan[N[(1.0 + N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1} \left(1 + \frac{C - A}{B}\right)\\
\mathbf{if}\;B \leq -1.9 \cdot 10^{-275}:\\
\;\;\;\;\frac{180 \cdot t\_0}{\pi}\\
\mathbf{elif}\;B \leq 1.4 \cdot 10^{-242}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.45 \cdot 10^{-105}:\\
\;\;\;\;180 \cdot \frac{t\_0}{\pi}\\
\mathbf{elif}\;B \leq 1.4 \cdot 10^{+33}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(1 + \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.89999999999999986e-275Initial program 54.8%
associate-*r/54.8%
associate-*l/54.8%
*-un-lft-identity54.8%
unpow254.8%
unpow254.8%
hypot-define78.1%
Applied egg-rr78.1%
Taylor expanded in B around -inf 70.8%
associate--l+70.8%
div-sub70.8%
Simplified70.8%
if -1.89999999999999986e-275 < B < 1.39999999999999992e-242Initial program 61.7%
Taylor expanded in C around inf 68.3%
associate-*r/68.3%
distribute-rgt1-in68.3%
metadata-eval68.3%
mul0-lft68.3%
metadata-eval68.3%
Simplified68.3%
if 1.39999999999999992e-242 < B < 1.45000000000000002e-105Initial program 64.3%
Taylor expanded in B around -inf 56.7%
associate--l+56.7%
div-sub60.4%
Simplified60.4%
if 1.45000000000000002e-105 < B < 1.4e33Initial program 33.3%
associate-*r/33.3%
associate-*l/33.3%
*-un-lft-identity33.3%
unpow233.3%
unpow233.3%
hypot-define48.5%
Applied egg-rr48.5%
Taylor expanded in A around -inf 47.8%
*-commutative47.8%
associate-/l*47.9%
Applied egg-rr47.9%
if 1.4e33 < B Initial program 49.4%
associate-*r/49.4%
associate-*l/49.4%
*-un-lft-identity49.4%
unpow249.4%
unpow249.4%
hypot-define86.1%
Applied egg-rr86.1%
Taylor expanded in C around 0 42.5%
mul-1-neg42.5%
distribute-neg-frac242.5%
unpow242.5%
unpow242.5%
hypot-define77.9%
Simplified77.9%
distribute-frac-neg277.9%
atan-neg77.9%
add-sqr-sqrt77.6%
sqrt-unprod28.6%
sqr-neg28.6%
sqrt-unprod0.0%
add-sqr-sqrt1.8%
distribute-rgt-neg-in1.8%
neg-sub01.8%
add-sqr-sqrt0.0%
sqrt-unprod28.6%
sqr-neg28.6%
sqrt-unprod77.6%
add-sqr-sqrt77.9%
Applied egg-rr77.9%
neg-sub077.9%
*-commutative77.9%
distribute-rgt-neg-in77.9%
*-lft-identity77.9%
*-lft-identity77.9%
hypot-undefine42.5%
unpow242.5%
unpow242.5%
+-commutative42.5%
unpow242.5%
unpow242.5%
hypot-define77.9%
metadata-eval77.9%
Simplified77.9%
Taylor expanded in A around 0 77.2%
Final simplification68.7%
(FPCore (A B C)
:precision binary64
(if (<= B -4.8e-95)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 7e-240)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 3.6e+36)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -4.8e-95) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 7e-240) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 3.6e+36) {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -4.8e-95) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 7e-240) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 3.6e+36) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -4.8e-95: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 7e-240: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 3.6e+36: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -4.8e-95) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 7e-240) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 3.6e+36) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -4.8e-95) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 7e-240) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 3.6e+36) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -4.8e-95], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7e-240], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.6e+36], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -4.8 \cdot 10^{-95}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 7 \cdot 10^{-240}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.6 \cdot 10^{+36}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -4.8e-95Initial program 56.0%
Taylor expanded in B around -inf 58.4%
if -4.8e-95 < B < 7.00000000000000032e-240Initial program 54.6%
Taylor expanded in C around inf 41.4%
associate-*r/41.4%
distribute-rgt1-in41.4%
metadata-eval41.4%
mul0-lft41.4%
metadata-eval41.4%
Simplified41.4%
if 7.00000000000000032e-240 < B < 3.5999999999999997e36Initial program 50.1%
Taylor expanded in A around inf 33.7%
if 3.5999999999999997e36 < B Initial program 48.5%
Taylor expanded in B around inf 69.1%
Final simplification52.5%
(FPCore (A B C)
:precision binary64
(if (<= B -4.1e-94)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 4.5e-29)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -4.1e-94) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 4.5e-29) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -4.1e-94) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 4.5e-29) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -4.1e-94: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 4.5e-29: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -4.1e-94) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 4.5e-29) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -4.1e-94) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 4.5e-29) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -4.1e-94], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.5e-29], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -4.1 \cdot 10^{-94}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 4.5 \cdot 10^{-29}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -4.10000000000000001e-94Initial program 56.0%
Taylor expanded in B around -inf 58.4%
if -4.10000000000000001e-94 < B < 4.4999999999999998e-29Initial program 53.3%
Taylor expanded in C around inf 32.7%
associate-*r/32.7%
distribute-rgt1-in32.7%
metadata-eval32.7%
mul0-lft32.7%
metadata-eval32.7%
Simplified32.7%
if 4.4999999999999998e-29 < B Initial program 47.6%
Taylor expanded in B around inf 60.5%
Final simplification49.7%
(FPCore (A B C) :precision binary64 (if (<= B -5e-310) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5e-310) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -5e-310) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5e-310: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -5e-310) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -5e-310) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5e-310], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -5 \cdot 10^{-310}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -4.999999999999985e-310Initial program 54.3%
Taylor expanded in B around -inf 44.7%
if -4.999999999999985e-310 < B Initial program 51.1%
Taylor expanded in B around inf 40.9%
Final simplification42.9%
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan -1.0) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(-1.0) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(-1.0) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(-1.0) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(-1.0) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(-1.0) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} -1}{\pi}
\end{array}
Initial program 52.8%
Taylor expanded in B around inf 20.3%
Final simplification20.3%
herbie shell --seed 2024076
(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)))