
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
(FPCore (A B C)
:precision binary64
(let* ((t_0
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))
(t_1 (atan (/ (- (- C A) (hypot B (- C A))) B))))
(if (<= t_0 -1e-58)
(* t_1 (/ 180.0 PI))
(if (<= t_0 0.0)
(* (/ 180.0 PI) (atan (* B (/ -0.5 (- C A)))))
(/ (* t_1 180.0) PI)))))
double code(double A, double B, double C) {
double t_0 = (1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
double t_1 = atan((((C - A) - hypot(B, (C - A))) / B));
double tmp;
if (t_0 <= -1e-58) {
tmp = t_1 * (180.0 / ((double) M_PI));
} else if (t_0 <= 0.0) {
tmp = (180.0 / ((double) M_PI)) * atan((B * (-0.5 / (C - A))));
} else {
tmp = (t_1 * 180.0) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))));
double t_1 = Math.atan((((C - A) - Math.hypot(B, (C - A))) / B));
double tmp;
if (t_0 <= -1e-58) {
tmp = t_1 * (180.0 / Math.PI);
} else if (t_0 <= 0.0) {
tmp = (180.0 / Math.PI) * Math.atan((B * (-0.5 / (C - A))));
} else {
tmp = (t_1 * 180.0) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = (1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))) t_1 = math.atan((((C - A) - math.hypot(B, (C - A))) / B)) tmp = 0 if t_0 <= -1e-58: tmp = t_1 * (180.0 / math.pi) elif t_0 <= 0.0: tmp = (180.0 / math.pi) * math.atan((B * (-0.5 / (C - A)))) else: tmp = (t_1 * 180.0) / math.pi return tmp
function code(A, B, C) t_0 = Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))) t_1 = atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(C - A))) / B)) tmp = 0.0 if (t_0 <= -1e-58) tmp = Float64(t_1 * Float64(180.0 / pi)); elseif (t_0 <= 0.0) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(-0.5 / Float64(C - A))))); else tmp = Float64(Float64(t_1 * 180.0) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))); t_1 = atan((((C - A) - hypot(B, (C - A))) / B)); tmp = 0.0; if (t_0 <= -1e-58) tmp = t_1 * (180.0 / pi); elseif (t_0 <= 0.0) tmp = (180.0 / pi) * atan((B * (-0.5 / (C - A)))); else tmp = (t_1 * 180.0) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(C - A), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$0, -1e-58], N[(t$95$1 * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(-0.5 / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(t$95$1 * 180.0), $MachinePrecision] / Pi), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
t_1 := \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right)\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{-58}:\\
\;\;\;\;t\_1 \cdot \frac{180}{\pi}\\
\mathbf{elif}\;t\_0 \leq 0:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1 \cdot 180}{\pi}\\
\end{array}
\end{array}
if (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -1e-58Initial program 61.7%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified89.2%
if -1e-58 < (*.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 21.4%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified21.4%
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-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
--lowering--.f6499.4%
Simplified99.4%
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 52.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified87.0%
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr87.0%
Final simplification89.6%
(FPCore (A B C)
:precision binary64
(if (<= A -7e+118)
(* (/ 180.0 PI) (atan (* B (/ -0.5 (- C A)))))
(if (<= A 3.8e+32)
(/ (* 180.0 (atan (/ (- C (hypot C B)) B))) PI)
(* 180.0 (/ (atan (+ (/ (- C A) B) -1.0)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -7e+118) {
tmp = (180.0 / ((double) M_PI)) * atan((B * (-0.5 / (C - A))));
} else if (A <= 3.8e+32) {
tmp = (180.0 * atan(((C - hypot(C, B)) / B))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((((C - A) / B) + -1.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -7e+118) {
tmp = (180.0 / Math.PI) * Math.atan((B * (-0.5 / (C - A))));
} else if (A <= 3.8e+32) {
tmp = (180.0 * Math.atan(((C - Math.hypot(C, B)) / B))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((((C - A) / B) + -1.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -7e+118: tmp = (180.0 / math.pi) * math.atan((B * (-0.5 / (C - A)))) elif A <= 3.8e+32: tmp = (180.0 * math.atan(((C - math.hypot(C, B)) / B))) / math.pi else: tmp = 180.0 * (math.atan((((C - A) / B) + -1.0)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -7e+118) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(-0.5 / Float64(C - A))))); elseif (A <= 3.8e+32) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(C, B)) / B))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) / B) + -1.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -7e+118) tmp = (180.0 / pi) * atan((B * (-0.5 / (C - A)))); elseif (A <= 3.8e+32) tmp = (180.0 * atan(((C - hypot(C, B)) / B))) / pi; else tmp = 180.0 * (atan((((C - A) / B) + -1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -7e+118], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(-0.5 / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.8e+32], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -7 \cdot 10^{+118}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)\\
\mathbf{elif}\;A \leq 3.8 \cdot 10^{+32}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\
\end{array}
\end{array}
if A < -7.00000000000000033e118Initial program 19.0%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified51.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-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
--lowering--.f6486.3%
Simplified86.3%
if -7.00000000000000033e118 < A < 3.8000000000000003e32Initial program 48.7%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified77.1%
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr77.2%
Taylor expanded in A around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6475.3%
Simplified75.3%
if 3.8000000000000003e32 < A Initial program 78.5%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6482.8%
Simplified82.8%
Final simplification78.7%
(FPCore (A B C)
:precision binary64
(if (<= A -7.8e+118)
(* (/ 180.0 PI) (atan (* B (/ -0.5 (- C A)))))
(if (<= A 1.5e+38)
(* 180.0 (/ (atan (/ (- C (hypot C B)) B)) PI))
(* 180.0 (/ (atan (+ (/ (- C A) B) -1.0)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -7.8e+118) {
tmp = (180.0 / ((double) M_PI)) * atan((B * (-0.5 / (C - A))));
} else if (A <= 1.5e+38) {
tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((((C - A) / B) + -1.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -7.8e+118) {
tmp = (180.0 / Math.PI) * Math.atan((B * (-0.5 / (C - A))));
} else if (A <= 1.5e+38) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(C, B)) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((((C - A) / B) + -1.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -7.8e+118: tmp = (180.0 / math.pi) * math.atan((B * (-0.5 / (C - A)))) elif A <= 1.5e+38: tmp = 180.0 * (math.atan(((C - math.hypot(C, B)) / B)) / math.pi) else: tmp = 180.0 * (math.atan((((C - A) / B) + -1.0)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -7.8e+118) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(-0.5 / Float64(C - A))))); elseif (A <= 1.5e+38) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(C, B)) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) / B) + -1.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -7.8e+118) tmp = (180.0 / pi) * atan((B * (-0.5 / (C - A)))); elseif (A <= 1.5e+38) tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / pi); else tmp = 180.0 * (atan((((C - A) / B) + -1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -7.8e+118], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(-0.5 / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.5e+38], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -7.8 \cdot 10^{+118}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)\\
\mathbf{elif}\;A \leq 1.5 \cdot 10^{+38}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\
\end{array}
\end{array}
if A < -7.8e118Initial program 19.0%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified51.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-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
--lowering--.f6486.3%
Simplified86.3%
if -7.8e118 < A < 1.5000000000000001e38Initial program 48.7%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified77.1%
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr77.2%
Taylor expanded in A around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6475.3%
Simplified75.3%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
PI-lowering-PI.f6475.3%
Applied egg-rr75.3%
if 1.5000000000000001e38 < A Initial program 78.5%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6482.8%
Simplified82.8%
Final simplification78.7%
(FPCore (A B C)
:precision binary64
(if (<= A -9.2e+118)
(* (/ 180.0 PI) (atan (* B (/ -0.5 (- C A)))))
(if (<= A 4.3e+43)
(* (/ 180.0 PI) (atan (/ (- C (hypot C B)) B)))
(* 180.0 (/ (atan (+ (/ (- C A) B) -1.0)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -9.2e+118) {
tmp = (180.0 / ((double) M_PI)) * atan((B * (-0.5 / (C - A))));
} else if (A <= 4.3e+43) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(C, B)) / B));
} else {
tmp = 180.0 * (atan((((C - A) / B) + -1.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -9.2e+118) {
tmp = (180.0 / Math.PI) * Math.atan((B * (-0.5 / (C - A))));
} else if (A <= 4.3e+43) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(C, B)) / B));
} else {
tmp = 180.0 * (Math.atan((((C - A) / B) + -1.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -9.2e+118: tmp = (180.0 / math.pi) * math.atan((B * (-0.5 / (C - A)))) elif A <= 4.3e+43: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(C, B)) / B)) else: tmp = 180.0 * (math.atan((((C - A) / B) + -1.0)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -9.2e+118) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(-0.5 / Float64(C - A))))); elseif (A <= 4.3e+43) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(C, B)) / B))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) / B) + -1.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -9.2e+118) tmp = (180.0 / pi) * atan((B * (-0.5 / (C - A)))); elseif (A <= 4.3e+43) tmp = (180.0 / pi) * atan(((C - hypot(C, B)) / B)); else tmp = 180.0 * (atan((((C - A) / B) + -1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -9.2e+118], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(-0.5 / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.3e+43], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -9.2 \cdot 10^{+118}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)\\
\mathbf{elif}\;A \leq 4.3 \cdot 10^{+43}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\
\end{array}
\end{array}
if A < -9.20000000000000063e118Initial program 19.0%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified51.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-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
--lowering--.f6486.3%
Simplified86.3%
if -9.20000000000000063e118 < A < 4.3e43Initial program 48.7%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified77.1%
Taylor expanded in A around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6475.2%
Simplified75.2%
if 4.3e43 < A Initial program 78.5%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6482.8%
Simplified82.8%
Final simplification78.7%
(FPCore (A B C) :precision binary64 (if (<= A -2.4e+146) (* (/ 180.0 PI) (atan (* B (/ -0.5 (- C A))))) (* (atan (/ (- (- C A) (hypot B (- C A))) B)) (/ 180.0 PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.4e+146) {
tmp = (180.0 / ((double) M_PI)) * atan((B * (-0.5 / (C - A))));
} else {
tmp = atan((((C - A) - hypot(B, (C - A))) / B)) * (180.0 / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.4e+146) {
tmp = (180.0 / Math.PI) * Math.atan((B * (-0.5 / (C - A))));
} else {
tmp = Math.atan((((C - A) - Math.hypot(B, (C - A))) / B)) * (180.0 / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.4e+146: tmp = (180.0 / math.pi) * math.atan((B * (-0.5 / (C - A)))) else: tmp = math.atan((((C - A) - math.hypot(B, (C - A))) / B)) * (180.0 / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.4e+146) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(-0.5 / Float64(C - A))))); else tmp = Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(C - A))) / B)) * Float64(180.0 / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.4e+146) tmp = (180.0 / pi) * atan((B * (-0.5 / (C - A)))); else tmp = atan((((C - A) - hypot(B, (C - A))) / B)) * (180.0 / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.4e+146], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(-0.5 / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $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[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.4 \cdot 10^{+146}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}\\
\end{array}
\end{array}
if A < -2.4000000000000002e146Initial program 6.7%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified44.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-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
--lowering--.f6486.8%
Simplified86.8%
if -2.4000000000000002e146 < A Initial program 57.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified83.1%
Final simplification83.6%
(FPCore (A B C)
:precision binary64
(if (<= B -2.1e-186)
(*
(/ 180.0 PI)
(atan (+ 1.0 (/ (+ (- C A) (* -0.5 (* (- C A) (/ (- A C) B)))) B))))
(if (<= B 7.5e-280)
(* (/ 180.0 PI) (atan (* B (/ -0.5 (- C A)))))
(* 180.0 (/ (atan (+ (/ (- C A) B) -1.0)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.1e-186) {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 + (((C - A) + (-0.5 * ((C - A) * ((A - C) / B)))) / B)));
} else if (B <= 7.5e-280) {
tmp = (180.0 / ((double) M_PI)) * atan((B * (-0.5 / (C - A))));
} else {
tmp = 180.0 * (atan((((C - A) / B) + -1.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2.1e-186) {
tmp = (180.0 / Math.PI) * Math.atan((1.0 + (((C - A) + (-0.5 * ((C - A) * ((A - C) / B)))) / B)));
} else if (B <= 7.5e-280) {
tmp = (180.0 / Math.PI) * Math.atan((B * (-0.5 / (C - A))));
} else {
tmp = 180.0 * (Math.atan((((C - A) / B) + -1.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.1e-186: tmp = (180.0 / math.pi) * math.atan((1.0 + (((C - A) + (-0.5 * ((C - A) * ((A - C) / B)))) / B))) elif B <= 7.5e-280: tmp = (180.0 / math.pi) * math.atan((B * (-0.5 / (C - A)))) else: tmp = 180.0 * (math.atan((((C - A) / B) + -1.0)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2.1e-186) tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 + Float64(Float64(Float64(C - A) + Float64(-0.5 * Float64(Float64(C - A) * Float64(Float64(A - C) / B)))) / B)))); elseif (B <= 7.5e-280) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(-0.5 / Float64(C - A))))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) / B) + -1.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2.1e-186) tmp = (180.0 / pi) * atan((1.0 + (((C - A) + (-0.5 * ((C - A) * ((A - C) / B)))) / B))); elseif (B <= 7.5e-280) tmp = (180.0 / pi) * atan((B * (-0.5 / (C - A)))); else tmp = 180.0 * (atan((((C - A) / B) + -1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.1e-186], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 + N[(N[(N[(C - A), $MachinePrecision] + N[(-0.5 * N[(N[(C - A), $MachinePrecision] * N[(N[(A - C), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7.5e-280], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(-0.5 / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2.1 \cdot 10^{-186}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{\left(C - A\right) + -0.5 \cdot \left(\left(C - A\right) \cdot \frac{A - C}{B}\right)}{B}\right)\\
\mathbf{elif}\;B \leq 7.5 \cdot 10^{-280}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -2.1000000000000002e-186Initial program 46.3%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified77.7%
Taylor expanded in B around -inf
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified74.4%
if -2.1000000000000002e-186 < B < 7.4999999999999999e-280Initial program 48.1%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified74.8%
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-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
--lowering--.f6464.3%
Simplified64.3%
if 7.4999999999999999e-280 < B Initial program 59.0%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6477.0%
Simplified77.0%
Final simplification73.4%
(FPCore (A B C)
:precision binary64
(if (<= A -6.4e-16)
(* (/ 180.0 PI) (atan (/ (* B 0.5) A)))
(if (<= A 3.45e-125)
(/ (* 180.0 (atan (+ 1.0 (/ C B)))) PI)
(if (<= A 6.2e-69)
(/ (* 180.0 (atan (+ (/ C B) -1.0))) PI)
(* (/ 180.0 PI) (atan (- 1.0 (/ A B))))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -6.4e-16) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * 0.5) / A));
} else if (A <= 3.45e-125) {
tmp = (180.0 * atan((1.0 + (C / B)))) / ((double) M_PI);
} else if (A <= 6.2e-69) {
tmp = (180.0 * atan(((C / B) + -1.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 (A <= -6.4e-16) {
tmp = (180.0 / Math.PI) * Math.atan(((B * 0.5) / A));
} else if (A <= 3.45e-125) {
tmp = (180.0 * Math.atan((1.0 + (C / B)))) / Math.PI;
} else if (A <= 6.2e-69) {
tmp = (180.0 * Math.atan(((C / B) + -1.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 A <= -6.4e-16: tmp = (180.0 / math.pi) * math.atan(((B * 0.5) / A)) elif A <= 3.45e-125: tmp = (180.0 * math.atan((1.0 + (C / B)))) / math.pi elif A <= 6.2e-69: tmp = (180.0 * math.atan(((C / B) + -1.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 (A <= -6.4e-16) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * 0.5) / A))); elseif (A <= 3.45e-125) tmp = Float64(Float64(180.0 * atan(Float64(1.0 + Float64(C / B)))) / pi); elseif (A <= 6.2e-69) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C / B) + -1.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 (A <= -6.4e-16) tmp = (180.0 / pi) * atan(((B * 0.5) / A)); elseif (A <= 3.45e-125) tmp = (180.0 * atan((1.0 + (C / B)))) / pi; elseif (A <= 6.2e-69) tmp = (180.0 * atan(((C / B) + -1.0))) / pi; else tmp = (180.0 / pi) * atan((1.0 - (A / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -6.4e-16], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.45e-125], N[(N[(180.0 * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 6.2e-69], N[(N[(180.0 * N[ArcTan[N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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 -6.4 \cdot 10^{-16}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
\mathbf{elif}\;A \leq 3.45 \cdot 10^{-125}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 6.2 \cdot 10^{-69}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)\\
\end{array}
\end{array}
if A < -6.40000000000000046e-16Initial program 24.6%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified56.1%
Taylor expanded in A around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6469.6%
Simplified69.6%
if -6.40000000000000046e-16 < A < 3.44999999999999986e-125Initial program 46.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified75.6%
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr75.6%
Taylor expanded in A around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6475.7%
Simplified75.7%
Taylor expanded in B around -inf
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6449.5%
Simplified49.5%
if 3.44999999999999986e-125 < A < 6.1999999999999999e-69Initial program 79.4%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified94.6%
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr94.7%
Taylor expanded in A around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6494.7%
Simplified94.7%
Taylor expanded in C around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6477.0%
Simplified77.0%
if 6.1999999999999999e-69 < A Initial program 73.5%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified96.3%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6477.1%
Simplified77.1%
Taylor expanded in C around 0
--lowering--.f64N/A
/-lowering-/.f6476.1%
Simplified76.1%
Final simplification64.3%
(FPCore (A B C)
:precision binary64
(if (<= A -2.4e-15)
(* (/ 180.0 PI) (atan (/ (* B 0.5) A)))
(if (<= A 5e-127)
(* (/ 180.0 PI) (atan (+ 1.0 (/ C B))))
(if (<= A 1.65e-69)
(/ (* 180.0 (atan (+ (/ C B) -1.0))) PI)
(* (/ 180.0 PI) (atan (- 1.0 (/ A B))))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.4e-15) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * 0.5) / A));
} else if (A <= 5e-127) {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 + (C / B)));
} else if (A <= 1.65e-69) {
tmp = (180.0 * atan(((C / B) + -1.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 (A <= -2.4e-15) {
tmp = (180.0 / Math.PI) * Math.atan(((B * 0.5) / A));
} else if (A <= 5e-127) {
tmp = (180.0 / Math.PI) * Math.atan((1.0 + (C / B)));
} else if (A <= 1.65e-69) {
tmp = (180.0 * Math.atan(((C / B) + -1.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 A <= -2.4e-15: tmp = (180.0 / math.pi) * math.atan(((B * 0.5) / A)) elif A <= 5e-127: tmp = (180.0 / math.pi) * math.atan((1.0 + (C / B))) elif A <= 1.65e-69: tmp = (180.0 * math.atan(((C / B) + -1.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 (A <= -2.4e-15) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * 0.5) / A))); elseif (A <= 5e-127) tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 + Float64(C / B)))); elseif (A <= 1.65e-69) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C / B) + -1.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 (A <= -2.4e-15) tmp = (180.0 / pi) * atan(((B * 0.5) / A)); elseif (A <= 5e-127) tmp = (180.0 / pi) * atan((1.0 + (C / B))); elseif (A <= 1.65e-69) tmp = (180.0 * atan(((C / B) + -1.0))) / pi; else tmp = (180.0 / pi) * atan((1.0 - (A / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.4e-15], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 5e-127], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.65e-69], N[(N[(180.0 * N[ArcTan[N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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.4 \cdot 10^{-15}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
\mathbf{elif}\;A \leq 5 \cdot 10^{-127}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)\\
\mathbf{elif}\;A \leq 1.65 \cdot 10^{-69}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)\\
\end{array}
\end{array}
if A < -2.39999999999999995e-15Initial program 24.6%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified56.1%
Taylor expanded in A around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6469.6%
Simplified69.6%
if -2.39999999999999995e-15 < A < 4.9999999999999997e-127Initial program 46.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified75.6%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6449.3%
Simplified49.3%
Taylor expanded in A around 0
+-lowering-+.f64N/A
/-lowering-/.f6449.4%
Simplified49.4%
if 4.9999999999999997e-127 < A < 1.65e-69Initial program 79.4%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified94.6%
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr94.7%
Taylor expanded in A around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6494.7%
Simplified94.7%
Taylor expanded in C around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6477.0%
Simplified77.0%
if 1.65e-69 < A Initial program 73.5%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified96.3%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6477.1%
Simplified77.1%
Taylor expanded in C around 0
--lowering--.f64N/A
/-lowering-/.f6476.1%
Simplified76.1%
Final simplification64.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -9.5e-185)
(* (/ 180.0 PI) (atan (+ 1.0 t_0)))
(if (<= B 8.5e-282)
(* (/ 180.0 PI) (atan (* B (/ -0.5 (- C A)))))
(* 180.0 (/ (atan (+ t_0 -1.0)) PI))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -9.5e-185) {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 + t_0));
} else if (B <= 8.5e-282) {
tmp = (180.0 / ((double) M_PI)) * atan((B * (-0.5 / (C - A))));
} else {
tmp = 180.0 * (atan((t_0 + -1.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -9.5e-185) {
tmp = (180.0 / Math.PI) * Math.atan((1.0 + t_0));
} else if (B <= 8.5e-282) {
tmp = (180.0 / Math.PI) * Math.atan((B * (-0.5 / (C - A))));
} else {
tmp = 180.0 * (Math.atan((t_0 + -1.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= -9.5e-185: tmp = (180.0 / math.pi) * math.atan((1.0 + t_0)) elif B <= 8.5e-282: tmp = (180.0 / math.pi) * math.atan((B * (-0.5 / (C - A)))) else: tmp = 180.0 * (math.atan((t_0 + -1.0)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= -9.5e-185) tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 + t_0))); elseif (B <= 8.5e-282) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(-0.5 / Float64(C - A))))); else tmp = Float64(180.0 * Float64(atan(Float64(t_0 + -1.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= -9.5e-185) tmp = (180.0 / pi) * atan((1.0 + t_0)); elseif (B <= 8.5e-282) tmp = (180.0 / pi) * atan((B * (-0.5 / (C - A)))); else tmp = 180.0 * (atan((t_0 + -1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -9.5e-185], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 8.5e-282], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(-0.5 / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -9.5 \cdot 10^{-185}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + t\_0\right)\\
\mathbf{elif}\;B \leq 8.5 \cdot 10^{-282}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(t\_0 + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -9.50000000000000042e-185Initial program 46.3%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified77.7%
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.50000000000000042e-185 < B < 8.499999999999999e-282Initial program 48.1%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified74.8%
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-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
--lowering--.f6464.3%
Simplified64.3%
if 8.499999999999999e-282 < B Initial program 59.0%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6477.0%
Simplified77.0%
Final simplification72.8%
(FPCore (A B C)
:precision binary64
(if (<= B -2.2e-140)
(/ (* 180.0 (atan (+ 1.0 (/ C B)))) PI)
(if (<= B 7.2e-281)
(* (/ 180.0 PI) (atan (* B (/ -0.5 (- C A)))))
(* 180.0 (/ (atan (+ (/ (- C A) B) -1.0)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.2e-140) {
tmp = (180.0 * atan((1.0 + (C / B)))) / ((double) M_PI);
} else if (B <= 7.2e-281) {
tmp = (180.0 / ((double) M_PI)) * atan((B * (-0.5 / (C - A))));
} else {
tmp = 180.0 * (atan((((C - A) / B) + -1.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2.2e-140) {
tmp = (180.0 * Math.atan((1.0 + (C / B)))) / Math.PI;
} else if (B <= 7.2e-281) {
tmp = (180.0 / Math.PI) * Math.atan((B * (-0.5 / (C - A))));
} else {
tmp = 180.0 * (Math.atan((((C - A) / B) + -1.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.2e-140: tmp = (180.0 * math.atan((1.0 + (C / B)))) / math.pi elif B <= 7.2e-281: tmp = (180.0 / math.pi) * math.atan((B * (-0.5 / (C - A)))) else: tmp = 180.0 * (math.atan((((C - A) / B) + -1.0)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2.2e-140) tmp = Float64(Float64(180.0 * atan(Float64(1.0 + Float64(C / B)))) / pi); elseif (B <= 7.2e-281) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(-0.5 / Float64(C - A))))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) / B) + -1.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2.2e-140) tmp = (180.0 * atan((1.0 + (C / B)))) / pi; elseif (B <= 7.2e-281) tmp = (180.0 / pi) * atan((B * (-0.5 / (C - A)))); else tmp = 180.0 * (atan((((C - A) / B) + -1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.2e-140], N[(N[(180.0 * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 7.2e-281], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(-0.5 / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2.2 \cdot 10^{-140}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 7.2 \cdot 10^{-281}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -2.1999999999999999e-140Initial program 45.7%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified77.4%
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr77.4%
Taylor expanded in A around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6471.2%
Simplified71.2%
Taylor expanded in B around -inf
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6469.5%
Simplified69.5%
if -2.1999999999999999e-140 < B < 7.20000000000000013e-281Initial program 48.9%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified75.8%
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-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
--lowering--.f6460.6%
Simplified60.6%
if 7.20000000000000013e-281 < B Initial program 59.0%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6477.0%
Simplified77.0%
Final simplification70.2%
(FPCore (A B C)
:precision binary64
(if (<= B -1.5e-239)
(/ (* 180.0 (atan (+ 1.0 (/ C B)))) PI)
(if (<= B -6.4e-296)
(* (/ 180.0 PI) (atan (/ (* B 0.5) A)))
(* 180.0 (/ (atan (+ (/ (- C A) B) -1.0)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.5e-239) {
tmp = (180.0 * atan((1.0 + (C / B)))) / ((double) M_PI);
} else if (B <= -6.4e-296) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * 0.5) / A));
} else {
tmp = 180.0 * (atan((((C - A) / B) + -1.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.5e-239) {
tmp = (180.0 * Math.atan((1.0 + (C / B)))) / Math.PI;
} else if (B <= -6.4e-296) {
tmp = (180.0 / Math.PI) * Math.atan(((B * 0.5) / A));
} else {
tmp = 180.0 * (Math.atan((((C - A) / B) + -1.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.5e-239: tmp = (180.0 * math.atan((1.0 + (C / B)))) / math.pi elif B <= -6.4e-296: tmp = (180.0 / math.pi) * math.atan(((B * 0.5) / A)) else: tmp = 180.0 * (math.atan((((C - A) / B) + -1.0)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.5e-239) tmp = Float64(Float64(180.0 * atan(Float64(1.0 + Float64(C / B)))) / pi); elseif (B <= -6.4e-296) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * 0.5) / A))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) / B) + -1.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.5e-239) tmp = (180.0 * atan((1.0 + (C / B)))) / pi; elseif (B <= -6.4e-296) tmp = (180.0 / pi) * atan(((B * 0.5) / A)); else tmp = 180.0 * (atan((((C - A) / B) + -1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.5e-239], N[(N[(180.0 * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, -6.4e-296], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.5 \cdot 10^{-239}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq -6.4 \cdot 10^{-296}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.4999999999999999e-239Initial program 45.4%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified77.7%
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr77.7%
Taylor expanded in A around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6468.8%
Simplified68.8%
Taylor expanded in B around -inf
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6463.2%
Simplified63.2%
if -1.4999999999999999e-239 < B < -6.40000000000000025e-296Initial program 49.4%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified65.7%
Taylor expanded in A around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6460.1%
Simplified60.1%
if -6.40000000000000025e-296 < B Initial program 58.5%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6473.1%
Simplified73.1%
Final simplification67.2%
(FPCore (A B C)
:precision binary64
(if (<= A -1.95e-17)
(* (/ 180.0 PI) (atan (/ (* B 0.5) A)))
(if (<= A 1.18e-85)
(* (/ 180.0 PI) (atan (+ 1.0 (/ C B))))
(* (/ 180.0 PI) (atan (- 1.0 (/ A B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.95e-17) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * 0.5) / A));
} else if (A <= 1.18e-85) {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 + (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 <= -1.95e-17) {
tmp = (180.0 / Math.PI) * Math.atan(((B * 0.5) / A));
} else if (A <= 1.18e-85) {
tmp = (180.0 / Math.PI) * Math.atan((1.0 + (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 <= -1.95e-17: tmp = (180.0 / math.pi) * math.atan(((B * 0.5) / A)) elif A <= 1.18e-85: tmp = (180.0 / math.pi) * math.atan((1.0 + (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 <= -1.95e-17) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * 0.5) / A))); elseif (A <= 1.18e-85) tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 + 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 <= -1.95e-17) tmp = (180.0 / pi) * atan(((B * 0.5) / A)); elseif (A <= 1.18e-85) tmp = (180.0 / pi) * atan((1.0 + (C / B))); else tmp = (180.0 / pi) * atan((1.0 - (A / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.95e-17], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.18e-85], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 + N[(C / 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 -1.95 \cdot 10^{-17}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
\mathbf{elif}\;A \leq 1.18 \cdot 10^{-85}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)\\
\end{array}
\end{array}
if A < -1.94999999999999995e-17Initial program 24.6%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified56.1%
Taylor expanded in A around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6469.6%
Simplified69.6%
if -1.94999999999999995e-17 < A < 1.18e-85Initial program 50.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified78.0%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6449.0%
Simplified49.0%
Taylor expanded in A around 0
+-lowering-+.f64N/A
/-lowering-/.f6449.2%
Simplified49.2%
if 1.18e-85 < A Initial program 74.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified96.3%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6476.4%
Simplified76.4%
Taylor expanded in C around 0
--lowering--.f64N/A
/-lowering-/.f6475.4%
Simplified75.4%
Final simplification62.4%
(FPCore (A B C)
:precision binary64
(if (<= A -1.1e-17)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 4.8e-78)
(* (/ 180.0 PI) (atan (+ 1.0 (/ C B))))
(* (/ 180.0 PI) (atan (- 1.0 (/ A B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.1e-17) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 4.8e-78) {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 + (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 <= -1.1e-17) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 4.8e-78) {
tmp = (180.0 / Math.PI) * Math.atan((1.0 + (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 <= -1.1e-17: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 4.8e-78: tmp = (180.0 / math.pi) * math.atan((1.0 + (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 <= -1.1e-17) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 4.8e-78) tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 + 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 <= -1.1e-17) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 4.8e-78) tmp = (180.0 / pi) * atan((1.0 + (C / B))); else tmp = (180.0 / pi) * atan((1.0 - (A / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.1e-17], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.8e-78], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 + N[(C / 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 -1.1 \cdot 10^{-17}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 4.8 \cdot 10^{-78}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)\\
\end{array}
\end{array}
if A < -1.1e-17Initial program 24.6%
Taylor expanded in A around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6469.4%
Simplified69.4%
if -1.1e-17 < A < 4.79999999999999999e-78Initial program 50.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified78.0%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6449.0%
Simplified49.0%
Taylor expanded in A around 0
+-lowering-+.f64N/A
/-lowering-/.f6449.2%
Simplified49.2%
if 4.79999999999999999e-78 < A Initial program 74.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified96.3%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6476.4%
Simplified76.4%
Taylor expanded in C around 0
--lowering--.f64N/A
/-lowering-/.f6475.4%
Simplified75.4%
Final simplification62.4%
(FPCore (A B C)
:precision binary64
(if (<= A -1.05e-17)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 7.6e+22)
(* (/ 180.0 PI) (atan (+ 1.0 (/ C B))))
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.05e-17) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 7.6e+22) {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 + (C / B)));
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.05e-17) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 7.6e+22) {
tmp = (180.0 / Math.PI) * Math.atan((1.0 + (C / B)));
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.05e-17: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 7.6e+22: tmp = (180.0 / math.pi) * math.atan((1.0 + (C / B))) else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.05e-17) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 7.6e+22) tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 + Float64(C / B)))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.05e-17) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 7.6e+22) tmp = (180.0 / pi) * atan((1.0 + (C / B))); else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.05e-17], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 7.6e+22], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.05 \cdot 10^{-17}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 7.6 \cdot 10^{+22}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.04999999999999996e-17Initial program 24.6%
Taylor expanded in A around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6469.4%
Simplified69.4%
if -1.04999999999999996e-17 < A < 7.6000000000000008e22Initial program 52.0%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified80.3%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6451.5%
Simplified51.5%
Taylor expanded in A around 0
+-lowering-+.f64N/A
/-lowering-/.f6449.6%
Simplified49.6%
if 7.6000000000000008e22 < A Initial program 77.4%
Taylor expanded in A around inf
associate-*r/N/A
metadata-evalN/A
distribute-lft-neg-inN/A
/-lowering-/.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6469.7%
Simplified69.7%
Final simplification59.3%
(FPCore (A B C)
:precision binary64
(if (<= A -1.05e-133)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 7.5e-95)
(* (/ 180.0 PI) (atan 1.0))
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.05e-133) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 7.5e-95) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.05e-133) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 7.5e-95) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.05e-133: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 7.5e-95: tmp = (180.0 / math.pi) * math.atan(1.0) else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.05e-133) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 7.5e-95) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.05e-133) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 7.5e-95) tmp = (180.0 / pi) * atan(1.0); else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.05e-133], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 7.5e-95], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.05 \cdot 10^{-133}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 7.5 \cdot 10^{-95}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.05e-133Initial program 32.3%
Taylor expanded in A around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6463.1%
Simplified63.1%
if -1.05e-133 < A < 7.5000000000000003e-95Initial program 47.7%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified79.2%
Taylor expanded in B around -inf
Simplified35.6%
if 7.5000000000000003e-95 < A Initial program 74.1%
Taylor expanded in A around inf
associate-*r/N/A
metadata-evalN/A
distribute-lft-neg-inN/A
/-lowering-/.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6463.6%
Simplified63.6%
Final simplification53.4%
(FPCore (A B C)
:precision binary64
(if (<= B -3.25e-136)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B 3.9e-91)
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI))
(* (/ 180.0 PI) (atan -1.0)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3.25e-136) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= 3.9e-91) {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((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 <= -3.25e-136) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= 3.9e-91) {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -3.25e-136: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= 3.9e-91: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -3.25e-136) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= 3.9e-91) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / 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 <= -3.25e-136) tmp = (180.0 / pi) * atan(1.0); elseif (B <= 3.9e-91) tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3.25e-136], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.9e-91], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $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 -3.25 \cdot 10^{-136}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq 3.9 \cdot 10^{-91}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -3.25000000000000005e-136Initial program 45.1%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified77.2%
Taylor expanded in B around -inf
Simplified57.4%
if -3.25000000000000005e-136 < B < 3.89999999999999994e-91Initial program 56.4%
Taylor expanded in A around inf
associate-*r/N/A
metadata-evalN/A
distribute-lft-neg-inN/A
/-lowering-/.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6437.7%
Simplified37.7%
if 3.89999999999999994e-91 < B Initial program 54.0%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified79.5%
Taylor expanded in B around inf
Simplified59.7%
Final simplification51.3%
(FPCore (A B C)
:precision binary64
(if (<= B -1.35e-146)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B 7e-261)
(* (/ 180.0 PI) (atan (/ 0.0 B)))
(* (/ 180.0 PI) (atan -1.0)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.35e-146) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= 7e-261) {
tmp = (180.0 / ((double) M_PI)) * atan((0.0 / 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.35e-146) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= 7e-261) {
tmp = (180.0 / Math.PI) * Math.atan((0.0 / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.35e-146: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= 7e-261: tmp = (180.0 / math.pi) * math.atan((0.0 / B)) else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.35e-146) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= 7e-261) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.0 / 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.35e-146) tmp = (180.0 / pi) * atan(1.0); elseif (B <= 7e-261) tmp = (180.0 / pi) * atan((0.0 / B)); else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.35e-146], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7e-261], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.0 / 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.35 \cdot 10^{-146}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq 7 \cdot 10^{-261}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -1.34999999999999997e-146Initial program 46.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified77.6%
Taylor expanded in B around -inf
Simplified56.6%
if -1.34999999999999997e-146 < B < 6.9999999999999995e-261Initial program 48.1%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified76.2%
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.2%
Simplified37.2%
if 6.9999999999999995e-261 < B Initial program 59.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified80.5%
Taylor expanded in B around inf
Simplified51.4%
Final simplification50.0%
(FPCore (A B C) :precision binary64 (if (<= B -2.15e-306) (* (/ 180.0 PI) (atan 1.0)) (* (/ 180.0 PI) (atan -1.0))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.15e-306) {
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 <= -2.15e-306) {
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 <= -2.15e-306: 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 <= -2.15e-306) 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 <= -2.15e-306) 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, -2.15e-306], 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 -2.15 \cdot 10^{-306}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -2.15e-306Initial program 47.1%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified76.2%
Taylor expanded in B around -inf
Simplified42.6%
if -2.15e-306 < B Initial program 57.3%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified81.3%
Taylor expanded in B around inf
Simplified45.9%
Final simplification44.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 51.4%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified78.3%
Taylor expanded in B around inf
Simplified20.3%
Final simplification20.3%
herbie shell --seed 2024152
(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)))