
(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}
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
(FPCore (A B C) :precision binary64 (if (<= A -4.2e+113) (/ (* 180.0 (atan (* (/ B A) 0.5))) PI) (/ (* 180.0 (atan (* (- (- C A) (hypot (- A C) B)) (pow B -1.0)))) PI)))
double code(double A, double B, double C) {
double tmp;
if (A <= -4.2e+113) {
tmp = (180.0 * atan(((B / A) * 0.5))) / ((double) M_PI);
} else {
tmp = (180.0 * atan((((C - A) - hypot((A - C), B)) * pow(B, -1.0)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4.2e+113) {
tmp = (180.0 * Math.atan(((B / A) * 0.5))) / Math.PI;
} else {
tmp = (180.0 * Math.atan((((C - A) - Math.hypot((A - C), B)) * Math.pow(B, -1.0)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4.2e+113: tmp = (180.0 * math.atan(((B / A) * 0.5))) / math.pi else: tmp = (180.0 * math.atan((((C - A) - math.hypot((A - C), B)) * math.pow(B, -1.0)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4.2e+113) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B / A) * 0.5))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) * (B ^ -1.0)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4.2e+113) tmp = (180.0 * atan(((B / A) * 0.5))) / pi; else tmp = (180.0 * atan((((C - A) - hypot((A - C), B)) * (B ^ -1.0)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4.2e+113], N[(N[(180.0 * N[ArcTan[N[(N[(B / A), $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] * N[Power[B, -1.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4.2 \cdot 10^{+113}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\left(\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)\right) \cdot {B}^{-1}\right)}{\pi}\\
\end{array}
\end{array}
if A < -4.1999999999999998e113Initial program 15.5%
lift-*.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
Applied rewrites53.5%
Taylor expanded in A around -inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f6477.6
Applied rewrites77.6%
if -4.1999999999999998e113 < A Initial program 61.3%
lift-*.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
Applied rewrites82.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0
(*
180.0
(/
(atan
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))
PI))))
(if (<= t_0 -1e-21)
(* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) B))) PI))
(if (<= t_0 0.0)
(/ (* 180.0 (atan (* (/ B A) 0.5))) PI)
(/ (* 180.0 (atan (+ 1.0 (/ (- C A) B)))) PI)))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
double tmp;
if (t_0 <= -1e-21) {
tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - B))) / ((double) M_PI));
} else if (t_0 <= 0.0) {
tmp = (180.0 * atan(((B / A) * 0.5))) / ((double) M_PI);
} 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 t_0 = 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
double tmp;
if (t_0 <= -1e-21) {
tmp = 180.0 * (Math.atan(((1.0 / B) * ((C - A) - B))) / Math.PI);
} else if (t_0 <= 0.0) {
tmp = (180.0 * Math.atan(((B / A) * 0.5))) / Math.PI;
} else {
tmp = (180.0 * Math.atan((1.0 + ((C - A) / B)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi) tmp = 0 if t_0 <= -1e-21: tmp = 180.0 * (math.atan(((1.0 / B) * ((C - A) - B))) / math.pi) elif t_0 <= 0.0: tmp = (180.0 * math.atan(((B / A) * 0.5))) / math.pi else: tmp = (180.0 * math.atan((1.0 + ((C - A) / B)))) / math.pi return tmp
function code(A, B, C) t_0 = 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)) tmp = 0.0 if (t_0 <= -1e-21) tmp = Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - B))) / pi)); elseif (t_0 <= 0.0) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B / A) * 0.5))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(1.0 + Float64(Float64(C - A) / B)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); tmp = 0.0; if (t_0 <= -1e-21) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - B))) / pi); elseif (t_0 <= 0.0) tmp = (180.0 * atan(((B / A) * 0.5))) / pi; else tmp = (180.0 * atan((1.0 + ((C - A) / B)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = 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]}, If[LessEqual[t$95$0, -1e-21], N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(N[(180.0 * N[ArcTan[N[(N[(B / A), $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 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}\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{-21}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - B\right)\right)}{\pi}\\
\mathbf{elif}\;t\_0 \leq 0:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if (*.f64 #s(literal 180 binary64) (/.f64 (atan.f64 (*.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))))))) (PI.f64))) < -9.99999999999999908e-22Initial program 60.6%
Taylor expanded in B around inf
Applied rewrites76.6%
if -9.99999999999999908e-22 < (*.f64 #s(literal 180 binary64) (/.f64 (atan.f64 (*.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))))))) (PI.f64))) < 0.0Initial program 18.9%
lift-*.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
Applied rewrites20.1%
Taylor expanded in A around -inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f6453.7
Applied rewrites53.7%
if 0.0 < (*.f64 #s(literal 180 binary64) (/.f64 (atan.f64 (*.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))))))) (PI.f64))) Initial program 57.5%
lift-*.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
Applied rewrites86.4%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f6474.9
Applied rewrites74.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0
(*
180.0
(/
(atan
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))
PI))))
(if (<= t_0 -1e-21)
(/ (* 180.0 (atan (- (/ C B) 1.0))) PI)
(if (<= t_0 0.0)
(* 180.0 (/ (atan (* (/ B C) -0.5)) PI))
(/ (* 180.0 (atan (+ 1.0 (/ C B)))) PI)))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
double tmp;
if (t_0 <= -1e-21) {
tmp = (180.0 * atan(((C / B) - 1.0))) / ((double) M_PI);
} else if (t_0 <= 0.0) {
tmp = 180.0 * (atan(((B / C) * -0.5)) / ((double) M_PI));
} else {
tmp = (180.0 * atan((1.0 + (C / B)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
double tmp;
if (t_0 <= -1e-21) {
tmp = (180.0 * Math.atan(((C / B) - 1.0))) / Math.PI;
} else if (t_0 <= 0.0) {
tmp = 180.0 * (Math.atan(((B / C) * -0.5)) / Math.PI);
} else {
tmp = (180.0 * Math.atan((1.0 + (C / B)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi) tmp = 0 if t_0 <= -1e-21: tmp = (180.0 * math.atan(((C / B) - 1.0))) / math.pi elif t_0 <= 0.0: tmp = 180.0 * (math.atan(((B / C) * -0.5)) / math.pi) else: tmp = (180.0 * math.atan((1.0 + (C / B)))) / math.pi return tmp
function code(A, B, C) t_0 = 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)) tmp = 0.0 if (t_0 <= -1e-21) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C / B) - 1.0))) / pi); elseif (t_0 <= 0.0) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B / C) * -0.5)) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(1.0 + Float64(C / B)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); tmp = 0.0; if (t_0 <= -1e-21) tmp = (180.0 * atan(((C / B) - 1.0))) / pi; elseif (t_0 <= 0.0) tmp = 180.0 * (atan(((B / C) * -0.5)) / pi); else tmp = (180.0 * atan((1.0 + (C / B)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = 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]}, If[LessEqual[t$95$0, -1e-21], N[(N[(180.0 * N[ArcTan[N[(N[(C / B), $MachinePrecision] - 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(180.0 * N[(N[ArcTan[N[(N[(B / C), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 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}\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{-21}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B} - 1\right)}{\pi}\\
\mathbf{elif}\;t\_0 \leq 0:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{C} \cdot -0.5\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\end{array}
\end{array}
if (*.f64 #s(literal 180 binary64) (/.f64 (atan.f64 (*.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))))))) (PI.f64))) < -9.99999999999999908e-22Initial program 60.6%
lift-*.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
Applied rewrites87.1%
Taylor expanded in A around 0
lower-/.f64N/A
lower--.f64N/A
pow2N/A
unpow2N/A
lower-hypot.f6470.9
Applied rewrites70.9%
Taylor expanded in B around inf
lower--.f64N/A
lower-/.f6463.6
Applied rewrites63.6%
if -9.99999999999999908e-22 < (*.f64 #s(literal 180 binary64) (/.f64 (atan.f64 (*.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))))))) (PI.f64))) < 0.0Initial program 18.9%
Taylor expanded in C around inf
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
lower-*.f6448.8
Applied rewrites48.8%
Taylor expanded in A around 0
*-commutativeN/A
lower-*.f64N/A
lift-/.f6448.8
Applied rewrites48.8%
if 0.0 < (*.f64 #s(literal 180 binary64) (/.f64 (atan.f64 (*.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))))))) (PI.f64))) Initial program 57.5%
lift-*.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
Applied rewrites86.4%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f6474.9
Applied rewrites74.9%
Taylor expanded in A around 0
Applied rewrites62.5%
(FPCore (A B C)
:precision binary64
(if (<= A -1.85e+99)
(/ (* 180.0 (atan (* (/ B A) 0.5))) PI)
(if (<= A 7.8e-10)
(* 180.0 (/ (atan (/ (- C (hypot C B)) B)) PI))
(/ (* 180.0 (atan (- (/ (+ (hypot B A) A) B)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.85e+99) {
tmp = (180.0 * atan(((B / A) * 0.5))) / ((double) M_PI);
} else if (A <= 7.8e-10) {
tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / ((double) M_PI));
} else {
tmp = (180.0 * atan(-((hypot(B, A) + A) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.85e+99) {
tmp = (180.0 * Math.atan(((B / A) * 0.5))) / Math.PI;
} else if (A <= 7.8e-10) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(C, B)) / B)) / Math.PI);
} else {
tmp = (180.0 * Math.atan(-((Math.hypot(B, A) + A) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.85e+99: tmp = (180.0 * math.atan(((B / A) * 0.5))) / math.pi elif A <= 7.8e-10: tmp = 180.0 * (math.atan(((C - math.hypot(C, B)) / B)) / math.pi) else: tmp = (180.0 * math.atan(-((math.hypot(B, A) + A) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.85e+99) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B / A) * 0.5))) / pi); elseif (A <= 7.8e-10) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(C, B)) / B)) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(-Float64(Float64(hypot(B, A) + A) / B)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.85e+99) tmp = (180.0 * atan(((B / A) * 0.5))) / pi; elseif (A <= 7.8e-10) tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / pi); else tmp = (180.0 * atan(-((hypot(B, A) + A) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.85e+99], N[(N[(180.0 * N[ArcTan[N[(N[(B / A), $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 7.8e-10], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[(-N[(N[(N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision] + A), $MachinePrecision] / B), $MachinePrecision])], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.85 \cdot 10^{+99}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi}\\
\mathbf{elif}\;A \leq 7.8 \cdot 10^{-10}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-\frac{\mathsf{hypot}\left(B, A\right) + A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.85000000000000005e99Initial program 16.4%
lift-*.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
Applied rewrites53.9%
Taylor expanded in A around -inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f6476.1
Applied rewrites76.1%
if -1.85000000000000005e99 < A < 7.7999999999999999e-10Initial program 54.8%
Taylor expanded in A around 0
lower-/.f64N/A
lower--.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f6474.9
Applied rewrites74.9%
if 7.7999999999999999e-10 < A Initial program 76.7%
lift-*.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
Applied rewrites94.3%
Taylor expanded in C around 0
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
pow2N/A
unpow2N/A
lower-hypot.f6488.3
Applied rewrites88.3%
(FPCore (A B C)
:precision binary64
(if (<= A -1.85e+99)
(/ (* 180.0 (atan (* (/ B A) 0.5))) PI)
(if (<= A 8.5e+61)
(* 180.0 (/ (atan (/ (- C (hypot C B)) B)) PI))
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.85e+99) {
tmp = (180.0 * atan(((B / A) * 0.5))) / ((double) M_PI);
} else if (A <= 8.5e+61) {
tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / ((double) M_PI));
} 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 <= -1.85e+99) {
tmp = (180.0 * Math.atan(((B / A) * 0.5))) / Math.PI;
} else if (A <= 8.5e+61) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(C, B)) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.85e+99: tmp = (180.0 * math.atan(((B / A) * 0.5))) / math.pi elif A <= 8.5e+61: tmp = 180.0 * (math.atan(((C - math.hypot(C, B)) / B)) / math.pi) 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 <= -1.85e+99) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B / A) * 0.5))) / pi); elseif (A <= 8.5e+61) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(C, B)) / B)) / pi)); 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 <= -1.85e+99) tmp = (180.0 * atan(((B / A) * 0.5))) / pi; elseif (A <= 8.5e+61) tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / pi); else tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.85e+99], N[(N[(180.0 * N[ArcTan[N[(N[(B / A), $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 8.5e+61], 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[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.85 \cdot 10^{+99}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi}\\
\mathbf{elif}\;A \leq 8.5 \cdot 10^{+61}:\\
\;\;\;\;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(1 + \frac{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.85000000000000005e99Initial program 16.4%
lift-*.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
Applied rewrites53.9%
Taylor expanded in A around -inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f6476.1
Applied rewrites76.1%
if -1.85000000000000005e99 < A < 8.50000000000000035e61Initial program 55.8%
Taylor expanded in A around 0
lower-/.f64N/A
lower--.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f6474.6
Applied rewrites74.6%
if 8.50000000000000035e61 < A Initial program 79.9%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f6482.9
Applied rewrites82.9%
(FPCore (A B C)
:precision binary64
(if (<= A -1.9e-32)
(* 180.0 (/ (atan (* (/ B A) 0.5)) PI))
(if (<= A -7e-54)
(* 180.0 (/ (atan (* (/ B C) -0.5)) PI))
(if (<= A -9e-261)
(/ (* 180.0 (atan (+ 1.0 (/ C B)))) PI)
(if (<= A 8.5e+61)
(/ (* 180.0 (atan (- (/ C B) 1.0))) PI)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.9e-32) {
tmp = 180.0 * (atan(((B / A) * 0.5)) / ((double) M_PI));
} else if (A <= -7e-54) {
tmp = 180.0 * (atan(((B / C) * -0.5)) / ((double) M_PI));
} else if (A <= -9e-261) {
tmp = (180.0 * atan((1.0 + (C / B)))) / ((double) M_PI);
} else if (A <= 8.5e+61) {
tmp = (180.0 * atan(((C / B) - 1.0))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.9e-32) {
tmp = 180.0 * (Math.atan(((B / A) * 0.5)) / Math.PI);
} else if (A <= -7e-54) {
tmp = 180.0 * (Math.atan(((B / C) * -0.5)) / Math.PI);
} else if (A <= -9e-261) {
tmp = (180.0 * Math.atan((1.0 + (C / B)))) / Math.PI;
} else if (A <= 8.5e+61) {
tmp = (180.0 * Math.atan(((C / B) - 1.0))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.9e-32: tmp = 180.0 * (math.atan(((B / A) * 0.5)) / math.pi) elif A <= -7e-54: tmp = 180.0 * (math.atan(((B / C) * -0.5)) / math.pi) elif A <= -9e-261: tmp = (180.0 * math.atan((1.0 + (C / B)))) / math.pi elif A <= 8.5e+61: tmp = (180.0 * math.atan(((C / B) - 1.0))) / math.pi else: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.9e-32) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B / A) * 0.5)) / pi)); elseif (A <= -7e-54) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B / C) * -0.5)) / pi)); elseif (A <= -9e-261) tmp = Float64(Float64(180.0 * atan(Float64(1.0 + Float64(C / B)))) / pi); elseif (A <= 8.5e+61) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C / B) - 1.0))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.9e-32) tmp = 180.0 * (atan(((B / A) * 0.5)) / pi); elseif (A <= -7e-54) tmp = 180.0 * (atan(((B / C) * -0.5)) / pi); elseif (A <= -9e-261) tmp = (180.0 * atan((1.0 + (C / B)))) / pi; elseif (A <= 8.5e+61) tmp = (180.0 * atan(((C / B) - 1.0))) / pi; else tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.9e-32], N[(180.0 * N[(N[ArcTan[N[(N[(B / A), $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -7e-54], N[(180.0 * N[(N[ArcTan[N[(N[(B / C), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -9e-261], N[(N[(180.0 * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 8.5e+61], N[(N[(180.0 * N[ArcTan[N[(N[(C / B), $MachinePrecision] - 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.9 \cdot 10^{-32}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi}\\
\mathbf{elif}\;A \leq -7 \cdot 10^{-54}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{C} \cdot -0.5\right)}{\pi}\\
\mathbf{elif}\;A \leq -9 \cdot 10^{-261}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 8.5 \cdot 10^{+61}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B} - 1\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.90000000000000004e-32Initial program 26.0%
Taylor expanded in A around -inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f6465.0
Applied rewrites65.0%
if -1.90000000000000004e-32 < A < -6.99999999999999964e-54Initial program 45.2%
Taylor expanded in C around inf
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
lower-*.f6421.8
Applied rewrites21.8%
Taylor expanded in A around 0
*-commutativeN/A
lower-*.f64N/A
lift-/.f6421.8
Applied rewrites21.8%
if -6.99999999999999964e-54 < A < -9.0000000000000002e-261Initial program 54.8%
lift-*.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
Applied rewrites77.2%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f6447.8
Applied rewrites47.8%
Taylor expanded in A around 0
Applied rewrites47.8%
if -9.0000000000000002e-261 < A < 8.50000000000000035e61Initial program 60.8%
lift-*.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
Applied rewrites85.3%
Taylor expanded in A around 0
lower-/.f64N/A
lower--.f64N/A
pow2N/A
unpow2N/A
lower-hypot.f6478.2
Applied rewrites78.2%
Taylor expanded in B around inf
lower--.f64N/A
lower-/.f6448.4
Applied rewrites48.4%
if 8.50000000000000035e61 < A Initial program 79.9%
Taylor expanded in A around inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f6475.5
Applied rewrites75.5%
(FPCore (A B C)
:precision binary64
(if (<= B -2.6e-37)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -2.9e-208)
(/ (* 180.0 (atan (/ C B))) PI)
(if (<= B 1.05e-268)
(/ (* (atan 0.0) 180.0) PI)
(if (<= B 1.05e-110)
(/ (* 180.0 (atan (/ (- A) B))) PI)
(/ (* 180.0 (atan (- (/ C B) 1.0))) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.6e-37) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -2.9e-208) {
tmp = (180.0 * atan((C / B))) / ((double) M_PI);
} else if (B <= 1.05e-268) {
tmp = (atan(0.0) * 180.0) / ((double) M_PI);
} else if (B <= 1.05e-110) {
tmp = (180.0 * atan((-A / B))) / ((double) M_PI);
} else {
tmp = (180.0 * atan(((C / B) - 1.0))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2.6e-37) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -2.9e-208) {
tmp = (180.0 * Math.atan((C / B))) / Math.PI;
} else if (B <= 1.05e-268) {
tmp = (Math.atan(0.0) * 180.0) / Math.PI;
} else if (B <= 1.05e-110) {
tmp = (180.0 * Math.atan((-A / B))) / Math.PI;
} else {
tmp = (180.0 * Math.atan(((C / B) - 1.0))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.6e-37: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -2.9e-208: tmp = (180.0 * math.atan((C / B))) / math.pi elif B <= 1.05e-268: tmp = (math.atan(0.0) * 180.0) / math.pi elif B <= 1.05e-110: tmp = (180.0 * math.atan((-A / B))) / math.pi else: tmp = (180.0 * math.atan(((C / B) - 1.0))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2.6e-37) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -2.9e-208) tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi); elseif (B <= 1.05e-268) tmp = Float64(Float64(atan(0.0) * 180.0) / pi); elseif (B <= 1.05e-110) tmp = Float64(Float64(180.0 * atan(Float64(Float64(-A) / B))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(C / B) - 1.0))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2.6e-37) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -2.9e-208) tmp = (180.0 * atan((C / B))) / pi; elseif (B <= 1.05e-268) tmp = (atan(0.0) * 180.0) / pi; elseif (B <= 1.05e-110) tmp = (180.0 * atan((-A / B))) / pi; else tmp = (180.0 * atan(((C / B) - 1.0))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.6e-37], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.9e-208], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 1.05e-268], N[(N[(N[ArcTan[0.0], $MachinePrecision] * 180.0), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 1.05e-110], N[(N[(180.0 * N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(C / B), $MachinePrecision] - 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2.6 \cdot 10^{-37}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -2.9 \cdot 10^{-208}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.05 \cdot 10^{-268}:\\
\;\;\;\;\frac{\tan^{-1} 0 \cdot 180}{\pi}\\
\mathbf{elif}\;B \leq 1.05 \cdot 10^{-110}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B} - 1\right)}{\pi}\\
\end{array}
\end{array}
if B < -2.5999999999999998e-37Initial program 48.6%
Taylor expanded in B around -inf
Applied rewrites59.5%
if -2.5999999999999998e-37 < B < -2.8999999999999999e-208Initial program 56.2%
lift-*.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
Applied rewrites73.5%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f6454.7
Applied rewrites54.7%
Taylor expanded in C around inf
lower-/.f6429.6
Applied rewrites29.6%
if -2.8999999999999999e-208 < B < 1.04999999999999999e-268Initial program 62.3%
lift-*.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
Applied rewrites84.2%
Taylor expanded in C around inf
distribute-rgt1-inN/A
metadata-evalN/A
lift-*.f64N/A
associate-*r/N/A
lift-*.f64N/A
mul0-lftN/A
metadata-evalN/A
mul0-lftN/A
lift-*.f64N/A
lift-/.f6435.4
lift-*.f64N/A
mul0-lft35.4
Applied rewrites35.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6435.4
lift-/.f64N/A
div035.4
Applied rewrites35.4%
if 1.04999999999999999e-268 < B < 1.05000000000000001e-110Initial program 57.1%
lift-*.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
Applied rewrites77.5%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f6448.1
Applied rewrites48.1%
Taylor expanded in A around inf
associate-*r/N/A
mul-1-negN/A
lower-/.f64N/A
lower-neg.f6434.8
Applied rewrites34.8%
if 1.05000000000000001e-110 < B Initial program 52.8%
lift-*.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
Applied rewrites77.5%
Taylor expanded in A around 0
lower-/.f64N/A
lower--.f64N/A
pow2N/A
unpow2N/A
lower-hypot.f6466.3
Applied rewrites66.3%
Taylor expanded in B around inf
lower--.f64N/A
lower-/.f6463.8
Applied rewrites63.8%
(FPCore (A B C)
:precision binary64
(if (<= B -2.6e-37)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -2.9e-208)
(/ (* 180.0 (atan (/ C B))) PI)
(if (<= B 1.05e-268)
(/ (* (atan 0.0) 180.0) PI)
(if (<= B 250000000000.0)
(/ (* 180.0 (atan (/ (- A) B))) PI)
(* 180.0 (/ (atan -1.0) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.6e-37) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -2.9e-208) {
tmp = (180.0 * atan((C / B))) / ((double) M_PI);
} else if (B <= 1.05e-268) {
tmp = (atan(0.0) * 180.0) / ((double) M_PI);
} else if (B <= 250000000000.0) {
tmp = (180.0 * atan((-A / B))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2.6e-37) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -2.9e-208) {
tmp = (180.0 * Math.atan((C / B))) / Math.PI;
} else if (B <= 1.05e-268) {
tmp = (Math.atan(0.0) * 180.0) / Math.PI;
} else if (B <= 250000000000.0) {
tmp = (180.0 * Math.atan((-A / B))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.6e-37: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -2.9e-208: tmp = (180.0 * math.atan((C / B))) / math.pi elif B <= 1.05e-268: tmp = (math.atan(0.0) * 180.0) / math.pi elif B <= 250000000000.0: tmp = (180.0 * math.atan((-A / B))) / math.pi else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2.6e-37) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -2.9e-208) tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi); elseif (B <= 1.05e-268) tmp = Float64(Float64(atan(0.0) * 180.0) / pi); elseif (B <= 250000000000.0) tmp = Float64(Float64(180.0 * atan(Float64(Float64(-A) / B))) / pi); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2.6e-37) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -2.9e-208) tmp = (180.0 * atan((C / B))) / pi; elseif (B <= 1.05e-268) tmp = (atan(0.0) * 180.0) / pi; elseif (B <= 250000000000.0) tmp = (180.0 * atan((-A / B))) / pi; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.6e-37], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.9e-208], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 1.05e-268], N[(N[(N[ArcTan[0.0], $MachinePrecision] * 180.0), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 250000000000.0], N[(N[(180.0 * N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2.6 \cdot 10^{-37}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -2.9 \cdot 10^{-208}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.05 \cdot 10^{-268}:\\
\;\;\;\;\frac{\tan^{-1} 0 \cdot 180}{\pi}\\
\mathbf{elif}\;B \leq 250000000000:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.5999999999999998e-37Initial program 48.6%
Taylor expanded in B around -inf
Applied rewrites59.5%
if -2.5999999999999998e-37 < B < -2.8999999999999999e-208Initial program 56.2%
lift-*.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
Applied rewrites73.5%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f6454.7
Applied rewrites54.7%
Taylor expanded in C around inf
lower-/.f6429.6
Applied rewrites29.6%
if -2.8999999999999999e-208 < B < 1.04999999999999999e-268Initial program 62.3%
lift-*.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
Applied rewrites84.2%
Taylor expanded in C around inf
distribute-rgt1-inN/A
metadata-evalN/A
lift-*.f64N/A
associate-*r/N/A
lift-*.f64N/A
mul0-lftN/A
metadata-evalN/A
mul0-lftN/A
lift-*.f64N/A
lift-/.f6435.4
lift-*.f64N/A
mul0-lft35.4
Applied rewrites35.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6435.4
lift-/.f64N/A
div035.4
Applied rewrites35.4%
if 1.04999999999999999e-268 < B < 2.5e11Initial program 59.5%
lift-*.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
Applied rewrites74.2%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f6445.4
Applied rewrites45.4%
Taylor expanded in A around inf
associate-*r/N/A
mul-1-negN/A
lower-/.f64N/A
lower-neg.f6430.7
Applied rewrites30.7%
if 2.5e11 < B Initial program 48.7%
Taylor expanded in B around inf
Applied rewrites62.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* 180.0 (atan (/ C B))) PI)))
(if (<= B -2.6e-37)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -2.9e-208)
t_0
(if (<= B 3.3e-265)
(/ (* (atan 0.0) 180.0) PI)
(if (<= B 7.8e-19) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 * atan((C / B))) / ((double) M_PI);
double tmp;
if (B <= -2.6e-37) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -2.9e-208) {
tmp = t_0;
} else if (B <= 3.3e-265) {
tmp = (atan(0.0) * 180.0) / ((double) M_PI);
} else if (B <= 7.8e-19) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 * Math.atan((C / B))) / Math.PI;
double tmp;
if (B <= -2.6e-37) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -2.9e-208) {
tmp = t_0;
} else if (B <= 3.3e-265) {
tmp = (Math.atan(0.0) * 180.0) / Math.PI;
} else if (B <= 7.8e-19) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 * math.atan((C / B))) / math.pi tmp = 0 if B <= -2.6e-37: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -2.9e-208: tmp = t_0 elif B <= 3.3e-265: tmp = (math.atan(0.0) * 180.0) / math.pi elif B <= 7.8e-19: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 * atan(Float64(C / B))) / pi) tmp = 0.0 if (B <= -2.6e-37) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -2.9e-208) tmp = t_0; elseif (B <= 3.3e-265) tmp = Float64(Float64(atan(0.0) * 180.0) / pi); elseif (B <= 7.8e-19) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 * atan((C / B))) / pi; tmp = 0.0; if (B <= -2.6e-37) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -2.9e-208) tmp = t_0; elseif (B <= 3.3e-265) tmp = (atan(0.0) * 180.0) / pi; elseif (B <= 7.8e-19) tmp = t_0; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[B, -2.6e-37], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.9e-208], t$95$0, If[LessEqual[B, 3.3e-265], N[(N[(N[ArcTan[0.0], $MachinePrecision] * 180.0), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 7.8e-19], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -2.6 \cdot 10^{-37}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -2.9 \cdot 10^{-208}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 3.3 \cdot 10^{-265}:\\
\;\;\;\;\frac{\tan^{-1} 0 \cdot 180}{\pi}\\
\mathbf{elif}\;B \leq 7.8 \cdot 10^{-19}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.5999999999999998e-37Initial program 48.6%
Taylor expanded in B around -inf
Applied rewrites59.5%
if -2.5999999999999998e-37 < B < -2.8999999999999999e-208 or 3.30000000000000002e-265 < B < 7.7999999999999999e-19Initial program 57.9%
lift-*.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
Applied rewrites74.6%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f6449.7
Applied rewrites49.7%
Taylor expanded in C around inf
lower-/.f6430.6
Applied rewrites30.6%
if -2.8999999999999999e-208 < B < 3.30000000000000002e-265Initial program 62.4%
lift-*.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
Applied rewrites84.2%
Taylor expanded in C around inf
distribute-rgt1-inN/A
metadata-evalN/A
lift-*.f64N/A
associate-*r/N/A
lift-*.f64N/A
mul0-lftN/A
metadata-evalN/A
mul0-lftN/A
lift-*.f64N/A
lift-/.f6435.1
lift-*.f64N/A
mul0-lft35.1
Applied rewrites35.1%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6435.1
lift-/.f64N/A
div035.1
Applied rewrites35.1%
if 7.7999999999999999e-19 < B Initial program 49.9%
Taylor expanded in B around inf
Applied rewrites59.5%
(FPCore (A B C)
:precision binary64
(if (<= A -1.9e-32)
(/ (* 180.0 (atan (* (/ B A) 0.5))) PI)
(if (<= A -7e-54)
(* 180.0 (/ (atan (* (/ B C) -0.5)) PI))
(if (<= A 5.8e-178)
(/ (* 180.0 (atan (+ 1.0 (/ C B)))) PI)
(/ (* 180.0 (atan (- (/ (+ B A) B)))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.9e-32) {
tmp = (180.0 * atan(((B / A) * 0.5))) / ((double) M_PI);
} else if (A <= -7e-54) {
tmp = 180.0 * (atan(((B / C) * -0.5)) / ((double) M_PI));
} else if (A <= 5.8e-178) {
tmp = (180.0 * atan((1.0 + (C / B)))) / ((double) M_PI);
} else {
tmp = (180.0 * atan(-((B + A) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.9e-32) {
tmp = (180.0 * Math.atan(((B / A) * 0.5))) / Math.PI;
} else if (A <= -7e-54) {
tmp = 180.0 * (Math.atan(((B / C) * -0.5)) / Math.PI);
} else if (A <= 5.8e-178) {
tmp = (180.0 * Math.atan((1.0 + (C / B)))) / Math.PI;
} else {
tmp = (180.0 * Math.atan(-((B + A) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.9e-32: tmp = (180.0 * math.atan(((B / A) * 0.5))) / math.pi elif A <= -7e-54: tmp = 180.0 * (math.atan(((B / C) * -0.5)) / math.pi) elif A <= 5.8e-178: tmp = (180.0 * math.atan((1.0 + (C / B)))) / math.pi else: tmp = (180.0 * math.atan(-((B + A) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.9e-32) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B / A) * 0.5))) / pi); elseif (A <= -7e-54) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B / C) * -0.5)) / pi)); elseif (A <= 5.8e-178) tmp = Float64(Float64(180.0 * atan(Float64(1.0 + Float64(C / B)))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(-Float64(Float64(B + A) / B)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.9e-32) tmp = (180.0 * atan(((B / A) * 0.5))) / pi; elseif (A <= -7e-54) tmp = 180.0 * (atan(((B / C) * -0.5)) / pi); elseif (A <= 5.8e-178) tmp = (180.0 * atan((1.0 + (C / B)))) / pi; else tmp = (180.0 * atan(-((B + A) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.9e-32], N[(N[(180.0 * N[ArcTan[N[(N[(B / A), $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, -7e-54], N[(180.0 * N[(N[ArcTan[N[(N[(B / C), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 5.8e-178], N[(N[(180.0 * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[(-N[(N[(B + A), $MachinePrecision] / B), $MachinePrecision])], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.9 \cdot 10^{-32}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi}\\
\mathbf{elif}\;A \leq -7 \cdot 10^{-54}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{C} \cdot -0.5\right)}{\pi}\\
\mathbf{elif}\;A \leq 5.8 \cdot 10^{-178}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-\frac{B + A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.90000000000000004e-32Initial program 26.0%
lift-*.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
Applied rewrites57.1%
Taylor expanded in A around -inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f6465.1
Applied rewrites65.1%
if -1.90000000000000004e-32 < A < -6.99999999999999964e-54Initial program 45.2%
Taylor expanded in C around inf
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
lower-*.f6421.8
Applied rewrites21.8%
Taylor expanded in A around 0
*-commutativeN/A
lower-*.f64N/A
lift-/.f6421.8
Applied rewrites21.8%
if -6.99999999999999964e-54 < A < 5.7999999999999995e-178Initial program 56.0%
lift-*.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
Applied rewrites80.1%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f6449.1
Applied rewrites49.1%
Taylor expanded in A around 0
Applied rewrites48.8%
if 5.7999999999999995e-178 < A Initial program 71.7%
lift-*.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
Applied rewrites91.2%
Taylor expanded in C around 0
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
pow2N/A
unpow2N/A
lower-hypot.f6482.3
Applied rewrites82.3%
Taylor expanded in A around 0
Applied rewrites66.8%
(FPCore (A B C)
:precision binary64
(if (<= A -1.9e-32)
(* 180.0 (/ (atan (* (/ B A) 0.5)) PI))
(if (<= A -7e-54)
(* 180.0 (/ (atan (* (/ B C) -0.5)) PI))
(if (<= A 5.8e-178)
(/ (* 180.0 (atan (+ 1.0 (/ C B)))) PI)
(/ (* 180.0 (atan (- (/ (+ B A) B)))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.9e-32) {
tmp = 180.0 * (atan(((B / A) * 0.5)) / ((double) M_PI));
} else if (A <= -7e-54) {
tmp = 180.0 * (atan(((B / C) * -0.5)) / ((double) M_PI));
} else if (A <= 5.8e-178) {
tmp = (180.0 * atan((1.0 + (C / B)))) / ((double) M_PI);
} else {
tmp = (180.0 * atan(-((B + A) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.9e-32) {
tmp = 180.0 * (Math.atan(((B / A) * 0.5)) / Math.PI);
} else if (A <= -7e-54) {
tmp = 180.0 * (Math.atan(((B / C) * -0.5)) / Math.PI);
} else if (A <= 5.8e-178) {
tmp = (180.0 * Math.atan((1.0 + (C / B)))) / Math.PI;
} else {
tmp = (180.0 * Math.atan(-((B + A) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.9e-32: tmp = 180.0 * (math.atan(((B / A) * 0.5)) / math.pi) elif A <= -7e-54: tmp = 180.0 * (math.atan(((B / C) * -0.5)) / math.pi) elif A <= 5.8e-178: tmp = (180.0 * math.atan((1.0 + (C / B)))) / math.pi else: tmp = (180.0 * math.atan(-((B + A) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.9e-32) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B / A) * 0.5)) / pi)); elseif (A <= -7e-54) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B / C) * -0.5)) / pi)); elseif (A <= 5.8e-178) tmp = Float64(Float64(180.0 * atan(Float64(1.0 + Float64(C / B)))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(-Float64(Float64(B + A) / B)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.9e-32) tmp = 180.0 * (atan(((B / A) * 0.5)) / pi); elseif (A <= -7e-54) tmp = 180.0 * (atan(((B / C) * -0.5)) / pi); elseif (A <= 5.8e-178) tmp = (180.0 * atan((1.0 + (C / B)))) / pi; else tmp = (180.0 * atan(-((B + A) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.9e-32], N[(180.0 * N[(N[ArcTan[N[(N[(B / A), $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -7e-54], N[(180.0 * N[(N[ArcTan[N[(N[(B / C), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 5.8e-178], N[(N[(180.0 * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[(-N[(N[(B + A), $MachinePrecision] / B), $MachinePrecision])], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.9 \cdot 10^{-32}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi}\\
\mathbf{elif}\;A \leq -7 \cdot 10^{-54}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{C} \cdot -0.5\right)}{\pi}\\
\mathbf{elif}\;A \leq 5.8 \cdot 10^{-178}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-\frac{B + A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.90000000000000004e-32Initial program 26.0%
Taylor expanded in A around -inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f6465.0
Applied rewrites65.0%
if -1.90000000000000004e-32 < A < -6.99999999999999964e-54Initial program 45.2%
Taylor expanded in C around inf
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
lower-*.f6421.8
Applied rewrites21.8%
Taylor expanded in A around 0
*-commutativeN/A
lower-*.f64N/A
lift-/.f6421.8
Applied rewrites21.8%
if -6.99999999999999964e-54 < A < 5.7999999999999995e-178Initial program 56.0%
lift-*.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
Applied rewrites80.1%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f6449.1
Applied rewrites49.1%
Taylor expanded in A around 0
Applied rewrites48.8%
if 5.7999999999999995e-178 < A Initial program 71.7%
lift-*.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
Applied rewrites91.2%
Taylor expanded in C around 0
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
pow2N/A
unpow2N/A
lower-hypot.f6482.3
Applied rewrites82.3%
Taylor expanded in A around 0
Applied rewrites66.8%
(FPCore (A B C)
:precision binary64
(if (<= B -2.25e-220)
(/ (* 180.0 (atan (+ 1.0 (/ C B)))) PI)
(if (<= B 1.05e-268)
(/ (* (atan 0.0) 180.0) PI)
(if (<= B 1.05e-110)
(/ (* 180.0 (atan (/ (- A) B))) PI)
(/ (* 180.0 (atan (- (/ C B) 1.0))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.25e-220) {
tmp = (180.0 * atan((1.0 + (C / B)))) / ((double) M_PI);
} else if (B <= 1.05e-268) {
tmp = (atan(0.0) * 180.0) / ((double) M_PI);
} else if (B <= 1.05e-110) {
tmp = (180.0 * atan((-A / B))) / ((double) M_PI);
} else {
tmp = (180.0 * atan(((C / B) - 1.0))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2.25e-220) {
tmp = (180.0 * Math.atan((1.0 + (C / B)))) / Math.PI;
} else if (B <= 1.05e-268) {
tmp = (Math.atan(0.0) * 180.0) / Math.PI;
} else if (B <= 1.05e-110) {
tmp = (180.0 * Math.atan((-A / B))) / Math.PI;
} else {
tmp = (180.0 * Math.atan(((C / B) - 1.0))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.25e-220: tmp = (180.0 * math.atan((1.0 + (C / B)))) / math.pi elif B <= 1.05e-268: tmp = (math.atan(0.0) * 180.0) / math.pi elif B <= 1.05e-110: tmp = (180.0 * math.atan((-A / B))) / math.pi else: tmp = (180.0 * math.atan(((C / B) - 1.0))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2.25e-220) tmp = Float64(Float64(180.0 * atan(Float64(1.0 + Float64(C / B)))) / pi); elseif (B <= 1.05e-268) tmp = Float64(Float64(atan(0.0) * 180.0) / pi); elseif (B <= 1.05e-110) tmp = Float64(Float64(180.0 * atan(Float64(Float64(-A) / B))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(C / B) - 1.0))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2.25e-220) tmp = (180.0 * atan((1.0 + (C / B)))) / pi; elseif (B <= 1.05e-268) tmp = (atan(0.0) * 180.0) / pi; elseif (B <= 1.05e-110) tmp = (180.0 * atan((-A / B))) / pi; else tmp = (180.0 * atan(((C / B) - 1.0))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.25e-220], N[(N[(180.0 * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 1.05e-268], N[(N[(N[ArcTan[0.0], $MachinePrecision] * 180.0), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 1.05e-110], N[(N[(180.0 * N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(C / B), $MachinePrecision] - 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2.25 \cdot 10^{-220}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.05 \cdot 10^{-268}:\\
\;\;\;\;\frac{\tan^{-1} 0 \cdot 180}{\pi}\\
\mathbf{elif}\;B \leq 1.05 \cdot 10^{-110}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B} - 1\right)}{\pi}\\
\end{array}
\end{array}
if B < -2.24999999999999984e-220Initial program 51.2%
lift-*.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
Applied rewrites76.7%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f6468.4
Applied rewrites68.4%
Taylor expanded in A around 0
Applied rewrites58.0%
if -2.24999999999999984e-220 < B < 1.04999999999999999e-268Initial program 63.4%
lift-*.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
Applied rewrites84.8%
Taylor expanded in C around inf
distribute-rgt1-inN/A
metadata-evalN/A
lift-*.f64N/A
associate-*r/N/A
lift-*.f64N/A
mul0-lftN/A
metadata-evalN/A
mul0-lftN/A
lift-*.f64N/A
lift-/.f6435.8
lift-*.f64N/A
mul0-lft35.8
Applied rewrites35.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6435.8
lift-/.f64N/A
div035.8
Applied rewrites35.8%
if 1.04999999999999999e-268 < B < 1.05000000000000001e-110Initial program 57.1%
lift-*.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
Applied rewrites77.5%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f6448.1
Applied rewrites48.1%
Taylor expanded in A around inf
associate-*r/N/A
mul-1-negN/A
lower-/.f64N/A
lower-neg.f6434.8
Applied rewrites34.8%
if 1.05000000000000001e-110 < B Initial program 52.8%
lift-*.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
Applied rewrites77.5%
Taylor expanded in A around 0
lower-/.f64N/A
lower--.f64N/A
pow2N/A
unpow2N/A
lower-hypot.f6466.3
Applied rewrites66.3%
Taylor expanded in B around inf
lower--.f64N/A
lower-/.f6463.8
Applied rewrites63.8%
(FPCore (A B C)
:precision binary64
(if (<= B -3.3e-133)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 2.45e-186)
(/ (* (atan 0.0) 180.0) PI)
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3.3e-133) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 2.45e-186) {
tmp = (atan(0.0) * 180.0) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -3.3e-133) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 2.45e-186) {
tmp = (Math.atan(0.0) * 180.0) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -3.3e-133: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 2.45e-186: tmp = (math.atan(0.0) * 180.0) / math.pi else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -3.3e-133) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 2.45e-186) tmp = Float64(Float64(atan(0.0) * 180.0) / pi); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -3.3e-133) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 2.45e-186) tmp = (atan(0.0) * 180.0) / pi; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3.3e-133], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.45e-186], N[(N[(N[ArcTan[0.0], $MachinePrecision] * 180.0), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -3.3 \cdot 10^{-133}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 2.45 \cdot 10^{-186}:\\
\;\;\;\;\frac{\tan^{-1} 0 \cdot 180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -3.30000000000000009e-133Initial program 50.8%
Taylor expanded in B around -inf
Applied rewrites51.1%
if -3.30000000000000009e-133 < B < 2.4499999999999998e-186Initial program 58.8%
lift-*.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
Applied rewrites81.6%
Taylor expanded in C around inf
distribute-rgt1-inN/A
metadata-evalN/A
lift-*.f64N/A
associate-*r/N/A
lift-*.f64N/A
mul0-lftN/A
metadata-evalN/A
mul0-lftN/A
lift-*.f64N/A
lift-/.f6432.4
lift-*.f64N/A
mul0-lft32.4
Applied rewrites32.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6432.4
lift-/.f64N/A
div032.4
Applied rewrites32.4%
if 2.4499999999999998e-186 < B Initial program 53.3%
Taylor expanded in B around inf
Applied rewrites47.2%
(FPCore (A B C) :precision binary64 (if (<= B -1e-310) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1e-310) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1e-310) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1e-310: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1e-310) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1e-310) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1e-310], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1 \cdot 10^{-310}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -9.999999999999969e-311Initial program 52.6%
Taylor expanded in B around -inf
Applied rewrites40.5%
if -9.999999999999969e-311 < B Initial program 54.8%
Taylor expanded in B around inf
Applied rewrites40.2%
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan -1.0) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(-1.0) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(-1.0) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(-1.0) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(-1.0) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(-1.0) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} -1}{\pi}
\end{array}
Initial program 53.7%
Taylor expanded in B around inf
Applied rewrites20.9%
herbie shell --seed 2025089
(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)))