
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
(FPCore (A B C) :precision binary64 (if (<= A -1.15e+103) (* (atan (* B (/ 0.5 (- A C)))) (/ 180.0 PI)) (* (/ 180.0 PI) (atan (/ (- C (+ A (hypot B (- C A)))) B)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.15e+103) {
tmp = atan((B * (0.5 / (A - C)))) * (180.0 / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (A + hypot(B, (C - A)))) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.15e+103) {
tmp = Math.atan((B * (0.5 / (A - C)))) * (180.0 / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - (A + Math.hypot(B, (C - A)))) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.15e+103: tmp = math.atan((B * (0.5 / (A - C)))) * (180.0 / math.pi) else: tmp = (180.0 / math.pi) * math.atan(((C - (A + math.hypot(B, (C - A)))) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.15e+103) tmp = Float64(atan(Float64(B * Float64(0.5 / Float64(A - C)))) * Float64(180.0 / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A + hypot(B, Float64(C - A)))) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.15e+103) tmp = atan((B * (0.5 / (A - C)))) * (180.0 / pi); else tmp = (180.0 / pi) * atan(((C - (A + hypot(B, (C - A)))) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.15e+103], N[(N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(C - A), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.15 \cdot 10^{+103}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, C - A\right)\right)}{B}\right)\\
\end{array}
\end{array}
if A < -1.15000000000000004e103Initial program 16.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified21.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--.f6484.1
Simplified84.1%
if -1.15000000000000004e103 < A Initial program 66.1%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified83.6%
Final simplification83.7%
(FPCore (A B C)
:precision binary64
(if (<= A -3.1e+93)
(* (atan (* B (/ 0.5 (- A C)))) (/ 180.0 PI))
(if (<= A 380000000.0)
(* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B)))
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.1e+93) {
tmp = atan((B * (0.5 / (A - C)))) * (180.0 / ((double) M_PI));
} else if (A <= 380000000.0) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / 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+93) {
tmp = Math.atan((B * (0.5 / (A - C)))) * (180.0 / Math.PI);
} else if (A <= 380000000.0) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / 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+93: tmp = math.atan((B * (0.5 / (A - C)))) * (180.0 / math.pi) elif A <= 380000000.0: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / 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+93) tmp = Float64(atan(Float64(B * Float64(0.5 / Float64(A - C)))) * Float64(180.0 / pi)); elseif (A <= 380000000.0) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / 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+93) tmp = atan((B * (0.5 / (A - C)))) * (180.0 / pi); elseif (A <= 380000000.0) tmp = (180.0 / pi) * atan(((C - hypot(B, C)) / 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+93], N[(N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 380000000.0], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 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^{+93}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;A \leq 380000000:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\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.10000000000000019e93Initial program 17.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified24.6%
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--.f6481.8
Simplified81.8%
if -3.10000000000000019e93 < A < 3.8e8Initial program 60.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified79.3%
Taylor expanded in A around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f6475.8
Simplified75.8%
if 3.8e8 < A Initial program 80.6%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6485.4
Simplified85.4%
Final simplification79.4%
(FPCore (A B C) :precision binary64 (if (<= A -1.5e+104) (* (atan (* B (/ 0.5 (- A C)))) (/ 180.0 PI)) (* (/ 180.0 PI) (atan (/ (- C (+ A (hypot B A))) B)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.5e+104) {
tmp = atan((B * (0.5 / (A - C)))) * (180.0 / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (A + hypot(B, A))) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.5e+104) {
tmp = Math.atan((B * (0.5 / (A - C)))) * (180.0 / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - (A + Math.hypot(B, A))) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.5e+104: tmp = math.atan((B * (0.5 / (A - C)))) * (180.0 / math.pi) else: tmp = (180.0 / math.pi) * math.atan(((C - (A + math.hypot(B, A))) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.5e+104) tmp = Float64(atan(Float64(B * Float64(0.5 / Float64(A - C)))) * Float64(180.0 / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A + hypot(B, A))) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.5e+104) tmp = atan((B * (0.5 / (A - C)))) * (180.0 / pi); else tmp = (180.0 / pi) * atan(((C - (A + hypot(B, A))) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.5e+104], N[(N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.5 \cdot 10^{+104}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A\right)\right)}{B}\right)\\
\end{array}
\end{array}
if A < -1.49999999999999984e104Initial program 16.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified21.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--.f6484.1
Simplified84.1%
if -1.49999999999999984e104 < A Initial program 66.1%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified83.6%
Taylor expanded in C around 0
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f6479.8
Simplified79.8%
Final simplification80.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- A C) B)))
(if (<= B 9.8e-224)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
(if (<= B 4.3e-175)
(* (atan (* B (/ 0.5 (- A C)))) (/ 180.0 PI))
(/
180.0
(/
PI
(atan (+ (* -0.5 (* t_0 t_0)) (+ (/ C B) (- -1.0 (/ A B)))))))))))
double code(double A, double B, double C) {
double t_0 = (A - C) / B;
double tmp;
if (B <= 9.8e-224) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else if (B <= 4.3e-175) {
tmp = atan((B * (0.5 / (A - C)))) * (180.0 / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / 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 = (A - C) / B;
double tmp;
if (B <= 9.8e-224) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else if (B <= 4.3e-175) {
tmp = Math.atan((B * (0.5 / (A - C)))) * (180.0 / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan(((-0.5 * (t_0 * t_0)) + ((C / B) + (-1.0 - (A / B))))));
}
return tmp;
}
def code(A, B, C): t_0 = (A - C) / B tmp = 0 if B <= 9.8e-224: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) elif B <= 4.3e-175: tmp = math.atan((B * (0.5 / (A - C)))) * (180.0 / math.pi) else: tmp = 180.0 / (math.pi / 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(A - C) / B) tmp = 0.0 if (B <= 9.8e-224) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); elseif (B <= 4.3e-175) tmp = Float64(atan(Float64(B * Float64(0.5 / Float64(A - C)))) * Float64(180.0 / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(-0.5 * Float64(t_0 * t_0)) + Float64(Float64(C / B) + Float64(-1.0 - Float64(A / B))))))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (A - C) / B; tmp = 0.0; if (B <= 9.8e-224) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); elseif (B <= 4.3e-175) tmp = atan((B * (0.5 / (A - C)))) * (180.0 / pi); else tmp = 180.0 / (pi / 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[(A - C), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, 9.8e-224], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.3e-175], N[(N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(-0.5 * N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(N[(C / B), $MachinePrecision] + N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{A - C}{B}\\
\mathbf{if}\;B \leq 9.8 \cdot 10^{-224}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4.3 \cdot 10^{-175}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(-0.5 \cdot \left(t\_0 \cdot t\_0\right) + \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)\right)}}\\
\end{array}
\end{array}
if B < 9.7999999999999992e-224Initial program 63.0%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6473.1
Simplified73.1%
if 9.7999999999999992e-224 < B < 4.29999999999999998e-175Initial program 31.3%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified31.2%
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.8
Simplified78.8%
if 4.29999999999999998e-175 < B Initial program 51.7%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f64N/A
atan-lowering-atan.f64N/A
*-commutativeN/A
un-div-invN/A
/-lowering-/.f64N/A
Applied egg-rr70.3%
Taylor expanded in B around inf
associate--l+N/A
+-lowering-+.f64N/A
Simplified67.8%
(FPCore (A B C)
:precision binary64
(if (<= B -1.65e+49)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B -6.5e-199)
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI))
(if (<= B 1.45e-307)
(/ (* 180.0 (atan 0.0)) PI)
(if (<= B 7e-51)
(* (/ 180.0 PI) (atan (/ C B)))
(* (/ 180.0 PI) (atan -1.0)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.65e+49) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= -6.5e-199) {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
} else if (B <= 1.45e-307) {
tmp = (180.0 * atan(0.0)) / ((double) M_PI);
} else if (B <= 7e-51) {
tmp = (180.0 / ((double) M_PI)) * atan((C / B));
} 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.65e+49) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= -6.5e-199) {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
} else if (B <= 1.45e-307) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else if (B <= 7e-51) {
tmp = (180.0 / Math.PI) * Math.atan((C / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.65e+49: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= -6.5e-199: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) elif B <= 1.45e-307: tmp = (180.0 * math.atan(0.0)) / math.pi elif B <= 7e-51: tmp = (180.0 / math.pi) * math.atan((C / B)) else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.65e+49) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= -6.5e-199) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); elseif (B <= 1.45e-307) tmp = Float64(Float64(180.0 * atan(0.0)) / pi); elseif (B <= 7e-51) tmp = Float64(Float64(180.0 / pi) * atan(Float64(C / B))); 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.65e+49) tmp = (180.0 / pi) * atan(1.0); elseif (B <= -6.5e-199) tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); elseif (B <= 1.45e-307) tmp = (180.0 * atan(0.0)) / pi; elseif (B <= 7e-51) tmp = (180.0 / pi) * atan((C / B)); else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.65e+49], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -6.5e-199], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.45e-307], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 7e-51], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $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.65 \cdot 10^{+49}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq -6.5 \cdot 10^{-199}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.45 \cdot 10^{-307}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{elif}\;B \leq 7 \cdot 10^{-51}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -1.6499999999999999e49Initial program 54.4%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified88.6%
Taylor expanded in B around -inf
Simplified74.9%
if -1.6499999999999999e49 < B < -6.50000000000000017e-199Initial program 70.8%
Taylor expanded in A around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6444.1
Simplified44.1%
if -6.50000000000000017e-199 < B < 1.45e-307Initial program 49.8%
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr49.5%
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
accelerator-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f6435.0
Applied egg-rr35.0%
Taylor expanded in C around inf
distribute-lft1-inN/A
metadata-evalN/A
mul0-lftN/A
metadata-eval49.9
Simplified49.9%
if 1.45e-307 < B < 6.9999999999999995e-51Initial program 61.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified63.7%
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--.f6458.7
Simplified58.7%
Taylor expanded in C around inf
/-lowering-/.f6443.5
Simplified43.5%
if 6.9999999999999995e-51 < B Initial program 48.4%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified71.4%
Taylor expanded in B around inf
Simplified53.4%
Final simplification54.3%
(FPCore (A B C)
:precision binary64
(if (<= B -1.5e+49)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B -3.9e-148)
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI))
(if (<= B 4.2e-53)
(* (/ 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.5e+49) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= -3.9e-148) {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
} else if (B <= 4.2e-53) {
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.5e+49) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= -3.9e-148) {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
} else if (B <= 4.2e-53) {
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.5e+49: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= -3.9e-148: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) elif B <= 4.2e-53: 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.5e+49) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= -3.9e-148) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); elseif (B <= 4.2e-53) 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.5e+49) tmp = (180.0 / pi) * atan(1.0); elseif (B <= -3.9e-148) tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); elseif (B <= 4.2e-53) 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.5e+49], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -3.9e-148], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.2e-53], 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.5 \cdot 10^{+49}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq -3.9 \cdot 10^{-148}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4.2 \cdot 10^{-53}:\\
\;\;\;\;\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.5000000000000001e49Initial program 54.4%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified88.6%
Taylor expanded in B around -inf
Simplified74.9%
if -1.5000000000000001e49 < B < -3.89999999999999994e-148Initial program 75.2%
Taylor expanded in A around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6444.8
Simplified44.8%
if -3.89999999999999994e-148 < B < 4.19999999999999955e-53Initial program 57.3%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified58.3%
Taylor expanded in A around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6447.6
Simplified47.6%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6447.7
Applied egg-rr47.7%
if 4.19999999999999955e-53 < B Initial program 49.1%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified71.8%
Taylor expanded in B around inf
Simplified52.9%
Final simplification55.1%
(FPCore (A B C)
:precision binary64
(if (<= B -1.9e+49)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B -1.3e-148)
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI))
(if (<= B 8.5e-54)
(* 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 <= -1.9e+49) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= -1.3e-148) {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
} else if (B <= 8.5e-54) {
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 <= -1.9e+49) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= -1.3e-148) {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
} else if (B <= 8.5e-54) {
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 <= -1.9e+49: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= -1.3e-148: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) elif B <= 8.5e-54: 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 <= -1.9e+49) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= -1.3e-148) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); elseif (B <= 8.5e-54) 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 <= -1.9e+49) tmp = (180.0 / pi) * atan(1.0); elseif (B <= -1.3e-148) tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); elseif (B <= 8.5e-54) 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, -1.9e+49], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.3e-148], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 8.5e-54], 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 -1.9 \cdot 10^{+49}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq -1.3 \cdot 10^{-148}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 8.5 \cdot 10^{-54}:\\
\;\;\;\;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 < -1.8999999999999999e49Initial program 54.4%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified88.6%
Taylor expanded in B around -inf
Simplified74.9%
if -1.8999999999999999e49 < B < -1.30000000000000004e-148Initial program 75.2%
Taylor expanded in A around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6444.8
Simplified44.8%
if -1.30000000000000004e-148 < B < 8.5e-54Initial program 57.3%
Taylor expanded in A around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6447.6
Simplified47.6%
if 8.5e-54 < B Initial program 49.1%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified71.8%
Taylor expanded in B around inf
Simplified52.9%
Final simplification55.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -1.7e-224)
(* 180.0 (/ (atan (+ 1.0 t_0)) PI))
(if (<= B 1e-306)
(* (atan (* B (/ 0.5 (- A C)))) (/ 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.7e-224) {
tmp = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
} else if (B <= 1e-306) {
tmp = atan((B * (0.5 / (A - C)))) * (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.7e-224) {
tmp = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
} else if (B <= 1e-306) {
tmp = Math.atan((B * (0.5 / (A - C)))) * (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.7e-224: tmp = 180.0 * (math.atan((1.0 + t_0)) / math.pi) elif B <= 1e-306: tmp = math.atan((B * (0.5 / (A - C)))) * (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.7e-224) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)); elseif (B <= 1e-306) tmp = Float64(atan(Float64(B * Float64(0.5 / Float64(A - C)))) * Float64(180.0 / pi)); else tmp = Float64(Float64(180.0 * 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.7e-224) tmp = 180.0 * (atan((1.0 + t_0)) / pi); elseif (B <= 1e-306) tmp = atan((B * (0.5 / (A - C)))) * (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.7e-224], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1e-306], N[(N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -1.7 \cdot 10^{-224}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t\_0\right)}{\pi}\\
\mathbf{elif}\;B \leq 10^{-306}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(t\_0 + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.69999999999999996e-224Initial program 62.5%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6477.0
Simplified77.0%
if -1.69999999999999996e-224 < B < 1.00000000000000003e-306Initial program 38.6%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified37.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--.f6479.2
Simplified79.2%
if 1.00000000000000003e-306 < B Initial program 54.0%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified68.2%
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--.f6464.4
Simplified64.4%
Taylor expanded in A around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
atan-lowering-atan.f64N/A
sub-negN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
div-subN/A
metadata-evalN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
PI-lowering-PI.f6464.4
Simplified64.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -5.6e-225)
(* 180.0 (/ (atan (+ 1.0 t_0)) PI))
(if (<= B 1.3e-307)
(* (atan (* B (/ 0.5 (- A C)))) (/ 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 <= -5.6e-225) {
tmp = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
} else if (B <= 1.3e-307) {
tmp = atan((B * (0.5 / (A - C)))) * (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 <= -5.6e-225) {
tmp = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
} else if (B <= 1.3e-307) {
tmp = Math.atan((B * (0.5 / (A - C)))) * (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 <= -5.6e-225: tmp = 180.0 * (math.atan((1.0 + t_0)) / math.pi) elif B <= 1.3e-307: tmp = math.atan((B * (0.5 / (A - C)))) * (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 <= -5.6e-225) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)); elseif (B <= 1.3e-307) tmp = Float64(atan(Float64(B * Float64(0.5 / Float64(A - C)))) * 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 <= -5.6e-225) tmp = 180.0 * (atan((1.0 + t_0)) / pi); elseif (B <= 1.3e-307) tmp = atan((B * (0.5 / (A - C)))) * (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, -5.6e-225], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.3e-307], N[(N[ArcTan[N[(B * N[(0.5 / N[(A - C), $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 -5.6 \cdot 10^{-225}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t\_0\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.3 \cdot 10^{-307}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(t\_0 + -1\right)\\
\end{array}
\end{array}
if B < -5.6e-225Initial program 62.5%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6477.0
Simplified77.0%
if -5.6e-225 < B < 1.29999999999999998e-307Initial program 38.6%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified37.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--.f6479.2
Simplified79.2%
if 1.29999999999999998e-307 < B Initial program 54.0%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified68.2%
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--.f6464.4
Simplified64.4%
Final simplification70.9%
(FPCore (A B C)
:precision binary64
(if (<= B 2.2e-224)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
(if (<= B 2.5e-36)
(* (atan (* B (/ 0.5 (- A C)))) (/ 180.0 PI))
(* (/ 180.0 PI) (atan (- -1.0 (/ A B)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= 2.2e-224) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else if (B <= 2.5e-36) {
tmp = atan((B * (0.5 / (A - C)))) * (180.0 / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-1.0 - (A / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 2.2e-224) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else if (B <= 2.5e-36) {
tmp = Math.atan((B * (0.5 / (A - C)))) * (180.0 / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan((-1.0 - (A / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 2.2e-224: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) elif B <= 2.5e-36: tmp = math.atan((B * (0.5 / (A - C)))) * (180.0 / math.pi) else: tmp = (180.0 / math.pi) * math.atan((-1.0 - (A / B))) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 2.2e-224) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); elseif (B <= 2.5e-36) tmp = Float64(atan(Float64(B * Float64(0.5 / Float64(A - C)))) * Float64(180.0 / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-1.0 - Float64(A / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 2.2e-224) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); elseif (B <= 2.5e-36) tmp = atan((B * (0.5 / (A - C)))) * (180.0 / pi); else tmp = (180.0 / pi) * atan((-1.0 - (A / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 2.2e-224], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.5e-36], N[(N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 2.2 \cdot 10^{-224}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.5 \cdot 10^{-36}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)\\
\end{array}
\end{array}
if B < 2.2000000000000001e-224Initial program 63.0%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6473.1
Simplified73.1%
if 2.2000000000000001e-224 < B < 2.50000000000000002e-36Initial program 48.4%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified50.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--.f6457.7
Simplified57.7%
if 2.50000000000000002e-36 < B Initial program 49.6%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified73.8%
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.8
Simplified70.8%
Taylor expanded in C around 0
distribute-lft-inN/A
metadata-evalN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6466.4
Simplified66.4%
Final simplification68.8%
(FPCore (A B C)
:precision binary64
(if (<= A -4e+26)
(* (/ 180.0 PI) (atan (/ (* B 0.5) A)))
(if (<= A 1.45e-45)
(/ 180.0 (/ PI (atan (/ (- C B) B))))
(* (/ 180.0 PI) (atan (- -1.0 (/ A B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4e+26) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * 0.5) / A));
} else if (A <= 1.45e-45) {
tmp = 180.0 / (((double) M_PI) / atan(((C - B) / B)));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-1.0 - (A / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4e+26) {
tmp = (180.0 / Math.PI) * Math.atan(((B * 0.5) / A));
} else if (A <= 1.45e-45) {
tmp = 180.0 / (Math.PI / Math.atan(((C - B) / B)));
} else {
tmp = (180.0 / Math.PI) * Math.atan((-1.0 - (A / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4e+26: tmp = (180.0 / math.pi) * math.atan(((B * 0.5) / A)) elif A <= 1.45e-45: tmp = 180.0 / (math.pi / math.atan(((C - B) / B))) else: tmp = (180.0 / math.pi) * math.atan((-1.0 - (A / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4e+26) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * 0.5) / A))); elseif (A <= 1.45e-45) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(C - B) / B)))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-1.0 - Float64(A / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4e+26) tmp = (180.0 / pi) * atan(((B * 0.5) / A)); elseif (A <= 1.45e-45) tmp = 180.0 / (pi / atan(((C - B) / B))); else tmp = (180.0 / pi) * atan((-1.0 - (A / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4e+26], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.45e-45], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4 \cdot 10^{+26}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
\mathbf{elif}\;A \leq 1.45 \cdot 10^{-45}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - B}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)\\
\end{array}
\end{array}
if A < -4.00000000000000019e26Initial program 25.7%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified32.1%
Taylor expanded in A around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6470.6
Simplified70.6%
if -4.00000000000000019e26 < A < 1.45e-45Initial program 60.8%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f64N/A
atan-lowering-atan.f64N/A
*-commutativeN/A
un-div-invN/A
/-lowering-/.f64N/A
Applied egg-rr80.9%
Taylor expanded in B around inf
Simplified50.2%
if 1.45e-45 < A Initial program 77.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified92.6%
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--.f6475.3
Simplified75.3%
Taylor expanded in C around 0
distribute-lft-inN/A
metadata-evalN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6474.3
Simplified74.3%
Final simplification62.5%
(FPCore (A B C)
:precision binary64
(if (<= A -1.4e+26)
(* (/ 180.0 PI) (atan (/ (* B 0.5) A)))
(if (<= A 4.2e-45)
(* (/ 180.0 PI) (atan (/ (- C B) B)))
(* (/ 180.0 PI) (atan (- -1.0 (/ A B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.4e+26) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * 0.5) / A));
} else if (A <= 4.2e-45) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - B) / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-1.0 - (A / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.4e+26) {
tmp = (180.0 / Math.PI) * Math.atan(((B * 0.5) / A));
} else if (A <= 4.2e-45) {
tmp = (180.0 / Math.PI) * Math.atan(((C - B) / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan((-1.0 - (A / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.4e+26: tmp = (180.0 / math.pi) * math.atan(((B * 0.5) / A)) elif A <= 4.2e-45: tmp = (180.0 / math.pi) * math.atan(((C - B) / B)) else: tmp = (180.0 / math.pi) * math.atan((-1.0 - (A / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.4e+26) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * 0.5) / A))); elseif (A <= 4.2e-45) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - B) / B))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-1.0 - Float64(A / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.4e+26) tmp = (180.0 / pi) * atan(((B * 0.5) / A)); elseif (A <= 4.2e-45) tmp = (180.0 / pi) * atan(((C - B) / B)); else tmp = (180.0 / pi) * atan((-1.0 - (A / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.4e+26], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.2e-45], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.4 \cdot 10^{+26}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
\mathbf{elif}\;A \leq 4.2 \cdot 10^{-45}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)\\
\end{array}
\end{array}
if A < -1.4e26Initial program 25.7%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified32.1%
Taylor expanded in A around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6470.6
Simplified70.6%
if -1.4e26 < A < 4.1999999999999999e-45Initial program 60.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified80.9%
Taylor expanded in B around inf
Simplified50.2%
if 4.1999999999999999e-45 < A Initial program 77.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified92.6%
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--.f6475.3
Simplified75.3%
Taylor expanded in C around 0
distribute-lft-inN/A
metadata-evalN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6474.3
Simplified74.3%
Final simplification62.5%
(FPCore (A B C)
:precision binary64
(if (<= A -2.5e-231)
(* (/ 180.0 PI) (atan (/ (* B 0.5) A)))
(if (<= A 1.52e-235)
(* (/ 180.0 PI) (atan (/ (* C 2.0) B)))
(* (/ 180.0 PI) (atan (- -1.0 (/ A B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.5e-231) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * 0.5) / A));
} else if (A <= 1.52e-235) {
tmp = (180.0 / ((double) M_PI)) * atan(((C * 2.0) / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-1.0 - (A / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.5e-231) {
tmp = (180.0 / Math.PI) * Math.atan(((B * 0.5) / A));
} else if (A <= 1.52e-235) {
tmp = (180.0 / Math.PI) * Math.atan(((C * 2.0) / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan((-1.0 - (A / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.5e-231: tmp = (180.0 / math.pi) * math.atan(((B * 0.5) / A)) elif A <= 1.52e-235: tmp = (180.0 / math.pi) * math.atan(((C * 2.0) / B)) else: tmp = (180.0 / math.pi) * math.atan((-1.0 - (A / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.5e-231) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * 0.5) / A))); elseif (A <= 1.52e-235) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C * 2.0) / B))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-1.0 - Float64(A / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.5e-231) tmp = (180.0 / pi) * atan(((B * 0.5) / A)); elseif (A <= 1.52e-235) tmp = (180.0 / pi) * atan(((C * 2.0) / B)); else tmp = (180.0 / pi) * atan((-1.0 - (A / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.5e-231], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.52e-235], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.5 \cdot 10^{-231}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
\mathbf{elif}\;A \leq 1.52 \cdot 10^{-235}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C \cdot 2}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)\\
\end{array}
\end{array}
if A < -2.50000000000000012e-231Initial program 39.7%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified52.3%
Taylor expanded in A around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6451.3
Simplified51.3%
if -2.50000000000000012e-231 < A < 1.52e-235Initial program 67.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified88.0%
Taylor expanded in C around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6448.2
Simplified48.2%
if 1.52e-235 < A Initial program 72.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified89.9%
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.5
Simplified70.5%
Taylor expanded in C around 0
distribute-lft-inN/A
metadata-evalN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6467.4
Simplified67.4%
Final simplification58.1%
(FPCore (A B C)
:precision binary64
(if (<= A -9e-232)
(* (/ 180.0 PI) (atan (/ (* B 0.5) A)))
(if (<= A 2.15e-235)
(* (/ 180.0 PI) (atan (/ C B)))
(* (/ 180.0 PI) (atan (- -1.0 (/ A B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -9e-232) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * 0.5) / A));
} else if (A <= 2.15e-235) {
tmp = (180.0 / ((double) M_PI)) * atan((C / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-1.0 - (A / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -9e-232) {
tmp = (180.0 / Math.PI) * Math.atan(((B * 0.5) / A));
} else if (A <= 2.15e-235) {
tmp = (180.0 / Math.PI) * Math.atan((C / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan((-1.0 - (A / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -9e-232: tmp = (180.0 / math.pi) * math.atan(((B * 0.5) / A)) elif A <= 2.15e-235: tmp = (180.0 / math.pi) * math.atan((C / B)) else: tmp = (180.0 / math.pi) * math.atan((-1.0 - (A / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -9e-232) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * 0.5) / A))); elseif (A <= 2.15e-235) tmp = Float64(Float64(180.0 / pi) * atan(Float64(C / B))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-1.0 - Float64(A / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -9e-232) tmp = (180.0 / pi) * atan(((B * 0.5) / A)); elseif (A <= 2.15e-235) tmp = (180.0 / pi) * atan((C / B)); else tmp = (180.0 / pi) * atan((-1.0 - (A / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -9e-232], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.15e-235], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -9 \cdot 10^{-232}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
\mathbf{elif}\;A \leq 2.15 \cdot 10^{-235}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)\\
\end{array}
\end{array}
if A < -8.99999999999999933e-232Initial program 39.7%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified52.3%
Taylor expanded in A around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6451.3
Simplified51.3%
if -8.99999999999999933e-232 < A < 2.15000000000000012e-235Initial program 67.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified88.0%
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--.f6463.1
Simplified63.1%
Taylor expanded in C around inf
/-lowering-/.f6448.2
Simplified48.2%
if 2.15000000000000012e-235 < A Initial program 72.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified89.9%
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.5
Simplified70.5%
Taylor expanded in C around 0
distribute-lft-inN/A
metadata-evalN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6467.4
Simplified67.4%
Final simplification58.1%
(FPCore (A B C)
:precision binary64
(if (<= A -7e-233)
(* (/ 180.0 PI) (atan (* B (/ 0.5 A))))
(if (<= A 5.5e-235)
(* (/ 180.0 PI) (atan (/ C B)))
(* (/ 180.0 PI) (atan (- -1.0 (/ A B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -7e-233) {
tmp = (180.0 / ((double) M_PI)) * atan((B * (0.5 / A)));
} else if (A <= 5.5e-235) {
tmp = (180.0 / ((double) M_PI)) * atan((C / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-1.0 - (A / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -7e-233) {
tmp = (180.0 / Math.PI) * Math.atan((B * (0.5 / A)));
} else if (A <= 5.5e-235) {
tmp = (180.0 / Math.PI) * Math.atan((C / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan((-1.0 - (A / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -7e-233: tmp = (180.0 / math.pi) * math.atan((B * (0.5 / A))) elif A <= 5.5e-235: tmp = (180.0 / math.pi) * math.atan((C / B)) else: tmp = (180.0 / math.pi) * math.atan((-1.0 - (A / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -7e-233) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(0.5 / A)))); elseif (A <= 5.5e-235) tmp = Float64(Float64(180.0 / pi) * atan(Float64(C / B))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-1.0 - Float64(A / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -7e-233) tmp = (180.0 / pi) * atan((B * (0.5 / A))); elseif (A <= 5.5e-235) tmp = (180.0 / pi) * atan((C / B)); else tmp = (180.0 / pi) * atan((-1.0 - (A / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -7e-233], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 5.5e-235], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -7 \cdot 10^{-233}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A}\right)\\
\mathbf{elif}\;A \leq 5.5 \cdot 10^{-235}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)\\
\end{array}
\end{array}
if A < -6.99999999999999982e-233Initial program 39.7%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified52.3%
Taylor expanded in A around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6451.3
Simplified51.3%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6451.3
Applied egg-rr51.3%
if -6.99999999999999982e-233 < A < 5.4999999999999998e-235Initial program 67.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified88.0%
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--.f6463.1
Simplified63.1%
Taylor expanded in C around inf
/-lowering-/.f6448.2
Simplified48.2%
if 5.4999999999999998e-235 < A Initial program 72.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified89.9%
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.5
Simplified70.5%
Taylor expanded in C around 0
distribute-lft-inN/A
metadata-evalN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6467.4
Simplified67.4%
Final simplification58.1%
(FPCore (A B C)
:precision binary64
(if (<= B -7.5e-6)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B 8.8e-48)
(* (/ 180.0 PI) (atan (/ C B)))
(* (/ 180.0 PI) (atan -1.0)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -7.5e-6) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= 8.8e-48) {
tmp = (180.0 / ((double) M_PI)) * atan((C / B));
} 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 <= -7.5e-6) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= 8.8e-48) {
tmp = (180.0 / Math.PI) * Math.atan((C / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -7.5e-6: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= 8.8e-48: tmp = (180.0 / math.pi) * math.atan((C / B)) else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -7.5e-6) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= 8.8e-48) tmp = Float64(Float64(180.0 / pi) * atan(Float64(C / B))); 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 <= -7.5e-6) tmp = (180.0 / pi) * atan(1.0); elseif (B <= 8.8e-48) tmp = (180.0 / pi) * atan((C / B)); else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -7.5e-6], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 8.8e-48], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $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 -7.5 \cdot 10^{-6}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq 8.8 \cdot 10^{-48}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -7.50000000000000019e-6Initial program 58.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified87.7%
Taylor expanded in B around -inf
Simplified68.3%
if -7.50000000000000019e-6 < B < 8.8000000000000005e-48Initial program 61.5%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified63.1%
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--.f6453.5
Simplified53.5%
Taylor expanded in C around inf
/-lowering-/.f6437.9
Simplified37.9%
if 8.8000000000000005e-48 < B Initial program 48.4%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified71.4%
Taylor expanded in B around inf
Simplified53.4%
Final simplification50.7%
(FPCore (A B C) :precision binary64 (if (<= B 8.5e-47) (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)) (* (/ 180.0 PI) (atan (- -1.0 (/ A B))))))
double code(double A, double B, double C) {
double tmp;
if (B <= 8.5e-47) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-1.0 - (A / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 8.5e-47) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan((-1.0 - (A / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 8.5e-47: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) else: tmp = (180.0 / math.pi) * math.atan((-1.0 - (A / B))) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 8.5e-47) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-1.0 - Float64(A / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 8.5e-47) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); else tmp = (180.0 / pi) * atan((-1.0 - (A / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 8.5e-47], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 8.5 \cdot 10^{-47}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)\\
\end{array}
\end{array}
if B < 8.4999999999999999e-47Initial program 60.4%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6466.5
Simplified66.5%
if 8.4999999999999999e-47 < B Initial program 48.4%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified71.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--.f6468.4
Simplified68.4%
Taylor expanded in C around 0
distribute-lft-inN/A
metadata-evalN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6464.3
Simplified64.3%
Final simplification65.9%
(FPCore (A B C)
:precision binary64
(if (<= B -4.5e-58)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B 1.06e-92)
(/ (* 180.0 (atan 0.0)) PI)
(* (/ 180.0 PI) (atan -1.0)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -4.5e-58) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= 1.06e-92) {
tmp = (180.0 * atan(0.0)) / ((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 <= -4.5e-58) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= 1.06e-92) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -4.5e-58: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= 1.06e-92: tmp = (180.0 * math.atan(0.0)) / math.pi else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -4.5e-58) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= 1.06e-92) tmp = Float64(Float64(180.0 * atan(0.0)) / 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 <= -4.5e-58) tmp = (180.0 / pi) * atan(1.0); elseif (B <= 1.06e-92) tmp = (180.0 * atan(0.0)) / pi; else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -4.5e-58], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.06e-92], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -4.5 \cdot 10^{-58}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq 1.06 \cdot 10^{-92}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -4.5000000000000003e-58Initial program 61.5%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified85.4%
Taylor expanded in B around -inf
Simplified61.7%
if -4.5000000000000003e-58 < B < 1.06e-92Initial program 58.2%
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr60.2%
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
accelerator-lowering-hypot.f64N/A
--lowering--.f64N/A
/-lowering-/.f6452.0
Applied egg-rr52.0%
Taylor expanded in C around inf
distribute-lft1-inN/A
metadata-evalN/A
mul0-lftN/A
metadata-eval32.3
Simplified32.3%
if 1.06e-92 < B Initial program 51.1%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified71.4%
Taylor expanded in B around inf
Simplified49.7%
Final simplification47.8%
(FPCore (A B C) :precision binary64 (if (<= B -4.2e-300) (* (/ 180.0 PI) (atan 1.0)) (* (/ 180.0 PI) (atan -1.0))))
double code(double A, double B, double C) {
double tmp;
if (B <= -4.2e-300) {
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 <= -4.2e-300) {
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 <= -4.2e-300: 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 <= -4.2e-300) 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 <= -4.2e-300) 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, -4.2e-300], 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 -4.2 \cdot 10^{-300}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -4.20000000000000007e-300Initial program 60.0%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified76.6%
Taylor expanded in B around -inf
Simplified45.0%
if -4.20000000000000007e-300 < B Initial program 54.0%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified67.9%
Taylor expanded in B around inf
Simplified37.1%
Final simplification41.0%
(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 57.0%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified72.2%
Taylor expanded in B around inf
Simplified19.6%
Final simplification19.6%
herbie shell --seed 2024192
(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)))