
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
(FPCore (A B C)
:precision binary64
(if (<= A -4.6e+95)
(* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))
(*
180.0
(log1p (expm1 (/ (atan (/ (- (- C A) (hypot (- A C) B)) B)) PI))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4.6e+95) {
tmp = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
} else {
tmp = 180.0 * log1p(expm1((atan((((C - A) - hypot((A - C), B)) / B)) / ((double) M_PI))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4.6e+95) {
tmp = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
} else {
tmp = 180.0 * Math.log1p(Math.expm1((Math.atan((((C - A) - Math.hypot((A - C), B)) / B)) / Math.PI)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4.6e+95: tmp = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) else: tmp = 180.0 * math.log1p(math.expm1((math.atan((((C - A) - math.hypot((A - C), B)) / B)) / math.pi))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4.6e+95) tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi)); else tmp = Float64(180.0 * log1p(expm1(Float64(atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B)) / pi)))); end return tmp end
code[A_, B_, C_] := If[LessEqual[A, -4.6e+95], N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[Log[1 + N[(Exp[N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4.6 \cdot 10^{+95}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}{\pi}\right)\right)\\
\end{array}
\end{array}
if A < -4.59999999999999994e95Initial program 13.9%
Taylor expanded in A around -inf 76.9%
associate-*r/76.9%
Simplified76.9%
if -4.59999999999999994e95 < A Initial program 62.0%
*-commutative62.0%
+-commutative62.0%
unpow262.0%
unpow262.0%
hypot-udef85.4%
associate--r+84.8%
div-inv84.9%
log1p-expm1-u84.9%
Applied egg-rr85.4%
Final simplification83.8%
(FPCore (A B C)
:precision binary64
(if (<= A -2.6e+90)
(* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))
(if (<= A 4.4e-36)
(* 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 <= -2.6e+90) {
tmp = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
} else if (A <= 4.4e-36) {
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 <= -2.6e+90) {
tmp = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
} else if (A <= 4.4e-36) {
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 <= -2.6e+90: tmp = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) elif A <= 4.4e-36: 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 <= -2.6e+90) tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi)); elseif (A <= 4.4e-36) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-A) - hypot(B, A)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.6e+90) tmp = 180.0 * (atan(((0.5 * B) / A)) / pi); elseif (A <= 4.4e-36) 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, -2.6e+90], N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.4e-36], 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 -2.6 \cdot 10^{+90}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 4.4 \cdot 10^{-36}:\\
\;\;\;\;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{\left(-A\right) - \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.5999999999999998e90Initial program 15.7%
Taylor expanded in A around -inf 77.4%
associate-*r/77.4%
Simplified77.4%
if -2.5999999999999998e90 < A < 4.3999999999999999e-36Initial program 56.7%
Taylor expanded in A around 0 52.5%
unpow252.5%
unpow252.5%
hypot-def77.5%
Simplified77.5%
if 4.3999999999999999e-36 < A Initial program 73.4%
Taylor expanded in C around 0 72.1%
associate-*r/72.1%
mul-1-neg72.1%
+-commutative72.1%
unpow272.1%
unpow272.1%
hypot-def89.8%
Simplified89.8%
Final simplification80.5%
(FPCore (A B C) :precision binary64 (if (<= A -2.6e+90) (* 180.0 (/ (atan (/ (* 0.5 B) A)) PI)) (* 180.0 (/ 1.0 (/ PI (atan (/ (- C (+ A (hypot (- A C) B))) B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.6e+90) {
tmp = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
} else {
tmp = 180.0 * (1.0 / (((double) M_PI) / atan(((C - (A + hypot((A - C), B))) / B))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.6e+90) {
tmp = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
} else {
tmp = 180.0 * (1.0 / (Math.PI / Math.atan(((C - (A + Math.hypot((A - C), B))) / B))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.6e+90: tmp = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) else: tmp = 180.0 * (1.0 / (math.pi / math.atan(((C - (A + math.hypot((A - C), B))) / B)))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.6e+90) tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi)); else tmp = Float64(180.0 * Float64(1.0 / Float64(pi / atan(Float64(Float64(C - Float64(A + hypot(Float64(A - C), B))) / B))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.6e+90) tmp = 180.0 * (atan(((0.5 * B) / A)) / pi); else tmp = 180.0 * (1.0 / (pi / atan(((C - (A + hypot((A - C), B))) / B)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.6e+90], N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(1.0 / N[(Pi / N[ArcTan[N[(N[(C - N[(A + N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.6 \cdot 10^{+90}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{1}{\frac{\pi}{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(A - C, B\right)\right)}{B}\right)}}\\
\end{array}
\end{array}
if A < -2.5999999999999998e90Initial program 15.7%
Taylor expanded in A around -inf 77.4%
associate-*r/77.4%
Simplified77.4%
if -2.5999999999999998e90 < A Initial program 61.8%
Applied egg-rr85.4%
unpow-185.4%
associate--l-85.3%
Simplified85.3%
Final simplification83.7%
(FPCore (A B C)
:precision binary64
(if (<= A -1.5e+89)
(* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))
(if (<= A 8.5e-24)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(* 180.0 (/ (atan (/ (+ C (- B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.5e+89) {
tmp = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
} else if (A <= 8.5e-24) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C + (B - A)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.5e+89) {
tmp = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
} else if (A <= 8.5e-24) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C + (B - A)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.5e+89: tmp = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) elif A <= 8.5e-24: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = 180.0 * (math.atan(((C + (B - A)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.5e+89) tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi)); elseif (A <= 8.5e-24) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C + Float64(B - A)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.5e+89) tmp = 180.0 * (atan(((0.5 * B) / A)) / pi); elseif (A <= 8.5e-24) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = 180.0 * (atan(((C + (B - A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.5e+89], N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 8.5e-24], 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[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.5 \cdot 10^{+89}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 8.5 \cdot 10^{-24}:\\
\;\;\;\;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{C + \left(B - A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.50000000000000006e89Initial program 15.7%
Taylor expanded in A around -inf 77.4%
associate-*r/77.4%
Simplified77.4%
if -1.50000000000000006e89 < A < 8.5000000000000002e-24Initial program 57.6%
Taylor expanded in A around 0 53.4%
unpow253.4%
unpow253.4%
hypot-def78.0%
Simplified78.0%
if 8.5000000000000002e-24 < A Initial program 72.1%
Simplified93.7%
Taylor expanded in B around -inf 79.3%
neg-mul-179.3%
unsub-neg79.3%
Simplified79.3%
Final simplification78.2%
(FPCore (A B C)
:precision binary64
(if (<= A -2.15e+89)
(* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))
(if (<= A 5.6e-36)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(/ (* -180.0 (atan (/ (+ A (hypot A B)) B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.15e+89) {
tmp = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
} else if (A <= 5.6e-36) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = (-180.0 * atan(((A + hypot(A, B)) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.15e+89) {
tmp = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
} else if (A <= 5.6e-36) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = (-180.0 * Math.atan(((A + Math.hypot(A, B)) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.15e+89: tmp = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) elif A <= 5.6e-36: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = (-180.0 * math.atan(((A + math.hypot(A, B)) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.15e+89) tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi)); elseif (A <= 5.6e-36) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(Float64(-180.0 * atan(Float64(Float64(A + hypot(A, B)) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.15e+89) tmp = 180.0 * (atan(((0.5 * B) / A)) / pi); elseif (A <= 5.6e-36) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = (-180.0 * atan(((A + hypot(A, B)) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.15e+89], N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 5.6e-36], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(-180.0 * N[ArcTan[N[(N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.15 \cdot 10^{+89}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 5.6 \cdot 10^{-36}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.1500000000000001e89Initial program 15.7%
Taylor expanded in A around -inf 77.4%
associate-*r/77.4%
Simplified77.4%
if -2.1500000000000001e89 < A < 5.6000000000000002e-36Initial program 56.7%
Taylor expanded in A around 0 52.5%
unpow252.5%
unpow252.5%
hypot-def77.5%
Simplified77.5%
if 5.6000000000000002e-36 < A Initial program 73.4%
Taylor expanded in C around 0 72.1%
associate-*r/72.1%
mul-1-neg72.1%
+-commutative72.1%
unpow272.1%
unpow272.1%
hypot-def89.8%
Simplified89.8%
expm1-log1p-u42.4%
expm1-udef42.4%
distribute-frac-neg42.4%
atan-neg42.4%
Applied egg-rr42.4%
expm1-def42.4%
expm1-log1p89.8%
associate-*r/89.8%
distribute-rgt-neg-out89.8%
distribute-lft-neg-in89.8%
metadata-eval89.8%
hypot-def72.1%
unpow272.1%
unpow272.1%
+-commutative72.1%
unpow272.1%
unpow272.1%
hypot-def89.8%
Simplified89.8%
Final simplification80.5%
(FPCore (A B C) :precision binary64 (if (<= A -1.8e+89) (* 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.8e+89) {
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.8e+89) {
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.8e+89: 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.8e+89) 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 <= -1.8e+89) 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.8e+89], 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 -1.8 \cdot 10^{+89}:\\
\;\;\;\;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 < -1.8e89Initial program 15.7%
Taylor expanded in A around -inf 77.4%
associate-*r/77.4%
Simplified77.4%
if -1.8e89 < A Initial program 61.8%
Simplified85.3%
Final simplification83.7%
(FPCore (A B C)
:precision binary64
(if (<= A -1.5e+79)
(* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))
(if (<= A 1.9e-180)
(* 180.0 (/ (atan (/ (+ B C) B)) PI))
(if (or (<= A 46.0) (not (<= A 8e+183)))
(* 180.0 (/ (atan (/ (- (- A) B) B)) PI))
(* 180.0 (/ (atan (/ (- B A) B)) PI))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.5e+79) {
tmp = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
} else if (A <= 1.9e-180) {
tmp = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
} else if ((A <= 46.0) || !(A <= 8e+183)) {
tmp = 180.0 * (atan(((-A - B) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((B - A) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.5e+79) {
tmp = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
} else if (A <= 1.9e-180) {
tmp = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
} else if ((A <= 46.0) || !(A <= 8e+183)) {
tmp = 180.0 * (Math.atan(((-A - B) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((B - A) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.5e+79: tmp = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) elif A <= 1.9e-180: tmp = 180.0 * (math.atan(((B + C) / B)) / math.pi) elif (A <= 46.0) or not (A <= 8e+183): tmp = 180.0 * (math.atan(((-A - B) / B)) / math.pi) else: tmp = 180.0 * (math.atan(((B - A) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.5e+79) tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi)); elseif (A <= 1.9e-180) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)); elseif ((A <= 46.0) || !(A <= 8e+183)) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-A) - B) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B - A) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.5e+79) tmp = 180.0 * (atan(((0.5 * B) / A)) / pi); elseif (A <= 1.9e-180) tmp = 180.0 * (atan(((B + C) / B)) / pi); elseif ((A <= 46.0) || ~((A <= 8e+183))) tmp = 180.0 * (atan(((-A - B) / B)) / pi); else tmp = 180.0 * (atan(((B - A) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.5e+79], N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.9e-180], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[A, 46.0], N[Not[LessEqual[A, 8e+183]], $MachinePrecision]], N[(180.0 * N[(N[ArcTan[N[(N[((-A) - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.5 \cdot 10^{+79}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.9 \cdot 10^{-180}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 46 \lor \neg \left(A \leq 8 \cdot 10^{+183}\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - B}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.49999999999999987e79Initial program 15.7%
Taylor expanded in A around -inf 76.2%
associate-*r/76.2%
Simplified76.2%
if -1.49999999999999987e79 < A < 1.9e-180Initial program 53.2%
Simplified79.1%
Taylor expanded in B around -inf 55.9%
neg-mul-155.9%
unsub-neg55.9%
Simplified55.9%
Taylor expanded in A around 0 56.0%
if 1.9e-180 < A < 46 or 7.99999999999999957e183 < A Initial program 73.2%
Taylor expanded in C around 0 65.1%
associate-*r/65.1%
mul-1-neg65.1%
+-commutative65.1%
unpow265.1%
unpow265.1%
hypot-def76.6%
Simplified76.6%
Taylor expanded in A around 0 64.0%
if 46 < A < 7.99999999999999957e183Initial program 67.8%
Simplified92.7%
Taylor expanded in B around -inf 79.9%
neg-mul-179.9%
unsub-neg79.9%
Simplified79.9%
Taylor expanded in C around 0 80.0%
Final simplification65.5%
(FPCore (A B C)
:precision binary64
(if (<= B -3.9e+31)
(* 180.0 (/ (atan (/ (+ B C) B)) PI))
(if (<= B -8.8e-136)
(* 180.0 (/ (atan (/ (- B A) B)) PI))
(if (<= B -1.75e-143)
(* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))
(* 180.0 (/ (atan (/ (- C (+ A B)) B)) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3.9e+31) {
tmp = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
} else if (B <= -8.8e-136) {
tmp = 180.0 * (atan(((B - A) / B)) / ((double) M_PI));
} else if (B <= -1.75e-143) {
tmp = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
} 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 tmp;
if (B <= -3.9e+31) {
tmp = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
} else if (B <= -8.8e-136) {
tmp = 180.0 * (Math.atan(((B - A) / B)) / Math.PI);
} else if (B <= -1.75e-143) {
tmp = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - (A + B)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -3.9e+31: tmp = 180.0 * (math.atan(((B + C) / B)) / math.pi) elif B <= -8.8e-136: tmp = 180.0 * (math.atan(((B - A) / B)) / math.pi) elif B <= -1.75e-143: tmp = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) else: tmp = 180.0 * (math.atan(((C - (A + B)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -3.9e+31) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)); elseif (B <= -8.8e-136) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B - A) / B)) / pi)); elseif (B <= -1.75e-143) 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 + B)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -3.9e+31) tmp = 180.0 * (atan(((B + C) / B)) / pi); elseif (B <= -8.8e-136) tmp = 180.0 * (atan(((B - A) / B)) / pi); elseif (B <= -1.75e-143) tmp = 180.0 * (atan(((0.5 * B) / A)) / pi); else tmp = 180.0 * (atan(((C - (A + B)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3.9e+31], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -8.8e-136], N[(180.0 * N[(N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.75e-143], 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 + B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -3.9 \cdot 10^{+31}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq -8.8 \cdot 10^{-136}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq -1.75 \cdot 10^{-143}:\\
\;\;\;\;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 + B\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -3.89999999999999999e31Initial program 41.2%
Simplified85.2%
Taylor expanded in B around -inf 84.0%
neg-mul-184.0%
unsub-neg84.0%
Simplified84.0%
Taylor expanded in A around 0 81.7%
if -3.89999999999999999e31 < B < -8.8000000000000005e-136Initial program 63.7%
Simplified63.6%
Taylor expanded in B around -inf 63.1%
neg-mul-163.1%
unsub-neg63.1%
Simplified63.1%
Taylor expanded in C around 0 58.5%
if -8.8000000000000005e-136 < B < -1.75000000000000003e-143Initial program 28.7%
Taylor expanded in A around -inf 100.0%
associate-*r/100.0%
Simplified100.0%
if -1.75000000000000003e-143 < B Initial program 55.8%
Simplified72.7%
Taylor expanded in B around inf 65.8%
+-commutative65.8%
Simplified65.8%
Final simplification69.2%
(FPCore (A B C)
:precision binary64
(if (<= B -1.05e-95)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 2.6e+15)
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.05e-95) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 2.6e+15) {
tmp = 180.0 * (atan((-2.0 * (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 <= -1.05e-95) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 2.6e+15) {
tmp = 180.0 * (Math.atan((-2.0 * (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 <= -1.05e-95: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 2.6e+15: tmp = 180.0 * (math.atan((-2.0 * (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 <= -1.05e-95) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 2.6e+15) tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / 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 <= -1.05e-95) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 2.6e+15) tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.05e-95], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.6e+15], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.05 \cdot 10^{-95}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 2.6 \cdot 10^{+15}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.05e-95Initial program 48.2%
Taylor expanded in B around -inf 62.8%
if -1.05e-95 < B < 2.6e15Initial program 58.7%
Taylor expanded in A around inf 39.4%
if 2.6e15 < B Initial program 50.3%
Taylor expanded in B around inf 67.7%
Final simplification54.5%
(FPCore (A B C)
:precision binary64
(if (<= A -9e+79)
(* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))
(if (<= A 5e+21)
(* 180.0 (/ (atan (/ (+ B C) B)) PI))
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -9e+79) {
tmp = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
} else if (A <= 5e+21) {
tmp = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -9e+79) {
tmp = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
} else if (A <= 5e+21) {
tmp = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -9e+79: tmp = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) elif A <= 5e+21: tmp = 180.0 * (math.atan(((B + C) / B)) / math.pi) else: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -9e+79) tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi)); elseif (A <= 5e+21) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -9e+79) tmp = 180.0 * (atan(((0.5 * B) / A)) / pi); elseif (A <= 5e+21) tmp = 180.0 * (atan(((B + C) / B)) / pi); else tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -9e+79], N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 5e+21], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -9 \cdot 10^{+79}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 5 \cdot 10^{+21}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -8.99999999999999987e79Initial program 15.7%
Taylor expanded in A around -inf 76.2%
associate-*r/76.2%
Simplified76.2%
if -8.99999999999999987e79 < A < 5e21Initial program 59.1%
Simplified81.9%
Taylor expanded in B around -inf 57.2%
neg-mul-157.2%
unsub-neg57.2%
Simplified57.2%
Taylor expanded in A around 0 52.2%
if 5e21 < A Initial program 70.2%
Taylor expanded in A around inf 66.2%
Final simplification59.8%
(FPCore (A B C)
:precision binary64
(if (<= A -9.5e+83)
(* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))
(if (<= A 1.05e-194)
(* 180.0 (/ (atan (/ (+ B C) B)) PI))
(* 180.0 (/ (atan (/ (- B A) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -9.5e+83) {
tmp = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
} else if (A <= 1.05e-194) {
tmp = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((B - A) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -9.5e+83) {
tmp = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
} else if (A <= 1.05e-194) {
tmp = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((B - A) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -9.5e+83: tmp = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) elif A <= 1.05e-194: tmp = 180.0 * (math.atan(((B + C) / B)) / math.pi) else: tmp = 180.0 * (math.atan(((B - A) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -9.5e+83) tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi)); elseif (A <= 1.05e-194) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B - A) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -9.5e+83) tmp = 180.0 * (atan(((0.5 * B) / A)) / pi); elseif (A <= 1.05e-194) tmp = 180.0 * (atan(((B + C) / B)) / pi); else tmp = 180.0 * (atan(((B - A) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -9.5e+83], N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.05e-194], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -9.5 \cdot 10^{+83}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.05 \cdot 10^{-194}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -9.5000000000000002e83Initial program 15.7%
Taylor expanded in A around -inf 76.2%
associate-*r/76.2%
Simplified76.2%
if -9.5000000000000002e83 < A < 1.05e-194Initial program 53.6%
Simplified78.9%
Taylor expanded in B around -inf 55.5%
neg-mul-155.5%
unsub-neg55.5%
Simplified55.5%
Taylor expanded in A around 0 55.6%
if 1.05e-194 < A Initial program 70.6%
Simplified91.6%
Taylor expanded in B around -inf 69.9%
neg-mul-169.9%
unsub-neg69.9%
Simplified69.9%
Taylor expanded in C around 0 64.1%
Final simplification63.0%
(FPCore (A B C)
:precision binary64
(if (<= B -7.4e-96)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 2.7e+15)
(* 180.0 (/ (atan (/ (- A) B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -7.4e-96) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 2.7e+15) {
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 <= -7.4e-96) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 2.7e+15) {
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 <= -7.4e-96: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 2.7e+15: 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 <= -7.4e-96) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 2.7e+15) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-A) / 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 <= -7.4e-96) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 2.7e+15) 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, -7.4e-96], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.7e+15], 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 -7.4 \cdot 10^{-96}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 2.7 \cdot 10^{+15}:\\
\;\;\;\;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 < -7.39999999999999972e-96Initial program 48.2%
Taylor expanded in B around -inf 62.8%
if -7.39999999999999972e-96 < B < 2.7e15Initial program 58.7%
Simplified65.0%
Taylor expanded in B around -inf 54.5%
neg-mul-154.5%
unsub-neg54.5%
Simplified54.5%
Taylor expanded in A around inf 39.0%
associate-*r/39.0%
mul-1-neg39.0%
Simplified39.0%
if 2.7e15 < B Initial program 50.3%
Taylor expanded in B around inf 67.7%
Final simplification54.3%
(FPCore (A B C) :precision binary64 (if (<= B -5e-159) (* 180.0 (/ (atan (/ (+ C (- B A)) B)) PI)) (* 180.0 (/ 1.0 (/ PI (atan (/ (- C (+ A B)) B)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5e-159) {
tmp = 180.0 * (atan(((C + (B - A)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (1.0 / (((double) M_PI) / atan(((C - (A + B)) / B))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -5e-159) {
tmp = 180.0 * (Math.atan(((C + (B - A)) / B)) / Math.PI);
} else {
tmp = 180.0 * (1.0 / (Math.PI / Math.atan(((C - (A + B)) / B))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5e-159: tmp = 180.0 * (math.atan(((C + (B - A)) / B)) / math.pi) else: tmp = 180.0 * (1.0 / (math.pi / math.atan(((C - (A + B)) / B)))) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -5e-159) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C + Float64(B - A)) / B)) / pi)); else tmp = Float64(180.0 * Float64(1.0 / Float64(pi / atan(Float64(Float64(C - Float64(A + B)) / B))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -5e-159) tmp = 180.0 * (atan(((C + (B - A)) / B)) / pi); else tmp = 180.0 * (1.0 / (pi / atan(((C - (A + B)) / B)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5e-159], N[(180.0 * N[(N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(1.0 / N[(Pi / N[ArcTan[N[(N[(C - N[(A + B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -5 \cdot 10^{-159}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{1}{\frac{\pi}{\tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)}}\\
\end{array}
\end{array}
if B < -5.00000000000000032e-159Initial program 49.2%
Simplified75.6%
Taylor expanded in B around -inf 74.0%
neg-mul-174.0%
unsub-neg74.0%
Simplified74.0%
if -5.00000000000000032e-159 < B Initial program 55.6%
Applied egg-rr79.1%
unpow-179.1%
associate--l-72.5%
Simplified72.5%
Taylor expanded in B around inf 66.0%
Final simplification69.3%
(FPCore (A B C) :precision binary64 (if (<= B -2e-165) (* 180.0 (/ 1.0 (/ PI (atan (/ (+ C (- B A)) B))))) (* 180.0 (/ 1.0 (/ PI (atan (/ (- C (+ A B)) B)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2e-165) {
tmp = 180.0 * (1.0 / (((double) M_PI) / atan(((C + (B - A)) / B))));
} else {
tmp = 180.0 * (1.0 / (((double) M_PI) / atan(((C - (A + B)) / B))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2e-165) {
tmp = 180.0 * (1.0 / (Math.PI / Math.atan(((C + (B - A)) / B))));
} else {
tmp = 180.0 * (1.0 / (Math.PI / Math.atan(((C - (A + B)) / B))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2e-165: tmp = 180.0 * (1.0 / (math.pi / math.atan(((C + (B - A)) / B)))) else: tmp = 180.0 * (1.0 / (math.pi / math.atan(((C - (A + B)) / B)))) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2e-165) tmp = Float64(180.0 * Float64(1.0 / Float64(pi / atan(Float64(Float64(C + Float64(B - A)) / B))))); else tmp = Float64(180.0 * Float64(1.0 / Float64(pi / atan(Float64(Float64(C - Float64(A + B)) / B))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2e-165) tmp = 180.0 * (1.0 / (pi / atan(((C + (B - A)) / B)))); else tmp = 180.0 * (1.0 / (pi / atan(((C - (A + B)) / B)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2e-165], N[(180.0 * N[(1.0 / N[(Pi / N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(1.0 / N[(Pi / N[ArcTan[N[(N[(C - N[(A + B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2 \cdot 10^{-165}:\\
\;\;\;\;180 \cdot \frac{1}{\frac{\pi}{\tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{1}{\frac{\pi}{\tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)}}\\
\end{array}
\end{array}
if B < -2e-165Initial program 49.2%
Applied egg-rr79.4%
unpow-179.4%
associate--l-75.5%
Simplified75.5%
Taylor expanded in B around -inf 74.1%
mul-1-neg74.1%
unsub-neg74.1%
Simplified74.1%
if -2e-165 < B Initial program 55.6%
Applied egg-rr79.1%
unpow-179.1%
associate--l-72.5%
Simplified72.5%
Taylor expanded in B around inf 66.0%
Final simplification69.3%
(FPCore (A B C)
:precision binary64
(if (<= B -4e-94)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 4.1e-52)
(* 180.0 (/ (atan (/ C B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -4e-94) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 4.1e-52) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -4e-94) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 4.1e-52) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -4e-94: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 4.1e-52: tmp = 180.0 * (math.atan((C / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -4e-94) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 4.1e-52) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -4e-94) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 4.1e-52) tmp = 180.0 * (atan((C / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -4e-94], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.1e-52], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -4 \cdot 10^{-94}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 4.1 \cdot 10^{-52}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -3.9999999999999998e-94Initial program 47.7%
Taylor expanded in B around -inf 63.3%
if -3.9999999999999998e-94 < B < 4.09999999999999988e-52Initial program 61.7%
Simplified68.8%
Taylor expanded in B around -inf 58.1%
neg-mul-158.1%
unsub-neg58.1%
Simplified58.1%
Taylor expanded in C around inf 37.2%
if 4.09999999999999988e-52 < B Initial program 48.6%
Taylor expanded in B around inf 58.5%
Final simplification52.6%
(FPCore (A B C) :precision binary64 (if (<= B -5e-159) (* 180.0 (/ (atan (/ (+ C (- B A)) B)) PI)) (* 180.0 (/ (atan (/ (- C (+ A B)) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5e-159) {
tmp = 180.0 * (atan(((C + (B - A)) / B)) / ((double) M_PI));
} 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 tmp;
if (B <= -5e-159) {
tmp = 180.0 * (Math.atan(((C + (B - A)) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - (A + B)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5e-159: tmp = 180.0 * (math.atan(((C + (B - A)) / B)) / math.pi) else: tmp = 180.0 * (math.atan(((C - (A + B)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -5e-159) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C + Float64(B - A)) / B)) / pi)); 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) tmp = 0.0; if (B <= -5e-159) tmp = 180.0 * (atan(((C + (B - A)) / B)) / pi); else tmp = 180.0 * (atan(((C - (A + B)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5e-159], N[(180.0 * N[(N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], 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}
\mathbf{if}\;B \leq -5 \cdot 10^{-159}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -5.00000000000000032e-159Initial program 49.2%
Simplified75.6%
Taylor expanded in B around -inf 74.0%
neg-mul-174.0%
unsub-neg74.0%
Simplified74.0%
if -5.00000000000000032e-159 < B Initial program 55.6%
Simplified72.5%
Taylor expanded in B around inf 66.0%
+-commutative66.0%
Simplified66.0%
Final simplification69.3%
(FPCore (A B C)
:precision binary64
(if (<= B -1.22e-135)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 9.2e-91)
(* 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.22e-135) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 9.2e-91) {
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.22e-135) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 9.2e-91) {
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.22e-135: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 9.2e-91: 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.22e-135) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 9.2e-91) 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.22e-135) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 9.2e-91) 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.22e-135], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 9.2e-91], 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.22 \cdot 10^{-135}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 9.2 \cdot 10^{-91}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.22e-135Initial program 49.5%
Taylor expanded in B around -inf 59.7%
if -1.22e-135 < B < 9.19999999999999982e-91Initial program 62.4%
add-log-exp61.6%
associate-*l/61.6%
*-un-lft-identity61.6%
unpow261.6%
unpow261.6%
hypot-def85.4%
Applied egg-rr85.4%
Taylor expanded in C around inf 28.8%
associate-*r/28.8%
distribute-rgt1-in28.8%
metadata-eval28.8%
mul0-lft28.8%
metadata-eval28.8%
div028.8%
Simplified28.8%
if 9.19999999999999982e-91 < B Initial program 48.3%
Taylor expanded in B around inf 55.4%
Final simplification49.2%
(FPCore (A B C) :precision binary64 (if (<= B 4.2e-89) (* 180.0 (/ (atan 0.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= 4.2e-89) {
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 <= 4.2e-89) {
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 <= 4.2e-89: 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 <= 4.2e-89) 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 <= 4.2e-89) 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, 4.2e-89], 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 4.2 \cdot 10^{-89}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < 4.2000000000000002e-89Initial program 55.1%
add-log-exp54.7%
associate-*l/54.7%
*-un-lft-identity54.7%
unpow254.7%
unpow254.7%
hypot-def81.9%
Applied egg-rr81.9%
Taylor expanded in C around inf 15.5%
associate-*r/15.5%
distribute-rgt1-in15.5%
metadata-eval15.5%
mul0-lft15.5%
metadata-eval15.5%
div015.5%
Simplified15.5%
if 4.2000000000000002e-89 < B Initial program 48.3%
Taylor expanded in B around inf 55.4%
Final simplification28.0%
(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 53.0%
Taylor expanded in B around inf 20.7%
Final simplification20.7%
herbie shell --seed 2024024
(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)))