
(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 27 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
(FPCore (A B C)
:precision binary64
(let* ((t_0
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))
(t_1 (- (- C A) (hypot (- C A) B))))
(if (<= t_0 -1e-8)
(/ 1.0 (/ (/ PI 180.0) (atan (/ t_1 B))))
(if (<= t_0 0.0)
(/ (atan (* -0.5 (/ B (- C A)))) (/ PI 180.0))
(/ (atan (/ 1.0 (/ B t_1))) (/ PI 180.0))))))
double code(double A, double B, double C) {
double t_0 = (1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
double t_1 = (C - A) - hypot((C - A), B);
double tmp;
if (t_0 <= -1e-8) {
tmp = 1.0 / ((((double) M_PI) / 180.0) / atan((t_1 / B)));
} else if (t_0 <= 0.0) {
tmp = atan((-0.5 * (B / (C - A)))) / (((double) M_PI) / 180.0);
} else {
tmp = atan((1.0 / (B / t_1))) / (((double) M_PI) / 180.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))));
double t_1 = (C - A) - Math.hypot((C - A), B);
double tmp;
if (t_0 <= -1e-8) {
tmp = 1.0 / ((Math.PI / 180.0) / Math.atan((t_1 / B)));
} else if (t_0 <= 0.0) {
tmp = Math.atan((-0.5 * (B / (C - A)))) / (Math.PI / 180.0);
} else {
tmp = Math.atan((1.0 / (B / t_1))) / (Math.PI / 180.0);
}
return tmp;
}
def code(A, B, C): t_0 = (1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))) t_1 = (C - A) - math.hypot((C - A), B) tmp = 0 if t_0 <= -1e-8: tmp = 1.0 / ((math.pi / 180.0) / math.atan((t_1 / B))) elif t_0 <= 0.0: tmp = math.atan((-0.5 * (B / (C - A)))) / (math.pi / 180.0) else: tmp = math.atan((1.0 / (B / t_1))) / (math.pi / 180.0) return tmp
function code(A, B, C) t_0 = Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))) t_1 = Float64(Float64(C - A) - hypot(Float64(C - A), B)) tmp = 0.0 if (t_0 <= -1e-8) tmp = Float64(1.0 / Float64(Float64(pi / 180.0) / atan(Float64(t_1 / B)))); elseif (t_0 <= 0.0) tmp = Float64(atan(Float64(-0.5 * Float64(B / Float64(C - A)))) / Float64(pi / 180.0)); else tmp = Float64(atan(Float64(1.0 / Float64(B / t_1))) / Float64(pi / 180.0)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))); t_1 = (C - A) - hypot((C - A), B); tmp = 0.0; if (t_0 <= -1e-8) tmp = 1.0 / ((pi / 180.0) / atan((t_1 / B))); elseif (t_0 <= 0.0) tmp = atan((-0.5 * (B / (C - A)))) / (pi / 180.0); else tmp = atan((1.0 / (B / t_1))) / (pi / 180.0); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(C - A), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1e-8], N[(1.0 / N[(N[(Pi / 180.0), $MachinePrecision] / N[ArcTan[N[(t$95$1 / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(1.0 / N[(B / t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
t_1 := \left(C - A\right) - \mathsf{hypot}\left(C - A, B\right)\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{-8}:\\
\;\;\;\;\frac{1}{\frac{\frac{\pi}{180}}{\tan^{-1} \left(\frac{t\_1}{B}\right)}}\\
\mathbf{elif}\;t\_0 \leq 0:\\
\;\;\;\;\frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)}{\frac{\pi}{180}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{1}{\frac{B}{t\_1}}\right)}{\frac{\pi}{180}}\\
\end{array}
\end{array}
if (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -1e-8Initial program 62.1%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified86.1%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
associate--r+N/A
--lowering--.f64N/A
--lowering--.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6490.7%
Applied egg-rr90.7%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f64N/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
+-commutativeN/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
--lowering--.f6490.7%
Applied egg-rr90.7%
if -1e-8 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < 0.0Initial program 10.7%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified9.4%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
associate--r+N/A
--lowering--.f64N/A
--lowering--.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6410.7%
Applied egg-rr10.7%
Taylor expanded in B around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6499.6%
Simplified99.6%
if 0.0 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) Initial program 62.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified82.9%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
associate--r+N/A
--lowering--.f64N/A
--lowering--.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6487.5%
Applied egg-rr87.5%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
+-commutativeN/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
--lowering--.f6487.6%
Applied egg-rr87.6%
(FPCore (A B C)
:precision binary64
(if (<= A -8.2e+62)
(/ (atan (* -0.5 (/ B (- C A)))) (/ PI 180.0))
(if (<= A 2.1e-92)
(/ (atan (/ (- C (hypot C B)) B)) (/ PI 180.0))
(* (/ 180.0 PI) (atan (/ (- C (+ A (hypot A B))) B))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -8.2e+62) {
tmp = atan((-0.5 * (B / (C - A)))) / (((double) M_PI) / 180.0);
} else if (A <= 2.1e-92) {
tmp = atan(((C - hypot(C, B)) / B)) / (((double) M_PI) / 180.0);
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (A + hypot(A, B))) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -8.2e+62) {
tmp = Math.atan((-0.5 * (B / (C - A)))) / (Math.PI / 180.0);
} else if (A <= 2.1e-92) {
tmp = Math.atan(((C - Math.hypot(C, B)) / B)) / (Math.PI / 180.0);
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - (A + Math.hypot(A, B))) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -8.2e+62: tmp = math.atan((-0.5 * (B / (C - A)))) / (math.pi / 180.0) elif A <= 2.1e-92: tmp = math.atan(((C - math.hypot(C, B)) / B)) / (math.pi / 180.0) else: tmp = (180.0 / math.pi) * math.atan(((C - (A + math.hypot(A, B))) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -8.2e+62) tmp = Float64(atan(Float64(-0.5 * Float64(B / Float64(C - A)))) / Float64(pi / 180.0)); elseif (A <= 2.1e-92) tmp = Float64(atan(Float64(Float64(C - hypot(C, B)) / B)) / Float64(pi / 180.0)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A + hypot(A, B))) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -8.2e+62) tmp = atan((-0.5 * (B / (C - A)))) / (pi / 180.0); elseif (A <= 2.1e-92) tmp = atan(((C - hypot(C, B)) / B)) / (pi / 180.0); else tmp = (180.0 / pi) * atan(((C - (A + hypot(A, B))) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -8.2e+62], N[(N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.1e-92], N[(N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -8.2 \cdot 10^{+62}:\\
\;\;\;\;\frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)}{\frac{\pi}{180}}\\
\mathbf{elif}\;A \leq 2.1 \cdot 10^{-92}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\frac{\pi}{180}}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(A, B\right)\right)}{B}\right)\\
\end{array}
\end{array}
if A < -8.19999999999999967e62Initial program 13.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified26.5%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
associate--r+N/A
--lowering--.f64N/A
--lowering--.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6449.4%
Applied egg-rr49.4%
Taylor expanded in B around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6485.4%
Simplified85.4%
if -8.19999999999999967e62 < A < 2.1e-92Initial program 55.7%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified76.1%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
associate--r+N/A
--lowering--.f64N/A
--lowering--.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6476.5%
Applied egg-rr76.5%
Taylor expanded in A around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6476.5%
Simplified76.5%
if 2.1e-92 < A Initial program 74.0%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified91.7%
Taylor expanded in C around 0
+-lowering-+.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6488.6%
Simplified88.6%
Final simplification81.6%
(FPCore (A B C) :precision binary64 (if (<= A -3.8e+66) (/ (atan (* -0.5 (/ B (- C A)))) (/ PI 180.0)) (/ 1.0 (/ (/ PI 180.0) (atan (/ (- (- C A) (hypot (- C A) B)) B))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.8e+66) {
tmp = atan((-0.5 * (B / (C - A)))) / (((double) M_PI) / 180.0);
} else {
tmp = 1.0 / ((((double) M_PI) / 180.0) / atan((((C - A) - hypot((C - A), B)) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.8e+66) {
tmp = Math.atan((-0.5 * (B / (C - A)))) / (Math.PI / 180.0);
} else {
tmp = 1.0 / ((Math.PI / 180.0) / Math.atan((((C - A) - Math.hypot((C - A), B)) / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.8e+66: tmp = math.atan((-0.5 * (B / (C - A)))) / (math.pi / 180.0) else: tmp = 1.0 / ((math.pi / 180.0) / math.atan((((C - A) - math.hypot((C - A), B)) / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.8e+66) tmp = Float64(atan(Float64(-0.5 * Float64(B / Float64(C - A)))) / Float64(pi / 180.0)); else tmp = Float64(1.0 / Float64(Float64(pi / 180.0) / atan(Float64(Float64(Float64(C - A) - hypot(Float64(C - A), B)) / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.8e+66) tmp = atan((-0.5 * (B / (C - A)))) / (pi / 180.0); else tmp = 1.0 / ((pi / 180.0) / atan((((C - A) - hypot((C - A), B)) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.8e+66], N[(N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(Pi / 180.0), $MachinePrecision] / N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(C - A), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.8 \cdot 10^{+66}:\\
\;\;\;\;\frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)}{\frac{\pi}{180}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{\frac{\pi}{180}}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(C - A, B\right)}{B}\right)}}\\
\end{array}
\end{array}
if A < -3.8000000000000002e66Initial program 13.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified26.5%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
associate--r+N/A
--lowering--.f64N/A
--lowering--.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6449.4%
Applied egg-rr49.4%
Taylor expanded in B around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6485.4%
Simplified85.4%
if -3.8000000000000002e66 < A Initial program 62.3%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified81.8%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
associate--r+N/A
--lowering--.f64N/A
--lowering--.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6482.0%
Applied egg-rr82.0%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f64N/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
+-commutativeN/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
--lowering--.f6482.0%
Applied egg-rr82.0%
(FPCore (A B C)
:precision binary64
(if (<= A -3e+64)
(/ (atan (* -0.5 (/ B (- C A)))) (/ PI 180.0))
(if (<= A 1.02e+63)
(/ (atan (/ (- C (hypot C B)) B)) (/ PI 180.0))
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3e+64) {
tmp = atan((-0.5 * (B / (C - A)))) / (((double) M_PI) / 180.0);
} else if (A <= 1.02e+63) {
tmp = atan(((C - hypot(C, B)) / B)) / (((double) M_PI) / 180.0);
} else {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3e+64) {
tmp = Math.atan((-0.5 * (B / (C - A)))) / (Math.PI / 180.0);
} else if (A <= 1.02e+63) {
tmp = Math.atan(((C - Math.hypot(C, B)) / B)) / (Math.PI / 180.0);
} else {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3e+64: tmp = math.atan((-0.5 * (B / (C - A)))) / (math.pi / 180.0) elif A <= 1.02e+63: tmp = math.atan(((C - math.hypot(C, B)) / B)) / (math.pi / 180.0) else: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3e+64) tmp = Float64(atan(Float64(-0.5 * Float64(B / Float64(C - A)))) / Float64(pi / 180.0)); elseif (A <= 1.02e+63) tmp = Float64(atan(Float64(Float64(C - hypot(C, B)) / B)) / Float64(pi / 180.0)); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3e+64) tmp = atan((-0.5 * (B / (C - A)))) / (pi / 180.0); elseif (A <= 1.02e+63) tmp = atan(((C - hypot(C, B)) / B)) / (pi / 180.0); else tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3e+64], N[(N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.02e+63], N[(N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3 \cdot 10^{+64}:\\
\;\;\;\;\frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)}{\frac{\pi}{180}}\\
\mathbf{elif}\;A \leq 1.02 \cdot 10^{+63}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\frac{\pi}{180}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.0000000000000002e64Initial program 13.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified26.5%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
associate--r+N/A
--lowering--.f64N/A
--lowering--.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6449.4%
Applied egg-rr49.4%
Taylor expanded in B around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6485.4%
Simplified85.4%
if -3.0000000000000002e64 < A < 1.02e63Initial program 56.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified77.4%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
associate--r+N/A
--lowering--.f64N/A
--lowering--.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6477.8%
Applied egg-rr77.8%
Taylor expanded in A around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6475.9%
Simplified75.9%
if 1.02e63 < A Initial program 85.3%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6486.9%
Simplified86.9%
(FPCore (A B C)
:precision binary64
(if (<= A -3.1e+63)
(/ (atan (* -0.5 (/ B (- C A)))) (/ PI 180.0))
(if (<= A 1.55e+64)
(* (/ 180.0 PI) (atan (/ (- C (hypot C B)) B)))
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.1e+63) {
tmp = atan((-0.5 * (B / (C - A)))) / (((double) M_PI) / 180.0);
} else if (A <= 1.55e+64) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(C, B)) / B));
} else {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.1e+63) {
tmp = Math.atan((-0.5 * (B / (C - A)))) / (Math.PI / 180.0);
} else if (A <= 1.55e+64) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(C, B)) / B));
} else {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.1e+63: tmp = math.atan((-0.5 * (B / (C - A)))) / (math.pi / 180.0) elif A <= 1.55e+64: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(C, B)) / B)) else: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.1e+63) tmp = Float64(atan(Float64(-0.5 * Float64(B / Float64(C - A)))) / Float64(pi / 180.0)); elseif (A <= 1.55e+64) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(C, B)) / B))); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.1e+63) tmp = atan((-0.5 * (B / (C - A)))) / (pi / 180.0); elseif (A <= 1.55e+64) tmp = (180.0 / pi) * atan(((C - hypot(C, B)) / B)); else tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.1e+63], N[(N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.55e+64], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.1 \cdot 10^{+63}:\\
\;\;\;\;\frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)}{\frac{\pi}{180}}\\
\mathbf{elif}\;A \leq 1.55 \cdot 10^{+64}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.1000000000000001e63Initial program 13.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified26.5%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
associate--r+N/A
--lowering--.f64N/A
--lowering--.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6449.4%
Applied egg-rr49.4%
Taylor expanded in B around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6485.4%
Simplified85.4%
if -3.1000000000000001e63 < A < 1.55e64Initial program 56.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified77.4%
Taylor expanded in A around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6475.8%
Simplified75.8%
if 1.55e64 < A Initial program 85.3%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6486.9%
Simplified86.9%
Final simplification79.4%
(FPCore (A B C) :precision binary64 (if (<= A -1.6e+66) (/ (atan (* -0.5 (/ B (- C A)))) (/ PI 180.0)) (/ (atan (/ (- (- C A) (hypot B (- C A))) B)) (/ PI 180.0))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.6e+66) {
tmp = atan((-0.5 * (B / (C - A)))) / (((double) M_PI) / 180.0);
} else {
tmp = atan((((C - A) - hypot(B, (C - A))) / B)) / (((double) M_PI) / 180.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.6e+66) {
tmp = Math.atan((-0.5 * (B / (C - A)))) / (Math.PI / 180.0);
} else {
tmp = Math.atan((((C - A) - Math.hypot(B, (C - A))) / B)) / (Math.PI / 180.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.6e+66: tmp = math.atan((-0.5 * (B / (C - A)))) / (math.pi / 180.0) else: tmp = math.atan((((C - A) - math.hypot(B, (C - A))) / B)) / (math.pi / 180.0) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.6e+66) tmp = Float64(atan(Float64(-0.5 * Float64(B / Float64(C - A)))) / Float64(pi / 180.0)); else tmp = Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(C - A))) / B)) / Float64(pi / 180.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.6e+66) tmp = atan((-0.5 * (B / (C - A)))) / (pi / 180.0); else tmp = atan((((C - A) - hypot(B, (C - A))) / B)) / (pi / 180.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.6e+66], N[(N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(C - A), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.6 \cdot 10^{+66}:\\
\;\;\;\;\frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)}{\frac{\pi}{180}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right)}{\frac{\pi}{180}}\\
\end{array}
\end{array}
if A < -1.6e66Initial program 13.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified26.5%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
associate--r+N/A
--lowering--.f64N/A
--lowering--.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6449.4%
Applied egg-rr49.4%
Taylor expanded in B around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6485.4%
Simplified85.4%
if -1.6e66 < A Initial program 62.3%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified81.8%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
associate--r+N/A
--lowering--.f64N/A
--lowering--.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6482.0%
Applied egg-rr82.0%
(FPCore (A B C) :precision binary64 (if (<= A -1.55e+62) (/ (atan (* -0.5 (/ B (- C A)))) (/ PI 180.0)) (* (atan (/ (- C (+ A (hypot B (- C A)))) B)) (/ 180.0 PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.55e+62) {
tmp = atan((-0.5 * (B / (C - A)))) / (((double) M_PI) / 180.0);
} else {
tmp = atan(((C - (A + hypot(B, (C - A)))) / B)) * (180.0 / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.55e+62) {
tmp = Math.atan((-0.5 * (B / (C - A)))) / (Math.PI / 180.0);
} else {
tmp = Math.atan(((C - (A + Math.hypot(B, (C - A)))) / B)) * (180.0 / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.55e+62: tmp = math.atan((-0.5 * (B / (C - A)))) / (math.pi / 180.0) else: tmp = math.atan(((C - (A + math.hypot(B, (C - A)))) / B)) * (180.0 / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.55e+62) tmp = Float64(atan(Float64(-0.5 * Float64(B / Float64(C - A)))) / Float64(pi / 180.0)); else tmp = Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(C - A)))) / B)) * Float64(180.0 / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.55e+62) tmp = atan((-0.5 * (B / (C - A)))) / (pi / 180.0); else tmp = atan(((C - (A + hypot(B, (C - A)))) / B)) * (180.0 / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.55e+62], N[(N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(C - A), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.55 \cdot 10^{+62}:\\
\;\;\;\;\frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)}{\frac{\pi}{180}}\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, C - A\right)\right)}{B}\right) \cdot \frac{180}{\pi}\\
\end{array}
\end{array}
if A < -1.55000000000000007e62Initial program 13.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified26.5%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
associate--r+N/A
--lowering--.f64N/A
--lowering--.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6449.4%
Applied egg-rr49.4%
Taylor expanded in B around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6485.4%
Simplified85.4%
if -1.55000000000000007e62 < A Initial program 62.3%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified81.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -1.25e-300)
(* 180.0 (/ (atan (+ 1.0 t_0)) PI))
(if (<= B 1.6e-213)
(/ 1.0 (/ (/ PI 180.0) (atan (/ -0.5 t_0))))
(/
1.0
(/
(/ PI 180.0)
(atan (+ (* -0.5 (* t_0 t_0)) (- (+ (/ C B) -1.0) (/ A B))))))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -1.25e-300) {
tmp = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
} else if (B <= 1.6e-213) {
tmp = 1.0 / ((((double) M_PI) / 180.0) / atan((-0.5 / t_0)));
} else {
tmp = 1.0 / ((((double) M_PI) / 180.0) / atan(((-0.5 * (t_0 * t_0)) + (((C / B) + -1.0) - (A / B)))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -1.25e-300) {
tmp = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
} else if (B <= 1.6e-213) {
tmp = 1.0 / ((Math.PI / 180.0) / Math.atan((-0.5 / t_0)));
} else {
tmp = 1.0 / ((Math.PI / 180.0) / Math.atan(((-0.5 * (t_0 * t_0)) + (((C / B) + -1.0) - (A / B)))));
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= -1.25e-300: tmp = 180.0 * (math.atan((1.0 + t_0)) / math.pi) elif B <= 1.6e-213: tmp = 1.0 / ((math.pi / 180.0) / math.atan((-0.5 / t_0))) else: tmp = 1.0 / ((math.pi / 180.0) / math.atan(((-0.5 * (t_0 * t_0)) + (((C / B) + -1.0) - (A / B))))) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= -1.25e-300) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)); elseif (B <= 1.6e-213) tmp = Float64(1.0 / Float64(Float64(pi / 180.0) / atan(Float64(-0.5 / t_0)))); else tmp = Float64(1.0 / Float64(Float64(pi / 180.0) / atan(Float64(Float64(-0.5 * Float64(t_0 * t_0)) + Float64(Float64(Float64(C / B) + -1.0) - Float64(A / B)))))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= -1.25e-300) tmp = 180.0 * (atan((1.0 + t_0)) / pi); elseif (B <= 1.6e-213) tmp = 1.0 / ((pi / 180.0) / atan((-0.5 / t_0))); else tmp = 1.0 / ((pi / 180.0) / atan(((-0.5 * (t_0 * t_0)) + (((C / B) + -1.0) - (A / B))))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -1.25e-300], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.6e-213], N[(1.0 / N[(N[(Pi / 180.0), $MachinePrecision] / N[ArcTan[N[(-0.5 / t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(Pi / 180.0), $MachinePrecision] / N[ArcTan[N[(N[(-0.5 * N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision] - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -1.25 \cdot 10^{-300}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t\_0\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.6 \cdot 10^{-213}:\\
\;\;\;\;\frac{1}{\frac{\frac{\pi}{180}}{\tan^{-1} \left(\frac{-0.5}{t\_0}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{\frac{\pi}{180}}{\tan^{-1} \left(-0.5 \cdot \left(t\_0 \cdot t\_0\right) + \left(\left(\frac{C}{B} + -1\right) - \frac{A}{B}\right)\right)}}\\
\end{array}
\end{array}
if B < -1.24999999999999999e-300Initial program 55.4%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6466.0%
Simplified66.0%
if -1.24999999999999999e-300 < B < 1.59999999999999986e-213Initial program 35.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified59.0%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
associate--r+N/A
--lowering--.f64N/A
--lowering--.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6477.4%
Applied egg-rr77.4%
Taylor expanded in B around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6472.1%
Simplified72.1%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f64N/A
atan-lowering-atan.f64N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f6472.3%
Applied egg-rr72.3%
if 1.59999999999999986e-213 < B Initial program 56.3%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified76.5%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
associate--r+N/A
--lowering--.f64N/A
--lowering--.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6478.3%
Applied egg-rr78.3%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f64N/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
+-commutativeN/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
--lowering--.f6478.3%
Applied egg-rr78.3%
Taylor expanded in B around inf
associate--l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
unpow2N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
associate--r+N/A
--lowering--.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6474.2%
Simplified74.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -3.9e-296)
(* 180.0 (/ (atan (+ 1.0 t_0)) PI))
(if (<= B 3.2e-213)
(/ 1.0 (/ (/ PI 180.0) (atan (/ -0.5 t_0))))
(*
180.0
(/
(atan (+ (* (/ -0.5 B) (* (- A C) (/ (- A C) B))) (+ t_0 -1.0)))
PI))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -3.9e-296) {
tmp = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
} else if (B <= 3.2e-213) {
tmp = 1.0 / ((((double) M_PI) / 180.0) / atan((-0.5 / t_0)));
} else {
tmp = 180.0 * (atan((((-0.5 / B) * ((A - C) * ((A - C) / B))) + (t_0 + -1.0))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -3.9e-296) {
tmp = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
} else if (B <= 3.2e-213) {
tmp = 1.0 / ((Math.PI / 180.0) / Math.atan((-0.5 / t_0)));
} else {
tmp = 180.0 * (Math.atan((((-0.5 / B) * ((A - C) * ((A - C) / B))) + (t_0 + -1.0))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= -3.9e-296: tmp = 180.0 * (math.atan((1.0 + t_0)) / math.pi) elif B <= 3.2e-213: tmp = 1.0 / ((math.pi / 180.0) / math.atan((-0.5 / t_0))) else: tmp = 180.0 * (math.atan((((-0.5 / B) * ((A - C) * ((A - C) / B))) + (t_0 + -1.0))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= -3.9e-296) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)); elseif (B <= 3.2e-213) tmp = Float64(1.0 / Float64(Float64(pi / 180.0) / atan(Float64(-0.5 / t_0)))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-0.5 / B) * Float64(Float64(A - C) * Float64(Float64(A - C) / B))) + Float64(t_0 + -1.0))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= -3.9e-296) tmp = 180.0 * (atan((1.0 + t_0)) / pi); elseif (B <= 3.2e-213) tmp = 1.0 / ((pi / 180.0) / atan((-0.5 / t_0))); else tmp = 180.0 * (atan((((-0.5 / B) * ((A - C) * ((A - C) / B))) + (t_0 + -1.0))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -3.9e-296], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.2e-213], N[(1.0 / N[(N[(Pi / 180.0), $MachinePrecision] / N[ArcTan[N[(-0.5 / t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(-0.5 / B), $MachinePrecision] * N[(N[(A - C), $MachinePrecision] * N[(N[(A - C), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -3.9 \cdot 10^{-296}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t\_0\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.2 \cdot 10^{-213}:\\
\;\;\;\;\frac{1}{\frac{\frac{\pi}{180}}{\tan^{-1} \left(\frac{-0.5}{t\_0}\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5}{B} \cdot \left(\left(A - C\right) \cdot \frac{A - C}{B}\right) + \left(t\_0 + -1\right)\right)}{\pi}\\
\end{array}
\end{array}
if B < -3.9000000000000001e-296Initial program 55.4%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6466.0%
Simplified66.0%
if -3.9000000000000001e-296 < B < 3.19999999999999972e-213Initial program 35.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified59.0%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
associate--r+N/A
--lowering--.f64N/A
--lowering--.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6477.4%
Applied egg-rr77.4%
Taylor expanded in B around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6472.1%
Simplified72.1%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f64N/A
atan-lowering-atan.f64N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f6472.3%
Applied egg-rr72.3%
if 3.19999999999999972e-213 < B Initial program 56.3%
Taylor expanded in B around inf
associate--l+N/A
+-lowering-+.f64N/A
Simplified74.1%
Final simplification70.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -1.5e-301)
(* 180.0 (/ (atan (+ 1.0 t_0)) PI))
(if (<= B 7e-203)
(/ 1.0 (/ (/ PI 180.0) (atan (/ -0.5 t_0))))
(/ 1.0 (/ (/ PI 180.0) (atan (- (+ (/ C B) -1.0) (/ A B)))))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -1.5e-301) {
tmp = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
} else if (B <= 7e-203) {
tmp = 1.0 / ((((double) M_PI) / 180.0) / atan((-0.5 / t_0)));
} else {
tmp = 1.0 / ((((double) M_PI) / 180.0) / atan((((C / B) + -1.0) - (A / B))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -1.5e-301) {
tmp = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
} else if (B <= 7e-203) {
tmp = 1.0 / ((Math.PI / 180.0) / Math.atan((-0.5 / t_0)));
} else {
tmp = 1.0 / ((Math.PI / 180.0) / Math.atan((((C / B) + -1.0) - (A / B))));
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= -1.5e-301: tmp = 180.0 * (math.atan((1.0 + t_0)) / math.pi) elif B <= 7e-203: tmp = 1.0 / ((math.pi / 180.0) / math.atan((-0.5 / t_0))) else: tmp = 1.0 / ((math.pi / 180.0) / math.atan((((C / B) + -1.0) - (A / B)))) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= -1.5e-301) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)); elseif (B <= 7e-203) tmp = Float64(1.0 / Float64(Float64(pi / 180.0) / atan(Float64(-0.5 / t_0)))); else tmp = Float64(1.0 / Float64(Float64(pi / 180.0) / atan(Float64(Float64(Float64(C / B) + -1.0) - Float64(A / B))))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= -1.5e-301) tmp = 180.0 * (atan((1.0 + t_0)) / pi); elseif (B <= 7e-203) tmp = 1.0 / ((pi / 180.0) / atan((-0.5 / t_0))); else tmp = 1.0 / ((pi / 180.0) / atan((((C / B) + -1.0) - (A / B)))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -1.5e-301], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7e-203], N[(1.0 / N[(N[(Pi / 180.0), $MachinePrecision] / N[ArcTan[N[(-0.5 / t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(Pi / 180.0), $MachinePrecision] / N[ArcTan[N[(N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision] - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -1.5 \cdot 10^{-301}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t\_0\right)}{\pi}\\
\mathbf{elif}\;B \leq 7 \cdot 10^{-203}:\\
\;\;\;\;\frac{1}{\frac{\frac{\pi}{180}}{\tan^{-1} \left(\frac{-0.5}{t\_0}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{\frac{\pi}{180}}{\tan^{-1} \left(\left(\frac{C}{B} + -1\right) - \frac{A}{B}\right)}}\\
\end{array}
\end{array}
if B < -1.5e-301Initial program 55.4%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6466.0%
Simplified66.0%
if -1.5e-301 < B < 7.0000000000000003e-203Initial program 38.4%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified57.9%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
associate--r+N/A
--lowering--.f64N/A
--lowering--.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6473.4%
Applied egg-rr73.4%
Taylor expanded in B around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6468.8%
Simplified68.8%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f64N/A
atan-lowering-atan.f64N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f6468.9%
Applied egg-rr68.9%
if 7.0000000000000003e-203 < B Initial program 56.5%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified77.5%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
associate--r+N/A
--lowering--.f64N/A
--lowering--.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6479.3%
Applied egg-rr79.3%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f64N/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
+-commutativeN/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
--lowering--.f6479.3%
Applied egg-rr79.3%
Taylor expanded in B around inf
associate--r+N/A
--lowering--.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6474.2%
Simplified74.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -5.6e-300)
(* 180.0 (/ (atan (+ 1.0 t_0)) PI))
(if (<= B 8.5e-149)
(/ 1.0 (/ (/ PI 180.0) (atan (/ -0.5 t_0))))
(* (/ 180.0 PI) (atan (+ t_0 -1.0)))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -5.6e-300) {
tmp = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
} else if (B <= 8.5e-149) {
tmp = 1.0 / ((((double) M_PI) / 180.0) / atan((-0.5 / t_0)));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((t_0 + -1.0));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -5.6e-300) {
tmp = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
} else if (B <= 8.5e-149) {
tmp = 1.0 / ((Math.PI / 180.0) / Math.atan((-0.5 / t_0)));
} else {
tmp = (180.0 / Math.PI) * Math.atan((t_0 + -1.0));
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= -5.6e-300: tmp = 180.0 * (math.atan((1.0 + t_0)) / math.pi) elif B <= 8.5e-149: tmp = 1.0 / ((math.pi / 180.0) / math.atan((-0.5 / t_0))) else: tmp = (180.0 / math.pi) * math.atan((t_0 + -1.0)) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= -5.6e-300) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)); elseif (B <= 8.5e-149) tmp = Float64(1.0 / Float64(Float64(pi / 180.0) / atan(Float64(-0.5 / t_0)))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(t_0 + -1.0))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= -5.6e-300) tmp = 180.0 * (atan((1.0 + t_0)) / pi); elseif (B <= 8.5e-149) tmp = 1.0 / ((pi / 180.0) / atan((-0.5 / t_0))); else tmp = (180.0 / pi) * atan((t_0 + -1.0)); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -5.6e-300], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 8.5e-149], N[(1.0 / N[(N[(Pi / 180.0), $MachinePrecision] / N[ArcTan[N[(-0.5 / t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -5.6 \cdot 10^{-300}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t\_0\right)}{\pi}\\
\mathbf{elif}\;B \leq 8.5 \cdot 10^{-149}:\\
\;\;\;\;\frac{1}{\frac{\frac{\pi}{180}}{\tan^{-1} \left(\frac{-0.5}{t\_0}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(t\_0 + -1\right)\\
\end{array}
\end{array}
if B < -5.59999999999999988e-300Initial program 55.4%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6466.0%
Simplified66.0%
if -5.59999999999999988e-300 < B < 8.5000000000000006e-149Initial program 39.0%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified59.3%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
associate--r+N/A
--lowering--.f64N/A
--lowering--.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6474.0%
Applied egg-rr74.0%
Taylor expanded in B around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6464.5%
Simplified64.5%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f64N/A
atan-lowering-atan.f64N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f6464.6%
Applied egg-rr64.6%
if 8.5000000000000006e-149 < B Initial program 57.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified78.6%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6476.1%
Simplified76.1%
Final simplification69.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -6e-297)
(* 180.0 (/ (atan (+ 1.0 t_0)) PI))
(if (<= B 1.15e-152)
(/ (* 180.0 (atan (/ -0.5 t_0))) PI)
(* (/ 180.0 PI) (atan (+ t_0 -1.0)))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -6e-297) {
tmp = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
} else if (B <= 1.15e-152) {
tmp = (180.0 * atan((-0.5 / t_0))) / ((double) M_PI);
} else {
tmp = (180.0 / ((double) M_PI)) * atan((t_0 + -1.0));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -6e-297) {
tmp = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
} else if (B <= 1.15e-152) {
tmp = (180.0 * Math.atan((-0.5 / t_0))) / Math.PI;
} else {
tmp = (180.0 / Math.PI) * Math.atan((t_0 + -1.0));
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= -6e-297: tmp = 180.0 * (math.atan((1.0 + t_0)) / math.pi) elif B <= 1.15e-152: tmp = (180.0 * math.atan((-0.5 / t_0))) / math.pi else: tmp = (180.0 / math.pi) * math.atan((t_0 + -1.0)) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= -6e-297) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)); elseif (B <= 1.15e-152) tmp = Float64(Float64(180.0 * atan(Float64(-0.5 / t_0))) / pi); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(t_0 + -1.0))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= -6e-297) tmp = 180.0 * (atan((1.0 + t_0)) / pi); elseif (B <= 1.15e-152) tmp = (180.0 * atan((-0.5 / t_0))) / pi; else tmp = (180.0 / pi) * atan((t_0 + -1.0)); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -6e-297], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.15e-152], N[(N[(180.0 * N[ArcTan[N[(-0.5 / t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -6 \cdot 10^{-297}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t\_0\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.15 \cdot 10^{-152}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-0.5}{t\_0}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(t\_0 + -1\right)\\
\end{array}
\end{array}
if B < -5.9999999999999999e-297Initial program 55.4%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6466.0%
Simplified66.0%
if -5.9999999999999999e-297 < B < 1.1500000000000001e-152Initial program 39.0%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified59.3%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
associate--r+N/A
--lowering--.f64N/A
--lowering--.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6474.0%
Applied egg-rr74.0%
Taylor expanded in B around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6464.5%
Simplified64.5%
associate-/r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
atan-lowering-atan.f64N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
PI-lowering-PI.f6464.6%
Applied egg-rr64.6%
if 1.1500000000000001e-152 < B Initial program 57.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified78.6%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6476.1%
Simplified76.1%
Final simplification69.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -1.25e-301)
(* 180.0 (/ (atan (+ 1.0 t_0)) PI))
(if (<= B 9.2e-160)
(/ (* 180.0 (atan (* B (/ -0.5 (- C A))))) PI)
(* (/ 180.0 PI) (atan (+ t_0 -1.0)))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -1.25e-301) {
tmp = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
} else if (B <= 9.2e-160) {
tmp = (180.0 * atan((B * (-0.5 / (C - A))))) / ((double) M_PI);
} else {
tmp = (180.0 / ((double) M_PI)) * atan((t_0 + -1.0));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -1.25e-301) {
tmp = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
} else if (B <= 9.2e-160) {
tmp = (180.0 * Math.atan((B * (-0.5 / (C - A))))) / Math.PI;
} else {
tmp = (180.0 / Math.PI) * Math.atan((t_0 + -1.0));
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= -1.25e-301: tmp = 180.0 * (math.atan((1.0 + t_0)) / math.pi) elif B <= 9.2e-160: tmp = (180.0 * math.atan((B * (-0.5 / (C - A))))) / math.pi else: tmp = (180.0 / math.pi) * math.atan((t_0 + -1.0)) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= -1.25e-301) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)); elseif (B <= 9.2e-160) tmp = Float64(Float64(180.0 * atan(Float64(B * Float64(-0.5 / Float64(C - A))))) / pi); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(t_0 + -1.0))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= -1.25e-301) tmp = 180.0 * (atan((1.0 + t_0)) / pi); elseif (B <= 9.2e-160) tmp = (180.0 * atan((B * (-0.5 / (C - A))))) / pi; else tmp = (180.0 / pi) * atan((t_0 + -1.0)); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -1.25e-301], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 9.2e-160], N[(N[(180.0 * N[ArcTan[N[(B * N[(-0.5 / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -1.25 \cdot 10^{-301}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t\_0\right)}{\pi}\\
\mathbf{elif}\;B \leq 9.2 \cdot 10^{-160}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(t\_0 + -1\right)\\
\end{array}
\end{array}
if B < -1.25000000000000003e-301Initial program 55.4%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6466.0%
Simplified66.0%
if -1.25000000000000003e-301 < B < 9.19999999999999939e-160Initial program 39.0%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified59.3%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
associate--r+N/A
--lowering--.f64N/A
--lowering--.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6474.0%
Applied egg-rr74.0%
Taylor expanded in B around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6464.5%
Simplified64.5%
associate-/r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
atan-lowering-atan.f64N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
PI-lowering-PI.f6464.6%
Applied egg-rr64.6%
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6464.5%
Applied egg-rr64.5%
if 9.19999999999999939e-160 < B Initial program 57.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified78.6%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6476.1%
Simplified76.1%
Final simplification69.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -3.6e-300)
(* 180.0 (/ (atan (+ 1.0 t_0)) PI))
(if (<= B 9.5e-203)
(/ (atan (* -0.5 (/ B (- C A)))) (/ PI 180.0))
(* (/ 180.0 PI) (atan (+ t_0 -1.0)))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -3.6e-300) {
tmp = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
} else if (B <= 9.5e-203) {
tmp = atan((-0.5 * (B / (C - A)))) / (((double) M_PI) / 180.0);
} else {
tmp = (180.0 / ((double) M_PI)) * atan((t_0 + -1.0));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -3.6e-300) {
tmp = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
} else if (B <= 9.5e-203) {
tmp = Math.atan((-0.5 * (B / (C - A)))) / (Math.PI / 180.0);
} else {
tmp = (180.0 / Math.PI) * Math.atan((t_0 + -1.0));
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= -3.6e-300: tmp = 180.0 * (math.atan((1.0 + t_0)) / math.pi) elif B <= 9.5e-203: tmp = math.atan((-0.5 * (B / (C - A)))) / (math.pi / 180.0) else: tmp = (180.0 / math.pi) * math.atan((t_0 + -1.0)) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= -3.6e-300) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)); elseif (B <= 9.5e-203) tmp = Float64(atan(Float64(-0.5 * Float64(B / Float64(C - A)))) / Float64(pi / 180.0)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(t_0 + -1.0))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= -3.6e-300) tmp = 180.0 * (atan((1.0 + t_0)) / pi); elseif (B <= 9.5e-203) tmp = atan((-0.5 * (B / (C - A)))) / (pi / 180.0); else tmp = (180.0 / pi) * atan((t_0 + -1.0)); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -3.6e-300], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 9.5e-203], N[(N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -3.6 \cdot 10^{-300}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t\_0\right)}{\pi}\\
\mathbf{elif}\;B \leq 9.5 \cdot 10^{-203}:\\
\;\;\;\;\frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)}{\frac{\pi}{180}}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(t\_0 + -1\right)\\
\end{array}
\end{array}
if B < -3.60000000000000016e-300Initial program 55.4%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6466.0%
Simplified66.0%
if -3.60000000000000016e-300 < B < 9.50000000000000035e-203Initial program 38.4%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified57.9%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
associate--r+N/A
--lowering--.f64N/A
--lowering--.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6473.4%
Applied egg-rr73.4%
Taylor expanded in B around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6468.8%
Simplified68.8%
if 9.50000000000000035e-203 < B Initial program 56.5%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified77.5%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6474.2%
Simplified74.2%
Final simplification69.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -1.38e-297)
(* 180.0 (/ (atan (+ 1.0 t_0)) PI))
(if (<= B 2.6e-203)
(* (atan (* -0.5 (/ B (- C A)))) (/ 180.0 PI))
(* (/ 180.0 PI) (atan (+ t_0 -1.0)))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -1.38e-297) {
tmp = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
} else if (B <= 2.6e-203) {
tmp = atan((-0.5 * (B / (C - A)))) * (180.0 / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((t_0 + -1.0));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -1.38e-297) {
tmp = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
} else if (B <= 2.6e-203) {
tmp = Math.atan((-0.5 * (B / (C - A)))) * (180.0 / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan((t_0 + -1.0));
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= -1.38e-297: tmp = 180.0 * (math.atan((1.0 + t_0)) / math.pi) elif B <= 2.6e-203: tmp = math.atan((-0.5 * (B / (C - A)))) * (180.0 / math.pi) else: tmp = (180.0 / math.pi) * math.atan((t_0 + -1.0)) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= -1.38e-297) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)); elseif (B <= 2.6e-203) tmp = Float64(atan(Float64(-0.5 * Float64(B / Float64(C - A)))) * Float64(180.0 / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(t_0 + -1.0))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= -1.38e-297) tmp = 180.0 * (atan((1.0 + t_0)) / pi); elseif (B <= 2.6e-203) tmp = atan((-0.5 * (B / (C - A)))) * (180.0 / pi); else tmp = (180.0 / pi) * atan((t_0 + -1.0)); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -1.38e-297], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.6e-203], N[(N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -1.38 \cdot 10^{-297}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t\_0\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.6 \cdot 10^{-203}:\\
\;\;\;\;\tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(t\_0 + -1\right)\\
\end{array}
\end{array}
if B < -1.38000000000000004e-297Initial program 55.4%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6466.0%
Simplified66.0%
if -1.38000000000000004e-297 < B < 2.59999999999999975e-203Initial program 38.4%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified57.9%
Taylor expanded in B around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6468.8%
Simplified68.8%
if 2.59999999999999975e-203 < B Initial program 56.5%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified77.5%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6474.2%
Simplified74.2%
Final simplification69.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -1.3e-301)
(* 180.0 (/ (atan (+ 1.0 t_0)) PI))
(if (<= B 2.5e-203)
(* (atan (* -0.5 (/ B (- C A)))) (/ 180.0 PI))
(* 180.0 (/ (atan (+ t_0 -1.0)) PI))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -1.3e-301) {
tmp = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
} else if (B <= 2.5e-203) {
tmp = atan((-0.5 * (B / (C - A)))) * (180.0 / ((double) M_PI));
} else {
tmp = 180.0 * (atan((t_0 + -1.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -1.3e-301) {
tmp = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
} else if (B <= 2.5e-203) {
tmp = Math.atan((-0.5 * (B / (C - A)))) * (180.0 / Math.PI);
} else {
tmp = 180.0 * (Math.atan((t_0 + -1.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= -1.3e-301: tmp = 180.0 * (math.atan((1.0 + t_0)) / math.pi) elif B <= 2.5e-203: tmp = math.atan((-0.5 * (B / (C - A)))) * (180.0 / math.pi) else: tmp = 180.0 * (math.atan((t_0 + -1.0)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= -1.3e-301) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)); elseif (B <= 2.5e-203) tmp = Float64(atan(Float64(-0.5 * Float64(B / Float64(C - A)))) * Float64(180.0 / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(t_0 + -1.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= -1.3e-301) tmp = 180.0 * (atan((1.0 + t_0)) / pi); elseif (B <= 2.5e-203) tmp = atan((-0.5 * (B / (C - A)))) * (180.0 / pi); else tmp = 180.0 * (atan((t_0 + -1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -1.3e-301], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.5e-203], N[(N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -1.3 \cdot 10^{-301}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t\_0\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.5 \cdot 10^{-203}:\\
\;\;\;\;\tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(t\_0 + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.2999999999999999e-301Initial program 55.4%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6466.0%
Simplified66.0%
if -1.2999999999999999e-301 < B < 2.5000000000000001e-203Initial program 38.4%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified57.9%
Taylor expanded in B around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6468.8%
Simplified68.8%
if 2.5000000000000001e-203 < B Initial program 56.5%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6474.2%
Simplified74.2%
Final simplification69.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -2.3e-302)
(* 180.0 (/ (atan (+ 1.0 t_0)) PI))
(if (<= B 1e-250)
(* (/ 180.0 PI) (atan (* B (/ 0.5 A))))
(* 180.0 (/ (atan (+ t_0 -1.0)) PI))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -2.3e-302) {
tmp = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
} else if (B <= 1e-250) {
tmp = (180.0 / ((double) M_PI)) * atan((B * (0.5 / A)));
} else {
tmp = 180.0 * (atan((t_0 + -1.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -2.3e-302) {
tmp = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
} else if (B <= 1e-250) {
tmp = (180.0 / Math.PI) * Math.atan((B * (0.5 / A)));
} else {
tmp = 180.0 * (Math.atan((t_0 + -1.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= -2.3e-302: tmp = 180.0 * (math.atan((1.0 + t_0)) / math.pi) elif B <= 1e-250: tmp = (180.0 / math.pi) * math.atan((B * (0.5 / A))) else: tmp = 180.0 * (math.atan((t_0 + -1.0)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= -2.3e-302) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)); elseif (B <= 1e-250) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(0.5 / A)))); else tmp = Float64(180.0 * Float64(atan(Float64(t_0 + -1.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= -2.3e-302) tmp = 180.0 * (atan((1.0 + t_0)) / pi); elseif (B <= 1e-250) tmp = (180.0 / pi) * atan((B * (0.5 / A))); else tmp = 180.0 * (atan((t_0 + -1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -2.3e-302], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1e-250], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -2.3 \cdot 10^{-302}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t\_0\right)}{\pi}\\
\mathbf{elif}\;B \leq 10^{-250}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(t\_0 + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -2.30000000000000002e-302Initial program 55.4%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6466.0%
Simplified66.0%
if -2.30000000000000002e-302 < B < 1.0000000000000001e-250Initial program 29.3%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified49.0%
Taylor expanded in B around 0
sub-negN/A
associate-*r/N/A
associate-*l/N/A
metadata-evalN/A
associate-*r/N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
Simplified60.5%
Taylor expanded in A around inf
/-lowering-/.f6460.9%
Simplified60.9%
if 1.0000000000000001e-250 < B Initial program 56.1%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6471.3%
Simplified71.3%
Final simplification68.1%
(FPCore (A B C)
:precision binary64
(if (<= B -9.5e-303)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
(if (<= B 3.7e-247)
(* (/ 180.0 PI) (atan (* B (/ 0.5 A))))
(* (/ 180.0 PI) (atan (/ (- C B) B))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -9.5e-303) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else if (B <= 3.7e-247) {
tmp = (180.0 / ((double) M_PI)) * atan((B * (0.5 / A)));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C - B) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -9.5e-303) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else if (B <= 3.7e-247) {
tmp = (180.0 / Math.PI) * Math.atan((B * (0.5 / A)));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - B) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -9.5e-303: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) elif B <= 3.7e-247: tmp = (180.0 / math.pi) * math.atan((B * (0.5 / A))) else: tmp = (180.0 / math.pi) * math.atan(((C - B) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -9.5e-303) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); elseif (B <= 3.7e-247) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(0.5 / A)))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - B) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -9.5e-303) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); elseif (B <= 3.7e-247) tmp = (180.0 / pi) * atan((B * (0.5 / A))); else tmp = (180.0 / pi) * atan(((C - B) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -9.5e-303], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.7e-247], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -9.5 \cdot 10^{-303}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.7 \cdot 10^{-247}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\
\end{array}
\end{array}
if B < -9.4999999999999999e-303Initial program 55.4%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6466.0%
Simplified66.0%
if -9.4999999999999999e-303 < B < 3.7000000000000001e-247Initial program 29.3%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified49.0%
Taylor expanded in B around 0
sub-negN/A
associate-*r/N/A
associate-*l/N/A
metadata-evalN/A
associate-*r/N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
Simplified60.5%
Taylor expanded in A around inf
/-lowering-/.f6460.9%
Simplified60.9%
if 3.7000000000000001e-247 < B Initial program 56.1%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified76.9%
Taylor expanded in B around inf
Simplified63.5%
Final simplification64.6%
(FPCore (A B C)
:precision binary64
(if (<= B -1.8e-22)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B 5.9e-10)
(* (/ 180.0 PI) (atan (* B (/ 0.5 A))))
(* (/ 180.0 PI) (atan -1.0)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.8e-22) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= 5.9e-10) {
tmp = (180.0 / ((double) M_PI)) * atan((B * (0.5 / A)));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.8e-22) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= 5.9e-10) {
tmp = (180.0 / Math.PI) * Math.atan((B * (0.5 / A)));
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.8e-22: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= 5.9e-10: tmp = (180.0 / math.pi) * math.atan((B * (0.5 / A))) else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.8e-22) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= 5.9e-10) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(0.5 / A)))); else tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.8e-22) tmp = (180.0 / pi) * atan(1.0); elseif (B <= 5.9e-10) tmp = (180.0 / pi) * atan((B * (0.5 / A))); else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.8e-22], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.9e-10], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.8 \cdot 10^{-22}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq 5.9 \cdot 10^{-10}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -1.7999999999999999e-22Initial program 55.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified80.2%
Taylor expanded in B around -inf
Simplified60.1%
if -1.7999999999999999e-22 < B < 5.9000000000000003e-10Initial program 51.0%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified59.7%
Taylor expanded in B around 0
sub-negN/A
associate-*r/N/A
associate-*l/N/A
metadata-evalN/A
associate-*r/N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
Simplified49.7%
Taylor expanded in A around inf
/-lowering-/.f6434.5%
Simplified34.5%
if 5.9000000000000003e-10 < B Initial program 58.6%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified86.4%
Taylor expanded in B around inf
Simplified67.5%
Final simplification50.3%
(FPCore (A B C)
:precision binary64
(if (<= B -2.7e-22)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B 7.8e-12)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(* (/ 180.0 PI) (atan -1.0)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.7e-22) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= 7.8e-12) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2.7e-22) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= 7.8e-12) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.7e-22: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= 7.8e-12: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2.7e-22) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= 7.8e-12) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2.7e-22) tmp = (180.0 / pi) * atan(1.0); elseif (B <= 7.8e-12) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.7e-22], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7.8e-12], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2.7 \cdot 10^{-22}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq 7.8 \cdot 10^{-12}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -2.7000000000000002e-22Initial program 55.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified80.2%
Taylor expanded in B around -inf
Simplified60.1%
if -2.7000000000000002e-22 < B < 7.79999999999999988e-12Initial program 51.0%
Taylor expanded in A around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6434.4%
Simplified34.4%
if 7.79999999999999988e-12 < B Initial program 58.6%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified86.4%
Taylor expanded in B around inf
Simplified67.5%
Final simplification50.3%
(FPCore (A B C)
:precision binary64
(if (<= B -3.8e-117)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B 2.15e-144)
(/ (/ (atan 0.0) PI) 0.005555555555555556)
(* (/ 180.0 PI) (atan -1.0)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3.8e-117) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= 2.15e-144) {
tmp = (atan(0.0) / ((double) M_PI)) / 0.005555555555555556;
} else {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -3.8e-117) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= 2.15e-144) {
tmp = (Math.atan(0.0) / Math.PI) / 0.005555555555555556;
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -3.8e-117: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= 2.15e-144: tmp = (math.atan(0.0) / math.pi) / 0.005555555555555556 else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -3.8e-117) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= 2.15e-144) tmp = Float64(Float64(atan(0.0) / pi) / 0.005555555555555556); else tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -3.8e-117) tmp = (180.0 / pi) * atan(1.0); elseif (B <= 2.15e-144) tmp = (atan(0.0) / pi) / 0.005555555555555556; else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3.8e-117], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.15e-144], N[(N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision] / 0.005555555555555556), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -3.8 \cdot 10^{-117}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq 2.15 \cdot 10^{-144}:\\
\;\;\;\;\frac{\frac{\tan^{-1} 0}{\pi}}{0.005555555555555556}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -3.79999999999999972e-117Initial program 54.9%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified74.9%
Taylor expanded in B around -inf
Simplified53.4%
if -3.79999999999999972e-117 < B < 2.14999999999999995e-144Initial program 48.4%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified60.9%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
associate--r+N/A
--lowering--.f64N/A
--lowering--.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6473.5%
Applied egg-rr73.5%
Taylor expanded in C around inf
associate-*r/N/A
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
metadata-evalN/A
/-lowering-/.f6429.7%
Simplified29.7%
div-invN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
div0N/A
atan-lowering-atan.f64N/A
PI-lowering-PI.f64N/A
metadata-eval29.7%
Applied egg-rr29.7%
if 2.14999999999999995e-144 < B Initial program 57.9%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified79.2%
Taylor expanded in B around inf
Simplified57.7%
Final simplification48.2%
(FPCore (A B C) :precision binary64 (if (<= C 1.35e-152) (* (/ 180.0 PI) (atan (/ (- C B) B))) (/ (* 180.0 (atan (/ (* B -0.5) C))) PI)))
double code(double A, double B, double C) {
double tmp;
if (C <= 1.35e-152) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - B) / B));
} else {
tmp = (180.0 * atan(((B * -0.5) / C))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 1.35e-152) {
tmp = (180.0 / Math.PI) * Math.atan(((C - B) / B));
} else {
tmp = (180.0 * Math.atan(((B * -0.5) / C))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 1.35e-152: tmp = (180.0 / math.pi) * math.atan(((C - B) / B)) else: tmp = (180.0 * math.atan(((B * -0.5) / C))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (C <= 1.35e-152) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - B) / B))); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(B * -0.5) / C))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 1.35e-152) tmp = (180.0 / pi) * atan(((C - B) / B)); else tmp = (180.0 * atan(((B * -0.5) / C))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 1.35e-152], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 1.35 \cdot 10^{-152}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < 1.34999999999999999e-152Initial program 68.9%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified84.3%
Taylor expanded in B around inf
Simplified57.9%
if 1.34999999999999999e-152 < C Initial program 30.7%
Taylor expanded in C around inf
+-lowering-+.f64N/A
associate-*r/N/A
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
metadata-evalN/A
/-lowering-/.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6461.7%
Simplified61.7%
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
div0N/A
+-lft-identityN/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6461.7%
Applied egg-rr61.7%
Final simplification59.4%
(FPCore (A B C) :precision binary64 (if (<= C 1.82e-152) (* (/ 180.0 PI) (atan (/ (- C B) B))) (/ (atan (/ (* B -0.5) C)) (/ PI 180.0))))
double code(double A, double B, double C) {
double tmp;
if (C <= 1.82e-152) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - B) / B));
} else {
tmp = atan(((B * -0.5) / C)) / (((double) M_PI) / 180.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 1.82e-152) {
tmp = (180.0 / Math.PI) * Math.atan(((C - B) / B));
} else {
tmp = Math.atan(((B * -0.5) / C)) / (Math.PI / 180.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 1.82e-152: tmp = (180.0 / math.pi) * math.atan(((C - B) / B)) else: tmp = math.atan(((B * -0.5) / C)) / (math.pi / 180.0) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 1.82e-152) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - B) / B))); else tmp = Float64(atan(Float64(Float64(B * -0.5) / C)) / Float64(pi / 180.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 1.82e-152) tmp = (180.0 / pi) * atan(((C - B) / B)); else tmp = atan(((B * -0.5) / C)) / (pi / 180.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 1.82e-152], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 1.82 \cdot 10^{-152}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\frac{\pi}{180}}\\
\end{array}
\end{array}
if C < 1.82000000000000009e-152Initial program 68.9%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified84.3%
Taylor expanded in B around inf
Simplified57.9%
if 1.82000000000000009e-152 < C Initial program 30.7%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified53.8%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
associate--r+N/A
--lowering--.f64N/A
--lowering--.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6458.5%
Applied egg-rr58.5%
Taylor expanded in B around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6463.9%
Simplified63.9%
Taylor expanded in C around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6461.7%
Simplified61.7%
Final simplification59.4%
(FPCore (A B C) :precision binary64 (if (<= C 1.4e-152) (* (/ 180.0 PI) (atan (/ (- C B) B))) (* 180.0 (/ (atan (/ (* B -0.5) C)) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= 1.4e-152) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - B) / B));
} else {
tmp = 180.0 * (atan(((B * -0.5) / C)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 1.4e-152) {
tmp = (180.0 / Math.PI) * Math.atan(((C - B) / B));
} else {
tmp = 180.0 * (Math.atan(((B * -0.5) / C)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 1.4e-152: tmp = (180.0 / math.pi) * math.atan(((C - B) / B)) else: tmp = 180.0 * (math.atan(((B * -0.5) / C)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 1.4e-152) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - B) / B))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / C)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 1.4e-152) tmp = (180.0 / pi) * atan(((C - B) / B)); else tmp = 180.0 * (atan(((B * -0.5) / C)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 1.4e-152], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 1.4 \cdot 10^{-152}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < 1.39999999999999992e-152Initial program 68.9%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified84.3%
Taylor expanded in B around inf
Simplified57.9%
if 1.39999999999999992e-152 < C Initial program 30.7%
Taylor expanded in C around inf
+-lowering-+.f64N/A
associate-*r/N/A
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
metadata-evalN/A
/-lowering-/.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6461.7%
Simplified61.7%
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
div0N/A
+-lft-identityN/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6461.7%
Applied egg-rr61.7%
Final simplification59.4%
(FPCore (A B C) :precision binary64 (if (<= B -6.8e-146) (* (/ 180.0 PI) (atan 1.0)) (* (/ 180.0 PI) (atan (/ (- C B) B)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -6.8e-146) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C - B) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -6.8e-146) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - B) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -6.8e-146: tmp = (180.0 / math.pi) * math.atan(1.0) else: tmp = (180.0 / math.pi) * math.atan(((C - B) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -6.8e-146) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - B) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -6.8e-146) tmp = (180.0 / pi) * atan(1.0); else tmp = (180.0 / pi) * atan(((C - B) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -6.8e-146], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -6.8 \cdot 10^{-146}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\
\end{array}
\end{array}
if B < -6.8000000000000001e-146Initial program 51.7%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified71.5%
Taylor expanded in B around -inf
Simplified50.3%
if -6.8000000000000001e-146 < B Initial program 55.6%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified73.0%
Taylor expanded in B around inf
Simplified59.0%
Final simplification55.7%
(FPCore (A B C) :precision binary64 (if (<= B -5e-310) (* (/ 180.0 PI) (atan 1.0)) (* (/ 180.0 PI) (atan -1.0))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5e-310) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -5e-310) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5e-310: tmp = (180.0 / math.pi) * math.atan(1.0) else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -5e-310) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); else tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -5e-310) tmp = (180.0 / pi) * atan(1.0); else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5e-310], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -4.999999999999985e-310Initial program 54.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified70.4%
Taylor expanded in B around -inf
Simplified40.7%
if -4.999999999999985e-310 < B Initial program 54.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified74.6%
Taylor expanded in B around inf
Simplified45.9%
Final simplification43.3%
(FPCore (A B C) :precision binary64 (* (/ 180.0 PI) (atan -1.0)))
double code(double A, double B, double C) {
return (180.0 / ((double) M_PI)) * atan(-1.0);
}
public static double code(double A, double B, double C) {
return (180.0 / Math.PI) * Math.atan(-1.0);
}
def code(A, B, C): return (180.0 / math.pi) * math.atan(-1.0)
function code(A, B, C) return Float64(Float64(180.0 / pi) * atan(-1.0)) end
function tmp = code(A, B, C) tmp = (180.0 / pi) * atan(-1.0); end
code[A_, B_, C_] := N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{180}{\pi} \cdot \tan^{-1} -1
\end{array}
Initial program 54.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified72.5%
Taylor expanded in B around inf
Simplified23.5%
Final simplification23.5%
herbie shell --seed 2024148
(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)))