
(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 (- A C))) B))))
(if (<= t_0 -0.5)
(/ (* 180.0 t_1) PI)
(if (<= t_0 0.0)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(* 180.0 (/ t_1 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, (A - C))) / B));
double tmp;
if (t_0 <= -0.5) {
tmp = (180.0 * t_1) / ((double) M_PI);
} else if (t_0 <= 0.0) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else {
tmp = 180.0 * (t_1 / ((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, (A - C))) / B));
double tmp;
if (t_0 <= -0.5) {
tmp = (180.0 * t_1) / Math.PI;
} else if (t_0 <= 0.0) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else {
tmp = 180.0 * (t_1 / 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, (A - C))) / B)) tmp = 0 if t_0 <= -0.5: tmp = (180.0 * t_1) / math.pi elif t_0 <= 0.0: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) else: tmp = 180.0 * (t_1 / 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(A - C))) / B)) tmp = 0.0 if (t_0 <= -0.5) tmp = Float64(Float64(180.0 * t_1) / pi); elseif (t_0 <= 0.0) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); else tmp = Float64(180.0 * Float64(t_1 / 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, (A - C))) / B)); tmp = 0.0; if (t_0 <= -0.5) tmp = (180.0 * t_1) / pi; elseif (t_0 <= 0.0) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); else tmp = 180.0 * (t_1 / 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[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$0, -0.5], N[(N[(180.0 * t$95$1), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(t$95$1 / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
t_1 := \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)\\
\mathbf{if}\;t\_0 \leq -0.5:\\
\;\;\;\;\frac{180 \cdot t\_1}{\pi}\\
\mathbf{elif}\;t\_0 \leq 0:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{t\_1}{\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)))))) < -0.5Initial program 67.6%
associate-*r/67.6%
Applied egg-rr93.8%
if -0.5 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < 0.0Initial program 15.0%
Taylor expanded in A around -inf 59.9%
associate-*r/59.9%
Simplified59.9%
if 0.0 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) Initial program 62.8%
associate-*l/62.8%
*-lft-identity62.8%
+-commutative62.8%
unpow262.8%
unpow262.8%
hypot-define90.4%
Simplified90.4%
Final simplification88.1%
(FPCore (A B C)
:precision binary64
(if (<= C -1.05e+48)
(* 180.0 (/ (atan (/ (- C (hypot C B)) B)) PI))
(if (<= C 1.4e+59)
(/ (* 180.0 (atan (/ (+ A (hypot A B)) (- B)))) PI)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.05e+48) {
tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / ((double) M_PI));
} else if (C <= 1.4e+59) {
tmp = (180.0 * atan(((A + hypot(A, B)) / -B))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.05e+48) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(C, B)) / B)) / Math.PI);
} else if (C <= 1.4e+59) {
tmp = (180.0 * Math.atan(((A + Math.hypot(A, B)) / -B))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.05e+48: tmp = 180.0 * (math.atan(((C - math.hypot(C, B)) / B)) / math.pi) elif C <= 1.4e+59: tmp = (180.0 * math.atan(((A + math.hypot(A, B)) / -B))) / math.pi else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.05e+48) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(C, B)) / B)) / pi)); elseif (C <= 1.4e+59) tmp = Float64(Float64(180.0 * atan(Float64(Float64(A + hypot(A, B)) / Float64(-B)))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.05e+48) tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / pi); elseif (C <= 1.4e+59) tmp = (180.0 * atan(((A + hypot(A, B)) / -B))) / pi; else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.05e+48], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.4e+59], N[(N[(180.0 * N[ArcTan[N[(N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.05 \cdot 10^{+48}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.4 \cdot 10^{+59}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{-B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.0499999999999999e48Initial program 83.9%
Taylor expanded in A around 0 83.9%
+-commutative83.9%
unpow283.9%
unpow283.9%
hypot-define98.0%
Simplified98.0%
if -1.0499999999999999e48 < C < 1.3999999999999999e59Initial program 62.3%
associate-*r/62.3%
Applied egg-rr85.2%
Taylor expanded in C around 0 57.9%
mul-1-neg57.9%
distribute-neg-frac257.9%
unpow257.9%
unpow257.9%
hypot-define80.6%
Simplified80.6%
if 1.3999999999999999e59 < C Initial program 23.3%
Taylor expanded in A around 0 17.8%
+-commutative17.8%
unpow217.8%
unpow217.8%
hypot-define47.5%
Simplified47.5%
Taylor expanded in C around inf 74.5%
(FPCore (A B C)
:precision binary64
(if (<= C -8.5e+47)
(* 180.0 (/ (atan (/ (- C (hypot C B)) B)) PI))
(if (<= C 7.2e+56)
(* 180.0 (/ (atan (/ (+ A (hypot A B)) (- B))) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -8.5e+47) {
tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / ((double) M_PI));
} else if (C <= 7.2e+56) {
tmp = 180.0 * (atan(((A + hypot(A, B)) / -B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -8.5e+47) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(C, B)) / B)) / Math.PI);
} else if (C <= 7.2e+56) {
tmp = 180.0 * (Math.atan(((A + Math.hypot(A, B)) / -B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -8.5e+47: tmp = 180.0 * (math.atan(((C - math.hypot(C, B)) / B)) / math.pi) elif C <= 7.2e+56: tmp = 180.0 * (math.atan(((A + math.hypot(A, B)) / -B)) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -8.5e+47) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(C, B)) / B)) / pi)); elseif (C <= 7.2e+56) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + hypot(A, B)) / Float64(-B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -8.5e+47) tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / pi); elseif (C <= 7.2e+56) tmp = 180.0 * (atan(((A + hypot(A, B)) / -B)) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -8.5e+47], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 7.2e+56], N[(180.0 * N[(N[ArcTan[N[(N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -8.5 \cdot 10^{+47}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 7.2 \cdot 10^{+56}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{-B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -8.5000000000000008e47Initial program 83.9%
Taylor expanded in A around 0 83.9%
+-commutative83.9%
unpow283.9%
unpow283.9%
hypot-define98.0%
Simplified98.0%
if -8.5000000000000008e47 < C < 7.19999999999999996e56Initial program 62.3%
Taylor expanded in C around 0 57.9%
associate-*r/57.9%
mul-1-neg57.9%
unpow257.9%
unpow257.9%
hypot-define80.6%
Simplified80.6%
if 7.19999999999999996e56 < C Initial program 23.3%
Taylor expanded in A around 0 17.8%
+-commutative17.8%
unpow217.8%
unpow217.8%
hypot-define47.5%
Simplified47.5%
Taylor expanded in C around inf 74.5%
Final simplification82.6%
(FPCore (A B C)
:precision binary64
(if (<= A -4.5e+124)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 9.5e-55)
(* 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 <= -4.5e+124) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 9.5e-55) {
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 <= -4.5e+124) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 9.5e-55) {
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 <= -4.5e+124: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 9.5e-55: 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 <= -4.5e+124) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 9.5e-55) 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 <= -4.5e+124) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 9.5e-55) 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, -4.5e+124], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 9.5e-55], 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 -4.5 \cdot 10^{+124}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 9.5 \cdot 10^{-55}:\\
\;\;\;\;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 < -4.5000000000000004e124Initial program 11.3%
Taylor expanded in A around -inf 79.9%
associate-*r/79.9%
Simplified79.9%
if -4.5000000000000004e124 < A < 9.5000000000000006e-55Initial program 57.6%
Taylor expanded in A around 0 54.8%
+-commutative54.8%
unpow254.8%
unpow254.8%
hypot-define78.3%
Simplified78.3%
if 9.5000000000000006e-55 < A Initial program 75.8%
Taylor expanded in B around -inf 79.9%
associate--l+79.9%
div-sub82.2%
Simplified82.2%
Final simplification79.7%
(FPCore (A B C) :precision binary64 (if (<= C 4e+58) (* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI)) (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= 4e+58) {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 4e+58) {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 4e+58: tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 4e+58) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 4e+58) tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 4e+58], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 4 \cdot 10^{+58}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < 3.99999999999999978e58Initial program 67.0%
associate-*l/67.0%
*-lft-identity67.0%
+-commutative67.0%
unpow267.0%
unpow267.0%
hypot-define88.0%
Simplified88.0%
if 3.99999999999999978e58 < C Initial program 23.3%
Taylor expanded in A around 0 17.8%
+-commutative17.8%
unpow217.8%
unpow217.8%
hypot-define47.5%
Simplified47.5%
Taylor expanded in C around inf 74.5%
(FPCore (A B C) :precision binary64 (if (<= A -4e+124) (* 180.0 (/ (atan (/ (* B 0.5) A)) PI)) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4e+124) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4e+124) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4e+124: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) else: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4e+124) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4e+124) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); else tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4e+124], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4 \cdot 10^{+124}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.99999999999999979e124Initial program 11.3%
Taylor expanded in A around -inf 79.9%
associate-*r/79.9%
Simplified79.9%
if -3.99999999999999979e124 < A Initial program 64.4%
Simplified84.8%
Final simplification84.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* 180.0 (atan (+ 1.0 (/ C B)))) PI)))
(if (<= A -1260000.0)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A -1.2e-181)
t_0
(if (<= A 1.1e-189)
(* 180.0 (/ (atan (/ (- C B) B)) PI))
(if (<= A 380.0) t_0 (* 180.0 (/ (atan (/ (* A -2.0) B)) PI))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 * atan((1.0 + (C / B)))) / ((double) M_PI);
double tmp;
if (A <= -1260000.0) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= -1.2e-181) {
tmp = t_0;
} else if (A <= 1.1e-189) {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
} else if (A <= 380.0) {
tmp = t_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 t_0 = (180.0 * Math.atan((1.0 + (C / B)))) / Math.PI;
double tmp;
if (A <= -1260000.0) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= -1.2e-181) {
tmp = t_0;
} else if (A <= 1.1e-189) {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
} else if (A <= 380.0) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 * math.atan((1.0 + (C / B)))) / math.pi tmp = 0 if A <= -1260000.0: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= -1.2e-181: tmp = t_0 elif A <= 1.1e-189: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) elif A <= 380.0: tmp = t_0 else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 * atan(Float64(1.0 + Float64(C / B)))) / pi) tmp = 0.0 if (A <= -1260000.0) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= -1.2e-181) tmp = t_0; elseif (A <= 1.1e-189) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); elseif (A <= 380.0) tmp = t_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) t_0 = (180.0 * atan((1.0 + (C / B)))) / pi; tmp = 0.0; if (A <= -1260000.0) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= -1.2e-181) tmp = t_0; elseif (A <= 1.1e-189) tmp = 180.0 * (atan(((C - B) / B)) / pi); elseif (A <= 380.0) tmp = t_0; else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[A, -1260000.0], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.2e-181], t$95$0, If[LessEqual[A, 1.1e-189], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 380.0], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180 \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;A \leq -1260000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -1.2 \cdot 10^{-181}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;A \leq 1.1 \cdot 10^{-189}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 380:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.26e6Initial program 23.3%
Taylor expanded in A around -inf 63.2%
associate-*r/63.2%
Simplified63.2%
if -1.26e6 < A < -1.2000000000000001e-181 or 1.1000000000000001e-189 < A < 380Initial program 67.8%
associate-*r/67.8%
Applied egg-rr83.5%
Taylor expanded in B around -inf 72.0%
associate--l+72.0%
div-sub72.0%
Simplified72.0%
Taylor expanded in A around 0 62.6%
if -1.2000000000000001e-181 < A < 1.1000000000000001e-189Initial program 61.0%
Taylor expanded in A around 0 61.1%
+-commutative61.1%
unpow261.1%
unpow261.1%
hypot-define89.7%
Simplified89.7%
Taylor expanded in C around 0 60.5%
if 380 < A Initial program 77.6%
associate-*l/77.6%
*-lft-identity77.6%
+-commutative77.6%
unpow277.6%
unpow277.6%
hypot-define93.3%
Simplified93.3%
Taylor expanded in A around inf 71.3%
*-commutative71.3%
Simplified71.3%
Final simplification64.7%
(FPCore (A B C)
:precision binary64
(if (<= A -3950000.0)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A -2e-171)
(/ (* 180.0 (atan (+ 1.0 (/ C B)))) PI)
(if (<= A 1.3e-189)
(* 180.0 (/ (atan (/ (- C B) B)) PI))
(/ (* 180.0 (atan (- 1.0 (/ A B)))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3950000.0) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= -2e-171) {
tmp = (180.0 * atan((1.0 + (C / B)))) / ((double) M_PI);
} else if (A <= 1.3e-189) {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
} else {
tmp = (180.0 * atan((1.0 - (A / B)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3950000.0) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= -2e-171) {
tmp = (180.0 * Math.atan((1.0 + (C / B)))) / Math.PI;
} else if (A <= 1.3e-189) {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
} else {
tmp = (180.0 * Math.atan((1.0 - (A / B)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3950000.0: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= -2e-171: tmp = (180.0 * math.atan((1.0 + (C / B)))) / math.pi elif A <= 1.3e-189: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) else: tmp = (180.0 * math.atan((1.0 - (A / B)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3950000.0) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= -2e-171) tmp = Float64(Float64(180.0 * atan(Float64(1.0 + Float64(C / B)))) / pi); elseif (A <= 1.3e-189) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(1.0 - Float64(A / B)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3950000.0) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= -2e-171) tmp = (180.0 * atan((1.0 + (C / B)))) / pi; elseif (A <= 1.3e-189) tmp = 180.0 * (atan(((C - B) / B)) / pi); else tmp = (180.0 * atan((1.0 - (A / B)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3950000.0], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2e-171], N[(N[(180.0 * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 1.3e-189], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3950000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -2 \cdot 10^{-171}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.3 \cdot 10^{-189}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.95e6Initial program 23.3%
Taylor expanded in A around -inf 63.2%
associate-*r/63.2%
Simplified63.2%
if -3.95e6 < A < -2e-171Initial program 70.8%
associate-*r/70.8%
Applied egg-rr77.1%
Taylor expanded in B around -inf 70.9%
associate--l+70.9%
div-sub70.9%
Simplified70.9%
Taylor expanded in A around 0 71.2%
if -2e-171 < A < 1.2999999999999999e-189Initial program 61.0%
Taylor expanded in A around 0 61.1%
+-commutative61.1%
unpow261.1%
unpow261.1%
hypot-define89.7%
Simplified89.7%
Taylor expanded in C around 0 60.5%
if 1.2999999999999999e-189 < A Initial program 72.9%
associate-*r/72.9%
Applied egg-rr90.5%
Taylor expanded in B around -inf 76.6%
associate--l+76.6%
div-sub78.2%
Simplified78.2%
Taylor expanded in C around 0 72.5%
Final simplification67.8%
(FPCore (A B C)
:precision binary64
(if (<= A -2.6e-48)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A -2.4e-98)
(* 180.0 (/ (atan 1.0) PI))
(if (<= A 1.3e-58)
(* 180.0 (/ (atan (/ (- C B) B)) PI))
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.6e-48) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= -2.4e-98) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (A <= 1.3e-58) {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
} 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 <= -2.6e-48) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= -2.4e-98) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (A <= 1.3e-58) {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.6e-48: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= -2.4e-98: tmp = 180.0 * (math.atan(1.0) / math.pi) elif A <= 1.3e-58: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.6e-48) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= -2.4e-98) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (A <= 1.3e-58) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); 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 <= -2.6e-48) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= -2.4e-98) tmp = 180.0 * (atan(1.0) / pi); elseif (A <= 1.3e-58) tmp = 180.0 * (atan(((C - B) / B)) / pi); else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.6e-48], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2.4e-98], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.3e-58], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $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 -2.6 \cdot 10^{-48}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -2.4 \cdot 10^{-98}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;A \leq 1.3 \cdot 10^{-58}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.59999999999999987e-48Initial program 26.8%
Taylor expanded in A around -inf 59.9%
associate-*r/59.9%
Simplified59.9%
if -2.59999999999999987e-48 < A < -2.40000000000000005e-98Initial program 80.2%
Taylor expanded in B around -inf 73.1%
if -2.40000000000000005e-98 < A < 1.30000000000000003e-58Initial program 65.7%
Taylor expanded in A around 0 62.3%
+-commutative62.3%
unpow262.3%
unpow262.3%
hypot-define84.6%
Simplified84.6%
Taylor expanded in C around 0 52.0%
if 1.30000000000000003e-58 < A Initial program 74.3%
associate-*l/74.3%
*-lft-identity74.3%
+-commutative74.3%
unpow274.3%
unpow274.3%
hypot-define92.5%
Simplified92.5%
Taylor expanded in A around inf 66.4%
*-commutative66.4%
Simplified66.4%
Final simplification59.8%
(FPCore (A B C)
:precision binary64
(if (<= B -9.8e-82)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.06e-283)
(* 180.0 (/ (atan (/ (* C 2.0) B)) PI))
(if (<= B 6.5e-14)
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI))
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -9.8e-82) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.06e-283) {
tmp = 180.0 * (atan(((C * 2.0) / B)) / ((double) M_PI));
} else if (B <= 6.5e-14) {
tmp = 180.0 * (atan(((A * -2.0) / 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 <= -9.8e-82) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.06e-283) {
tmp = 180.0 * (Math.atan(((C * 2.0) / B)) / Math.PI);
} else if (B <= 6.5e-14) {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -9.8e-82: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.06e-283: tmp = 180.0 * (math.atan(((C * 2.0) / B)) / math.pi) elif B <= 6.5e-14: tmp = 180.0 * (math.atan(((A * -2.0) / 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 <= -9.8e-82) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.06e-283) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C * 2.0) / B)) / pi)); elseif (B <= 6.5e-14) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / 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 <= -9.8e-82) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.06e-283) tmp = 180.0 * (atan(((C * 2.0) / B)) / pi); elseif (B <= 6.5e-14) tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -9.8e-82], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.06e-283], N[(180.0 * N[(N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6.5e-14], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $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 -9.8 \cdot 10^{-82}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.06 \cdot 10^{-283}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C \cdot 2}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 6.5 \cdot 10^{-14}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -9.8000000000000006e-82Initial program 56.0%
Taylor expanded in B around -inf 60.7%
if -9.8000000000000006e-82 < B < 1.06e-283Initial program 68.1%
Taylor expanded in C around -inf 48.3%
associate-*r/48.3%
*-commutative48.3%
Simplified48.3%
if 1.06e-283 < B < 6.5000000000000001e-14Initial program 63.9%
associate-*l/63.9%
*-lft-identity63.9%
+-commutative63.9%
unpow263.9%
unpow263.9%
hypot-define80.9%
Simplified80.9%
Taylor expanded in A around inf 46.2%
*-commutative46.2%
Simplified46.2%
if 6.5000000000000001e-14 < B Initial program 51.1%
Taylor expanded in B around inf 57.7%
(FPCore (A B C)
:precision binary64
(if (<= B -1.55e-77)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.05e-282)
(/ (* 180.0 (atan (/ C B))) PI)
(if (<= B 6.5e-14)
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI))
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.55e-77) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.05e-282) {
tmp = (180.0 * atan((C / B))) / ((double) M_PI);
} else if (B <= 6.5e-14) {
tmp = 180.0 * (atan(((A * -2.0) / 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 <= -1.55e-77) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.05e-282) {
tmp = (180.0 * Math.atan((C / B))) / Math.PI;
} else if (B <= 6.5e-14) {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.55e-77: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.05e-282: tmp = (180.0 * math.atan((C / B))) / math.pi elif B <= 6.5e-14: tmp = 180.0 * (math.atan(((A * -2.0) / 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 <= -1.55e-77) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.05e-282) tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi); elseif (B <= 6.5e-14) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / 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 <= -1.55e-77) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.05e-282) tmp = (180.0 * atan((C / B))) / pi; elseif (B <= 6.5e-14) tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.55e-77], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.05e-282], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 6.5e-14], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $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.55 \cdot 10^{-77}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.05 \cdot 10^{-282}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 6.5 \cdot 10^{-14}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.55000000000000004e-77Initial program 56.0%
Taylor expanded in B around -inf 60.7%
if -1.55000000000000004e-77 < B < 1.05000000000000006e-282Initial program 68.1%
associate-*r/68.1%
Applied egg-rr86.8%
Taylor expanded in B around -inf 57.6%
associate--l+57.6%
div-sub59.7%
Simplified59.7%
Taylor expanded in C around inf 47.3%
if 1.05000000000000006e-282 < B < 6.5000000000000001e-14Initial program 63.9%
associate-*l/63.9%
*-lft-identity63.9%
+-commutative63.9%
unpow263.9%
unpow263.9%
hypot-define80.9%
Simplified80.9%
Taylor expanded in A around inf 46.2%
*-commutative46.2%
Simplified46.2%
if 6.5000000000000001e-14 < B Initial program 51.1%
Taylor expanded in B around inf 57.7%
(FPCore (A B C)
:precision binary64
(if (<= B -3.4e-81)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.05e-282)
(/ (* 180.0 (atan (/ C B))) PI)
(if (<= B 7.2e-14)
(/ (* 180.0 (atan (/ A (- B)))) PI)
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3.4e-81) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.05e-282) {
tmp = (180.0 * atan((C / B))) / ((double) M_PI);
} else if (B <= 7.2e-14) {
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 <= -3.4e-81) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.05e-282) {
tmp = (180.0 * Math.atan((C / B))) / Math.PI;
} else if (B <= 7.2e-14) {
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 <= -3.4e-81: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.05e-282: tmp = (180.0 * math.atan((C / B))) / math.pi elif B <= 7.2e-14: 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 <= -3.4e-81) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.05e-282) tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi); elseif (B <= 7.2e-14) tmp = Float64(Float64(180.0 * atan(Float64(A / Float64(-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 <= -3.4e-81) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.05e-282) tmp = (180.0 * atan((C / B))) / pi; elseif (B <= 7.2e-14) 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, -3.4e-81], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.05e-282], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 7.2e-14], 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 -3.4 \cdot 10^{-81}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.05 \cdot 10^{-282}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 7.2 \cdot 10^{-14}:\\
\;\;\;\;\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 < -3.3999999999999999e-81Initial program 56.0%
Taylor expanded in B around -inf 60.7%
if -3.3999999999999999e-81 < B < 1.05000000000000006e-282Initial program 68.1%
associate-*r/68.1%
Applied egg-rr86.8%
Taylor expanded in B around -inf 57.6%
associate--l+57.6%
div-sub59.7%
Simplified59.7%
Taylor expanded in C around inf 47.3%
if 1.05000000000000006e-282 < B < 7.1999999999999996e-14Initial program 63.9%
associate-*r/63.9%
Applied egg-rr80.8%
Taylor expanded in B around -inf 53.1%
associate--l+53.1%
div-sub56.3%
Simplified56.3%
Taylor expanded in A around inf 46.2%
associate-*r/46.2%
mul-1-neg46.2%
Simplified46.2%
if 7.1999999999999996e-14 < B Initial program 51.1%
Taylor expanded in B around inf 57.7%
Final simplification54.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -4e-163)
(/ 1.0 (/ (/ PI 180.0) (atan (+ 1.0 t_0))))
(/ (* 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 <= -4e-163) {
tmp = 1.0 / ((((double) M_PI) / 180.0) / atan((1.0 + t_0)));
} 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 <= -4e-163) {
tmp = 1.0 / ((Math.PI / 180.0) / Math.atan((1.0 + t_0)));
} 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 <= -4e-163: tmp = 1.0 / ((math.pi / 180.0) / math.atan((1.0 + t_0))) 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 <= -4e-163) tmp = Float64(1.0 / Float64(Float64(pi / 180.0) / atan(Float64(1.0 + t_0)))); else tmp = Float64(Float64(180.0 * atan(Float64(t_0 + -1.0))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= -4e-163) tmp = 1.0 / ((pi / 180.0) / atan((1.0 + t_0))); 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, -4e-163], N[(1.0 / N[(N[(Pi / 180.0), $MachinePrecision] / N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -4 \cdot 10^{-163}:\\
\;\;\;\;\frac{1}{\frac{\frac{\pi}{180}}{\tan^{-1} \left(1 + t\_0\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(t\_0 + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -3.99999999999999969e-163Initial program 57.9%
associate-*r/57.9%
Applied egg-rr80.9%
Taylor expanded in B around -inf 75.6%
associate--l+75.6%
div-sub75.6%
Simplified75.6%
clear-num75.6%
inv-pow75.6%
Applied egg-rr75.6%
unpow-175.6%
associate-/r*75.6%
Simplified75.6%
if -3.99999999999999969e-163 < B Initial program 59.7%
associate-*r/59.7%
Applied egg-rr83.9%
Taylor expanded in B around inf 67.5%
+-commutative67.5%
associate--r+67.5%
div-sub69.5%
Simplified69.5%
Final simplification72.0%
(FPCore (A B C)
:precision binary64
(if (<= B -1.25e-80)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 2.3e-111)
(/ (* 180.0 (atan (/ C B))) PI)
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.25e-80) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 2.3e-111) {
tmp = (180.0 * atan((C / 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 <= -1.25e-80) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 2.3e-111) {
tmp = (180.0 * Math.atan((C / B))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.25e-80: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 2.3e-111: tmp = (180.0 * math.atan((C / 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 <= -1.25e-80) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 2.3e-111) tmp = Float64(Float64(180.0 * atan(Float64(C / 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 <= -1.25e-80) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 2.3e-111) tmp = (180.0 * atan((C / B))) / pi; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.25e-80], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.3e-111], N[(N[(180.0 * N[ArcTan[N[(C / 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 -1.25 \cdot 10^{-80}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 2.3 \cdot 10^{-111}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.25e-80Initial program 56.0%
Taylor expanded in B around -inf 60.7%
if -1.25e-80 < B < 2.3e-111Initial program 66.2%
associate-*r/66.2%
Applied egg-rr85.9%
Taylor expanded in B around -inf 57.6%
associate--l+57.6%
div-sub61.0%
Simplified61.0%
Taylor expanded in C around inf 41.6%
if 2.3e-111 < B Initial program 54.2%
Taylor expanded in B around inf 50.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -1e-251)
(* 180.0 (/ (atan (+ 1.0 t_0)) PI))
(/ (* 180.0 (atan (+ t_0 -1.0))) PI))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -1e-251) {
tmp = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
} else {
tmp = (180.0 * atan((t_0 + -1.0))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -1e-251) {
tmp = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
} else {
tmp = (180.0 * Math.atan((t_0 + -1.0))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= -1e-251: tmp = 180.0 * (math.atan((1.0 + t_0)) / math.pi) else: tmp = (180.0 * math.atan((t_0 + -1.0))) / math.pi return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= -1e-251) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(t_0 + -1.0))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= -1e-251) tmp = 180.0 * (atan((1.0 + t_0)) / pi); else tmp = (180.0 * atan((t_0 + -1.0))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -1e-251], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -1 \cdot 10^{-251}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t\_0\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(t\_0 + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.00000000000000002e-251Initial program 57.5%
Taylor expanded in B around -inf 72.1%
associate--l+72.1%
div-sub73.0%
Simplified73.0%
if -1.00000000000000002e-251 < B Initial program 60.2%
associate-*r/60.2%
Applied egg-rr82.9%
Taylor expanded in B around inf 69.7%
+-commutative69.7%
associate--r+69.7%
div-sub71.1%
Simplified71.1%
Final simplification72.0%
(FPCore (A B C) :precision binary64 (if (<= C 4.1e+57) (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)) (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= 4.1e+57) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 4.1e+57) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 4.1e+57: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 4.1e+57) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 4.1e+57) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 4.1e+57], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 4.1 \cdot 10^{+57}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < 4.1e57Initial program 67.0%
Taylor expanded in B around -inf 66.3%
associate--l+66.3%
div-sub66.8%
Simplified66.8%
if 4.1e57 < C Initial program 23.3%
Taylor expanded in A around 0 17.8%
+-commutative17.8%
unpow217.8%
unpow217.8%
hypot-define47.5%
Simplified47.5%
Taylor expanded in C around inf 74.5%
(FPCore (A B C)
:precision binary64
(if (<= B -1.2e-175)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.38e-98)
(* 180.0 (/ (atan 0.0) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.2e-175) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.38e-98) {
tmp = 180.0 * (atan(0.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 <= -1.2e-175) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.38e-98) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.2e-175: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.38e-98: tmp = 180.0 * (math.atan(0.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 <= -1.2e-175) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.38e-98) tmp = Float64(180.0 * Float64(atan(0.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 <= -1.2e-175) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.38e-98) tmp = 180.0 * (atan(0.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.2e-175], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.38e-98], N[(180.0 * N[(N[ArcTan[0.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.2 \cdot 10^{-175}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.38 \cdot 10^{-98}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.2e-175Initial program 58.7%
Taylor expanded in B around -inf 52.6%
if -1.2e-175 < B < 1.3800000000000001e-98Initial program 61.7%
*-commutative61.7%
associate--l-60.1%
+-commutative60.1%
unpow260.1%
unpow260.1%
hypot-undefine74.9%
associate--r+86.0%
div-inv86.0%
div-sub59.1%
Applied egg-rr59.1%
Taylor expanded in C around inf 17.3%
distribute-lft1-in17.3%
metadata-eval17.3%
mul0-lft29.5%
metadata-eval29.5%
Simplified29.5%
if 1.3800000000000001e-98 < B Initial program 56.8%
Taylor expanded in B around inf 52.7%
(FPCore (A B C) :precision binary64 (if (<= B 6.3e-99) (* 180.0 (/ (atan 0.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= 6.3e-99) {
tmp = 180.0 * (atan(0.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 <= 6.3e-99) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 6.3e-99: tmp = 180.0 * (math.atan(0.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 <= 6.3e-99) tmp = Float64(180.0 * Float64(atan(0.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 <= 6.3e-99) tmp = 180.0 * (atan(0.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 6.3e-99], N[(180.0 * N[(N[ArcTan[0.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 6.3 \cdot 10^{-99}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < 6.29999999999999992e-99Initial program 59.9%
*-commutative59.9%
associate--l-59.2%
+-commutative59.2%
unpow259.2%
unpow259.2%
hypot-undefine77.1%
associate--r+83.2%
div-inv83.2%
div-sub70.6%
Applied egg-rr70.6%
Taylor expanded in C around inf 8.9%
distribute-lft1-in8.9%
metadata-eval8.9%
mul0-lft15.6%
metadata-eval15.6%
Simplified15.6%
if 6.29999999999999992e-99 < B Initial program 56.8%
Taylor expanded in B around inf 52.7%
(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 59.0%
Taylor expanded in B around inf 19.8%
herbie shell --seed 2024139
(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)))