
(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 26 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 -5.6e+141) (* 180.0 (/ (atan (/ (* 0.5 B) A)) PI)) (* (/ 180.0 PI) (atan (* (/ -1.0 B) (+ (- A C) (hypot (- A C) B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -5.6e+141) {
tmp = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((-1.0 / B) * ((A - C) + hypot((A - C), B))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -5.6e+141) {
tmp = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan(((-1.0 / B) * ((A - C) + Math.hypot((A - C), B))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -5.6e+141: tmp = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) else: tmp = (180.0 / math.pi) * math.atan(((-1.0 / B) * ((A - C) + math.hypot((A - C), B)))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -5.6e+141) tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(-1.0 / B) * Float64(Float64(A - C) + hypot(Float64(A - C), B))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -5.6e+141) tmp = 180.0 * (atan(((0.5 * B) / A)) / pi); else tmp = (180.0 / pi) * atan(((-1.0 / B) * ((A - C) + hypot((A - C), B)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -5.6e+141], N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(-1.0 / B), $MachinePrecision] * N[(N[(A - C), $MachinePrecision] + N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -5.6 \cdot 10^{+141}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-1}{B} \cdot \left(\left(A - C\right) + \mathsf{hypot}\left(A - C, B\right)\right)\right)\\
\end{array}
\end{array}
if A < -5.59999999999999982e141Initial program 9.1%
Taylor expanded in A around -inf 84.2%
associate-*r/84.2%
Simplified84.2%
if -5.59999999999999982e141 < A Initial program 66.5%
Taylor expanded in B around 0 65.6%
Simplified83.4%
div-inv83.5%
hypot-undefine65.6%
unpow265.6%
unpow265.6%
+-commutative65.6%
associate--l-66.6%
*-commutative66.6%
unpow266.6%
unpow266.6%
hypot-define84.4%
Applied egg-rr84.4%
Final simplification84.4%
(FPCore (A B C)
:precision binary64
(if (<= A -1.05e+138)
(* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))
(if (<= A 3.7e-54)
(* (/ 180.0 PI) (atan (* (/ 1.0 B) (- C (hypot B C)))))
(* 180.0 (/ (atan (/ (+ A (hypot B A)) (- B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.05e+138) {
tmp = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
} else if (A <= 3.7e-54) {
tmp = (180.0 / ((double) M_PI)) * atan(((1.0 / B) * (C - hypot(B, C))));
} else {
tmp = 180.0 * (atan(((A + hypot(B, A)) / -B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.05e+138) {
tmp = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
} else if (A <= 3.7e-54) {
tmp = (180.0 / Math.PI) * Math.atan(((1.0 / B) * (C - Math.hypot(B, C))));
} else {
tmp = 180.0 * (Math.atan(((A + Math.hypot(B, A)) / -B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.05e+138: tmp = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) elif A <= 3.7e-54: tmp = (180.0 / math.pi) * math.atan(((1.0 / B) * (C - math.hypot(B, C)))) else: tmp = 180.0 * (math.atan(((A + math.hypot(B, A)) / -B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.05e+138) tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi)); elseif (A <= 3.7e-54) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(1.0 / B) * Float64(C - hypot(B, C))))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + hypot(B, A)) / Float64(-B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.05e+138) tmp = 180.0 * (atan(((0.5 * B) / A)) / pi); elseif (A <= 3.7e-54) tmp = (180.0 / pi) * atan(((1.0 / B) * (C - hypot(B, C)))); else tmp = 180.0 * (atan(((A + hypot(B, A)) / -B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.05e+138], N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.7e-54], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.05 \cdot 10^{+138}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 3.7 \cdot 10^{-54}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{1}{B} \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{-B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.05000000000000003e138Initial program 9.1%
Taylor expanded in A around -inf 84.2%
associate-*r/84.2%
Simplified84.2%
if -1.05000000000000003e138 < A < 3.7000000000000003e-54Initial program 60.0%
Taylor expanded in B around 0 58.5%
Simplified78.0%
div-inv78.0%
hypot-undefine58.5%
unpow258.5%
unpow258.5%
+-commutative58.5%
associate--l-60.0%
*-commutative60.0%
unpow260.0%
unpow260.0%
hypot-define79.5%
Applied egg-rr79.5%
Taylor expanded in A around 0 56.4%
unpow256.4%
unpow256.4%
hypot-define75.7%
Simplified75.7%
if 3.7000000000000003e-54 < A Initial program 78.3%
Taylor expanded in C around 0 76.3%
mul-1-neg76.3%
distribute-neg-frac276.3%
+-commutative76.3%
unpow276.3%
unpow276.3%
hypot-define88.8%
Simplified88.8%
Final simplification80.9%
(FPCore (A B C)
:precision binary64
(if (<= A -1.25e+134)
(* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))
(if (<= A 4.2e-122)
(* (/ 180.0 PI) (atan (* (/ 1.0 B) (- C (hypot B C)))))
(* (/ 180.0 PI) (atan (/ (- C (+ A (hypot B A))) B))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.25e+134) {
tmp = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
} else if (A <= 4.2e-122) {
tmp = (180.0 / ((double) M_PI)) * atan(((1.0 / B) * (C - hypot(B, C))));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (A + hypot(B, A))) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.25e+134) {
tmp = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
} else if (A <= 4.2e-122) {
tmp = (180.0 / Math.PI) * Math.atan(((1.0 / B) * (C - Math.hypot(B, C))));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - (A + Math.hypot(B, A))) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.25e+134: tmp = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) elif A <= 4.2e-122: tmp = (180.0 / math.pi) * math.atan(((1.0 / B) * (C - math.hypot(B, C)))) else: tmp = (180.0 / math.pi) * math.atan(((C - (A + math.hypot(B, A))) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.25e+134) tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi)); elseif (A <= 4.2e-122) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(1.0 / B) * Float64(C - hypot(B, C))))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A + hypot(B, A))) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.25e+134) tmp = 180.0 * (atan(((0.5 * B) / A)) / pi); elseif (A <= 4.2e-122) tmp = (180.0 / pi) * atan(((1.0 / B) * (C - hypot(B, C)))); else tmp = (180.0 / pi) * atan(((C - (A + hypot(B, A))) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.25e+134], N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.2e-122], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.25 \cdot 10^{+134}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 4.2 \cdot 10^{-122}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{1}{B} \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A\right)\right)}{B}\right)\\
\end{array}
\end{array}
if A < -1.24999999999999995e134Initial program 9.1%
Taylor expanded in A around -inf 84.2%
associate-*r/84.2%
Simplified84.2%
if -1.24999999999999995e134 < A < 4.19999999999999985e-122Initial program 58.5%
Taylor expanded in B around 0 56.9%
Simplified76.5%
div-inv76.6%
hypot-undefine56.9%
unpow256.9%
unpow256.9%
+-commutative56.9%
associate--l-58.5%
*-commutative58.5%
unpow258.5%
unpow258.5%
hypot-define78.1%
Applied egg-rr78.1%
Taylor expanded in A around 0 55.3%
unpow255.3%
unpow255.3%
hypot-define74.6%
Simplified74.6%
if 4.19999999999999985e-122 < A Initial program 78.7%
Taylor expanded in B around 0 78.7%
Simplified93.8%
Taylor expanded in C around 0 78.6%
+-commutative78.6%
unpow278.6%
unpow278.6%
hypot-define92.0%
Simplified92.0%
Final simplification81.9%
(FPCore (A B C)
:precision binary64
(if (<= A -4e+136)
(* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))
(if (<= A 3.5e-55)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(* 180.0 (/ (atan (/ (+ A (hypot B A)) (- B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4e+136) {
tmp = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
} else if (A <= 3.5e-55) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A + hypot(B, A)) / -B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4e+136) {
tmp = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
} else if (A <= 3.5e-55) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A + Math.hypot(B, A)) / -B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4e+136: tmp = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) elif A <= 3.5e-55: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = 180.0 * (math.atan(((A + math.hypot(B, A)) / -B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4e+136) tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi)); elseif (A <= 3.5e-55) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + hypot(B, A)) / Float64(-B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4e+136) tmp = 180.0 * (atan(((0.5 * B) / A)) / pi); elseif (A <= 3.5e-55) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = 180.0 * (atan(((A + hypot(B, A)) / -B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4e+136], N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.5e-55], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4 \cdot 10^{+136}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 3.5 \cdot 10^{-55}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{-B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -4.00000000000000023e136Initial program 9.1%
Taylor expanded in A around -inf 84.2%
associate-*r/84.2%
Simplified84.2%
if -4.00000000000000023e136 < A < 3.50000000000000025e-55Initial program 60.0%
Taylor expanded in A around 0 56.4%
unpow256.4%
unpow256.4%
hypot-define75.7%
Simplified75.7%
if 3.50000000000000025e-55 < A Initial program 78.3%
Taylor expanded in C around 0 76.3%
mul-1-neg76.3%
distribute-neg-frac276.3%
+-commutative76.3%
unpow276.3%
unpow276.3%
hypot-define88.8%
Simplified88.8%
Final simplification80.9%
(FPCore (A B C)
:precision binary64
(if (<= A -3.2e+137)
(* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))
(if (<= A 1.28e+33)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(/ 1.0 (/ (/ PI 180.0) (atan (/ (- (- C B) A) B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.2e+137) {
tmp = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
} else if (A <= 1.28e+33) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = 1.0 / ((((double) M_PI) / 180.0) / atan((((C - B) - A) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.2e+137) {
tmp = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
} else if (A <= 1.28e+33) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = 1.0 / ((Math.PI / 180.0) / Math.atan((((C - B) - A) / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.2e+137: tmp = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) elif A <= 1.28e+33: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = 1.0 / ((math.pi / 180.0) / math.atan((((C - B) - A) / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.2e+137) tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi)); elseif (A <= 1.28e+33) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(1.0 / Float64(Float64(pi / 180.0) / atan(Float64(Float64(Float64(C - B) - A) / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.2e+137) tmp = 180.0 * (atan(((0.5 * B) / A)) / pi); elseif (A <= 1.28e+33) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = 1.0 / ((pi / 180.0) / atan((((C - B) - A) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.2e+137], N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.28e+33], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(Pi / 180.0), $MachinePrecision] / N[ArcTan[N[(N[(N[(C - B), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.2 \cdot 10^{+137}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.28 \cdot 10^{+33}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{\frac{\pi}{180}}{\tan^{-1} \left(\frac{\left(C - B\right) - A}{B}\right)}}\\
\end{array}
\end{array}
if A < -3.20000000000000019e137Initial program 9.1%
Taylor expanded in A around -inf 84.2%
associate-*r/84.2%
Simplified84.2%
if -3.20000000000000019e137 < A < 1.28e33Initial program 62.7%
Taylor expanded in A around 0 57.3%
unpow257.3%
unpow257.3%
hypot-define75.2%
Simplified75.2%
if 1.28e33 < A Initial program 76.5%
Applied egg-rr93.8%
inv-pow93.8%
associate-/r*93.8%
Applied egg-rr93.8%
Simplified93.8%
Taylor expanded in B around inf 86.2%
mul-1-neg86.2%
unsub-neg86.2%
Simplified86.2%
Final simplification79.1%
(FPCore (A B C) :precision binary64 (if (<= A -4.3e+133) (* 180.0 (/ (atan (/ (* 0.5 B) A)) PI)) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4.3e+133) {
tmp = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4.3e+133) {
tmp = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4.3e+133: tmp = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) else: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4.3e+133) tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4.3e+133) tmp = 180.0 * (atan(((0.5 * B) / A)) / pi); else tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4.3e+133], N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4.3 \cdot 10^{+133}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -4.29999999999999994e133Initial program 9.1%
Taylor expanded in A around -inf 84.2%
associate-*r/84.2%
Simplified84.2%
if -4.29999999999999994e133 < A Initial program 66.5%
Simplified83.4%
Final simplification83.5%
(FPCore (A B C) :precision binary64 (if (<= A -1.16e+141) (* 180.0 (/ (atan (/ (* 0.5 B) A)) PI)) (* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.16e+141) {
tmp = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.16e+141) {
tmp = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.16e+141: tmp = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) else: tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.16e+141) tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / 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 <= -1.16e+141) tmp = 180.0 * (atan(((0.5 * B) / A)) / pi); else tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.16e+141], N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / 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 -1.16 \cdot 10^{+141}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\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 < -1.16e141Initial program 9.1%
Taylor expanded in A around -inf 84.2%
associate-*r/84.2%
Simplified84.2%
if -1.16e141 < A Initial program 66.5%
Simplified84.4%
Final simplification84.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ (/ C B) -1.0)) PI))))
(if (<= A -2.45e+88)
(* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))
(if (<= A -2700000.0)
t_0
(if (<= A -2.2e-64)
(* 180.0 (/ (atan 1.0) PI))
(if (or (<= A 4.8e-271) (and (not (<= A 3.7e-164)) (<= A 1.02e-131)))
t_0
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((C / B) + -1.0)) / ((double) M_PI));
double tmp;
if (A <= -2.45e+88) {
tmp = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
} else if (A <= -2700000.0) {
tmp = t_0;
} else if (A <= -2.2e-64) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if ((A <= 4.8e-271) || (!(A <= 3.7e-164) && (A <= 1.02e-131))) {
tmp = t_0;
} 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(((C / B) + -1.0)) / Math.PI);
double tmp;
if (A <= -2.45e+88) {
tmp = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
} else if (A <= -2700000.0) {
tmp = t_0;
} else if (A <= -2.2e-64) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if ((A <= 4.8e-271) || (!(A <= 3.7e-164) && (A <= 1.02e-131))) {
tmp = t_0;
} 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(((C / B) + -1.0)) / math.pi) tmp = 0 if A <= -2.45e+88: tmp = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) elif A <= -2700000.0: tmp = t_0 elif A <= -2.2e-64: tmp = 180.0 * (math.atan(1.0) / math.pi) elif (A <= 4.8e-271) or (not (A <= 3.7e-164) and (A <= 1.02e-131)): tmp = t_0 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(Float64(C / B) + -1.0)) / pi)) tmp = 0.0 if (A <= -2.45e+88) tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi)); elseif (A <= -2700000.0) tmp = t_0; elseif (A <= -2.2e-64) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif ((A <= 4.8e-271) || (!(A <= 3.7e-164) && (A <= 1.02e-131))) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((C / B) + -1.0)) / pi); tmp = 0.0; if (A <= -2.45e+88) tmp = 180.0 * (atan(((0.5 * B) / A)) / pi); elseif (A <= -2700000.0) tmp = t_0; elseif (A <= -2.2e-64) tmp = 180.0 * (atan(1.0) / pi); elseif ((A <= 4.8e-271) || (~((A <= 3.7e-164)) && (A <= 1.02e-131))) tmp = t_0; 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[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -2.45e+88], N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2700000.0], t$95$0, If[LessEqual[A, -2.2e-64], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[A, 4.8e-271], And[N[Not[LessEqual[A, 3.7e-164]], $MachinePrecision], LessEqual[A, 1.02e-131]]], t$95$0, N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\
\mathbf{if}\;A \leq -2.45 \cdot 10^{+88}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -2700000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;A \leq -2.2 \cdot 10^{-64}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;A \leq 4.8 \cdot 10^{-271} \lor \neg \left(A \leq 3.7 \cdot 10^{-164}\right) \land A \leq 1.02 \cdot 10^{-131}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.4500000000000001e88Initial program 17.3%
Taylor expanded in A around -inf 74.5%
associate-*r/74.5%
Simplified74.5%
if -2.4500000000000001e88 < A < -2.7e6 or -2.2e-64 < A < 4.8000000000000005e-271 or 3.6999999999999999e-164 < A < 1.02000000000000001e-131Initial program 58.3%
Simplified75.4%
Taylor expanded in B around inf 53.1%
+-commutative53.1%
Simplified53.1%
Taylor expanded in A around 0 52.4%
div-sub52.4%
sub-neg52.4%
*-inverses52.4%
metadata-eval52.4%
Simplified52.4%
if -2.7e6 < A < -2.2e-64Initial program 66.1%
Taylor expanded in B around -inf 66.0%
if 4.8000000000000005e-271 < A < 3.6999999999999999e-164 or 1.02000000000000001e-131 < A Initial program 75.5%
Taylor expanded in C around 0 70.9%
mul-1-neg70.9%
distribute-neg-frac270.9%
+-commutative70.9%
unpow270.9%
unpow270.9%
hypot-define84.9%
Simplified84.9%
Taylor expanded in B around -inf 70.0%
mul-1-neg70.0%
unsub-neg70.0%
Simplified70.0%
Final simplification64.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (+ 1.0 (/ C B)))))
(t_1 (* 180.0 (/ (atan (+ (/ C B) -1.0)) PI)))
(t_2 (* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))))
(if (<= A -1.8e+88)
t_2
(if (<= A -2.3e+66)
t_1
(if (<= A -2.5e+58)
t_2
(if (<= A -1e-192)
t_0
(if (<= A 8.4e-284)
t_1
(if (<= A 3.2e-55)
t_0
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan((1.0 + (C / B)));
double t_1 = 180.0 * (atan(((C / B) + -1.0)) / ((double) M_PI));
double t_2 = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
double tmp;
if (A <= -1.8e+88) {
tmp = t_2;
} else if (A <= -2.3e+66) {
tmp = t_1;
} else if (A <= -2.5e+58) {
tmp = t_2;
} else if (A <= -1e-192) {
tmp = t_0;
} else if (A <= 8.4e-284) {
tmp = t_1;
} else if (A <= 3.2e-55) {
tmp = t_0;
} 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.PI) * Math.atan((1.0 + (C / B)));
double t_1 = 180.0 * (Math.atan(((C / B) + -1.0)) / Math.PI);
double t_2 = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
double tmp;
if (A <= -1.8e+88) {
tmp = t_2;
} else if (A <= -2.3e+66) {
tmp = t_1;
} else if (A <= -2.5e+58) {
tmp = t_2;
} else if (A <= -1e-192) {
tmp = t_0;
} else if (A <= 8.4e-284) {
tmp = t_1;
} else if (A <= 3.2e-55) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan((1.0 + (C / B))) t_1 = 180.0 * (math.atan(((C / B) + -1.0)) / math.pi) t_2 = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) tmp = 0 if A <= -1.8e+88: tmp = t_2 elif A <= -2.3e+66: tmp = t_1 elif A <= -2.5e+58: tmp = t_2 elif A <= -1e-192: tmp = t_0 elif A <= 8.4e-284: tmp = t_1 elif A <= 3.2e-55: tmp = t_0 else: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(1.0 + Float64(C / B)))) t_1 = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + -1.0)) / pi)) t_2 = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi)) tmp = 0.0 if (A <= -1.8e+88) tmp = t_2; elseif (A <= -2.3e+66) tmp = t_1; elseif (A <= -2.5e+58) tmp = t_2; elseif (A <= -1e-192) tmp = t_0; elseif (A <= 8.4e-284) tmp = t_1; elseif (A <= 3.2e-55) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan((1.0 + (C / B))); t_1 = 180.0 * (atan(((C / B) + -1.0)) / pi); t_2 = 180.0 * (atan(((0.5 * B) / A)) / pi); tmp = 0.0; if (A <= -1.8e+88) tmp = t_2; elseif (A <= -2.3e+66) tmp = t_1; elseif (A <= -2.5e+58) tmp = t_2; elseif (A <= -1e-192) tmp = t_0; elseif (A <= 8.4e-284) tmp = t_1; elseif (A <= 3.2e-55) tmp = t_0; else tmp = 180.0 * (atan((1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -1.8e+88], t$95$2, If[LessEqual[A, -2.3e+66], t$95$1, If[LessEqual[A, -2.5e+58], t$95$2, If[LessEqual[A, -1e-192], t$95$0, If[LessEqual[A, 8.4e-284], t$95$1, If[LessEqual[A, 3.2e-55], t$95$0, N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\
t_2 := 180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{if}\;A \leq -1.8 \cdot 10^{+88}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;A \leq -2.3 \cdot 10^{+66}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;A \leq -2.5 \cdot 10^{+58}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;A \leq -1 \cdot 10^{-192}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;A \leq 8.4 \cdot 10^{-284}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;A \leq 3.2 \cdot 10^{-55}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.8000000000000001e88 or -2.3e66 < A < -2.49999999999999993e58Initial program 18.2%
Taylor expanded in A around -inf 76.6%
associate-*r/76.6%
Simplified76.6%
if -1.8000000000000001e88 < A < -2.3e66 or -1.0000000000000001e-192 < A < 8.39999999999999965e-284Initial program 66.4%
Simplified82.1%
Taylor expanded in B around inf 63.2%
+-commutative63.2%
Simplified63.2%
Taylor expanded in A around 0 62.2%
div-sub62.2%
sub-neg62.2%
*-inverses62.2%
metadata-eval62.2%
Simplified62.2%
if -2.49999999999999993e58 < A < -1.0000000000000001e-192 or 8.39999999999999965e-284 < A < 3.2000000000000001e-55Initial program 61.2%
Taylor expanded in B around 0 61.1%
Simplified82.2%
div-inv82.2%
hypot-undefine61.1%
unpow261.1%
unpow261.1%
+-commutative61.1%
associate--l-61.2%
*-commutative61.2%
unpow261.2%
unpow261.2%
hypot-define82.2%
Applied egg-rr82.2%
Taylor expanded in B around -inf 55.6%
associate--l+55.6%
div-sub55.6%
Simplified55.6%
Taylor expanded in C around inf 54.0%
if 3.2000000000000001e-55 < A Initial program 78.3%
Taylor expanded in C around 0 76.3%
mul-1-neg76.3%
distribute-neg-frac276.3%
+-commutative76.3%
unpow276.3%
unpow276.3%
hypot-define88.8%
Simplified88.8%
Taylor expanded in B around -inf 74.7%
mul-1-neg74.7%
unsub-neg74.7%
Simplified74.7%
Final simplification65.7%
(FPCore (A B C)
:precision binary64
(if (<= B -420000000.0)
(* 180.0 (/ (atan (/ (- B A) B)) PI))
(if (or (<= B -1.6e-65)
(not
(or (<= B -1.05e-131) (and (not (<= B 4.4e-194)) (<= B 5e-150)))))
(* 180.0 (/ (atan (/ (- C (+ A B)) B)) PI))
(* (atan (/ (* 0.5 B) A)) (/ 180.0 PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -420000000.0) {
tmp = 180.0 * (atan(((B - A) / B)) / ((double) M_PI));
} else if ((B <= -1.6e-65) || !((B <= -1.05e-131) || (!(B <= 4.4e-194) && (B <= 5e-150)))) {
tmp = 180.0 * (atan(((C - (A + B)) / B)) / ((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 tmp;
if (B <= -420000000.0) {
tmp = 180.0 * (Math.atan(((B - A) / B)) / Math.PI);
} else if ((B <= -1.6e-65) || !((B <= -1.05e-131) || (!(B <= 4.4e-194) && (B <= 5e-150)))) {
tmp = 180.0 * (Math.atan(((C - (A + B)) / B)) / Math.PI);
} else {
tmp = Math.atan(((0.5 * B) / A)) * (180.0 / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -420000000.0: tmp = 180.0 * (math.atan(((B - A) / B)) / math.pi) elif (B <= -1.6e-65) or not ((B <= -1.05e-131) or (not (B <= 4.4e-194) and (B <= 5e-150))): tmp = 180.0 * (math.atan(((C - (A + B)) / B)) / math.pi) else: tmp = math.atan(((0.5 * B) / A)) * (180.0 / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -420000000.0) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B - A) / B)) / pi)); elseif ((B <= -1.6e-65) || !((B <= -1.05e-131) || (!(B <= 4.4e-194) && (B <= 5e-150)))) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + B)) / B)) / pi)); else tmp = Float64(atan(Float64(Float64(0.5 * B) / A)) * Float64(180.0 / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -420000000.0) tmp = 180.0 * (atan(((B - A) / B)) / pi); elseif ((B <= -1.6e-65) || ~(((B <= -1.05e-131) || (~((B <= 4.4e-194)) && (B <= 5e-150))))) tmp = 180.0 * (atan(((C - (A + B)) / B)) / pi); else tmp = atan(((0.5 * B) / A)) * (180.0 / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -420000000.0], N[(180.0 * N[(N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, -1.6e-65], N[Not[Or[LessEqual[B, -1.05e-131], And[N[Not[LessEqual[B, 4.4e-194]], $MachinePrecision], LessEqual[B, 5e-150]]]], $MachinePrecision]], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -420000000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq -1.6 \cdot 10^{-65} \lor \neg \left(B \leq -1.05 \cdot 10^{-131} \lor \neg \left(B \leq 4.4 \cdot 10^{-194}\right) \land B \leq 5 \cdot 10^{-150}\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right) \cdot \frac{180}{\pi}\\
\end{array}
\end{array}
if B < -4.2e8Initial program 54.9%
Taylor expanded in C around 0 50.1%
mul-1-neg50.1%
distribute-neg-frac250.1%
+-commutative50.1%
unpow250.1%
unpow250.1%
hypot-define75.6%
Simplified75.6%
Taylor expanded in B around -inf 74.5%
mul-1-neg74.5%
unsub-neg74.5%
Simplified74.5%
if -4.2e8 < B < -1.6e-65 or -1.04999999999999999e-131 < B < 4.4000000000000003e-194 or 4.9999999999999999e-150 < B Initial program 64.9%
Simplified77.7%
Taylor expanded in B around inf 71.4%
+-commutative71.4%
Simplified71.4%
if -1.6e-65 < B < -1.04999999999999999e-131 or 4.4000000000000003e-194 < B < 4.9999999999999999e-150Initial program 29.7%
Taylor expanded in B around 0 29.0%
Simplified41.7%
div-inv41.7%
hypot-undefine29.0%
unpow229.0%
unpow229.0%
+-commutative29.0%
associate--l-29.7%
*-commutative29.7%
unpow229.7%
unpow229.7%
hypot-define63.4%
Applied egg-rr63.4%
Taylor expanded in A around -inf 67.6%
associate-*r/67.6%
Simplified67.6%
Final simplification71.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (- 1.0 (/ A B))) PI))))
(if (<= B -5.3e-39)
t_0
(if (<= B -2.65e-80)
(* 180.0 (/ (atan (* (/ C B) 2.0)) PI))
(if (<= B 2.05e-210)
t_0
(if (<= B 5e-150)
(* 180.0 (/ (atan 0.0) PI))
(if (<= B 3.1e-84)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(* 180.0 (/ (atan (+ (/ C B) -1.0)) PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
double tmp;
if (B <= -5.3e-39) {
tmp = t_0;
} else if (B <= -2.65e-80) {
tmp = 180.0 * (atan(((C / B) * 2.0)) / ((double) M_PI));
} else if (B <= 2.05e-210) {
tmp = t_0;
} else if (B <= 5e-150) {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
} else if (B <= 3.1e-84) {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C / B) + -1.0)) / ((double) M_PI));
}
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 (B <= -5.3e-39) {
tmp = t_0;
} else if (B <= -2.65e-80) {
tmp = 180.0 * (Math.atan(((C / B) * 2.0)) / Math.PI);
} else if (B <= 2.05e-210) {
tmp = t_0;
} else if (B <= 5e-150) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else if (B <= 3.1e-84) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C / B) + -1.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) tmp = 0 if B <= -5.3e-39: tmp = t_0 elif B <= -2.65e-80: tmp = 180.0 * (math.atan(((C / B) * 2.0)) / math.pi) elif B <= 2.05e-210: tmp = t_0 elif B <= 5e-150: tmp = 180.0 * (math.atan(0.0) / math.pi) elif B <= 3.1e-84: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) else: tmp = 180.0 * (math.atan(((C / B) + -1.0)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)) tmp = 0.0 if (B <= -5.3e-39) tmp = t_0; elseif (B <= -2.65e-80) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) * 2.0)) / pi)); elseif (B <= 2.05e-210) tmp = t_0; elseif (B <= 5e-150) tmp = Float64(180.0 * Float64(atan(0.0) / pi)); elseif (B <= 3.1e-84) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + -1.0)) / pi)); 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 (B <= -5.3e-39) tmp = t_0; elseif (B <= -2.65e-80) tmp = 180.0 * (atan(((C / B) * 2.0)) / pi); elseif (B <= 2.05e-210) tmp = t_0; elseif (B <= 5e-150) tmp = 180.0 * (atan(0.0) / pi); elseif (B <= 3.1e-84) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); else tmp = 180.0 * (atan(((C / B) + -1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -5.3e-39], t$95$0, If[LessEqual[B, -2.65e-80], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.05e-210], t$95$0, If[LessEqual[B, 5e-150], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.1e-84], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -5.3 \cdot 10^{-39}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq -2.65 \cdot 10^{-80}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.05 \cdot 10^{-210}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 5 \cdot 10^{-150}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{elif}\;B \leq 3.1 \cdot 10^{-84}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -5.30000000000000003e-39 or -2.65000000000000013e-80 < B < 2.04999999999999995e-210Initial program 61.3%
Taylor expanded in C around 0 51.5%
mul-1-neg51.5%
distribute-neg-frac251.5%
+-commutative51.5%
unpow251.5%
unpow251.5%
hypot-define67.2%
Simplified67.2%
Taylor expanded in B around -inf 59.4%
mul-1-neg59.4%
unsub-neg59.4%
Simplified59.4%
if -5.30000000000000003e-39 < B < -2.65000000000000013e-80Initial program 72.9%
Taylor expanded in C around -inf 63.8%
if 2.04999999999999995e-210 < B < 4.9999999999999999e-150Initial program 11.6%
+-commutative11.6%
unpow211.6%
unpow211.6%
hypot-undefine63.5%
sub-neg63.5%
distribute-lft-in25.1%
hypot-undefine10.4%
unpow210.4%
unpow210.4%
+-commutative10.4%
unpow210.4%
unpow210.4%
hypot-define25.1%
Applied egg-rr25.1%
Taylor expanded in A around -inf 33.5%
distribute-lft1-in33.5%
metadata-eval33.5%
mul0-lft41.2%
Simplified41.2%
if 4.9999999999999999e-150 < B < 3.10000000000000002e-84Initial program 65.3%
Taylor expanded in A around inf 52.7%
if 3.10000000000000002e-84 < B Initial program 60.5%
Simplified85.3%
Taylor expanded in B around inf 82.3%
+-commutative82.3%
Simplified82.3%
Taylor expanded in A around 0 71.5%
div-sub71.5%
sub-neg71.5%
*-inverses71.5%
metadata-eval71.5%
Simplified71.5%
Final simplification61.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (atan (/ (* 0.5 B) A)) (/ 180.0 PI))))
(if (<= B -7.2e-65)
(* 180.0 (/ (atan (/ (+ C (- B A)) B)) PI))
(if (<= B -2.95e-131)
t_0
(if (<= B 4.2e-211)
(* (/ 180.0 PI) (atan (- 1.0 (/ (- A C) B))))
(if (<= B 7e-150)
t_0
(* 180.0 (/ (atan (* (/ 1.0 B) (- (- C B) A))) PI))))))))
double code(double A, double B, double C) {
double t_0 = atan(((0.5 * B) / A)) * (180.0 / ((double) M_PI));
double tmp;
if (B <= -7.2e-65) {
tmp = 180.0 * (atan(((C + (B - A)) / B)) / ((double) M_PI));
} else if (B <= -2.95e-131) {
tmp = t_0;
} else if (B <= 4.2e-211) {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 - ((A - C) / B)));
} else if (B <= 7e-150) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(((1.0 / B) * ((C - B) - A))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = Math.atan(((0.5 * B) / A)) * (180.0 / Math.PI);
double tmp;
if (B <= -7.2e-65) {
tmp = 180.0 * (Math.atan(((C + (B - A)) / B)) / Math.PI);
} else if (B <= -2.95e-131) {
tmp = t_0;
} else if (B <= 4.2e-211) {
tmp = (180.0 / Math.PI) * Math.atan((1.0 - ((A - C) / B)));
} else if (B <= 7e-150) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(((1.0 / B) * ((C - B) - A))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = math.atan(((0.5 * B) / A)) * (180.0 / math.pi) tmp = 0 if B <= -7.2e-65: tmp = 180.0 * (math.atan(((C + (B - A)) / B)) / math.pi) elif B <= -2.95e-131: tmp = t_0 elif B <= 4.2e-211: tmp = (180.0 / math.pi) * math.atan((1.0 - ((A - C) / B))) elif B <= 7e-150: tmp = t_0 else: tmp = 180.0 * (math.atan(((1.0 / B) * ((C - B) - A))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(atan(Float64(Float64(0.5 * B) / A)) * Float64(180.0 / pi)) tmp = 0.0 if (B <= -7.2e-65) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C + Float64(B - A)) / B)) / pi)); elseif (B <= -2.95e-131) tmp = t_0; elseif (B <= 4.2e-211) tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 - Float64(Float64(A - C) / B)))); elseif (B <= 7e-150) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - B) - A))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = atan(((0.5 * B) / A)) * (180.0 / pi); tmp = 0.0; if (B <= -7.2e-65) tmp = 180.0 * (atan(((C + (B - A)) / B)) / pi); elseif (B <= -2.95e-131) tmp = t_0; elseif (B <= 4.2e-211) tmp = (180.0 / pi) * atan((1.0 - ((A - C) / B))); elseif (B <= 7e-150) tmp = t_0; else tmp = 180.0 * (atan(((1.0 / B) * ((C - B) - A))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -7.2e-65], N[(180.0 * N[(N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.95e-131], t$95$0, If[LessEqual[B, 4.2e-211], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 - N[(N[(A - C), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7e-150], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - B), $MachinePrecision] - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1} \left(\frac{0.5 \cdot B}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{if}\;B \leq -7.2 \cdot 10^{-65}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq -2.95 \cdot 10^{-131}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 4.2 \cdot 10^{-211}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 - \frac{A - C}{B}\right)\\
\mathbf{elif}\;B \leq 7 \cdot 10^{-150}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - B\right) - A\right)\right)}{\pi}\\
\end{array}
\end{array}
if B < -7.1999999999999996e-65Initial program 60.3%
Simplified82.4%
Taylor expanded in B around -inf 80.7%
neg-mul-180.7%
unsub-neg80.7%
Simplified80.7%
if -7.1999999999999996e-65 < B < -2.94999999999999983e-131 or 4.20000000000000015e-211 < B < 6.9999999999999996e-150Initial program 27.8%
Taylor expanded in B around 0 27.1%
Simplified42.4%
div-inv42.4%
hypot-undefine27.1%
unpow227.1%
unpow227.1%
+-commutative27.1%
associate--l-27.8%
*-commutative27.8%
unpow227.8%
unpow227.8%
hypot-define66.3%
Applied egg-rr66.3%
Taylor expanded in A around -inf 66.2%
associate-*r/66.2%
Simplified66.2%
if -2.94999999999999983e-131 < B < 4.20000000000000015e-211Initial program 67.0%
Taylor expanded in B around 0 64.0%
Simplified68.7%
div-inv68.7%
hypot-undefine64.0%
unpow264.0%
unpow264.0%
+-commutative64.0%
associate--l-67.0%
*-commutative67.0%
unpow267.0%
unpow267.0%
hypot-define80.8%
Applied egg-rr80.8%
Taylor expanded in B around -inf 57.2%
associate--l+57.2%
div-sub62.0%
Simplified62.0%
if 6.9999999999999996e-150 < B Initial program 61.3%
Taylor expanded in B around inf 78.8%
neg-mul-178.8%
unsub-neg78.8%
Simplified78.8%
Final simplification74.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (atan (/ (* 0.5 B) A)) (/ 180.0 PI))))
(if (<= B -7e-64)
(* 180.0 (/ (atan (/ (+ C (- B A)) B)) PI))
(if (<= B -1.76e-128)
t_0
(if (<= B 9e-211)
(* (/ 180.0 PI) (atan (- 1.0 (/ (- A C) B))))
(if (<= B 5e-150)
t_0
(* (/ 180.0 PI) (atan (* (/ 1.0 B) (- (- C B) A))))))))))
double code(double A, double B, double C) {
double t_0 = atan(((0.5 * B) / A)) * (180.0 / ((double) M_PI));
double tmp;
if (B <= -7e-64) {
tmp = 180.0 * (atan(((C + (B - A)) / B)) / ((double) M_PI));
} else if (B <= -1.76e-128) {
tmp = t_0;
} else if (B <= 9e-211) {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 - ((A - C) / B)));
} else if (B <= 5e-150) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((1.0 / B) * ((C - B) - A)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = Math.atan(((0.5 * B) / A)) * (180.0 / Math.PI);
double tmp;
if (B <= -7e-64) {
tmp = 180.0 * (Math.atan(((C + (B - A)) / B)) / Math.PI);
} else if (B <= -1.76e-128) {
tmp = t_0;
} else if (B <= 9e-211) {
tmp = (180.0 / Math.PI) * Math.atan((1.0 - ((A - C) / B)));
} else if (B <= 5e-150) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan(((1.0 / B) * ((C - B) - A)));
}
return tmp;
}
def code(A, B, C): t_0 = math.atan(((0.5 * B) / A)) * (180.0 / math.pi) tmp = 0 if B <= -7e-64: tmp = 180.0 * (math.atan(((C + (B - A)) / B)) / math.pi) elif B <= -1.76e-128: tmp = t_0 elif B <= 9e-211: tmp = (180.0 / math.pi) * math.atan((1.0 - ((A - C) / B))) elif B <= 5e-150: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan(((1.0 / B) * ((C - B) - A))) return tmp
function code(A, B, C) t_0 = Float64(atan(Float64(Float64(0.5 * B) / A)) * Float64(180.0 / pi)) tmp = 0.0 if (B <= -7e-64) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C + Float64(B - A)) / B)) / pi)); elseif (B <= -1.76e-128) tmp = t_0; elseif (B <= 9e-211) tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 - Float64(Float64(A - C) / B)))); elseif (B <= 5e-150) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(1.0 / B) * Float64(Float64(C - B) - A)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = atan(((0.5 * B) / A)) * (180.0 / pi); tmp = 0.0; if (B <= -7e-64) tmp = 180.0 * (atan(((C + (B - A)) / B)) / pi); elseif (B <= -1.76e-128) tmp = t_0; elseif (B <= 9e-211) tmp = (180.0 / pi) * atan((1.0 - ((A - C) / B))); elseif (B <= 5e-150) tmp = t_0; else tmp = (180.0 / pi) * atan(((1.0 / B) * ((C - B) - A))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -7e-64], N[(180.0 * N[(N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.76e-128], t$95$0, If[LessEqual[B, 9e-211], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 - N[(N[(A - C), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5e-150], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - B), $MachinePrecision] - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1} \left(\frac{0.5 \cdot B}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{if}\;B \leq -7 \cdot 10^{-64}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq -1.76 \cdot 10^{-128}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 9 \cdot 10^{-211}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 - \frac{A - C}{B}\right)\\
\mathbf{elif}\;B \leq 5 \cdot 10^{-150}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - B\right) - A\right)\right)\\
\end{array}
\end{array}
if B < -7.0000000000000006e-64Initial program 60.3%
Simplified82.4%
Taylor expanded in B around -inf 80.7%
neg-mul-180.7%
unsub-neg80.7%
Simplified80.7%
if -7.0000000000000006e-64 < B < -1.76000000000000002e-128 or 8.9999999999999997e-211 < B < 4.9999999999999999e-150Initial program 27.8%
Taylor expanded in B around 0 27.1%
Simplified42.4%
div-inv42.4%
hypot-undefine27.1%
unpow227.1%
unpow227.1%
+-commutative27.1%
associate--l-27.8%
*-commutative27.8%
unpow227.8%
unpow227.8%
hypot-define66.3%
Applied egg-rr66.3%
Taylor expanded in A around -inf 66.2%
associate-*r/66.2%
Simplified66.2%
if -1.76000000000000002e-128 < B < 8.9999999999999997e-211Initial program 67.0%
Taylor expanded in B around 0 64.0%
Simplified68.7%
div-inv68.7%
hypot-undefine64.0%
unpow264.0%
unpow264.0%
+-commutative64.0%
associate--l-67.0%
*-commutative67.0%
unpow267.0%
unpow267.0%
hypot-define80.8%
Applied egg-rr80.8%
Taylor expanded in B around -inf 57.2%
associate--l+57.2%
div-sub62.0%
Simplified62.0%
if 4.9999999999999999e-150 < B Initial program 61.3%
Taylor expanded in B around 0 61.3%
Simplified83.6%
div-inv83.7%
hypot-undefine61.3%
unpow261.3%
unpow261.3%
+-commutative61.3%
associate--l-61.3%
*-commutative61.3%
unpow261.3%
unpow261.3%
hypot-define83.8%
Applied egg-rr83.8%
Taylor expanded in B around inf 78.8%
neg-mul-178.8%
sub-neg78.8%
Simplified78.8%
Final simplification74.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (atan (/ (* 0.5 B) A)) (/ 180.0 PI))))
(if (<= B -8e-66)
(* 180.0 (/ (atan (/ (+ C (- B A)) B)) PI))
(if (<= B -1.76e-128)
t_0
(if (<= B 2.8e-210)
(* (/ 180.0 PI) (atan (- 1.0 (/ (- A C) B))))
(if (<= B 5e-150)
t_0
(/ 1.0 (/ (/ PI 180.0) (atan (/ (- (- C B) A) B))))))))))
double code(double A, double B, double C) {
double t_0 = atan(((0.5 * B) / A)) * (180.0 / ((double) M_PI));
double tmp;
if (B <= -8e-66) {
tmp = 180.0 * (atan(((C + (B - A)) / B)) / ((double) M_PI));
} else if (B <= -1.76e-128) {
tmp = t_0;
} else if (B <= 2.8e-210) {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 - ((A - C) / B)));
} else if (B <= 5e-150) {
tmp = t_0;
} else {
tmp = 1.0 / ((((double) M_PI) / 180.0) / atan((((C - B) - A) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = Math.atan(((0.5 * B) / A)) * (180.0 / Math.PI);
double tmp;
if (B <= -8e-66) {
tmp = 180.0 * (Math.atan(((C + (B - A)) / B)) / Math.PI);
} else if (B <= -1.76e-128) {
tmp = t_0;
} else if (B <= 2.8e-210) {
tmp = (180.0 / Math.PI) * Math.atan((1.0 - ((A - C) / B)));
} else if (B <= 5e-150) {
tmp = t_0;
} else {
tmp = 1.0 / ((Math.PI / 180.0) / Math.atan((((C - B) - A) / B)));
}
return tmp;
}
def code(A, B, C): t_0 = math.atan(((0.5 * B) / A)) * (180.0 / math.pi) tmp = 0 if B <= -8e-66: tmp = 180.0 * (math.atan(((C + (B - A)) / B)) / math.pi) elif B <= -1.76e-128: tmp = t_0 elif B <= 2.8e-210: tmp = (180.0 / math.pi) * math.atan((1.0 - ((A - C) / B))) elif B <= 5e-150: tmp = t_0 else: tmp = 1.0 / ((math.pi / 180.0) / math.atan((((C - B) - A) / B))) return tmp
function code(A, B, C) t_0 = Float64(atan(Float64(Float64(0.5 * B) / A)) * Float64(180.0 / pi)) tmp = 0.0 if (B <= -8e-66) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C + Float64(B - A)) / B)) / pi)); elseif (B <= -1.76e-128) tmp = t_0; elseif (B <= 2.8e-210) tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 - Float64(Float64(A - C) / B)))); elseif (B <= 5e-150) tmp = t_0; else tmp = Float64(1.0 / Float64(Float64(pi / 180.0) / atan(Float64(Float64(Float64(C - B) - A) / B)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = atan(((0.5 * B) / A)) * (180.0 / pi); tmp = 0.0; if (B <= -8e-66) tmp = 180.0 * (atan(((C + (B - A)) / B)) / pi); elseif (B <= -1.76e-128) tmp = t_0; elseif (B <= 2.8e-210) tmp = (180.0 / pi) * atan((1.0 - ((A - C) / B))); elseif (B <= 5e-150) tmp = t_0; else tmp = 1.0 / ((pi / 180.0) / atan((((C - B) - A) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -8e-66], N[(180.0 * N[(N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.76e-128], t$95$0, If[LessEqual[B, 2.8e-210], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 - N[(N[(A - C), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5e-150], t$95$0, N[(1.0 / N[(N[(Pi / 180.0), $MachinePrecision] / N[ArcTan[N[(N[(N[(C - B), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1} \left(\frac{0.5 \cdot B}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{if}\;B \leq -8 \cdot 10^{-66}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq -1.76 \cdot 10^{-128}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 2.8 \cdot 10^{-210}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 - \frac{A - C}{B}\right)\\
\mathbf{elif}\;B \leq 5 \cdot 10^{-150}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{\frac{\pi}{180}}{\tan^{-1} \left(\frac{\left(C - B\right) - A}{B}\right)}}\\
\end{array}
\end{array}
if B < -7.9999999999999998e-66Initial program 60.3%
Simplified82.4%
Taylor expanded in B around -inf 80.7%
neg-mul-180.7%
unsub-neg80.7%
Simplified80.7%
if -7.9999999999999998e-66 < B < -1.76000000000000002e-128 or 2.8e-210 < B < 4.9999999999999999e-150Initial program 27.8%
Taylor expanded in B around 0 27.1%
Simplified42.4%
div-inv42.4%
hypot-undefine27.1%
unpow227.1%
unpow227.1%
+-commutative27.1%
associate--l-27.8%
*-commutative27.8%
unpow227.8%
unpow227.8%
hypot-define66.3%
Applied egg-rr66.3%
Taylor expanded in A around -inf 66.2%
associate-*r/66.2%
Simplified66.2%
if -1.76000000000000002e-128 < B < 2.8e-210Initial program 67.0%
Taylor expanded in B around 0 64.0%
Simplified68.7%
div-inv68.7%
hypot-undefine64.0%
unpow264.0%
unpow264.0%
+-commutative64.0%
associate--l-67.0%
*-commutative67.0%
unpow267.0%
unpow267.0%
hypot-define80.8%
Applied egg-rr80.8%
Taylor expanded in B around -inf 57.2%
associate--l+57.2%
div-sub62.0%
Simplified62.0%
if 4.9999999999999999e-150 < B Initial program 61.3%
Applied egg-rr83.7%
inv-pow83.7%
associate-/r*83.8%
Applied egg-rr83.8%
Simplified83.8%
Taylor expanded in B around inf 78.8%
mul-1-neg78.8%
unsub-neg78.8%
Simplified78.8%
Final simplification74.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- A C) B)) (t_1 (* (atan (/ (* 0.5 B) A)) (/ 180.0 PI))))
(if (<= B -1.05e-65)
(* (/ 180.0 PI) (atan (+ 1.0 (+ 1.0 (- -1.0 t_0)))))
(if (<= B -3.9e-126)
t_1
(if (<= B 1.9e-211)
(* (/ 180.0 PI) (atan (- 1.0 t_0)))
(if (<= B 5e-150)
t_1
(/ 1.0 (/ (/ PI 180.0) (atan (/ (- (- C B) A) B))))))))))
double code(double A, double B, double C) {
double t_0 = (A - C) / B;
double t_1 = atan(((0.5 * B) / A)) * (180.0 / ((double) M_PI));
double tmp;
if (B <= -1.05e-65) {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 + (1.0 + (-1.0 - t_0))));
} else if (B <= -3.9e-126) {
tmp = t_1;
} else if (B <= 1.9e-211) {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 - t_0));
} else if (B <= 5e-150) {
tmp = t_1;
} else {
tmp = 1.0 / ((((double) M_PI) / 180.0) / atan((((C - B) - A) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (A - C) / B;
double t_1 = Math.atan(((0.5 * B) / A)) * (180.0 / Math.PI);
double tmp;
if (B <= -1.05e-65) {
tmp = (180.0 / Math.PI) * Math.atan((1.0 + (1.0 + (-1.0 - t_0))));
} else if (B <= -3.9e-126) {
tmp = t_1;
} else if (B <= 1.9e-211) {
tmp = (180.0 / Math.PI) * Math.atan((1.0 - t_0));
} else if (B <= 5e-150) {
tmp = t_1;
} else {
tmp = 1.0 / ((Math.PI / 180.0) / Math.atan((((C - B) - A) / B)));
}
return tmp;
}
def code(A, B, C): t_0 = (A - C) / B t_1 = math.atan(((0.5 * B) / A)) * (180.0 / math.pi) tmp = 0 if B <= -1.05e-65: tmp = (180.0 / math.pi) * math.atan((1.0 + (1.0 + (-1.0 - t_0)))) elif B <= -3.9e-126: tmp = t_1 elif B <= 1.9e-211: tmp = (180.0 / math.pi) * math.atan((1.0 - t_0)) elif B <= 5e-150: tmp = t_1 else: tmp = 1.0 / ((math.pi / 180.0) / math.atan((((C - B) - A) / B))) return tmp
function code(A, B, C) t_0 = Float64(Float64(A - C) / B) t_1 = Float64(atan(Float64(Float64(0.5 * B) / A)) * Float64(180.0 / pi)) tmp = 0.0 if (B <= -1.05e-65) tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 + Float64(1.0 + Float64(-1.0 - t_0))))); elseif (B <= -3.9e-126) tmp = t_1; elseif (B <= 1.9e-211) tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 - t_0))); elseif (B <= 5e-150) tmp = t_1; else tmp = Float64(1.0 / Float64(Float64(pi / 180.0) / atan(Float64(Float64(Float64(C - B) - A) / B)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (A - C) / B; t_1 = atan(((0.5 * B) / A)) * (180.0 / pi); tmp = 0.0; if (B <= -1.05e-65) tmp = (180.0 / pi) * atan((1.0 + (1.0 + (-1.0 - t_0)))); elseif (B <= -3.9e-126) tmp = t_1; elseif (B <= 1.9e-211) tmp = (180.0 / pi) * atan((1.0 - t_0)); elseif (B <= 5e-150) tmp = t_1; else tmp = 1.0 / ((pi / 180.0) / atan((((C - B) - A) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(A - C), $MachinePrecision] / B), $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.05e-65], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 + N[(1.0 + N[(-1.0 - t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -3.9e-126], t$95$1, If[LessEqual[B, 1.9e-211], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5e-150], t$95$1, N[(1.0 / N[(N[(Pi / 180.0), $MachinePrecision] / N[ArcTan[N[(N[(N[(C - B), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{A - C}{B}\\
t_1 := \tan^{-1} \left(\frac{0.5 \cdot B}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{if}\;B \leq -1.05 \cdot 10^{-65}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \left(1 + \left(-1 - t\_0\right)\right)\right)\\
\mathbf{elif}\;B \leq -3.9 \cdot 10^{-126}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq 1.9 \cdot 10^{-211}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 - t\_0\right)\\
\mathbf{elif}\;B \leq 5 \cdot 10^{-150}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{\frac{\pi}{180}}{\tan^{-1} \left(\frac{\left(C - B\right) - A}{B}\right)}}\\
\end{array}
\end{array}
if B < -1.05000000000000001e-65Initial program 60.3%
Taylor expanded in B around 0 60.4%
Simplified82.3%
div-inv82.3%
hypot-undefine60.4%
unpow260.4%
unpow260.4%
+-commutative60.4%
associate--l-60.3%
*-commutative60.3%
unpow260.3%
unpow260.3%
hypot-define82.2%
Applied egg-rr82.2%
Taylor expanded in B around -inf 80.7%
associate--l+80.7%
div-sub80.7%
Simplified80.7%
expm1-log1p-u80.3%
log1p-define80.3%
expm1-undefine80.3%
add-exp-log80.7%
Applied egg-rr80.7%
associate--l+80.7%
Simplified80.7%
if -1.05000000000000001e-65 < B < -3.8999999999999998e-126 or 1.90000000000000006e-211 < B < 4.9999999999999999e-150Initial program 27.8%
Taylor expanded in B around 0 27.1%
Simplified42.4%
div-inv42.4%
hypot-undefine27.1%
unpow227.1%
unpow227.1%
+-commutative27.1%
associate--l-27.8%
*-commutative27.8%
unpow227.8%
unpow227.8%
hypot-define66.3%
Applied egg-rr66.3%
Taylor expanded in A around -inf 66.2%
associate-*r/66.2%
Simplified66.2%
if -3.8999999999999998e-126 < B < 1.90000000000000006e-211Initial program 67.0%
Taylor expanded in B around 0 64.0%
Simplified68.7%
div-inv68.7%
hypot-undefine64.0%
unpow264.0%
unpow264.0%
+-commutative64.0%
associate--l-67.0%
*-commutative67.0%
unpow267.0%
unpow267.0%
hypot-define80.8%
Applied egg-rr80.8%
Taylor expanded in B around -inf 57.2%
associate--l+57.2%
div-sub62.0%
Simplified62.0%
if 4.9999999999999999e-150 < B Initial program 61.3%
Applied egg-rr83.7%
inv-pow83.7%
associate-/r*83.8%
Applied egg-rr83.8%
Simplified83.8%
Taylor expanded in B around inf 78.8%
mul-1-neg78.8%
unsub-neg78.8%
Simplified78.8%
Final simplification74.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (atan (/ (* 0.5 B) A)) (/ 180.0 PI)))
(t_1 (* 180.0 (/ (atan (/ (+ C (- B A)) B)) PI))))
(if (<= B -8e-66)
t_1
(if (<= B -5.1e-126)
t_0
(if (<= B 2.8e-210)
t_1
(if (<= B 5e-150)
t_0
(* 180.0 (/ (atan (/ (- C (+ A B)) B)) PI))))))))
double code(double A, double B, double C) {
double t_0 = atan(((0.5 * B) / A)) * (180.0 / ((double) M_PI));
double t_1 = 180.0 * (atan(((C + (B - A)) / B)) / ((double) M_PI));
double tmp;
if (B <= -8e-66) {
tmp = t_1;
} else if (B <= -5.1e-126) {
tmp = t_0;
} else if (B <= 2.8e-210) {
tmp = t_1;
} else if (B <= 5e-150) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(((C - (A + B)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = Math.atan(((0.5 * B) / A)) * (180.0 / Math.PI);
double t_1 = 180.0 * (Math.atan(((C + (B - A)) / B)) / Math.PI);
double tmp;
if (B <= -8e-66) {
tmp = t_1;
} else if (B <= -5.1e-126) {
tmp = t_0;
} else if (B <= 2.8e-210) {
tmp = t_1;
} else if (B <= 5e-150) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(((C - (A + B)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = math.atan(((0.5 * B) / A)) * (180.0 / math.pi) t_1 = 180.0 * (math.atan(((C + (B - A)) / B)) / math.pi) tmp = 0 if B <= -8e-66: tmp = t_1 elif B <= -5.1e-126: tmp = t_0 elif B <= 2.8e-210: tmp = t_1 elif B <= 5e-150: tmp = t_0 else: tmp = 180.0 * (math.atan(((C - (A + B)) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(atan(Float64(Float64(0.5 * B) / A)) * Float64(180.0 / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(Float64(C + Float64(B - A)) / B)) / pi)) tmp = 0.0 if (B <= -8e-66) tmp = t_1; elseif (B <= -5.1e-126) tmp = t_0; elseif (B <= 2.8e-210) tmp = t_1; elseif (B <= 5e-150) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + B)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = atan(((0.5 * B) / A)) * (180.0 / pi); t_1 = 180.0 * (atan(((C + (B - A)) / B)) / pi); tmp = 0.0; if (B <= -8e-66) tmp = t_1; elseif (B <= -5.1e-126) tmp = t_0; elseif (B <= 2.8e-210) tmp = t_1; elseif (B <= 5e-150) tmp = t_0; else tmp = 180.0 * (atan(((C - (A + B)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -8e-66], t$95$1, If[LessEqual[B, -5.1e-126], t$95$0, If[LessEqual[B, 2.8e-210], t$95$1, If[LessEqual[B, 5e-150], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1} \left(\frac{0.5 \cdot B}{A}\right) \cdot \frac{180}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -8 \cdot 10^{-66}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq -5.1 \cdot 10^{-126}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 2.8 \cdot 10^{-210}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq 5 \cdot 10^{-150}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -7.9999999999999998e-66 or -5.10000000000000002e-126 < B < 2.8e-210Initial program 63.3%
Simplified76.3%
Taylor expanded in B around -inf 72.4%
neg-mul-172.4%
unsub-neg72.4%
Simplified72.4%
if -7.9999999999999998e-66 < B < -5.10000000000000002e-126 or 2.8e-210 < B < 4.9999999999999999e-150Initial program 27.8%
Taylor expanded in B around 0 27.1%
Simplified42.4%
div-inv42.4%
hypot-undefine27.1%
unpow227.1%
unpow227.1%
+-commutative27.1%
associate--l-27.8%
*-commutative27.8%
unpow227.8%
unpow227.8%
hypot-define66.3%
Applied egg-rr66.3%
Taylor expanded in A around -inf 66.2%
associate-*r/66.2%
Simplified66.2%
if 4.9999999999999999e-150 < B Initial program 61.3%
Simplified83.6%
Taylor expanded in B around inf 78.8%
+-commutative78.8%
Simplified78.8%
Final simplification74.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (atan (/ (* 0.5 B) A)) (/ 180.0 PI))))
(if (<= B -8e-66)
(* 180.0 (/ (atan (/ (+ C (- B A)) B)) PI))
(if (<= B -8.4e-126)
t_0
(if (<= B 3.7e-210)
(* (/ 180.0 PI) (atan (- 1.0 (/ (- A C) B))))
(if (<= B 5e-150)
t_0
(* 180.0 (/ (atan (/ (- C (+ A B)) B)) PI))))))))
double code(double A, double B, double C) {
double t_0 = atan(((0.5 * B) / A)) * (180.0 / ((double) M_PI));
double tmp;
if (B <= -8e-66) {
tmp = 180.0 * (atan(((C + (B - A)) / B)) / ((double) M_PI));
} else if (B <= -8.4e-126) {
tmp = t_0;
} else if (B <= 3.7e-210) {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 - ((A - C) / B)));
} else if (B <= 5e-150) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(((C - (A + B)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = Math.atan(((0.5 * B) / A)) * (180.0 / Math.PI);
double tmp;
if (B <= -8e-66) {
tmp = 180.0 * (Math.atan(((C + (B - A)) / B)) / Math.PI);
} else if (B <= -8.4e-126) {
tmp = t_0;
} else if (B <= 3.7e-210) {
tmp = (180.0 / Math.PI) * Math.atan((1.0 - ((A - C) / B)));
} else if (B <= 5e-150) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(((C - (A + B)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = math.atan(((0.5 * B) / A)) * (180.0 / math.pi) tmp = 0 if B <= -8e-66: tmp = 180.0 * (math.atan(((C + (B - A)) / B)) / math.pi) elif B <= -8.4e-126: tmp = t_0 elif B <= 3.7e-210: tmp = (180.0 / math.pi) * math.atan((1.0 - ((A - C) / B))) elif B <= 5e-150: tmp = t_0 else: tmp = 180.0 * (math.atan(((C - (A + B)) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(atan(Float64(Float64(0.5 * B) / A)) * Float64(180.0 / pi)) tmp = 0.0 if (B <= -8e-66) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C + Float64(B - A)) / B)) / pi)); elseif (B <= -8.4e-126) tmp = t_0; elseif (B <= 3.7e-210) tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 - Float64(Float64(A - C) / B)))); elseif (B <= 5e-150) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + B)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = atan(((0.5 * B) / A)) * (180.0 / pi); tmp = 0.0; if (B <= -8e-66) tmp = 180.0 * (atan(((C + (B - A)) / B)) / pi); elseif (B <= -8.4e-126) tmp = t_0; elseif (B <= 3.7e-210) tmp = (180.0 / pi) * atan((1.0 - ((A - C) / B))); elseif (B <= 5e-150) tmp = t_0; else tmp = 180.0 * (atan(((C - (A + B)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -8e-66], N[(180.0 * N[(N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -8.4e-126], t$95$0, If[LessEqual[B, 3.7e-210], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 - N[(N[(A - C), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5e-150], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1} \left(\frac{0.5 \cdot B}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{if}\;B \leq -8 \cdot 10^{-66}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq -8.4 \cdot 10^{-126}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 3.7 \cdot 10^{-210}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 - \frac{A - C}{B}\right)\\
\mathbf{elif}\;B \leq 5 \cdot 10^{-150}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -7.9999999999999998e-66Initial program 60.3%
Simplified82.4%
Taylor expanded in B around -inf 80.7%
neg-mul-180.7%
unsub-neg80.7%
Simplified80.7%
if -7.9999999999999998e-66 < B < -8.3999999999999994e-126 or 3.7000000000000003e-210 < B < 4.9999999999999999e-150Initial program 27.8%
Taylor expanded in B around 0 27.1%
Simplified42.4%
div-inv42.4%
hypot-undefine27.1%
unpow227.1%
unpow227.1%
+-commutative27.1%
associate--l-27.8%
*-commutative27.8%
unpow227.8%
unpow227.8%
hypot-define66.3%
Applied egg-rr66.3%
Taylor expanded in A around -inf 66.2%
associate-*r/66.2%
Simplified66.2%
if -8.3999999999999994e-126 < B < 3.7000000000000003e-210Initial program 67.0%
Taylor expanded in B around 0 64.0%
Simplified68.7%
div-inv68.7%
hypot-undefine64.0%
unpow264.0%
unpow264.0%
+-commutative64.0%
associate--l-67.0%
*-commutative67.0%
unpow267.0%
unpow267.0%
hypot-define80.8%
Applied egg-rr80.8%
Taylor expanded in B around -inf 57.2%
associate--l+57.2%
div-sub62.0%
Simplified62.0%
if 4.9999999999999999e-150 < B Initial program 61.3%
Simplified83.6%
Taylor expanded in B around inf 78.8%
+-commutative78.8%
Simplified78.8%
Final simplification74.0%
(FPCore (A B C)
:precision binary64
(if (<= B -31000.0)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.85e-210)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= B 7e-150)
(* 180.0 (/ (atan 0.0) PI))
(if (<= B 8.5e-63)
(* 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 <= -31000.0) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.85e-210) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (B <= 7e-150) {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
} else if (B <= 8.5e-63) {
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 <= -31000.0) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.85e-210) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (B <= 7e-150) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else if (B <= 8.5e-63) {
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 <= -31000.0: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.85e-210: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif B <= 7e-150: tmp = 180.0 * (math.atan(0.0) / math.pi) elif B <= 8.5e-63: 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 <= -31000.0) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.85e-210) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (B <= 7e-150) tmp = Float64(180.0 * Float64(atan(0.0) / pi)); elseif (B <= 8.5e-63) 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 <= -31000.0) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.85e-210) tmp = 180.0 * (atan((C / B)) / pi); elseif (B <= 7e-150) tmp = 180.0 * (atan(0.0) / pi); elseif (B <= 8.5e-63) 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, -31000.0], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.85e-210], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7e-150], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 8.5e-63], 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 -31000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.85 \cdot 10^{-210}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 7 \cdot 10^{-150}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{elif}\;B \leq 8.5 \cdot 10^{-63}:\\
\;\;\;\;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 < -31000Initial program 55.5%
Taylor expanded in B around -inf 67.6%
if -31000 < B < 1.8500000000000001e-210Initial program 66.7%
Simplified69.0%
Taylor expanded in B around inf 57.3%
+-commutative57.3%
Simplified57.3%
Taylor expanded in C around inf 40.2%
if 1.8500000000000001e-210 < B < 6.9999999999999996e-150Initial program 11.6%
+-commutative11.6%
unpow211.6%
unpow211.6%
hypot-undefine63.5%
sub-neg63.5%
distribute-lft-in25.1%
hypot-undefine10.4%
unpow210.4%
unpow210.4%
+-commutative10.4%
unpow210.4%
unpow210.4%
hypot-define25.1%
Applied egg-rr25.1%
Taylor expanded in A around -inf 33.5%
distribute-lft1-in33.5%
metadata-eval33.5%
mul0-lft41.2%
Simplified41.2%
if 6.9999999999999996e-150 < B < 8.49999999999999969e-63Initial program 67.6%
Taylor expanded in A around inf 55.9%
if 8.49999999999999969e-63 < B Initial program 59.9%
Taylor expanded in B around inf 58.2%
Final simplification53.4%
(FPCore (A B C)
:precision binary64
(if (<= B -30000.0)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.8e-210)
(* 180.0 (/ (atan (* (/ C B) 2.0)) PI))
(if (<= B 6e-150)
(* 180.0 (/ (atan 0.0) PI))
(if (<= B 3.5e-60)
(* 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 <= -30000.0) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.8e-210) {
tmp = 180.0 * (atan(((C / B) * 2.0)) / ((double) M_PI));
} else if (B <= 6e-150) {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
} else if (B <= 3.5e-60) {
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 <= -30000.0) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.8e-210) {
tmp = 180.0 * (Math.atan(((C / B) * 2.0)) / Math.PI);
} else if (B <= 6e-150) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else if (B <= 3.5e-60) {
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 <= -30000.0: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.8e-210: tmp = 180.0 * (math.atan(((C / B) * 2.0)) / math.pi) elif B <= 6e-150: tmp = 180.0 * (math.atan(0.0) / math.pi) elif B <= 3.5e-60: 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 <= -30000.0) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.8e-210) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) * 2.0)) / pi)); elseif (B <= 6e-150) tmp = Float64(180.0 * Float64(atan(0.0) / pi)); elseif (B <= 3.5e-60) 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 <= -30000.0) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.8e-210) tmp = 180.0 * (atan(((C / B) * 2.0)) / pi); elseif (B <= 6e-150) tmp = 180.0 * (atan(0.0) / pi); elseif (B <= 3.5e-60) 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, -30000.0], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.8e-210], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6e-150], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.5e-60], 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 -30000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.8 \cdot 10^{-210}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\
\mathbf{elif}\;B \leq 6 \cdot 10^{-150}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{elif}\;B \leq 3.5 \cdot 10^{-60}:\\
\;\;\;\;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 < -3e4Initial program 55.5%
Taylor expanded in B around -inf 67.6%
if -3e4 < B < 1.7999999999999999e-210Initial program 66.7%
Taylor expanded in C around -inf 40.2%
if 1.7999999999999999e-210 < B < 6.0000000000000003e-150Initial program 11.6%
+-commutative11.6%
unpow211.6%
unpow211.6%
hypot-undefine63.5%
sub-neg63.5%
distribute-lft-in25.1%
hypot-undefine10.4%
unpow210.4%
unpow210.4%
+-commutative10.4%
unpow210.4%
unpow210.4%
hypot-define25.1%
Applied egg-rr25.1%
Taylor expanded in A around -inf 33.5%
distribute-lft1-in33.5%
metadata-eval33.5%
mul0-lft41.2%
Simplified41.2%
if 6.0000000000000003e-150 < B < 3.49999999999999976e-60Initial program 67.6%
Taylor expanded in A around inf 55.9%
if 3.49999999999999976e-60 < B Initial program 59.9%
Taylor expanded in B around inf 58.2%
Final simplification53.4%
(FPCore (A B C)
:precision binary64
(if (<= B -3900000.0)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 2.4e-212)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= B 8.5e-150)
(* 180.0 (/ (atan 0.0) PI))
(if (<= B 1.12e-63)
(* 180.0 (/ (atan (/ A (- B))) PI))
(* 180.0 (/ (atan -1.0) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3900000.0) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 2.4e-212) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (B <= 8.5e-150) {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
} else if (B <= 1.12e-63) {
tmp = 180.0 * (atan((A / -B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -3900000.0) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 2.4e-212) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (B <= 8.5e-150) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else if (B <= 1.12e-63) {
tmp = 180.0 * (Math.atan((A / -B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -3900000.0: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 2.4e-212: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif B <= 8.5e-150: tmp = 180.0 * (math.atan(0.0) / math.pi) elif B <= 1.12e-63: tmp = 180.0 * (math.atan((A / -B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -3900000.0) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 2.4e-212) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (B <= 8.5e-150) tmp = Float64(180.0 * Float64(atan(0.0) / pi)); elseif (B <= 1.12e-63) tmp = Float64(180.0 * Float64(atan(Float64(A / Float64(-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 <= -3900000.0) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 2.4e-212) tmp = 180.0 * (atan((C / B)) / pi); elseif (B <= 8.5e-150) tmp = 180.0 * (atan(0.0) / pi); elseif (B <= 1.12e-63) tmp = 180.0 * (atan((A / -B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3900000.0], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.4e-212], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 8.5e-150], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.12e-63], N[(180.0 * N[(N[ArcTan[N[(A / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -3900000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 2.4 \cdot 10^{-212}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 8.5 \cdot 10^{-150}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{elif}\;B \leq 1.12 \cdot 10^{-63}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -3.9e6Initial program 55.5%
Taylor expanded in B around -inf 67.6%
if -3.9e6 < B < 2.39999999999999989e-212Initial program 66.7%
Simplified69.0%
Taylor expanded in B around inf 57.3%
+-commutative57.3%
Simplified57.3%
Taylor expanded in C around inf 40.2%
if 2.39999999999999989e-212 < B < 8.4999999999999997e-150Initial program 11.6%
+-commutative11.6%
unpow211.6%
unpow211.6%
hypot-undefine63.5%
sub-neg63.5%
distribute-lft-in25.1%
hypot-undefine10.4%
unpow210.4%
unpow210.4%
+-commutative10.4%
unpow210.4%
unpow210.4%
hypot-define25.1%
Applied egg-rr25.1%
Taylor expanded in A around -inf 33.5%
distribute-lft1-in33.5%
metadata-eval33.5%
mul0-lft41.2%
Simplified41.2%
if 8.4999999999999997e-150 < B < 1.12000000000000002e-63Initial program 67.6%
Simplified76.4%
Taylor expanded in B around inf 63.5%
+-commutative63.5%
Simplified63.5%
Taylor expanded in A around inf 55.8%
associate-*r/55.8%
mul-1-neg55.8%
Simplified55.8%
if 1.12000000000000002e-63 < B Initial program 59.9%
Taylor expanded in B around inf 58.2%
Final simplification53.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ C B)) PI))))
(if (<= B -30000.0)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 7.4e-211)
t_0
(if (<= B 2.55e-132)
(* 180.0 (/ (atan 0.0) PI))
(if (<= B 270000000000.0) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((C / B)) / ((double) M_PI));
double tmp;
if (B <= -30000.0) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 7.4e-211) {
tmp = t_0;
} else if (B <= 2.55e-132) {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
} else if (B <= 270000000000.0) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((C / B)) / Math.PI);
double tmp;
if (B <= -30000.0) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 7.4e-211) {
tmp = t_0;
} else if (B <= 2.55e-132) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else if (B <= 270000000000.0) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((C / B)) / math.pi) tmp = 0 if B <= -30000.0: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 7.4e-211: tmp = t_0 elif B <= 2.55e-132: tmp = 180.0 * (math.atan(0.0) / math.pi) elif B <= 270000000000.0: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)) tmp = 0.0 if (B <= -30000.0) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 7.4e-211) tmp = t_0; elseif (B <= 2.55e-132) tmp = Float64(180.0 * Float64(atan(0.0) / pi)); elseif (B <= 270000000000.0) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((C / B)) / pi); tmp = 0.0; if (B <= -30000.0) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 7.4e-211) tmp = t_0; elseif (B <= 2.55e-132) tmp = 180.0 * (atan(0.0) / pi); elseif (B <= 270000000000.0) tmp = t_0; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -30000.0], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7.4e-211], t$95$0, If[LessEqual[B, 2.55e-132], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 270000000000.0], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -30000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 7.4 \cdot 10^{-211}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 2.55 \cdot 10^{-132}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{elif}\;B \leq 270000000000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -3e4Initial program 55.5%
Taylor expanded in B around -inf 67.6%
if -3e4 < B < 7.3999999999999996e-211 or 2.55000000000000003e-132 < B < 2.7e11Initial program 66.7%
Simplified68.6%
Taylor expanded in B around inf 58.3%
+-commutative58.3%
Simplified58.3%
Taylor expanded in C around inf 38.8%
if 7.3999999999999996e-211 < B < 2.55000000000000003e-132Initial program 24.2%
+-commutative24.2%
unpow224.2%
unpow224.2%
hypot-undefine67.0%
sub-neg67.0%
distribute-lft-in33.7%
hypot-undefine23.1%
unpow223.1%
unpow223.1%
+-commutative23.1%
unpow223.1%
unpow223.1%
hypot-define33.7%
Applied egg-rr33.7%
Taylor expanded in A around -inf 24.0%
distribute-lft1-in24.0%
metadata-eval24.0%
mul0-lft36.4%
Simplified36.4%
if 2.7e11 < B Initial program 60.6%
Taylor expanded in B around inf 63.9%
Final simplification52.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (+ 1.0 (/ C B))))))
(if (<= B -8.5e-66)
t_0
(if (<= B -1.55e-136)
(* (atan (/ (* 0.5 B) A)) (/ 180.0 PI))
(if (<= B -2.7e-284) t_0 (* 180.0 (/ (atan (/ (+ A B) (- B))) PI)))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan((1.0 + (C / B)));
double tmp;
if (B <= -8.5e-66) {
tmp = t_0;
} else if (B <= -1.55e-136) {
tmp = atan(((0.5 * B) / A)) * (180.0 / ((double) M_PI));
} else if (B <= -2.7e-284) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(((A + B) / -B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan((1.0 + (C / B)));
double tmp;
if (B <= -8.5e-66) {
tmp = t_0;
} else if (B <= -1.55e-136) {
tmp = Math.atan(((0.5 * B) / A)) * (180.0 / Math.PI);
} else if (B <= -2.7e-284) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(((A + B) / -B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan((1.0 + (C / B))) tmp = 0 if B <= -8.5e-66: tmp = t_0 elif B <= -1.55e-136: tmp = math.atan(((0.5 * B) / A)) * (180.0 / math.pi) elif B <= -2.7e-284: tmp = t_0 else: tmp = 180.0 * (math.atan(((A + B) / -B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(1.0 + Float64(C / B)))) tmp = 0.0 if (B <= -8.5e-66) tmp = t_0; elseif (B <= -1.55e-136) tmp = Float64(atan(Float64(Float64(0.5 * B) / A)) * Float64(180.0 / pi)); elseif (B <= -2.7e-284) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + B) / Float64(-B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan((1.0 + (C / B))); tmp = 0.0; if (B <= -8.5e-66) tmp = t_0; elseif (B <= -1.55e-136) tmp = atan(((0.5 * B) / A)) * (180.0 / pi); elseif (B <= -2.7e-284) tmp = t_0; else tmp = 180.0 * (atan(((A + B) / -B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -8.5e-66], t$95$0, If[LessEqual[B, -1.55e-136], N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.7e-284], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(A + B), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)\\
\mathbf{if}\;B \leq -8.5 \cdot 10^{-66}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq -1.55 \cdot 10^{-136}:\\
\;\;\;\;\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;B \leq -2.7 \cdot 10^{-284}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + B}{-B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -8.49999999999999966e-66 or -1.55e-136 < B < -2.69999999999999984e-284Initial program 59.5%
Taylor expanded in B around 0 58.8%
Simplified75.0%
div-inv75.0%
hypot-undefine58.8%
unpow258.8%
unpow258.8%
+-commutative58.8%
associate--l-59.5%
*-commutative59.5%
unpow259.5%
unpow259.5%
hypot-define78.9%
Applied egg-rr78.9%
Taylor expanded in B around -inf 69.5%
associate--l+69.5%
div-sub71.2%
Simplified71.2%
Taylor expanded in C around inf 61.5%
if -8.49999999999999966e-66 < B < -1.55e-136Initial program 49.4%
Taylor expanded in B around 0 48.8%
Simplified56.4%
div-inv56.4%
hypot-undefine48.8%
unpow248.8%
unpow248.8%
+-commutative48.8%
associate--l-49.4%
*-commutative49.4%
unpow249.4%
unpow249.4%
hypot-define71.8%
Applied egg-rr71.8%
Taylor expanded in A around -inf 57.1%
associate-*r/57.1%
Simplified57.1%
if -2.69999999999999984e-284 < B Initial program 59.8%
Simplified77.9%
Taylor expanded in B around inf 72.8%
+-commutative72.8%
Simplified72.8%
Taylor expanded in C around 0 64.8%
mul-1-neg64.8%
distribute-neg-frac264.8%
Simplified64.8%
Final simplification62.9%
(FPCore (A B C)
:precision binary64
(if (<= B -5e-75)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 2.7e-132)
(* 180.0 (/ (atan 0.0) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5e-75) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 2.7e-132) {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -5e-75) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 2.7e-132) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5e-75: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 2.7e-132: tmp = 180.0 * (math.atan(0.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -5e-75) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 2.7e-132) tmp = Float64(180.0 * Float64(atan(0.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -5e-75) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 2.7e-132) tmp = 180.0 * (atan(0.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5e-75], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.7e-132], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -5 \cdot 10^{-75}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 2.7 \cdot 10^{-132}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -4.99999999999999979e-75Initial program 60.1%
Taylor expanded in B around -inf 58.3%
if -4.99999999999999979e-75 < B < 2.6999999999999999e-132Initial program 55.8%
+-commutative55.8%
unpow255.8%
unpow255.8%
hypot-undefine77.1%
sub-neg77.1%
distribute-lft-in54.3%
hypot-undefine50.9%
unpow250.9%
unpow250.9%
+-commutative50.9%
unpow250.9%
unpow250.9%
hypot-define54.3%
Applied egg-rr54.3%
Taylor expanded in A around -inf 15.3%
distribute-lft1-in15.3%
metadata-eval15.3%
mul0-lft25.9%
Simplified25.9%
if 2.6999999999999999e-132 < B Initial program 62.0%
Taylor expanded in B around inf 53.5%
Final simplification45.0%
(FPCore (A B C) :precision binary64 (if (<= B -38000.0) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan (+ (/ C B) -1.0)) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -38000.0) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C / B) + -1.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -38000.0) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C / B) + -1.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -38000.0: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(((C / B) + -1.0)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -38000.0) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + -1.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -38000.0) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(((C / B) + -1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -38000.0], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -38000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -38000Initial program 55.5%
Taylor expanded in B around -inf 67.6%
if -38000 < B Initial program 60.4%
Simplified73.2%
Taylor expanded in B around inf 64.8%
+-commutative64.8%
Simplified64.8%
Taylor expanded in A around 0 50.1%
div-sub50.1%
sub-neg50.1%
*-inverses50.1%
metadata-eval50.1%
Simplified50.1%
Final simplification54.8%
(FPCore (A B C) :precision binary64 (if (<= B 1.1e-129) (* 180.0 (/ (atan 0.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= 1.1e-129) {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 1.1e-129) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 1.1e-129: tmp = 180.0 * (math.atan(0.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 1.1e-129) tmp = Float64(180.0 * Float64(atan(0.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 1.1e-129) tmp = 180.0 * (atan(0.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 1.1e-129], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 1.1 \cdot 10^{-129}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < 1.10000000000000001e-129Initial program 57.8%
+-commutative57.8%
unpow257.8%
unpow257.8%
hypot-undefine79.2%
sub-neg79.2%
distribute-lft-in67.1%
hypot-undefine55.3%
unpow255.3%
unpow255.3%
+-commutative55.3%
unpow255.3%
unpow255.3%
hypot-define67.1%
Applied egg-rr67.1%
Taylor expanded in A around -inf 9.7%
distribute-lft1-in9.7%
metadata-eval9.7%
mul0-lft15.3%
Simplified15.3%
if 1.10000000000000001e-129 < B Initial program 62.0%
Taylor expanded in B around inf 53.5%
Final simplification27.2%
(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 59.1%
Taylor expanded in B around inf 20.2%
Final simplification20.2%
herbie shell --seed 2024053
(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)))