
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
(FPCore (A B C)
:precision binary64
(let* ((t_0
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
(if (<= t_0 -0.5)
(/ (/ (atan (/ (- (- C A) (hypot (- C A) B)) B)) 0.005555555555555556) PI)
(if (<= t_0 0.0)
(/ (atan (/ (* B -0.5) (- 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 t_0 = (1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
double tmp;
if (t_0 <= -0.5) {
tmp = (atan((((C - A) - hypot((C - A), B)) / B)) / 0.005555555555555556) / ((double) M_PI);
} else if (t_0 <= 0.0) {
tmp = atan(((B * -0.5) / (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 t_0 = (1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))));
double tmp;
if (t_0 <= -0.5) {
tmp = (Math.atan((((C - A) - Math.hypot((C - A), B)) / B)) / 0.005555555555555556) / Math.PI;
} else if (t_0 <= 0.0) {
tmp = Math.atan(((B * -0.5) / (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): t_0 = (1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))) tmp = 0 if t_0 <= -0.5: tmp = (math.atan((((C - A) - math.hypot((C - A), B)) / B)) / 0.005555555555555556) / math.pi elif t_0 <= 0.0: tmp = math.atan(((B * -0.5) / (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) t_0 = Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))) tmp = 0.0 if (t_0 <= -0.5) tmp = Float64(Float64(atan(Float64(Float64(Float64(C - A) - hypot(Float64(C - A), B)) / B)) / 0.005555555555555556) / pi); elseif (t_0 <= 0.0) tmp = Float64(atan(Float64(Float64(B * -0.5) / 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) t_0 = (1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))); tmp = 0.0; if (t_0 <= -0.5) tmp = (atan((((C - A) - hypot((C - A), B)) / B)) / 0.005555555555555556) / pi; elseif (t_0 <= 0.0) tmp = atan(((B * -0.5) / (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_] := Block[{t$95$0 = N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -0.5], N[(N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(C - A), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / 0.005555555555555556), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $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}
t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
\mathbf{if}\;t\_0 \leq -0.5:\\
\;\;\;\;\frac{\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(C - A, B\right)}{B}\right)}{0.005555555555555556}}{\pi}\\
\mathbf{elif}\;t\_0 \leq 0:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B \cdot -0.5}{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 (*.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.5Initial program 51.1%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified79.2%
*-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f64N/A
/-lowering-/.f64N/A
Applied egg-rr84.9%
*-commutativeN/A
un-div-invN/A
/-lowering-/.f64N/A
Applied egg-rr84.9%
if -0.5 < (*.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 22.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified15.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
accelerator-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6422.2%
Applied egg-rr22.2%
Taylor expanded in B around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
--lowering--.f6499.2%
Simplified99.2%
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 60.6%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified83.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
accelerator-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6489.3%
Applied egg-rr89.3%
(FPCore (A B C)
:precision binary64
(if (<= C -2.1e-14)
(* (atan (/ (- C (+ A (hypot B (- C A)))) B)) (/ 180.0 PI))
(if (<= C 5e+30)
(/ (atan (/ (+ A (hypot A B)) (- 0.0 B))) (/ PI 180.0))
(/ (atan (/ (* B -0.5) (- C A))) (/ PI 180.0)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -2.1e-14) {
tmp = atan(((C - (A + hypot(B, (C - A)))) / B)) * (180.0 / ((double) M_PI));
} else if (C <= 5e+30) {
tmp = atan(((A + hypot(A, B)) / (0.0 - B))) / (((double) M_PI) / 180.0);
} else {
tmp = atan(((B * -0.5) / (C - A))) / (((double) M_PI) / 180.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -2.1e-14) {
tmp = Math.atan(((C - (A + Math.hypot(B, (C - A)))) / B)) * (180.0 / Math.PI);
} else if (C <= 5e+30) {
tmp = Math.atan(((A + Math.hypot(A, B)) / (0.0 - B))) / (Math.PI / 180.0);
} else {
tmp = Math.atan(((B * -0.5) / (C - A))) / (Math.PI / 180.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -2.1e-14: tmp = math.atan(((C - (A + math.hypot(B, (C - A)))) / B)) * (180.0 / math.pi) elif C <= 5e+30: tmp = math.atan(((A + math.hypot(A, B)) / (0.0 - B))) / (math.pi / 180.0) else: tmp = math.atan(((B * -0.5) / (C - A))) / (math.pi / 180.0) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -2.1e-14) tmp = Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(C - A)))) / B)) * Float64(180.0 / pi)); elseif (C <= 5e+30) tmp = Float64(atan(Float64(Float64(A + hypot(A, B)) / Float64(0.0 - B))) / Float64(pi / 180.0)); else tmp = Float64(atan(Float64(Float64(B * -0.5) / Float64(C - A))) / Float64(pi / 180.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -2.1e-14) tmp = atan(((C - (A + hypot(B, (C - A)))) / B)) * (180.0 / pi); elseif (C <= 5e+30) tmp = atan(((A + hypot(A, B)) / (0.0 - B))) / (pi / 180.0); else tmp = atan(((B * -0.5) / (C - A))) / (pi / 180.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -2.1e-14], 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], If[LessEqual[C, 5e+30], N[(N[ArcTan[N[(N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / N[(0.0 - B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -2.1 \cdot 10^{-14}:\\
\;\;\;\;\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, C - A\right)\right)}{B}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;C \leq 5 \cdot 10^{+30}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{0 - B}\right)}{\frac{\pi}{180}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)}{\frac{\pi}{180}}\\
\end{array}
\end{array}
if C < -2.0999999999999999e-14Initial program 83.6%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified94.7%
if -2.0999999999999999e-14 < C < 4.9999999999999998e30Initial program 50.3%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified71.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
accelerator-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6482.4%
Applied egg-rr82.4%
Taylor expanded in C around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f6482.4%
Simplified82.4%
if 4.9999999999999998e30 < C Initial program 18.7%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified50.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
accelerator-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6453.5%
Applied egg-rr53.5%
Taylor expanded in B around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
--lowering--.f6478.6%
Simplified78.6%
Final simplification84.9%
(FPCore (A B C)
:precision binary64
(if (<= C -250000.0)
(* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B)))
(if (<= C 2.6e+30)
(/ (atan (/ (+ A (hypot A B)) (- 0.0 B))) (/ PI 180.0))
(/ (atan (/ (* B -0.5) (- C A))) (/ PI 180.0)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -250000.0) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / B));
} else if (C <= 2.6e+30) {
tmp = atan(((A + hypot(A, B)) / (0.0 - B))) / (((double) M_PI) / 180.0);
} else {
tmp = atan(((B * -0.5) / (C - A))) / (((double) M_PI) / 180.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -250000.0) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / B));
} else if (C <= 2.6e+30) {
tmp = Math.atan(((A + Math.hypot(A, B)) / (0.0 - B))) / (Math.PI / 180.0);
} else {
tmp = Math.atan(((B * -0.5) / (C - A))) / (Math.PI / 180.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -250000.0: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / B)) elif C <= 2.6e+30: tmp = math.atan(((A + math.hypot(A, B)) / (0.0 - B))) / (math.pi / 180.0) else: tmp = math.atan(((B * -0.5) / (C - A))) / (math.pi / 180.0) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -250000.0) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / B))); elseif (C <= 2.6e+30) tmp = Float64(atan(Float64(Float64(A + hypot(A, B)) / Float64(0.0 - B))) / Float64(pi / 180.0)); else tmp = Float64(atan(Float64(Float64(B * -0.5) / Float64(C - A))) / Float64(pi / 180.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -250000.0) tmp = (180.0 / pi) * atan(((C - hypot(B, C)) / B)); elseif (C <= 2.6e+30) tmp = atan(((A + hypot(A, B)) / (0.0 - B))) / (pi / 180.0); else tmp = atan(((B * -0.5) / (C - A))) / (pi / 180.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -250000.0], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.6e+30], N[(N[ArcTan[N[(N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / N[(0.0 - B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -250000:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
\mathbf{elif}\;C \leq 2.6 \cdot 10^{+30}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{0 - B}\right)}{\frac{\pi}{180}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)}{\frac{\pi}{180}}\\
\end{array}
\end{array}
if C < -2.5e5Initial program 84.5%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified95.9%
Taylor expanded in A around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f6494.8%
Simplified94.8%
if -2.5e5 < C < 2.59999999999999988e30Initial program 50.4%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified71.6%
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
accelerator-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6481.9%
Applied egg-rr81.9%
Taylor expanded in C around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f6481.9%
Simplified81.9%
if 2.59999999999999988e30 < C Initial program 18.7%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified50.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
accelerator-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6453.5%
Applied egg-rr53.5%
Taylor expanded in B around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
--lowering--.f6478.6%
Simplified78.6%
Final simplification84.6%
(FPCore (A B C)
:precision binary64
(if (<= A -1e+73)
(/ (atan (/ (* B -0.5) (- C A))) (/ PI 180.0))
(if (<= A 1.46e+40)
(* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B)))
(* (/ 180.0 PI) (atan (+ 1.0 (/ (- C A) B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1e+73) {
tmp = atan(((B * -0.5) / (C - A))) / (((double) M_PI) / 180.0);
} else if (A <= 1.46e+40) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 + ((C - A) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1e+73) {
tmp = Math.atan(((B * -0.5) / (C - A))) / (Math.PI / 180.0);
} else if (A <= 1.46e+40) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan((1.0 + ((C - A) / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1e+73: tmp = math.atan(((B * -0.5) / (C - A))) / (math.pi / 180.0) elif A <= 1.46e+40: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / B)) else: tmp = (180.0 / math.pi) * math.atan((1.0 + ((C - A) / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1e+73) tmp = Float64(atan(Float64(Float64(B * -0.5) / Float64(C - A))) / Float64(pi / 180.0)); elseif (A <= 1.46e+40) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / B))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 + Float64(Float64(C - A) / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1e+73) tmp = atan(((B * -0.5) / (C - A))) / (pi / 180.0); elseif (A <= 1.46e+40) tmp = (180.0 / pi) * atan(((C - hypot(B, C)) / B)); else tmp = (180.0 / pi) * atan((1.0 + ((C - A) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1e+73], N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.46e+40], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1 \cdot 10^{+73}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)}{\frac{\pi}{180}}\\
\mathbf{elif}\;A \leq 1.46 \cdot 10^{+40}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C - A}{B}\right)\\
\end{array}
\end{array}
if A < -9.99999999999999983e72Initial program 22.0%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified30.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
accelerator-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
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
--lowering--.f6476.4%
Simplified76.4%
if -9.99999999999999983e72 < A < 1.46e40Initial program 52.1%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified80.8%
Taylor expanded in A around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f6478.0%
Simplified78.0%
if 1.46e40 < A Initial program 81.6%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified94.4%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6484.7%
Simplified84.7%
Final simplification79.0%
(FPCore (A B C) :precision binary64 (if (<= C 1.75e+28) (/ (atan (/ (- (- C A) (hypot B (- C A))) B)) (/ PI 180.0)) (/ (atan (/ (* B -0.5) (- C A))) (/ PI 180.0))))
double code(double A, double B, double C) {
double tmp;
if (C <= 1.75e+28) {
tmp = atan((((C - A) - hypot(B, (C - A))) / B)) / (((double) M_PI) / 180.0);
} else {
tmp = atan(((B * -0.5) / (C - A))) / (((double) M_PI) / 180.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 1.75e+28) {
tmp = Math.atan((((C - A) - Math.hypot(B, (C - A))) / B)) / (Math.PI / 180.0);
} else {
tmp = Math.atan(((B * -0.5) / (C - A))) / (Math.PI / 180.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 1.75e+28: tmp = math.atan((((C - A) - math.hypot(B, (C - A))) / B)) / (math.pi / 180.0) else: tmp = math.atan(((B * -0.5) / (C - A))) / (math.pi / 180.0) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 1.75e+28) tmp = Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(C - A))) / B)) / Float64(pi / 180.0)); else tmp = Float64(atan(Float64(Float64(B * -0.5) / Float64(C - A))) / Float64(pi / 180.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 1.75e+28) tmp = atan((((C - A) - hypot(B, (C - A))) / B)) / (pi / 180.0); else tmp = atan(((B * -0.5) / (C - A))) / (pi / 180.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 1.75e+28], 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], N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 1.75 \cdot 10^{+28}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right)}{\frac{\pi}{180}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)}{\frac{\pi}{180}}\\
\end{array}
\end{array}
if C < 1.75e28Initial program 63.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified80.7%
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
accelerator-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6487.7%
Applied egg-rr87.7%
if 1.75e28 < C Initial program 18.7%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified50.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
accelerator-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6453.5%
Applied egg-rr53.5%
Taylor expanded in B around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
--lowering--.f6478.6%
Simplified78.6%
(FPCore (A B C) :precision binary64 (if (<= C 2.4e+26) (* (/ 180.0 PI) (atan (/ (- C (+ A (hypot B A))) B))) (/ (atan (/ (* B -0.5) (- C A))) (/ PI 180.0))))
double code(double A, double B, double C) {
double tmp;
if (C <= 2.4e+26) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (A + hypot(B, A))) / B));
} else {
tmp = atan(((B * -0.5) / (C - A))) / (((double) M_PI) / 180.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 2.4e+26) {
tmp = (180.0 / Math.PI) * Math.atan(((C - (A + Math.hypot(B, A))) / B));
} else {
tmp = Math.atan(((B * -0.5) / (C - A))) / (Math.PI / 180.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 2.4e+26: tmp = (180.0 / math.pi) * math.atan(((C - (A + math.hypot(B, A))) / B)) else: tmp = math.atan(((B * -0.5) / (C - A))) / (math.pi / 180.0) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 2.4e+26) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A + hypot(B, A))) / B))); else tmp = Float64(atan(Float64(Float64(B * -0.5) / Float64(C - A))) / Float64(pi / 180.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 2.4e+26) tmp = (180.0 / pi) * atan(((C - (A + hypot(B, A))) / B)); else tmp = atan(((B * -0.5) / (C - A))) / (pi / 180.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 2.4e+26], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 2.4 \cdot 10^{+26}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A\right)\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)}{\frac{\pi}{180}}\\
\end{array}
\end{array}
if C < 2.40000000000000005e26Initial program 63.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified80.7%
Taylor expanded in C around 0
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f6480.1%
Simplified80.1%
if 2.40000000000000005e26 < C Initial program 18.7%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified50.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
accelerator-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6453.5%
Applied egg-rr53.5%
Taylor expanded in B around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
--lowering--.f6478.6%
Simplified78.6%
Final simplification79.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ (* A -2.0) B)))))
(if (<= B -9e-139)
(/ (atan (+ 1.0 (/ C B))) (/ PI 180.0))
(if (<= B -6.5e-204)
t_0
(if (<= B 3.9e-203)
(/ (/ (atan 0.0) PI) 0.005555555555555556)
(if (<= B 4.8e-134) t_0 (* (/ 180.0 PI) (atan (/ (- C B) B)))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(((A * -2.0) / B));
double tmp;
if (B <= -9e-139) {
tmp = atan((1.0 + (C / B))) / (((double) M_PI) / 180.0);
} else if (B <= -6.5e-204) {
tmp = t_0;
} else if (B <= 3.9e-203) {
tmp = (atan(0.0) / ((double) M_PI)) / 0.005555555555555556;
} else if (B <= 4.8e-134) {
tmp = t_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 t_0 = (180.0 / Math.PI) * Math.atan(((A * -2.0) / B));
double tmp;
if (B <= -9e-139) {
tmp = Math.atan((1.0 + (C / B))) / (Math.PI / 180.0);
} else if (B <= -6.5e-204) {
tmp = t_0;
} else if (B <= 3.9e-203) {
tmp = (Math.atan(0.0) / Math.PI) / 0.005555555555555556;
} else if (B <= 4.8e-134) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - B) / B));
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan(((A * -2.0) / B)) tmp = 0 if B <= -9e-139: tmp = math.atan((1.0 + (C / B))) / (math.pi / 180.0) elif B <= -6.5e-204: tmp = t_0 elif B <= 3.9e-203: tmp = (math.atan(0.0) / math.pi) / 0.005555555555555556 elif B <= 4.8e-134: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan(((C - B) / B)) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(A * -2.0) / B))) tmp = 0.0 if (B <= -9e-139) tmp = Float64(atan(Float64(1.0 + Float64(C / B))) / Float64(pi / 180.0)); elseif (B <= -6.5e-204) tmp = t_0; elseif (B <= 3.9e-203) tmp = Float64(Float64(atan(0.0) / pi) / 0.005555555555555556); elseif (B <= 4.8e-134) tmp = t_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) t_0 = (180.0 / pi) * atan(((A * -2.0) / B)); tmp = 0.0; if (B <= -9e-139) tmp = atan((1.0 + (C / B))) / (pi / 180.0); elseif (B <= -6.5e-204) tmp = t_0; elseif (B <= 3.9e-203) tmp = (atan(0.0) / pi) / 0.005555555555555556; elseif (B <= 4.8e-134) tmp = t_0; else tmp = (180.0 / pi) * atan(((C - B) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -9e-139], N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -6.5e-204], t$95$0, If[LessEqual[B, 3.9e-203], N[(N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision] / 0.005555555555555556), $MachinePrecision], If[LessEqual[B, 4.8e-134], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A \cdot -2}{B}\right)\\
\mathbf{if}\;B \leq -9 \cdot 10^{-139}:\\
\;\;\;\;\frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\frac{\pi}{180}}\\
\mathbf{elif}\;B \leq -6.5 \cdot 10^{-204}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 3.9 \cdot 10^{-203}:\\
\;\;\;\;\frac{\frac{\tan^{-1} 0}{\pi}}{0.005555555555555556}\\
\mathbf{elif}\;B \leq 4.8 \cdot 10^{-134}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\
\end{array}
\end{array}
if B < -9.00000000000000046e-139Initial program 57.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified80.2%
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
accelerator-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6481.4%
Applied egg-rr81.4%
Taylor expanded in A around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f6472.8%
Simplified72.8%
Taylor expanded in B around -inf
+-lowering-+.f64N/A
/-lowering-/.f6470.7%
Simplified70.7%
if -9.00000000000000046e-139 < B < -6.49999999999999939e-204 or 3.8999999999999999e-203 < B < 4.80000000000000019e-134Initial program 68.9%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified72.1%
Taylor expanded in A around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6465.4%
Simplified65.4%
if -6.49999999999999939e-204 < B < 3.8999999999999999e-203Initial program 45.3%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified60.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
accelerator-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6479.6%
Applied egg-rr79.6%
Taylor expanded in C around inf
associate-*r/N/A
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
metadata-evalN/A
/-lowering-/.f6447.3%
Simplified47.3%
div-invN/A
metadata-evalN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
div0N/A
atan-lowering-atan.f64N/A
PI-lowering-PI.f6447.3%
Applied egg-rr47.3%
if 4.80000000000000019e-134 < B Initial program 42.7%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified72.7%
Taylor expanded in B around inf
Simplified65.5%
Final simplification63.6%
(FPCore (A B C)
:precision binary64
(if (<= B -3.6e-99)
(/ (atan (+ 1.0 (/ C B))) (/ PI 180.0))
(if (<= B 2.8e-203)
(* (/ 180.0 PI) (atan (* B (/ 0.5 (- A C)))))
(if (<= B 1.55e-133)
(* (/ 180.0 PI) (atan (/ (* A -2.0) B)))
(* (/ 180.0 PI) (atan (/ (- C B) B)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3.6e-99) {
tmp = atan((1.0 + (C / B))) / (((double) M_PI) / 180.0);
} else if (B <= 2.8e-203) {
tmp = (180.0 / ((double) M_PI)) * atan((B * (0.5 / (A - C))));
} else if (B <= 1.55e-133) {
tmp = (180.0 / ((double) M_PI)) * atan(((A * -2.0) / B));
} 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 <= -3.6e-99) {
tmp = Math.atan((1.0 + (C / B))) / (Math.PI / 180.0);
} else if (B <= 2.8e-203) {
tmp = (180.0 / Math.PI) * Math.atan((B * (0.5 / (A - C))));
} else if (B <= 1.55e-133) {
tmp = (180.0 / Math.PI) * Math.atan(((A * -2.0) / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - B) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -3.6e-99: tmp = math.atan((1.0 + (C / B))) / (math.pi / 180.0) elif B <= 2.8e-203: tmp = (180.0 / math.pi) * math.atan((B * (0.5 / (A - C)))) elif B <= 1.55e-133: tmp = (180.0 / math.pi) * math.atan(((A * -2.0) / B)) else: tmp = (180.0 / math.pi) * math.atan(((C - B) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -3.6e-99) tmp = Float64(atan(Float64(1.0 + Float64(C / B))) / Float64(pi / 180.0)); elseif (B <= 2.8e-203) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(0.5 / Float64(A - C))))); elseif (B <= 1.55e-133) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(A * -2.0) / B))); 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 <= -3.6e-99) tmp = atan((1.0 + (C / B))) / (pi / 180.0); elseif (B <= 2.8e-203) tmp = (180.0 / pi) * atan((B * (0.5 / (A - C)))); elseif (B <= 1.55e-133) tmp = (180.0 / pi) * atan(((A * -2.0) / B)); else tmp = (180.0 / pi) * atan(((C - B) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3.6e-99], N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.8e-203], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.55e-133], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -3.6 \cdot 10^{-99}:\\
\;\;\;\;\frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\frac{\pi}{180}}\\
\mathbf{elif}\;B \leq 2.8 \cdot 10^{-203}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right)\\
\mathbf{elif}\;B \leq 1.55 \cdot 10^{-133}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A \cdot -2}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\
\end{array}
\end{array}
if B < -3.6000000000000001e-99Initial program 58.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified82.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
accelerator-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6482.5%
Applied egg-rr82.5%
Taylor expanded in A around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f6475.6%
Simplified75.6%
Taylor expanded in B around -inf
+-lowering-+.f64N/A
/-lowering-/.f6473.4%
Simplified73.4%
if -3.6000000000000001e-99 < B < 2.80000000000000022e-203Initial program 49.3%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified60.9%
Taylor expanded in B around 0
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
associate-*r/N/A
*-lowering-*.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-frac2N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
mul-1-negN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
sub-negN/A
/-lowering-/.f64N/A
--lowering--.f6461.5%
Simplified61.5%
if 2.80000000000000022e-203 < B < 1.55000000000000008e-133Initial program 77.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified77.8%
Taylor expanded in A around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6475.9%
Simplified75.9%
if 1.55000000000000008e-133 < B Initial program 42.7%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified72.7%
Taylor expanded in B around inf
Simplified65.5%
Final simplification67.4%
(FPCore (A B C)
:precision binary64
(if (<= A -1.08e+135)
(* (/ 180.0 PI) (atan (/ (* B 0.5) A)))
(if (<= A 1.35e-52)
(* (/ 180.0 PI) (atan (/ (- C B) B)))
(if (<= A 4.5e+39)
(* (/ 180.0 PI) (atan (/ (* B -0.5) C)))
(* (/ 180.0 PI) (atan (/ (* A -2.0) B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.08e+135) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * 0.5) / A));
} else if (A <= 1.35e-52) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - B) / B));
} else if (A <= 4.5e+39) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / C));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((A * -2.0) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.08e+135) {
tmp = (180.0 / Math.PI) * Math.atan(((B * 0.5) / A));
} else if (A <= 1.35e-52) {
tmp = (180.0 / Math.PI) * Math.atan(((C - B) / B));
} else if (A <= 4.5e+39) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / C));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((A * -2.0) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.08e+135: tmp = (180.0 / math.pi) * math.atan(((B * 0.5) / A)) elif A <= 1.35e-52: tmp = (180.0 / math.pi) * math.atan(((C - B) / B)) elif A <= 4.5e+39: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / C)) else: tmp = (180.0 / math.pi) * math.atan(((A * -2.0) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.08e+135) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * 0.5) / A))); elseif (A <= 1.35e-52) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - B) / B))); elseif (A <= 4.5e+39) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / C))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(A * -2.0) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.08e+135) tmp = (180.0 / pi) * atan(((B * 0.5) / A)); elseif (A <= 1.35e-52) tmp = (180.0 / pi) * atan(((C - B) / B)); elseif (A <= 4.5e+39) tmp = (180.0 / pi) * atan(((B * -0.5) / C)); else tmp = (180.0 / pi) * atan(((A * -2.0) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.08e+135], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.35e-52], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.5e+39], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.08 \cdot 10^{+135}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
\mathbf{elif}\;A \leq 1.35 \cdot 10^{-52}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\
\mathbf{elif}\;A \leq 4.5 \cdot 10^{+39}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A \cdot -2}{B}\right)\\
\end{array}
\end{array}
if A < -1.08e135Initial program 18.5%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified25.7%
Taylor expanded in A around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6476.2%
Simplified76.2%
if -1.08e135 < A < 1.35000000000000005e-52Initial program 50.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified80.0%
Taylor expanded in B around inf
Simplified49.8%
if 1.35000000000000005e-52 < A < 4.49999999999999996e39Initial program 58.6%
Taylor expanded in C around inf
+-lowering-+.f64N/A
associate-*r/N/A
mul-1-negN/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-*.f6462.3%
Simplified62.3%
*-commutativeN/A
div-invN/A
associate-*l*N/A
associate-/r/N/A
clear-numN/A
*-lowering-*.f64N/A
div0N/A
+-lft-identityN/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6462.5%
Applied egg-rr62.5%
if 4.49999999999999996e39 < A Initial program 81.6%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified94.4%
Taylor expanded in A around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6474.7%
Simplified74.7%
Final simplification60.4%
(FPCore (A B C)
:precision binary64
(if (<= B -2.9e-105)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B 5e-119)
(/ (/ (atan 0.0) PI) 0.005555555555555556)
(if (<= B 2.7e+129)
(* 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.9e-105) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= 5e-119) {
tmp = (atan(0.0) / ((double) M_PI)) / 0.005555555555555556;
} else if (B <= 2.7e+129) {
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.9e-105) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= 5e-119) {
tmp = (Math.atan(0.0) / Math.PI) / 0.005555555555555556;
} else if (B <= 2.7e+129) {
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.9e-105: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= 5e-119: tmp = (math.atan(0.0) / math.pi) / 0.005555555555555556 elif B <= 2.7e+129: 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.9e-105) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= 5e-119) tmp = Float64(Float64(atan(0.0) / pi) / 0.005555555555555556); elseif (B <= 2.7e+129) 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.9e-105) tmp = (180.0 / pi) * atan(1.0); elseif (B <= 5e-119) tmp = (atan(0.0) / pi) / 0.005555555555555556; elseif (B <= 2.7e+129) 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.9e-105], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5e-119], N[(N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision] / 0.005555555555555556), $MachinePrecision], If[LessEqual[B, 2.7e+129], 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.9 \cdot 10^{-105}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq 5 \cdot 10^{-119}:\\
\;\;\;\;\frac{\frac{\tan^{-1} 0}{\pi}}{0.005555555555555556}\\
\mathbf{elif}\;B \leq 2.7 \cdot 10^{+129}:\\
\;\;\;\;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.90000000000000003e-105Initial program 58.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified82.5%
Taylor expanded in B around -inf
Simplified51.4%
if -2.90000000000000003e-105 < B < 4.99999999999999993e-119Initial program 55.1%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified64.6%
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
accelerator-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6481.4%
Applied egg-rr81.4%
Taylor expanded in C around inf
associate-*r/N/A
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
metadata-evalN/A
/-lowering-/.f6436.2%
Simplified36.2%
div-invN/A
metadata-evalN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
div0N/A
atan-lowering-atan.f64N/A
PI-lowering-PI.f6436.2%
Applied egg-rr36.2%
if 4.99999999999999993e-119 < B < 2.7000000000000001e129Initial program 56.2%
Taylor expanded in A around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6434.7%
Simplified34.7%
if 2.7000000000000001e129 < B Initial program 21.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified87.7%
Taylor expanded in B around inf
Simplified85.8%
Final simplification48.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -5.2e-199)
(/ (atan (+ 1.0 t_0)) (/ PI 180.0))
(if (<= B 3.8e-203)
(/ (atan (/ (* B -0.5) (- 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 <= -5.2e-199) {
tmp = atan((1.0 + t_0)) / (((double) M_PI) / 180.0);
} else if (B <= 3.8e-203) {
tmp = atan(((B * -0.5) / (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 <= -5.2e-199) {
tmp = Math.atan((1.0 + t_0)) / (Math.PI / 180.0);
} else if (B <= 3.8e-203) {
tmp = Math.atan(((B * -0.5) / (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 <= -5.2e-199: tmp = math.atan((1.0 + t_0)) / (math.pi / 180.0) elif B <= 3.8e-203: tmp = math.atan(((B * -0.5) / (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 <= -5.2e-199) tmp = Float64(atan(Float64(1.0 + t_0)) / Float64(pi / 180.0)); elseif (B <= 3.8e-203) tmp = Float64(atan(Float64(Float64(B * -0.5) / 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 <= -5.2e-199) tmp = atan((1.0 + t_0)) / (pi / 180.0); elseif (B <= 3.8e-203) tmp = atan(((B * -0.5) / (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, -5.2e-199], N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.8e-203], N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $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 -5.2 \cdot 10^{-199}:\\
\;\;\;\;\frac{\tan^{-1} \left(1 + t\_0\right)}{\frac{\pi}{180}}\\
\mathbf{elif}\;B \leq 3.8 \cdot 10^{-203}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B \cdot -0.5}{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 < -5.2000000000000001e-199Initial program 59.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified78.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
accelerator-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6482.0%
Applied egg-rr82.0%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6473.8%
Simplified73.8%
if -5.2000000000000001e-199 < B < 3.80000000000000025e-203Initial program 44.5%
*-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
accelerator-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6478.1%
Applied egg-rr78.1%
Taylor expanded in B around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
--lowering--.f6467.9%
Simplified67.9%
if 3.80000000000000025e-203 < B Initial program 47.3%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified73.4%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6470.9%
Simplified70.9%
Final simplification71.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -1.3e-197)
(/ (atan (+ 1.0 t_0)) (/ PI 180.0))
(if (<= B 1.25e-202)
(* (/ 180.0 PI) (atan (* B (/ 0.5 (- A C)))))
(* (/ 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.3e-197) {
tmp = atan((1.0 + t_0)) / (((double) M_PI) / 180.0);
} else if (B <= 1.25e-202) {
tmp = (180.0 / ((double) M_PI)) * atan((B * (0.5 / (A - C))));
} 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.3e-197) {
tmp = Math.atan((1.0 + t_0)) / (Math.PI / 180.0);
} else if (B <= 1.25e-202) {
tmp = (180.0 / Math.PI) * Math.atan((B * (0.5 / (A - C))));
} 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.3e-197: tmp = math.atan((1.0 + t_0)) / (math.pi / 180.0) elif B <= 1.25e-202: tmp = (180.0 / math.pi) * math.atan((B * (0.5 / (A - C)))) 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.3e-197) tmp = Float64(atan(Float64(1.0 + t_0)) / Float64(pi / 180.0)); elseif (B <= 1.25e-202) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(0.5 / Float64(A - C))))); 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.3e-197) tmp = atan((1.0 + t_0)) / (pi / 180.0); elseif (B <= 1.25e-202) tmp = (180.0 / pi) * atan((B * (0.5 / (A - C)))); 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.3e-197], N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.25e-202], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $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 -1.3 \cdot 10^{-197}:\\
\;\;\;\;\frac{\tan^{-1} \left(1 + t\_0\right)}{\frac{\pi}{180}}\\
\mathbf{elif}\;B \leq 1.25 \cdot 10^{-202}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(t\_0 + -1\right)\\
\end{array}
\end{array}
if B < -1.3000000000000001e-197Initial program 59.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified78.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
accelerator-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6482.0%
Applied egg-rr82.0%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6473.8%
Simplified73.8%
if -1.3000000000000001e-197 < B < 1.24999999999999993e-202Initial program 44.5%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified59.0%
Taylor expanded in B around 0
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
associate-*r/N/A
*-lowering-*.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-frac2N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
mul-1-negN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
sub-negN/A
/-lowering-/.f64N/A
--lowering--.f6467.9%
Simplified67.9%
if 1.24999999999999993e-202 < B Initial program 47.3%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified73.4%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6470.9%
Simplified70.9%
Final simplification71.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -1.14e-201)
(* (/ 180.0 PI) (atan (+ 1.0 t_0)))
(if (<= B 1.65e-203)
(* (/ 180.0 PI) (atan (* B (/ 0.5 (- A C)))))
(* (/ 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.14e-201) {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 + t_0));
} else if (B <= 1.65e-203) {
tmp = (180.0 / ((double) M_PI)) * atan((B * (0.5 / (A - C))));
} 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.14e-201) {
tmp = (180.0 / Math.PI) * Math.atan((1.0 + t_0));
} else if (B <= 1.65e-203) {
tmp = (180.0 / Math.PI) * Math.atan((B * (0.5 / (A - C))));
} 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.14e-201: tmp = (180.0 / math.pi) * math.atan((1.0 + t_0)) elif B <= 1.65e-203: tmp = (180.0 / math.pi) * math.atan((B * (0.5 / (A - C)))) 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.14e-201) tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 + t_0))); elseif (B <= 1.65e-203) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(0.5 / Float64(A - C))))); 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.14e-201) tmp = (180.0 / pi) * atan((1.0 + t_0)); elseif (B <= 1.65e-203) tmp = (180.0 / pi) * atan((B * (0.5 / (A - C)))); 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.14e-201], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.65e-203], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $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 -1.14 \cdot 10^{-201}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + t\_0\right)\\
\mathbf{elif}\;B \leq 1.65 \cdot 10^{-203}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(t\_0 + -1\right)\\
\end{array}
\end{array}
if B < -1.1400000000000001e-201Initial program 59.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified78.8%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6473.8%
Simplified73.8%
if -1.1400000000000001e-201 < B < 1.65000000000000012e-203Initial program 44.5%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified59.0%
Taylor expanded in B around 0
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
associate-*r/N/A
*-lowering-*.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-frac2N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
mul-1-negN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
sub-negN/A
/-lowering-/.f64N/A
--lowering--.f6467.9%
Simplified67.9%
if 1.65000000000000012e-203 < B Initial program 47.3%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified73.4%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6470.9%
Simplified70.9%
Final simplification71.5%
(FPCore (A B C)
:precision binary64
(if (<= A -8.2e-228)
(* (/ 180.0 PI) (atan (/ (* B 0.5) A)))
(if (<= A 9.4e+39)
(* (/ 180.0 PI) (atan (/ (* B -0.5) C)))
(* (/ 180.0 PI) (atan (/ (* A -2.0) B))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -8.2e-228) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * 0.5) / A));
} else if (A <= 9.4e+39) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / C));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((A * -2.0) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -8.2e-228) {
tmp = (180.0 / Math.PI) * Math.atan(((B * 0.5) / A));
} else if (A <= 9.4e+39) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / C));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((A * -2.0) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -8.2e-228: tmp = (180.0 / math.pi) * math.atan(((B * 0.5) / A)) elif A <= 9.4e+39: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / C)) else: tmp = (180.0 / math.pi) * math.atan(((A * -2.0) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -8.2e-228) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * 0.5) / A))); elseif (A <= 9.4e+39) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / C))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(A * -2.0) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -8.2e-228) tmp = (180.0 / pi) * atan(((B * 0.5) / A)); elseif (A <= 9.4e+39) tmp = (180.0 / pi) * atan(((B * -0.5) / C)); else tmp = (180.0 / pi) * atan(((A * -2.0) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -8.2e-228], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 9.4e+39], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -8.2 \cdot 10^{-228}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
\mathbf{elif}\;A \leq 9.4 \cdot 10^{+39}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A \cdot -2}{B}\right)\\
\end{array}
\end{array}
if A < -8.19999999999999995e-228Initial program 34.4%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified55.6%
Taylor expanded in A around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6451.9%
Simplified51.9%
if -8.19999999999999995e-228 < A < 9.3999999999999998e39Initial program 55.7%
Taylor expanded in C around inf
+-lowering-+.f64N/A
associate-*r/N/A
mul-1-negN/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-*.f6437.5%
Simplified37.5%
*-commutativeN/A
div-invN/A
associate-*l*N/A
associate-/r/N/A
clear-numN/A
*-lowering-*.f64N/A
div0N/A
+-lft-identityN/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6437.7%
Applied egg-rr37.7%
if 9.3999999999999998e39 < A Initial program 81.6%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified94.4%
Taylor expanded in A around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6474.7%
Simplified74.7%
Final simplification51.3%
(FPCore (A B C)
:precision binary64
(if (<= A -4.2e-94)
(* (/ 180.0 PI) (atan (/ (* B 0.5) A)))
(if (<= A 2e-127)
(* (/ 180.0 PI) (atan -1.0))
(* (/ 180.0 PI) (atan (/ (* A -2.0) B))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4.2e-94) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * 0.5) / A));
} else if (A <= 2e-127) {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((A * -2.0) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4.2e-94) {
tmp = (180.0 / Math.PI) * Math.atan(((B * 0.5) / A));
} else if (A <= 2e-127) {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
} else {
tmp = (180.0 / Math.PI) * Math.atan(((A * -2.0) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4.2e-94: tmp = (180.0 / math.pi) * math.atan(((B * 0.5) / A)) elif A <= 2e-127: tmp = (180.0 / math.pi) * math.atan(-1.0) else: tmp = (180.0 / math.pi) * math.atan(((A * -2.0) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4.2e-94) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * 0.5) / A))); elseif (A <= 2e-127) tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(A * -2.0) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4.2e-94) tmp = (180.0 / pi) * atan(((B * 0.5) / A)); elseif (A <= 2e-127) tmp = (180.0 / pi) * atan(-1.0); else tmp = (180.0 / pi) * atan(((A * -2.0) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4.2e-94], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2e-127], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4.2 \cdot 10^{-94}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
\mathbf{elif}\;A \leq 2 \cdot 10^{-127}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A \cdot -2}{B}\right)\\
\end{array}
\end{array}
if A < -4.2000000000000002e-94Initial program 28.3%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified45.6%
Taylor expanded in A around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6458.0%
Simplified58.0%
if -4.2000000000000002e-94 < A < 2.0000000000000001e-127Initial program 49.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified82.8%
Taylor expanded in B around inf
Simplified31.0%
if 2.0000000000000001e-127 < A Initial program 76.1%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified90.4%
Taylor expanded in A around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6457.7%
Simplified57.7%
Final simplification49.5%
(FPCore (A B C)
:precision binary64
(if (<= A -1.25e-92)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 4.1e-132)
(* (/ 180.0 PI) (atan -1.0))
(* (/ 180.0 PI) (atan (/ (* A -2.0) B))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.25e-92) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 4.1e-132) {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((A * -2.0) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.25e-92) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 4.1e-132) {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
} else {
tmp = (180.0 / Math.PI) * Math.atan(((A * -2.0) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.25e-92: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 4.1e-132: tmp = (180.0 / math.pi) * math.atan(-1.0) else: tmp = (180.0 / math.pi) * math.atan(((A * -2.0) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.25e-92) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 4.1e-132) tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(A * -2.0) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.25e-92) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 4.1e-132) tmp = (180.0 / pi) * atan(-1.0); else tmp = (180.0 / pi) * atan(((A * -2.0) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.25e-92], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.1e-132], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.25 \cdot 10^{-92}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 4.1 \cdot 10^{-132}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A \cdot -2}{B}\right)\\
\end{array}
\end{array}
if A < -1.25000000000000003e-92Initial program 28.3%
Taylor expanded in A around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6457.9%
Simplified57.9%
if -1.25000000000000003e-92 < A < 4.10000000000000007e-132Initial program 49.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified82.8%
Taylor expanded in B around inf
Simplified31.0%
if 4.10000000000000007e-132 < A Initial program 76.1%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified90.4%
Taylor expanded in A around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6457.7%
Simplified57.7%
Final simplification49.5%
(FPCore (A B C) :precision binary64 (if (<= C 2.5e+25) (* (/ 180.0 PI) (atan (+ 1.0 (/ (- C A) B)))) (* (/ 180.0 PI) (atan (* B (/ 0.5 (- A C)))))))
double code(double A, double B, double C) {
double tmp;
if (C <= 2.5e+25) {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 + ((C - A) / B)));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((B * (0.5 / (A - C))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 2.5e+25) {
tmp = (180.0 / Math.PI) * Math.atan((1.0 + ((C - A) / B)));
} else {
tmp = (180.0 / Math.PI) * Math.atan((B * (0.5 / (A - C))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 2.5e+25: tmp = (180.0 / math.pi) * math.atan((1.0 + ((C - A) / B))) else: tmp = (180.0 / math.pi) * math.atan((B * (0.5 / (A - C)))) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 2.5e+25) tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 + Float64(Float64(C - A) / B)))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(0.5 / Float64(A - C))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 2.5e+25) tmp = (180.0 / pi) * atan((1.0 + ((C - A) / B))); else tmp = (180.0 / pi) * atan((B * (0.5 / (A - C)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 2.5e+25], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 2.5 \cdot 10^{+25}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C - A}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right)\\
\end{array}
\end{array}
if C < 2.50000000000000012e25Initial program 63.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified80.7%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6463.1%
Simplified63.1%
if 2.50000000000000012e25 < C Initial program 18.7%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified50.0%
Taylor expanded in B around 0
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
associate-*r/N/A
*-lowering-*.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-frac2N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
mul-1-negN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
sub-negN/A
/-lowering-/.f64N/A
--lowering--.f6478.5%
Simplified78.5%
Final simplification67.1%
(FPCore (A B C)
:precision binary64
(if (<= B -1.35e-103)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B 7.8e-129)
(/ (/ (atan 0.0) PI) 0.005555555555555556)
(* (/ 180.0 PI) (atan -1.0)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.35e-103) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= 7.8e-129) {
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 <= -1.35e-103) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= 7.8e-129) {
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 <= -1.35e-103: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= 7.8e-129: 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 <= -1.35e-103) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= 7.8e-129) 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 <= -1.35e-103) tmp = (180.0 / pi) * atan(1.0); elseif (B <= 7.8e-129) 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, -1.35e-103], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7.8e-129], 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 -1.35 \cdot 10^{-103}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq 7.8 \cdot 10^{-129}:\\
\;\;\;\;\frac{\frac{\tan^{-1} 0}{\pi}}{0.005555555555555556}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -1.35000000000000005e-103Initial program 58.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified82.5%
Taylor expanded in B around -inf
Simplified51.4%
if -1.35000000000000005e-103 < B < 7.80000000000000019e-129Initial program 53.6%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified63.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
accelerator-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6480.8%
Applied egg-rr80.8%
Taylor expanded in C around inf
associate-*r/N/A
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
metadata-evalN/A
/-lowering-/.f6437.4%
Simplified37.4%
div-invN/A
metadata-evalN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
div0N/A
atan-lowering-atan.f64N/A
PI-lowering-PI.f6437.4%
Applied egg-rr37.4%
if 7.80000000000000019e-129 < B Initial program 42.7%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified72.7%
Taylor expanded in B around inf
Simplified51.2%
Final simplification46.6%
(FPCore (A B C) :precision binary64 (if (<= B -9.8e-269) (* (/ 180.0 PI) (atan 1.0)) (* (/ 180.0 PI) (atan -1.0))))
double code(double A, double B, double C) {
double tmp;
if (B <= -9.8e-269) {
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 <= -9.8e-269) {
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 <= -9.8e-269: 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 <= -9.8e-269) 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 <= -9.8e-269) 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, -9.8e-269], 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 -9.8 \cdot 10^{-269}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -9.79999999999999999e-269Initial program 57.5%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified74.4%
Taylor expanded in B around -inf
Simplified37.1%
if -9.79999999999999999e-269 < B Initial program 45.7%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified71.0%
Taylor expanded in B around inf
Simplified37.7%
Final simplification37.4%
(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 51.5%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified72.7%
Taylor expanded in B around inf
Simplified20.0%
Final simplification20.0%
herbie shell --seed 2024191
(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)))