
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* PI (/ angle 180.0)))) (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))))
double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (angle / 180.0);
return ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0);
}
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * (angle / 180.0);
return ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * Math.sin(t_0)) * Math.cos(t_0);
}
def code(a, b, angle): t_0 = math.pi * (angle / 180.0) return ((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * math.sin(t_0)) * math.cos(t_0)
function code(a, b, angle) t_0 = Float64(pi * Float64(angle / 180.0)) return Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) end
function tmp = code(a, b, angle) t_0 = pi * (angle / 180.0); tmp = ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0); end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t_0\right) \cdot \cos t_0
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* PI (/ angle 180.0)))) (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))))
double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (angle / 180.0);
return ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0);
}
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * (angle / 180.0);
return ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * Math.sin(t_0)) * Math.cos(t_0);
}
def code(a, b, angle): t_0 = math.pi * (angle / 180.0) return ((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * math.sin(t_0)) * math.cos(t_0)
function code(a, b, angle) t_0 = Float64(pi * Float64(angle / 180.0)) return Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) end
function tmp = code(a, b, angle) t_0 = pi * (angle / 180.0); tmp = ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0); end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t_0\right) \cdot \cos t_0
\end{array}
\end{array}
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
(FPCore (a b angle)
:precision binary64
(if (<= b 6.2e-79)
(* (+ b a) (* (- b a) (sin (* 2.0 (* PI (* angle 0.005555555555555556))))))
(if (<= b 2.8e+203)
(*
(+ b a)
(*
(- b a)
(sin
(*
2.0
(*
(cbrt angle)
(* (* PI 0.005555555555555556) (pow (cbrt angle) 2.0)))))))
(* (+ b a) (* b (sin (* PI (* angle 0.011111111111111112))))))))a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
double tmp;
if (b <= 6.2e-79) {
tmp = (b + a) * ((b - a) * sin((2.0 * (((double) M_PI) * (angle * 0.005555555555555556)))));
} else if (b <= 2.8e+203) {
tmp = (b + a) * ((b - a) * sin((2.0 * (cbrt(angle) * ((((double) M_PI) * 0.005555555555555556) * pow(cbrt(angle), 2.0))))));
} else {
tmp = (b + a) * (b * sin((((double) M_PI) * (angle * 0.011111111111111112))));
}
return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
double tmp;
if (b <= 6.2e-79) {
tmp = (b + a) * ((b - a) * Math.sin((2.0 * (Math.PI * (angle * 0.005555555555555556)))));
} else if (b <= 2.8e+203) {
tmp = (b + a) * ((b - a) * Math.sin((2.0 * (Math.cbrt(angle) * ((Math.PI * 0.005555555555555556) * Math.pow(Math.cbrt(angle), 2.0))))));
} else {
tmp = (b + a) * (b * Math.sin((Math.PI * (angle * 0.011111111111111112))));
}
return tmp;
}
a = abs(a) b = abs(b) function code(a, b, angle) tmp = 0.0 if (b <= 6.2e-79) tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(2.0 * Float64(pi * Float64(angle * 0.005555555555555556)))))); elseif (b <= 2.8e+203) tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(2.0 * Float64(cbrt(angle) * Float64(Float64(pi * 0.005555555555555556) * (cbrt(angle) ^ 2.0))))))); else tmp = Float64(Float64(b + a) * Float64(b * sin(Float64(pi * Float64(angle * 0.011111111111111112))))); end return tmp end
NOTE: a should be positive before calling this function NOTE: b should be positive before calling this function code[a_, b_, angle_] := If[LessEqual[b, 6.2e-79], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(2.0 * N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.8e+203], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(2.0 * N[(N[Power[angle, 1/3], $MachinePrecision] * N[(N[(Pi * 0.005555555555555556), $MachinePrecision] * N[Power[N[Power[angle, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + a), $MachinePrecision] * N[(b * N[Sin[N[(Pi * N[(angle * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq 6.2 \cdot 10^{-79}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\\
\mathbf{elif}\;b \leq 2.8 \cdot 10^{+203}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\sqrt[3]{angle} \cdot \left(\left(\pi \cdot 0.005555555555555556\right) \cdot {\left(\sqrt[3]{angle}\right)}^{2}\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b + a\right) \cdot \left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\\
\end{array}
\end{array}
if b < 6.1999999999999999e-79Initial program 61.9%
*-commutative61.9%
associate-*l*61.9%
associate-*l*61.9%
unpow261.9%
unpow261.9%
difference-of-squares64.3%
Simplified64.3%
Taylor expanded in angle around inf 62.8%
expm1-log1p-u49.5%
expm1-udef34.4%
Applied egg-rr40.1%
expm1-def55.3%
expm1-log1p72.6%
*-commutative72.6%
Simplified72.6%
if 6.1999999999999999e-79 < b < 2.7999999999999999e203Initial program 48.1%
*-commutative48.1%
associate-*l*48.1%
associate-*l*48.1%
unpow248.1%
unpow248.1%
difference-of-squares48.1%
Simplified48.1%
Taylor expanded in angle around inf 43.3%
expm1-log1p-u30.8%
expm1-udef15.1%
Applied egg-rr17.3%
expm1-def33.1%
expm1-log1p53.3%
*-commutative53.3%
Simplified53.3%
*-commutative53.3%
add-cube-cbrt52.3%
pow355.5%
*-commutative55.5%
Applied egg-rr55.5%
unpow352.3%
add-cube-cbrt53.3%
*-commutative53.3%
associate-*r*55.5%
add-cube-cbrt55.1%
associate-*r*59.4%
pow259.4%
Applied egg-rr59.4%
if 2.7999999999999999e203 < b Initial program 61.9%
*-commutative61.9%
associate-*l*61.9%
associate-*l*61.9%
unpow261.9%
unpow261.9%
difference-of-squares70.6%
Simplified70.6%
Taylor expanded in angle around inf 70.6%
expm1-log1p-u35.2%
expm1-udef35.2%
Applied egg-rr38.7%
expm1-def38.7%
expm1-log1p82.5%
*-commutative82.5%
Simplified82.5%
Taylor expanded in b around inf 82.5%
*-commutative82.5%
*-commutative82.5%
*-commutative82.5%
associate-*l*86.9%
Simplified86.9%
Final simplification70.6%
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* PI (* angle 0.005555555555555556))))
(if (<= b 4.5e+142)
(* (+ b a) (* (- b a) (sin (* 2.0 t_0))))
(if (<= b 4e+211)
(*
(+ b a)
(*
(- b a)
(sin
(*
2.0
(pow (* (cbrt (* PI angle)) (cbrt 0.005555555555555556)) 3.0)))))
(* (+ b a) (* (- b a) (sin (* 2.0 (pow (cbrt t_0) 3.0)))))))))a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (angle * 0.005555555555555556);
double tmp;
if (b <= 4.5e+142) {
tmp = (b + a) * ((b - a) * sin((2.0 * t_0)));
} else if (b <= 4e+211) {
tmp = (b + a) * ((b - a) * sin((2.0 * pow((cbrt((((double) M_PI) * angle)) * cbrt(0.005555555555555556)), 3.0))));
} else {
tmp = (b + a) * ((b - a) * sin((2.0 * pow(cbrt(t_0), 3.0))));
}
return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * (angle * 0.005555555555555556);
double tmp;
if (b <= 4.5e+142) {
tmp = (b + a) * ((b - a) * Math.sin((2.0 * t_0)));
} else if (b <= 4e+211) {
tmp = (b + a) * ((b - a) * Math.sin((2.0 * Math.pow((Math.cbrt((Math.PI * angle)) * Math.cbrt(0.005555555555555556)), 3.0))));
} else {
tmp = (b + a) * ((b - a) * Math.sin((2.0 * Math.pow(Math.cbrt(t_0), 3.0))));
}
return tmp;
}
a = abs(a) b = abs(b) function code(a, b, angle) t_0 = Float64(pi * Float64(angle * 0.005555555555555556)) tmp = 0.0 if (b <= 4.5e+142) tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(2.0 * t_0)))); elseif (b <= 4e+211) tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(2.0 * (Float64(cbrt(Float64(pi * angle)) * cbrt(0.005555555555555556)) ^ 3.0))))); else tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(2.0 * (cbrt(t_0) ^ 3.0))))); end return tmp end
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, 4.5e+142], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(2.0 * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4e+211], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(2.0 * N[Power[N[(N[Power[N[(Pi * angle), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[0.005555555555555556, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(2.0 * N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
t_0 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\
\mathbf{if}\;b \leq 4.5 \cdot 10^{+142}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot t_0\right)\right)\\
\mathbf{elif}\;b \leq 4 \cdot 10^{+211}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot {\left(\sqrt[3]{\pi \cdot angle} \cdot \sqrt[3]{0.005555555555555556}\right)}^{3}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot {\left(\sqrt[3]{t_0}\right)}^{3}\right)\right)\\
\end{array}
\end{array}
if b < 4.4999999999999999e142Initial program 59.2%
*-commutative59.2%
associate-*l*59.2%
associate-*l*59.2%
unpow259.2%
unpow259.2%
difference-of-squares61.0%
Simplified61.0%
Taylor expanded in angle around inf 58.9%
expm1-log1p-u46.0%
expm1-udef30.1%
Applied egg-rr35.1%
expm1-def50.9%
expm1-log1p67.9%
*-commutative67.9%
Simplified67.9%
if 4.4999999999999999e142 < b < 3.9999999999999998e211Initial program 23.0%
*-commutative23.0%
associate-*l*23.0%
associate-*l*23.0%
unpow223.0%
unpow223.0%
difference-of-squares23.0%
Simplified23.0%
Taylor expanded in angle around inf 13.0%
expm1-log1p-u0.2%
expm1-udef0.2%
Applied egg-rr0.2%
expm1-def0.2%
expm1-log1p49.8%
*-commutative49.8%
Simplified49.8%
*-commutative49.8%
add-cube-cbrt49.0%
pow358.8%
*-commutative58.8%
Applied egg-rr58.8%
associate-*r*58.7%
*-commutative58.7%
cbrt-prod78.5%
*-commutative78.5%
Applied egg-rr78.5%
if 3.9999999999999998e211 < b Initial program 67.5%
*-commutative67.5%
associate-*l*67.5%
associate-*l*67.5%
unpow267.5%
unpow267.5%
difference-of-squares77.0%
Simplified77.0%
Taylor expanded in angle around inf 77.0%
expm1-log1p-u38.5%
expm1-udef38.5%
Applied egg-rr42.3%
expm1-def42.3%
expm1-log1p85.6%
*-commutative85.6%
Simplified85.6%
*-commutative85.6%
add-cube-cbrt71.4%
pow371.4%
*-commutative71.4%
Applied egg-rr71.4%
Final simplification68.6%
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
(FPCore (a b angle)
:precision binary64
(if (<= (/ angle 180.0) 2e+101)
(*
(+ b a)
(*
(- b a)
(sin (* 2.0 (pow (cbrt (* angle (* PI 0.005555555555555556))) 3.0)))))
(*
(+ b a)
(*
(- b a)
(sin
(* 2.0 (* (sqrt PI) (* (* angle 0.005555555555555556) (sqrt PI)))))))))a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
double tmp;
if ((angle / 180.0) <= 2e+101) {
tmp = (b + a) * ((b - a) * sin((2.0 * pow(cbrt((angle * (((double) M_PI) * 0.005555555555555556))), 3.0))));
} else {
tmp = (b + a) * ((b - a) * sin((2.0 * (sqrt(((double) M_PI)) * ((angle * 0.005555555555555556) * sqrt(((double) M_PI)))))));
}
return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
double tmp;
if ((angle / 180.0) <= 2e+101) {
tmp = (b + a) * ((b - a) * Math.sin((2.0 * Math.pow(Math.cbrt((angle * (Math.PI * 0.005555555555555556))), 3.0))));
} else {
tmp = (b + a) * ((b - a) * Math.sin((2.0 * (Math.sqrt(Math.PI) * ((angle * 0.005555555555555556) * Math.sqrt(Math.PI))))));
}
return tmp;
}
a = abs(a) b = abs(b) function code(a, b, angle) tmp = 0.0 if (Float64(angle / 180.0) <= 2e+101) tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(2.0 * (cbrt(Float64(angle * Float64(pi * 0.005555555555555556))) ^ 3.0))))); else tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(2.0 * Float64(sqrt(pi) * Float64(Float64(angle * 0.005555555555555556) * sqrt(pi))))))); end return tmp end
NOTE: a should be positive before calling this function NOTE: b should be positive before calling this function code[a_, b_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], 2e+101], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(2.0 * N[Power[N[Power[N[(angle * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(2.0 * N[(N[Sqrt[Pi], $MachinePrecision] * N[(N[(angle * 0.005555555555555556), $MachinePrecision] * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{angle}{180} \leq 2 \cdot 10^{+101}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot {\left(\sqrt[3]{angle \cdot \left(\pi \cdot 0.005555555555555556\right)}\right)}^{3}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\sqrt{\pi} \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot \sqrt{\pi}\right)\right)\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle 180) < 2e101Initial program 62.5%
*-commutative62.5%
associate-*l*62.5%
associate-*l*62.5%
unpow262.5%
unpow262.5%
difference-of-squares65.3%
Simplified65.3%
Taylor expanded in angle around inf 63.3%
expm1-log1p-u48.1%
expm1-udef31.6%
Applied egg-rr36.5%
expm1-def53.1%
expm1-log1p74.9%
*-commutative74.9%
Simplified74.9%
*-commutative74.9%
add-cube-cbrt74.0%
pow376.0%
*-commutative76.0%
Applied egg-rr76.0%
expm1-log1p-u64.9%
expm1-udef25.4%
Applied egg-rr25.4%
expm1-def64.9%
expm1-log1p76.0%
*-commutative76.0%
associate-*l*76.1%
*-commutative76.1%
Simplified76.1%
if 2e101 < (/.f64 angle 180) Initial program 39.1%
*-commutative39.1%
associate-*l*39.1%
associate-*l*39.1%
unpow239.1%
unpow239.1%
difference-of-squares39.1%
Simplified39.1%
Taylor expanded in angle around inf 35.9%
expm1-log1p-u21.8%
expm1-udef20.1%
Applied egg-rr23.7%
expm1-def25.1%
expm1-log1p38.5%
*-commutative38.5%
Simplified38.5%
*-commutative38.5%
add-cube-cbrt35.4%
pow338.7%
*-commutative38.7%
Applied egg-rr38.7%
unpow335.4%
add-cube-cbrt38.5%
*-commutative38.5%
*-commutative38.5%
add-sqr-sqrt46.2%
associate-*r*48.3%
*-commutative48.3%
Applied egg-rr48.3%
Final simplification71.3%
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (sin (* 0.011111111111111112 (* PI angle)))))
(if (<= (/ angle 180.0) -2e+149)
(*
(+ b a)
(* (- b a) (sin (* 2.0 (fabs (* angle (* PI 0.005555555555555556)))))))
(if (<= (/ angle 180.0) 5e+192)
(* (+ b a) (* (- b a) t_0))
(* (+ b a) (* (- b a) (sqrt (pow t_0 2.0))))))))a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
double t_0 = sin((0.011111111111111112 * (((double) M_PI) * angle)));
double tmp;
if ((angle / 180.0) <= -2e+149) {
tmp = (b + a) * ((b - a) * sin((2.0 * fabs((angle * (((double) M_PI) * 0.005555555555555556))))));
} else if ((angle / 180.0) <= 5e+192) {
tmp = (b + a) * ((b - a) * t_0);
} else {
tmp = (b + a) * ((b - a) * sqrt(pow(t_0, 2.0)));
}
return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
double t_0 = Math.sin((0.011111111111111112 * (Math.PI * angle)));
double tmp;
if ((angle / 180.0) <= -2e+149) {
tmp = (b + a) * ((b - a) * Math.sin((2.0 * Math.abs((angle * (Math.PI * 0.005555555555555556))))));
} else if ((angle / 180.0) <= 5e+192) {
tmp = (b + a) * ((b - a) * t_0);
} else {
tmp = (b + a) * ((b - a) * Math.sqrt(Math.pow(t_0, 2.0)));
}
return tmp;
}
a = abs(a) b = abs(b) def code(a, b, angle): t_0 = math.sin((0.011111111111111112 * (math.pi * angle))) tmp = 0 if (angle / 180.0) <= -2e+149: tmp = (b + a) * ((b - a) * math.sin((2.0 * math.fabs((angle * (math.pi * 0.005555555555555556)))))) elif (angle / 180.0) <= 5e+192: tmp = (b + a) * ((b - a) * t_0) else: tmp = (b + a) * ((b - a) * math.sqrt(math.pow(t_0, 2.0))) return tmp
a = abs(a) b = abs(b) function code(a, b, angle) t_0 = sin(Float64(0.011111111111111112 * Float64(pi * angle))) tmp = 0.0 if (Float64(angle / 180.0) <= -2e+149) tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(2.0 * abs(Float64(angle * Float64(pi * 0.005555555555555556))))))); elseif (Float64(angle / 180.0) <= 5e+192) tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * t_0)); else tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sqrt((t_0 ^ 2.0)))); end return tmp end
a = abs(a) b = abs(b) function tmp_2 = code(a, b, angle) t_0 = sin((0.011111111111111112 * (pi * angle))); tmp = 0.0; if ((angle / 180.0) <= -2e+149) tmp = (b + a) * ((b - a) * sin((2.0 * abs((angle * (pi * 0.005555555555555556)))))); elseif ((angle / 180.0) <= 5e+192) tmp = (b + a) * ((b - a) * t_0); else tmp = (b + a) * ((b - a) * sqrt((t_0 ^ 2.0))); end tmp_2 = tmp; end
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
code[a_, b_, angle_] := Block[{t$95$0 = N[Sin[N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], -2e+149], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(2.0 * N[Abs[N[(angle * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 5e+192], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sqrt[N[Power[t$95$0, 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
t_0 := \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\\
\mathbf{if}\;\frac{angle}{180} \leq -2 \cdot 10^{+149}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left|angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right|\right)\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{+192}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot t_0\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sqrt{{t_0}^{2}}\right)\\
\end{array}
\end{array}
if (/.f64 angle 180) < -2.0000000000000001e149Initial program 16.0%
*-commutative16.0%
associate-*l*16.0%
associate-*l*16.0%
unpow216.0%
unpow216.0%
difference-of-squares24.0%
Simplified24.0%
Taylor expanded in angle around inf 14.2%
expm1-log1p-u8.0%
expm1-udef5.8%
Applied egg-rr10.0%
expm1-def12.8%
expm1-log1p19.6%
*-commutative19.6%
Simplified19.6%
*-commutative19.6%
add-cube-cbrt19.3%
pow330.7%
*-commutative30.7%
Applied egg-rr30.7%
add-sqr-sqrt0.0%
sqrt-unprod4.1%
unpow34.1%
add-cube-cbrt4.7%
associate-*r*4.7%
*-commutative4.7%
*-commutative4.7%
unpow34.7%
add-cube-cbrt4.6%
associate-*r*8.6%
*-commutative8.6%
*-commutative8.6%
associate-*r*4.6%
*-commutative4.6%
associate-*r*4.6%
*-commutative4.6%
Applied egg-rr4.0%
unpow24.0%
metadata-eval4.0%
swap-sqr8.6%
associate-*r*4.6%
associate-*r*4.6%
rem-sqrt-square32.9%
*-commutative32.9%
associate-*l*36.6%
*-commutative36.6%
Simplified36.6%
if -2.0000000000000001e149 < (/.f64 angle 180) < 5.00000000000000033e192Initial program 67.2%
*-commutative67.2%
associate-*l*67.2%
associate-*l*67.2%
unpow267.2%
unpow267.2%
difference-of-squares69.2%
Simplified69.2%
difference-of-squares67.2%
*-commutative67.2%
sub-neg67.2%
distribute-lft-in67.2%
associate-*l*67.2%
2-sin67.2%
div-inv66.6%
metadata-eval66.6%
Applied egg-rr66.5%
distribute-lft-out66.5%
sub-neg66.5%
difference-of-squares68.5%
*-commutative68.5%
associate-*l*79.5%
+-commutative79.5%
*-commutative79.5%
associate-*r*80.2%
associate-*l*80.2%
*-commutative80.2%
metadata-eval80.2%
Simplified80.2%
if 5.00000000000000033e192 < (/.f64 angle 180) Initial program 27.2%
*-commutative27.2%
associate-*l*27.2%
associate-*l*27.2%
unpow227.2%
unpow227.2%
difference-of-squares27.2%
Simplified27.2%
Taylor expanded in angle around inf 28.6%
expm1-log1p-u20.4%
expm1-udef18.9%
Applied egg-rr17.2%
expm1-def18.8%
expm1-log1p26.8%
*-commutative26.8%
Simplified26.8%
add-sqr-sqrt11.6%
sqrt-unprod43.7%
pow243.7%
*-commutative43.7%
associate-*r*44.6%
*-commutative44.6%
associate-*l*44.6%
*-commutative44.6%
metadata-eval44.6%
Applied egg-rr44.6%
Final simplification72.6%
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
(FPCore (a b angle)
:precision binary64
(if (<= (/ angle 180.0) -2e+149)
(*
(+ b a)
(* (- b a) (sin (* 2.0 (fabs (* angle (* PI 0.005555555555555556)))))))
(if (<= (/ angle 180.0) 1e+140)
(* (+ b a) (* (- b a) (sin (* 0.011111111111111112 (* PI angle)))))
(* (* (+ b a) (- b a)) (* 2.0 (sin (* PI (/ angle 180.0))))))))a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
double tmp;
if ((angle / 180.0) <= -2e+149) {
tmp = (b + a) * ((b - a) * sin((2.0 * fabs((angle * (((double) M_PI) * 0.005555555555555556))))));
} else if ((angle / 180.0) <= 1e+140) {
tmp = (b + a) * ((b - a) * sin((0.011111111111111112 * (((double) M_PI) * angle))));
} else {
tmp = ((b + a) * (b - a)) * (2.0 * sin((((double) M_PI) * (angle / 180.0))));
}
return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
double tmp;
if ((angle / 180.0) <= -2e+149) {
tmp = (b + a) * ((b - a) * Math.sin((2.0 * Math.abs((angle * (Math.PI * 0.005555555555555556))))));
} else if ((angle / 180.0) <= 1e+140) {
tmp = (b + a) * ((b - a) * Math.sin((0.011111111111111112 * (Math.PI * angle))));
} else {
tmp = ((b + a) * (b - a)) * (2.0 * Math.sin((Math.PI * (angle / 180.0))));
}
return tmp;
}
a = abs(a) b = abs(b) def code(a, b, angle): tmp = 0 if (angle / 180.0) <= -2e+149: tmp = (b + a) * ((b - a) * math.sin((2.0 * math.fabs((angle * (math.pi * 0.005555555555555556)))))) elif (angle / 180.0) <= 1e+140: tmp = (b + a) * ((b - a) * math.sin((0.011111111111111112 * (math.pi * angle)))) else: tmp = ((b + a) * (b - a)) * (2.0 * math.sin((math.pi * (angle / 180.0)))) return tmp
a = abs(a) b = abs(b) function code(a, b, angle) tmp = 0.0 if (Float64(angle / 180.0) <= -2e+149) tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(2.0 * abs(Float64(angle * Float64(pi * 0.005555555555555556))))))); elseif (Float64(angle / 180.0) <= 1e+140) tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(0.011111111111111112 * Float64(pi * angle))))); else tmp = Float64(Float64(Float64(b + a) * Float64(b - a)) * Float64(2.0 * sin(Float64(pi * Float64(angle / 180.0))))); end return tmp end
a = abs(a) b = abs(b) function tmp_2 = code(a, b, angle) tmp = 0.0; if ((angle / 180.0) <= -2e+149) tmp = (b + a) * ((b - a) * sin((2.0 * abs((angle * (pi * 0.005555555555555556)))))); elseif ((angle / 180.0) <= 1e+140) tmp = (b + a) * ((b - a) * sin((0.011111111111111112 * (pi * angle)))); else tmp = ((b + a) * (b - a)) * (2.0 * sin((pi * (angle / 180.0)))); end tmp_2 = tmp; end
NOTE: a should be positive before calling this function NOTE: b should be positive before calling this function code[a_, b_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], -2e+149], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(2.0 * N[Abs[N[(angle * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1e+140], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[Sin[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{angle}{180} \leq -2 \cdot 10^{+149}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left|angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right|\right)\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq 10^{+140}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle 180) < -2.0000000000000001e149Initial program 16.0%
*-commutative16.0%
associate-*l*16.0%
associate-*l*16.0%
unpow216.0%
unpow216.0%
difference-of-squares24.0%
Simplified24.0%
Taylor expanded in angle around inf 14.2%
expm1-log1p-u8.0%
expm1-udef5.8%
Applied egg-rr10.0%
expm1-def12.8%
expm1-log1p19.6%
*-commutative19.6%
Simplified19.6%
*-commutative19.6%
add-cube-cbrt19.3%
pow330.7%
*-commutative30.7%
Applied egg-rr30.7%
add-sqr-sqrt0.0%
sqrt-unprod4.1%
unpow34.1%
add-cube-cbrt4.7%
associate-*r*4.7%
*-commutative4.7%
*-commutative4.7%
unpow34.7%
add-cube-cbrt4.6%
associate-*r*8.6%
*-commutative8.6%
*-commutative8.6%
associate-*r*4.6%
*-commutative4.6%
associate-*r*4.6%
*-commutative4.6%
Applied egg-rr4.0%
unpow24.0%
metadata-eval4.0%
swap-sqr8.6%
associate-*r*4.6%
associate-*r*4.6%
rem-sqrt-square32.9%
*-commutative32.9%
associate-*l*36.6%
*-commutative36.6%
Simplified36.6%
if -2.0000000000000001e149 < (/.f64 angle 180) < 1.00000000000000006e140Initial program 67.8%
*-commutative67.8%
associate-*l*67.8%
associate-*l*67.8%
unpow267.8%
unpow267.8%
difference-of-squares69.8%
Simplified69.8%
difference-of-squares67.8%
*-commutative67.8%
sub-neg67.8%
distribute-lft-in67.8%
associate-*l*67.8%
2-sin67.8%
div-inv67.2%
metadata-eval67.2%
Applied egg-rr67.2%
distribute-lft-out67.2%
sub-neg67.2%
difference-of-squares69.2%
*-commutative69.2%
associate-*l*80.6%
+-commutative80.6%
*-commutative80.6%
associate-*r*81.7%
associate-*l*81.7%
*-commutative81.7%
metadata-eval81.7%
Simplified81.7%
if 1.00000000000000006e140 < (/.f64 angle 180) Initial program 33.6%
*-commutative33.6%
associate-*l*33.6%
associate-*l*33.6%
unpow233.6%
unpow233.6%
difference-of-squares33.6%
Simplified33.6%
Taylor expanded in angle around 0 43.2%
Final simplification72.5%
NOTE: a should be positive before calling this function NOTE: b should be positive before calling this function (FPCore (a b angle) :precision binary64 (if (<= a 5e+212) (* (+ b a) (* (- b a) (sin (* 0.011111111111111112 (* PI angle))))) (* 2.0 (* (- b a) (* a (sin (* 0.005555555555555556 (* PI angle))))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
double tmp;
if (a <= 5e+212) {
tmp = (b + a) * ((b - a) * sin((0.011111111111111112 * (((double) M_PI) * angle))));
} else {
tmp = 2.0 * ((b - a) * (a * sin((0.005555555555555556 * (((double) M_PI) * angle)))));
}
return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
double tmp;
if (a <= 5e+212) {
tmp = (b + a) * ((b - a) * Math.sin((0.011111111111111112 * (Math.PI * angle))));
} else {
tmp = 2.0 * ((b - a) * (a * Math.sin((0.005555555555555556 * (Math.PI * angle)))));
}
return tmp;
}
a = abs(a) b = abs(b) def code(a, b, angle): tmp = 0 if a <= 5e+212: tmp = (b + a) * ((b - a) * math.sin((0.011111111111111112 * (math.pi * angle)))) else: tmp = 2.0 * ((b - a) * (a * math.sin((0.005555555555555556 * (math.pi * angle))))) return tmp
a = abs(a) b = abs(b) function code(a, b, angle) tmp = 0.0 if (a <= 5e+212) tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(0.011111111111111112 * Float64(pi * angle))))); else tmp = Float64(2.0 * Float64(Float64(b - a) * Float64(a * sin(Float64(0.005555555555555556 * Float64(pi * angle)))))); end return tmp end
a = abs(a) b = abs(b) function tmp_2 = code(a, b, angle) tmp = 0.0; if (a <= 5e+212) tmp = (b + a) * ((b - a) * sin((0.011111111111111112 * (pi * angle)))); else tmp = 2.0 * ((b - a) * (a * sin((0.005555555555555556 * (pi * angle))))); end tmp_2 = tmp; end
NOTE: a should be positive before calling this function NOTE: b should be positive before calling this function code[a_, b_, angle_] := If[LessEqual[a, 5e+212], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(a * N[Sin[N[(0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 5 \cdot 10^{+212}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(a \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\right)\\
\end{array}
\end{array}
if a < 4.99999999999999992e212Initial program 58.1%
*-commutative58.1%
associate-*l*58.1%
associate-*l*58.1%
unpow258.1%
unpow258.1%
difference-of-squares60.5%
Simplified60.5%
difference-of-squares58.1%
*-commutative58.1%
sub-neg58.1%
distribute-lft-in58.1%
associate-*l*58.1%
2-sin58.1%
div-inv57.5%
metadata-eval57.5%
Applied egg-rr57.4%
distribute-lft-out57.4%
sub-neg57.4%
difference-of-squares59.5%
*-commutative59.5%
associate-*l*68.1%
+-commutative68.1%
*-commutative68.1%
associate-*r*67.8%
associate-*l*67.8%
*-commutative67.8%
metadata-eval67.8%
Simplified67.8%
if 4.99999999999999992e212 < a Initial program 65.4%
*-commutative65.4%
associate-*l*65.4%
associate-*l*65.4%
unpow265.4%
unpow265.4%
difference-of-squares65.4%
Simplified65.4%
Taylor expanded in angle around inf 78.5%
associate-*r*78.5%
*-commutative78.5%
associate-*r*78.5%
*-commutative78.5%
*-commutative78.5%
*-commutative78.5%
associate-*r*78.5%
*-commutative78.5%
*-commutative78.5%
*-commutative78.5%
Simplified78.5%
Taylor expanded in a around inf 78.5%
Taylor expanded in angle around 0 78.5%
Final simplification68.4%
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
(FPCore (a b angle)
:precision binary64
(if (<= angle 7.2e+94)
(* (+ b a) (* 0.011111111111111112 (* PI (* (- b a) angle))))
(if (<= angle 3.8e+201)
(fabs (* PI (* -0.011111111111111112 (* angle (* a a)))))
(* 0.011111111111111112 (* angle (* (- b a) (* b PI)))))))a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
double tmp;
if (angle <= 7.2e+94) {
tmp = (b + a) * (0.011111111111111112 * (((double) M_PI) * ((b - a) * angle)));
} else if (angle <= 3.8e+201) {
tmp = fabs((((double) M_PI) * (-0.011111111111111112 * (angle * (a * a)))));
} else {
tmp = 0.011111111111111112 * (angle * ((b - a) * (b * ((double) M_PI))));
}
return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
double tmp;
if (angle <= 7.2e+94) {
tmp = (b + a) * (0.011111111111111112 * (Math.PI * ((b - a) * angle)));
} else if (angle <= 3.8e+201) {
tmp = Math.abs((Math.PI * (-0.011111111111111112 * (angle * (a * a)))));
} else {
tmp = 0.011111111111111112 * (angle * ((b - a) * (b * Math.PI)));
}
return tmp;
}
a = abs(a) b = abs(b) def code(a, b, angle): tmp = 0 if angle <= 7.2e+94: tmp = (b + a) * (0.011111111111111112 * (math.pi * ((b - a) * angle))) elif angle <= 3.8e+201: tmp = math.fabs((math.pi * (-0.011111111111111112 * (angle * (a * a))))) else: tmp = 0.011111111111111112 * (angle * ((b - a) * (b * math.pi))) return tmp
a = abs(a) b = abs(b) function code(a, b, angle) tmp = 0.0 if (angle <= 7.2e+94) tmp = Float64(Float64(b + a) * Float64(0.011111111111111112 * Float64(pi * Float64(Float64(b - a) * angle)))); elseif (angle <= 3.8e+201) tmp = abs(Float64(pi * Float64(-0.011111111111111112 * Float64(angle * Float64(a * a))))); else tmp = Float64(0.011111111111111112 * Float64(angle * Float64(Float64(b - a) * Float64(b * pi)))); end return tmp end
a = abs(a) b = abs(b) function tmp_2 = code(a, b, angle) tmp = 0.0; if (angle <= 7.2e+94) tmp = (b + a) * (0.011111111111111112 * (pi * ((b - a) * angle))); elseif (angle <= 3.8e+201) tmp = abs((pi * (-0.011111111111111112 * (angle * (a * a))))); else tmp = 0.011111111111111112 * (angle * ((b - a) * (b * pi))); end tmp_2 = tmp; end
NOTE: a should be positive before calling this function NOTE: b should be positive before calling this function code[a_, b_, angle_] := If[LessEqual[angle, 7.2e+94], N[(N[(b + a), $MachinePrecision] * N[(0.011111111111111112 * N[(Pi * N[(N[(b - a), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[angle, 3.8e+201], N[Abs[N[(Pi * N[(-0.011111111111111112 * N[(angle * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(0.011111111111111112 * N[(angle * N[(N[(b - a), $MachinePrecision] * N[(b * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 7.2 \cdot 10^{+94}:\\
\;\;\;\;\left(b + a\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot angle\right)\right)\right)\\
\mathbf{elif}\;angle \leq 3.8 \cdot 10^{+201}:\\
\;\;\;\;\left|\pi \cdot \left(-0.011111111111111112 \cdot \left(angle \cdot \left(a \cdot a\right)\right)\right)\right|\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(b \cdot \pi\right)\right)\right)\\
\end{array}
\end{array}
if angle < 7.19999999999999985e94Initial program 62.5%
*-commutative62.5%
associate-*l*62.5%
associate-*l*62.5%
unpow262.5%
unpow262.5%
difference-of-squares65.3%
Simplified65.3%
Taylor expanded in angle around inf 63.3%
expm1-log1p-u48.1%
expm1-udef31.4%
Applied egg-rr36.4%
expm1-def53.1%
expm1-log1p75.1%
*-commutative75.1%
Simplified75.1%
Taylor expanded in angle around 0 73.6%
associate-*r*73.6%
*-commutative73.6%
Simplified73.6%
if 7.19999999999999985e94 < angle < 3.79999999999999995e201Initial program 51.7%
*-commutative51.7%
associate-*l*51.7%
associate-*l*51.7%
unpow251.7%
unpow251.7%
difference-of-squares51.7%
Simplified51.7%
Taylor expanded in angle around 0 23.2%
Taylor expanded in b around 0 19.3%
*-commutative19.3%
*-commutative19.3%
unpow219.3%
Simplified19.3%
add-sqr-sqrt13.7%
sqrt-unprod49.2%
*-commutative49.2%
*-commutative49.2%
swap-sqr49.2%
metadata-eval49.2%
pow249.2%
*-commutative49.2%
associate-*l*49.2%
Applied egg-rr49.2%
*-commutative49.2%
unpow249.2%
metadata-eval49.2%
swap-sqr49.2%
rem-sqrt-square45.2%
associate-*l*45.2%
*-commutative45.2%
unpow245.2%
*-commutative45.2%
unpow245.2%
Simplified45.2%
if 3.79999999999999995e201 < angle Initial program 28.4%
*-commutative28.4%
associate-*l*28.4%
associate-*l*28.4%
unpow228.4%
unpow228.4%
difference-of-squares28.4%
Simplified28.4%
Taylor expanded in angle around 0 40.8%
Taylor expanded in a around 0 40.4%
*-commutative40.4%
Simplified40.4%
Final simplification68.0%
NOTE: a should be positive before calling this function NOTE: b should be positive before calling this function (FPCore (a b angle) :precision binary64 (if (<= a 7e-125) (* (+ b a) (* b (sin (* PI (* angle 0.011111111111111112))))) (* (+ b a) (* 0.011111111111111112 (* PI (* (- b a) angle))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
double tmp;
if (a <= 7e-125) {
tmp = (b + a) * (b * sin((((double) M_PI) * (angle * 0.011111111111111112))));
} else {
tmp = (b + a) * (0.011111111111111112 * (((double) M_PI) * ((b - a) * angle)));
}
return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
double tmp;
if (a <= 7e-125) {
tmp = (b + a) * (b * Math.sin((Math.PI * (angle * 0.011111111111111112))));
} else {
tmp = (b + a) * (0.011111111111111112 * (Math.PI * ((b - a) * angle)));
}
return tmp;
}
a = abs(a) b = abs(b) def code(a, b, angle): tmp = 0 if a <= 7e-125: tmp = (b + a) * (b * math.sin((math.pi * (angle * 0.011111111111111112)))) else: tmp = (b + a) * (0.011111111111111112 * (math.pi * ((b - a) * angle))) return tmp
a = abs(a) b = abs(b) function code(a, b, angle) tmp = 0.0 if (a <= 7e-125) tmp = Float64(Float64(b + a) * Float64(b * sin(Float64(pi * Float64(angle * 0.011111111111111112))))); else tmp = Float64(Float64(b + a) * Float64(0.011111111111111112 * Float64(pi * Float64(Float64(b - a) * angle)))); end return tmp end
a = abs(a) b = abs(b) function tmp_2 = code(a, b, angle) tmp = 0.0; if (a <= 7e-125) tmp = (b + a) * (b * sin((pi * (angle * 0.011111111111111112)))); else tmp = (b + a) * (0.011111111111111112 * (pi * ((b - a) * angle))); end tmp_2 = tmp; end
NOTE: a should be positive before calling this function NOTE: b should be positive before calling this function code[a_, b_, angle_] := If[LessEqual[a, 7e-125], N[(N[(b + a), $MachinePrecision] * N[(b * N[Sin[N[(Pi * N[(angle * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + a), $MachinePrecision] * N[(0.011111111111111112 * N[(Pi * N[(N[(b - a), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 7 \cdot 10^{-125}:\\
\;\;\;\;\left(b + a\right) \cdot \left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b + a\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot angle\right)\right)\right)\\
\end{array}
\end{array}
if a < 6.99999999999999995e-125Initial program 58.9%
*-commutative58.9%
associate-*l*58.9%
associate-*l*58.9%
unpow258.9%
unpow258.9%
difference-of-squares60.7%
Simplified60.7%
Taylor expanded in angle around inf 57.9%
expm1-log1p-u43.9%
expm1-udef31.0%
Applied egg-rr36.4%
expm1-def49.3%
expm1-log1p67.9%
*-commutative67.9%
Simplified67.9%
Taylor expanded in b around inf 52.0%
*-commutative52.0%
*-commutative52.0%
*-commutative52.0%
associate-*l*51.3%
Simplified51.3%
if 6.99999999999999995e-125 < a Initial program 57.5%
*-commutative57.5%
associate-*l*57.5%
associate-*l*57.5%
unpow257.5%
unpow257.5%
difference-of-squares60.9%
Simplified60.9%
Taylor expanded in angle around inf 59.8%
expm1-log1p-u42.9%
expm1-udef26.9%
Applied egg-rr30.3%
expm1-def46.3%
expm1-log1p70.2%
*-commutative70.2%
Simplified70.2%
Taylor expanded in angle around 0 67.3%
associate-*r*67.2%
*-commutative67.2%
Simplified67.2%
Final simplification56.8%
NOTE: a should be positive before calling this function NOTE: b should be positive before calling this function (FPCore (a b angle) :precision binary64 (if (<= a 7e-101) (* (+ b a) (* b (sin (* 0.011111111111111112 (* PI angle))))) (* (+ b a) (* 0.011111111111111112 (* PI (* (- b a) angle))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
double tmp;
if (a <= 7e-101) {
tmp = (b + a) * (b * sin((0.011111111111111112 * (((double) M_PI) * angle))));
} else {
tmp = (b + a) * (0.011111111111111112 * (((double) M_PI) * ((b - a) * angle)));
}
return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
double tmp;
if (a <= 7e-101) {
tmp = (b + a) * (b * Math.sin((0.011111111111111112 * (Math.PI * angle))));
} else {
tmp = (b + a) * (0.011111111111111112 * (Math.PI * ((b - a) * angle)));
}
return tmp;
}
a = abs(a) b = abs(b) def code(a, b, angle): tmp = 0 if a <= 7e-101: tmp = (b + a) * (b * math.sin((0.011111111111111112 * (math.pi * angle)))) else: tmp = (b + a) * (0.011111111111111112 * (math.pi * ((b - a) * angle))) return tmp
a = abs(a) b = abs(b) function code(a, b, angle) tmp = 0.0 if (a <= 7e-101) tmp = Float64(Float64(b + a) * Float64(b * sin(Float64(0.011111111111111112 * Float64(pi * angle))))); else tmp = Float64(Float64(b + a) * Float64(0.011111111111111112 * Float64(pi * Float64(Float64(b - a) * angle)))); end return tmp end
a = abs(a) b = abs(b) function tmp_2 = code(a, b, angle) tmp = 0.0; if (a <= 7e-101) tmp = (b + a) * (b * sin((0.011111111111111112 * (pi * angle)))); else tmp = (b + a) * (0.011111111111111112 * (pi * ((b - a) * angle))); end tmp_2 = tmp; end
NOTE: a should be positive before calling this function NOTE: b should be positive before calling this function code[a_, b_, angle_] := If[LessEqual[a, 7e-101], N[(N[(b + a), $MachinePrecision] * N[(b * N[Sin[N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + a), $MachinePrecision] * N[(0.011111111111111112 * N[(Pi * N[(N[(b - a), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 7 \cdot 10^{-101}:\\
\;\;\;\;\left(b + a\right) \cdot \left(b \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b + a\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot angle\right)\right)\right)\\
\end{array}
\end{array}
if a < 6.99999999999999989e-101Initial program 58.8%
*-commutative58.8%
associate-*l*58.8%
associate-*l*58.8%
unpow258.8%
unpow258.8%
difference-of-squares60.6%
Simplified60.6%
Taylor expanded in angle around inf 57.8%
expm1-log1p-u44.0%
expm1-udef31.0%
Applied egg-rr36.3%
expm1-def49.3%
expm1-log1p67.7%
*-commutative67.7%
Simplified67.7%
Taylor expanded in b around inf 52.6%
if 6.99999999999999989e-101 < a Initial program 57.7%
*-commutative57.7%
associate-*l*57.7%
associate-*l*57.7%
unpow257.7%
unpow257.7%
difference-of-squares61.2%
Simplified61.2%
Taylor expanded in angle around inf 60.1%
expm1-log1p-u42.7%
expm1-udef26.9%
Applied egg-rr30.3%
expm1-def46.2%
expm1-log1p70.6%
*-commutative70.6%
Simplified70.6%
Taylor expanded in angle around 0 66.5%
associate-*r*66.5%
*-commutative66.5%
Simplified66.5%
Final simplification57.3%
NOTE: a should be positive before calling this function NOTE: b should be positive before calling this function (FPCore (a b angle) :precision binary64 (* (+ b a) (* (- b a) (sin (* 0.011111111111111112 (* PI angle))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
return (b + a) * ((b - a) * sin((0.011111111111111112 * (((double) M_PI) * angle))));
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
return (b + a) * ((b - a) * Math.sin((0.011111111111111112 * (Math.PI * angle))));
}
a = abs(a) b = abs(b) def code(a, b, angle): return (b + a) * ((b - a) * math.sin((0.011111111111111112 * (math.pi * angle))))
a = abs(a) b = abs(b) function code(a, b, angle) return Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(0.011111111111111112 * Float64(pi * angle))))) end
a = abs(a) b = abs(b) function tmp = code(a, b, angle) tmp = (b + a) * ((b - a) * sin((0.011111111111111112 * (pi * angle)))); end
NOTE: a should be positive before calling this function NOTE: b should be positive before calling this function code[a_, b_, angle_] := N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)
\end{array}
Initial program 58.5%
*-commutative58.5%
associate-*l*58.5%
associate-*l*58.5%
unpow258.5%
unpow258.5%
difference-of-squares60.8%
Simplified60.8%
difference-of-squares58.5%
*-commutative58.5%
sub-neg58.5%
distribute-lft-in58.5%
associate-*l*58.5%
2-sin58.5%
div-inv57.9%
metadata-eval57.9%
Applied egg-rr57.8%
distribute-lft-out57.8%
sub-neg57.8%
difference-of-squares59.8%
*-commutative59.8%
associate-*l*68.7%
+-commutative68.7%
*-commutative68.7%
associate-*r*68.4%
associate-*l*68.4%
*-commutative68.4%
metadata-eval68.4%
Simplified68.4%
Final simplification68.4%
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
(FPCore (a b angle)
:precision binary64
(if (<= a 920.0)
(* 0.011111111111111112 (* angle (* PI (* b b))))
(if (<= a 5.8e+159)
(* 0.011111111111111112 (* angle (* (- b a) (* a PI))))
(* PI (* -0.011111111111111112 (* a (* a angle)))))))a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
double tmp;
if (a <= 920.0) {
tmp = 0.011111111111111112 * (angle * (((double) M_PI) * (b * b)));
} else if (a <= 5.8e+159) {
tmp = 0.011111111111111112 * (angle * ((b - a) * (a * ((double) M_PI))));
} else {
tmp = ((double) M_PI) * (-0.011111111111111112 * (a * (a * angle)));
}
return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
double tmp;
if (a <= 920.0) {
tmp = 0.011111111111111112 * (angle * (Math.PI * (b * b)));
} else if (a <= 5.8e+159) {
tmp = 0.011111111111111112 * (angle * ((b - a) * (a * Math.PI)));
} else {
tmp = Math.PI * (-0.011111111111111112 * (a * (a * angle)));
}
return tmp;
}
a = abs(a) b = abs(b) def code(a, b, angle): tmp = 0 if a <= 920.0: tmp = 0.011111111111111112 * (angle * (math.pi * (b * b))) elif a <= 5.8e+159: tmp = 0.011111111111111112 * (angle * ((b - a) * (a * math.pi))) else: tmp = math.pi * (-0.011111111111111112 * (a * (a * angle))) return tmp
a = abs(a) b = abs(b) function code(a, b, angle) tmp = 0.0 if (a <= 920.0) tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(b * b)))); elseif (a <= 5.8e+159) tmp = Float64(0.011111111111111112 * Float64(angle * Float64(Float64(b - a) * Float64(a * pi)))); else tmp = Float64(pi * Float64(-0.011111111111111112 * Float64(a * Float64(a * angle)))); end return tmp end
a = abs(a) b = abs(b) function tmp_2 = code(a, b, angle) tmp = 0.0; if (a <= 920.0) tmp = 0.011111111111111112 * (angle * (pi * (b * b))); elseif (a <= 5.8e+159) tmp = 0.011111111111111112 * (angle * ((b - a) * (a * pi))); else tmp = pi * (-0.011111111111111112 * (a * (a * angle))); end tmp_2 = tmp; end
NOTE: a should be positive before calling this function NOTE: b should be positive before calling this function code[a_, b_, angle_] := If[LessEqual[a, 920.0], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.8e+159], N[(0.011111111111111112 * N[(angle * N[(N[(b - a), $MachinePrecision] * N[(a * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(Pi * N[(-0.011111111111111112 * N[(a * N[(a * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 920:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\
\mathbf{elif}\;a \leq 5.8 \cdot 10^{+159}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(a \cdot \pi\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\pi \cdot \left(-0.011111111111111112 \cdot \left(a \cdot \left(a \cdot angle\right)\right)\right)\\
\end{array}
\end{array}
if a < 920Initial program 59.7%
*-commutative59.7%
associate-*l*59.7%
associate-*l*59.7%
unpow259.7%
unpow259.7%
difference-of-squares61.3%
Simplified61.3%
Taylor expanded in angle around 0 58.5%
Taylor expanded in b around inf 44.0%
*-commutative44.0%
*-commutative44.0%
unpow244.0%
Simplified44.0%
if 920 < a < 5.80000000000000029e159Initial program 55.9%
*-commutative55.9%
associate-*l*55.9%
associate-*l*55.9%
unpow255.9%
unpow255.9%
difference-of-squares58.5%
Simplified58.5%
Taylor expanded in angle around 0 53.4%
Taylor expanded in a around inf 38.4%
*-commutative38.4%
Simplified38.4%
if 5.80000000000000029e159 < a Initial program 51.5%
*-commutative51.5%
associate-*l*51.5%
associate-*l*51.5%
unpow251.5%
unpow251.5%
difference-of-squares60.6%
Simplified60.6%
Taylor expanded in angle around 0 56.1%
Taylor expanded in b around 0 56.1%
*-commutative56.1%
*-commutative56.1%
unpow256.1%
Simplified56.1%
Taylor expanded in angle around 0 56.1%
*-commutative56.1%
associate-*r*56.1%
*-commutative56.1%
unpow256.1%
*-commutative56.1%
associate-*l*56.1%
*-commutative56.1%
unpow256.1%
*-commutative56.1%
unpow256.1%
Simplified56.1%
Taylor expanded in angle around 0 56.1%
unpow256.1%
associate-*r*77.1%
Simplified77.1%
Final simplification46.0%
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
(FPCore (a b angle)
:precision binary64
(if (<= a 800.0)
(* 0.011111111111111112 (* angle (* (- b a) (* b PI))))
(if (<= a 5.8e+159)
(* 0.011111111111111112 (* angle (* (- b a) (* a PI))))
(* PI (* -0.011111111111111112 (* a (* a angle)))))))a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
double tmp;
if (a <= 800.0) {
tmp = 0.011111111111111112 * (angle * ((b - a) * (b * ((double) M_PI))));
} else if (a <= 5.8e+159) {
tmp = 0.011111111111111112 * (angle * ((b - a) * (a * ((double) M_PI))));
} else {
tmp = ((double) M_PI) * (-0.011111111111111112 * (a * (a * angle)));
}
return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
double tmp;
if (a <= 800.0) {
tmp = 0.011111111111111112 * (angle * ((b - a) * (b * Math.PI)));
} else if (a <= 5.8e+159) {
tmp = 0.011111111111111112 * (angle * ((b - a) * (a * Math.PI)));
} else {
tmp = Math.PI * (-0.011111111111111112 * (a * (a * angle)));
}
return tmp;
}
a = abs(a) b = abs(b) def code(a, b, angle): tmp = 0 if a <= 800.0: tmp = 0.011111111111111112 * (angle * ((b - a) * (b * math.pi))) elif a <= 5.8e+159: tmp = 0.011111111111111112 * (angle * ((b - a) * (a * math.pi))) else: tmp = math.pi * (-0.011111111111111112 * (a * (a * angle))) return tmp
a = abs(a) b = abs(b) function code(a, b, angle) tmp = 0.0 if (a <= 800.0) tmp = Float64(0.011111111111111112 * Float64(angle * Float64(Float64(b - a) * Float64(b * pi)))); elseif (a <= 5.8e+159) tmp = Float64(0.011111111111111112 * Float64(angle * Float64(Float64(b - a) * Float64(a * pi)))); else tmp = Float64(pi * Float64(-0.011111111111111112 * Float64(a * Float64(a * angle)))); end return tmp end
a = abs(a) b = abs(b) function tmp_2 = code(a, b, angle) tmp = 0.0; if (a <= 800.0) tmp = 0.011111111111111112 * (angle * ((b - a) * (b * pi))); elseif (a <= 5.8e+159) tmp = 0.011111111111111112 * (angle * ((b - a) * (a * pi))); else tmp = pi * (-0.011111111111111112 * (a * (a * angle))); end tmp_2 = tmp; end
NOTE: a should be positive before calling this function NOTE: b should be positive before calling this function code[a_, b_, angle_] := If[LessEqual[a, 800.0], N[(0.011111111111111112 * N[(angle * N[(N[(b - a), $MachinePrecision] * N[(b * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.8e+159], N[(0.011111111111111112 * N[(angle * N[(N[(b - a), $MachinePrecision] * N[(a * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(Pi * N[(-0.011111111111111112 * N[(a * N[(a * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 800:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(b \cdot \pi\right)\right)\right)\\
\mathbf{elif}\;a \leq 5.8 \cdot 10^{+159}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(a \cdot \pi\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\pi \cdot \left(-0.011111111111111112 \cdot \left(a \cdot \left(a \cdot angle\right)\right)\right)\\
\end{array}
\end{array}
if a < 800Initial program 59.7%
*-commutative59.7%
associate-*l*59.7%
associate-*l*59.7%
unpow259.7%
unpow259.7%
difference-of-squares61.3%
Simplified61.3%
Taylor expanded in angle around 0 58.5%
Taylor expanded in a around 0 45.6%
*-commutative45.6%
Simplified45.6%
if 800 < a < 5.80000000000000029e159Initial program 55.9%
*-commutative55.9%
associate-*l*55.9%
associate-*l*55.9%
unpow255.9%
unpow255.9%
difference-of-squares58.5%
Simplified58.5%
Taylor expanded in angle around 0 53.4%
Taylor expanded in a around inf 38.4%
*-commutative38.4%
Simplified38.4%
if 5.80000000000000029e159 < a Initial program 51.5%
*-commutative51.5%
associate-*l*51.5%
associate-*l*51.5%
unpow251.5%
unpow251.5%
difference-of-squares60.6%
Simplified60.6%
Taylor expanded in angle around 0 56.1%
Taylor expanded in b around 0 56.1%
*-commutative56.1%
*-commutative56.1%
unpow256.1%
Simplified56.1%
Taylor expanded in angle around 0 56.1%
*-commutative56.1%
associate-*r*56.1%
*-commutative56.1%
unpow256.1%
*-commutative56.1%
associate-*l*56.1%
*-commutative56.1%
unpow256.1%
*-commutative56.1%
unpow256.1%
Simplified56.1%
Taylor expanded in angle around 0 56.1%
unpow256.1%
associate-*r*77.1%
Simplified77.1%
Final simplification47.2%
NOTE: a should be positive before calling this function NOTE: b should be positive before calling this function (FPCore (a b angle) :precision binary64 (if (<= a 5.8e+159) (* 0.011111111111111112 (* angle (* (- b a) (* (+ b a) PI)))) (* PI (* -0.011111111111111112 (* a (* a angle))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
double tmp;
if (a <= 5.8e+159) {
tmp = 0.011111111111111112 * (angle * ((b - a) * ((b + a) * ((double) M_PI))));
} else {
tmp = ((double) M_PI) * (-0.011111111111111112 * (a * (a * angle)));
}
return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
double tmp;
if (a <= 5.8e+159) {
tmp = 0.011111111111111112 * (angle * ((b - a) * ((b + a) * Math.PI)));
} else {
tmp = Math.PI * (-0.011111111111111112 * (a * (a * angle)));
}
return tmp;
}
a = abs(a) b = abs(b) def code(a, b, angle): tmp = 0 if a <= 5.8e+159: tmp = 0.011111111111111112 * (angle * ((b - a) * ((b + a) * math.pi))) else: tmp = math.pi * (-0.011111111111111112 * (a * (a * angle))) return tmp
a = abs(a) b = abs(b) function code(a, b, angle) tmp = 0.0 if (a <= 5.8e+159) tmp = Float64(0.011111111111111112 * Float64(angle * Float64(Float64(b - a) * Float64(Float64(b + a) * pi)))); else tmp = Float64(pi * Float64(-0.011111111111111112 * Float64(a * Float64(a * angle)))); end return tmp end
a = abs(a) b = abs(b) function tmp_2 = code(a, b, angle) tmp = 0.0; if (a <= 5.8e+159) tmp = 0.011111111111111112 * (angle * ((b - a) * ((b + a) * pi))); else tmp = pi * (-0.011111111111111112 * (a * (a * angle))); end tmp_2 = tmp; end
NOTE: a should be positive before calling this function NOTE: b should be positive before calling this function code[a_, b_, angle_] := If[LessEqual[a, 5.8e+159], N[(0.011111111111111112 * N[(angle * N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(Pi * N[(-0.011111111111111112 * N[(a * N[(a * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 5.8 \cdot 10^{+159}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \pi\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\pi \cdot \left(-0.011111111111111112 \cdot \left(a \cdot \left(a \cdot angle\right)\right)\right)\\
\end{array}
\end{array}
if a < 5.80000000000000029e159Initial program 59.1%
*-commutative59.1%
associate-*l*59.1%
associate-*l*59.1%
unpow259.1%
unpow259.1%
difference-of-squares60.8%
Simplified60.8%
Taylor expanded in angle around 0 57.6%
if 5.80000000000000029e159 < a Initial program 51.5%
*-commutative51.5%
associate-*l*51.5%
associate-*l*51.5%
unpow251.5%
unpow251.5%
difference-of-squares60.6%
Simplified60.6%
Taylor expanded in angle around 0 56.1%
Taylor expanded in b around 0 56.1%
*-commutative56.1%
*-commutative56.1%
unpow256.1%
Simplified56.1%
Taylor expanded in angle around 0 56.1%
*-commutative56.1%
associate-*r*56.1%
*-commutative56.1%
unpow256.1%
*-commutative56.1%
associate-*l*56.1%
*-commutative56.1%
unpow256.1%
*-commutative56.1%
unpow256.1%
Simplified56.1%
Taylor expanded in angle around 0 56.1%
unpow256.1%
associate-*r*77.1%
Simplified77.1%
Final simplification59.3%
NOTE: a should be positive before calling this function NOTE: b should be positive before calling this function (FPCore (a b angle) :precision binary64 (if (<= a 1.35e+153) (* 0.011111111111111112 (* angle (* (- b a) (* (+ b a) PI)))) (* 2.0 (* 0.005555555555555556 (* (* a angle) (* (- b a) PI))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
double tmp;
if (a <= 1.35e+153) {
tmp = 0.011111111111111112 * (angle * ((b - a) * ((b + a) * ((double) M_PI))));
} else {
tmp = 2.0 * (0.005555555555555556 * ((a * angle) * ((b - a) * ((double) M_PI))));
}
return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
double tmp;
if (a <= 1.35e+153) {
tmp = 0.011111111111111112 * (angle * ((b - a) * ((b + a) * Math.PI)));
} else {
tmp = 2.0 * (0.005555555555555556 * ((a * angle) * ((b - a) * Math.PI)));
}
return tmp;
}
a = abs(a) b = abs(b) def code(a, b, angle): tmp = 0 if a <= 1.35e+153: tmp = 0.011111111111111112 * (angle * ((b - a) * ((b + a) * math.pi))) else: tmp = 2.0 * (0.005555555555555556 * ((a * angle) * ((b - a) * math.pi))) return tmp
a = abs(a) b = abs(b) function code(a, b, angle) tmp = 0.0 if (a <= 1.35e+153) tmp = Float64(0.011111111111111112 * Float64(angle * Float64(Float64(b - a) * Float64(Float64(b + a) * pi)))); else tmp = Float64(2.0 * Float64(0.005555555555555556 * Float64(Float64(a * angle) * Float64(Float64(b - a) * pi)))); end return tmp end
a = abs(a) b = abs(b) function tmp_2 = code(a, b, angle) tmp = 0.0; if (a <= 1.35e+153) tmp = 0.011111111111111112 * (angle * ((b - a) * ((b + a) * pi))); else tmp = 2.0 * (0.005555555555555556 * ((a * angle) * ((b - a) * pi))); end tmp_2 = tmp; end
NOTE: a should be positive before calling this function NOTE: b should be positive before calling this function code[a_, b_, angle_] := If[LessEqual[a, 1.35e+153], N[(0.011111111111111112 * N[(angle * N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(0.005555555555555556 * N[(N[(a * angle), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.35 \cdot 10^{+153}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \pi\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(0.005555555555555556 \cdot \left(\left(a \cdot angle\right) \cdot \left(\left(b - a\right) \cdot \pi\right)\right)\right)\\
\end{array}
\end{array}
if a < 1.35e153Initial program 59.6%
*-commutative59.6%
associate-*l*59.6%
associate-*l*59.6%
unpow259.6%
unpow259.6%
difference-of-squares60.9%
Simplified60.9%
Taylor expanded in angle around 0 57.6%
if 1.35e153 < a Initial program 47.2%
*-commutative47.2%
associate-*l*47.2%
associate-*l*47.2%
unpow247.2%
unpow247.2%
difference-of-squares59.7%
Simplified59.7%
Taylor expanded in angle around inf 79.0%
associate-*r*79.0%
*-commutative79.0%
associate-*r*80.2%
*-commutative80.2%
*-commutative80.2%
*-commutative80.2%
associate-*r*79.1%
*-commutative79.1%
*-commutative79.1%
*-commutative79.1%
Simplified79.1%
Taylor expanded in a around inf 75.6%
Taylor expanded in angle around 0 52.0%
associate-*r*71.2%
*-commutative71.2%
Simplified71.2%
Final simplification58.9%
NOTE: a should be positive before calling this function NOTE: b should be positive before calling this function (FPCore (a b angle) :precision binary64 (if (<= angle 2.15e+43) (* (+ b a) (* 0.011111111111111112 (* PI (* (- b a) angle)))) (* 0.011111111111111112 (* angle (* (- b a) (* a PI))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
double tmp;
if (angle <= 2.15e+43) {
tmp = (b + a) * (0.011111111111111112 * (((double) M_PI) * ((b - a) * angle)));
} else {
tmp = 0.011111111111111112 * (angle * ((b - a) * (a * ((double) M_PI))));
}
return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
double tmp;
if (angle <= 2.15e+43) {
tmp = (b + a) * (0.011111111111111112 * (Math.PI * ((b - a) * angle)));
} else {
tmp = 0.011111111111111112 * (angle * ((b - a) * (a * Math.PI)));
}
return tmp;
}
a = abs(a) b = abs(b) def code(a, b, angle): tmp = 0 if angle <= 2.15e+43: tmp = (b + a) * (0.011111111111111112 * (math.pi * ((b - a) * angle))) else: tmp = 0.011111111111111112 * (angle * ((b - a) * (a * math.pi))) return tmp
a = abs(a) b = abs(b) function code(a, b, angle) tmp = 0.0 if (angle <= 2.15e+43) tmp = Float64(Float64(b + a) * Float64(0.011111111111111112 * Float64(pi * Float64(Float64(b - a) * angle)))); else tmp = Float64(0.011111111111111112 * Float64(angle * Float64(Float64(b - a) * Float64(a * pi)))); end return tmp end
a = abs(a) b = abs(b) function tmp_2 = code(a, b, angle) tmp = 0.0; if (angle <= 2.15e+43) tmp = (b + a) * (0.011111111111111112 * (pi * ((b - a) * angle))); else tmp = 0.011111111111111112 * (angle * ((b - a) * (a * pi))); end tmp_2 = tmp; end
NOTE: a should be positive before calling this function NOTE: b should be positive before calling this function code[a_, b_, angle_] := If[LessEqual[angle, 2.15e+43], N[(N[(b + a), $MachinePrecision] * N[(0.011111111111111112 * N[(Pi * N[(N[(b - a), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle * N[(N[(b - a), $MachinePrecision] * N[(a * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 2.15 \cdot 10^{+43}:\\
\;\;\;\;\left(b + a\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot angle\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(a \cdot \pi\right)\right)\right)\\
\end{array}
\end{array}
if angle < 2.15e43Initial program 65.6%
*-commutative65.6%
associate-*l*65.6%
associate-*l*65.6%
unpow265.6%
unpow265.6%
difference-of-squares68.1%
Simplified68.1%
Taylor expanded in angle around inf 65.3%
expm1-log1p-u50.2%
expm1-udef32.5%
Applied egg-rr38.3%
expm1-def56.1%
expm1-log1p78.5%
*-commutative78.5%
Simplified78.5%
Taylor expanded in angle around 0 76.5%
associate-*r*76.5%
*-commutative76.5%
Simplified76.5%
if 2.15e43 < angle Initial program 35.2%
*-commutative35.2%
associate-*l*35.2%
associate-*l*35.2%
unpow235.2%
unpow235.2%
difference-of-squares36.9%
Simplified36.9%
Taylor expanded in angle around 0 32.0%
Taylor expanded in a around inf 27.5%
*-commutative27.5%
Simplified27.5%
Final simplification65.0%
NOTE: a should be positive before calling this function NOTE: b should be positive before calling this function (FPCore (a b angle) :precision binary64 (if (<= a 6e-29) (* PI (* -0.011111111111111112 (* angle (* a a)))) (* -0.011111111111111112 (* PI (* a (* a angle))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
double tmp;
if (a <= 6e-29) {
tmp = ((double) M_PI) * (-0.011111111111111112 * (angle * (a * a)));
} else {
tmp = -0.011111111111111112 * (((double) M_PI) * (a * (a * angle)));
}
return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
double tmp;
if (a <= 6e-29) {
tmp = Math.PI * (-0.011111111111111112 * (angle * (a * a)));
} else {
tmp = -0.011111111111111112 * (Math.PI * (a * (a * angle)));
}
return tmp;
}
a = abs(a) b = abs(b) def code(a, b, angle): tmp = 0 if a <= 6e-29: tmp = math.pi * (-0.011111111111111112 * (angle * (a * a))) else: tmp = -0.011111111111111112 * (math.pi * (a * (a * angle))) return tmp
a = abs(a) b = abs(b) function code(a, b, angle) tmp = 0.0 if (a <= 6e-29) tmp = Float64(pi * Float64(-0.011111111111111112 * Float64(angle * Float64(a * a)))); else tmp = Float64(-0.011111111111111112 * Float64(pi * Float64(a * Float64(a * angle)))); end return tmp end
a = abs(a) b = abs(b) function tmp_2 = code(a, b, angle) tmp = 0.0; if (a <= 6e-29) tmp = pi * (-0.011111111111111112 * (angle * (a * a))); else tmp = -0.011111111111111112 * (pi * (a * (a * angle))); end tmp_2 = tmp; end
NOTE: a should be positive before calling this function NOTE: b should be positive before calling this function code[a_, b_, angle_] := If[LessEqual[a, 6e-29], N[(Pi * N[(-0.011111111111111112 * N[(angle * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-0.011111111111111112 * N[(Pi * N[(a * N[(a * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 6 \cdot 10^{-29}:\\
\;\;\;\;\pi \cdot \left(-0.011111111111111112 \cdot \left(angle \cdot \left(a \cdot a\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(a \cdot \left(a \cdot angle\right)\right)\right)\\
\end{array}
\end{array}
if a < 6.0000000000000005e-29Initial program 59.1%
*-commutative59.1%
associate-*l*59.1%
associate-*l*59.1%
unpow259.1%
unpow259.1%
difference-of-squares60.7%
Simplified60.7%
Taylor expanded in angle around 0 57.8%
Taylor expanded in b around 0 37.5%
*-commutative37.5%
*-commutative37.5%
unpow237.5%
Simplified37.5%
Taylor expanded in angle around 0 37.5%
*-commutative37.5%
associate-*r*37.5%
*-commutative37.5%
unpow237.5%
*-commutative37.5%
associate-*l*37.5%
*-commutative37.5%
unpow237.5%
*-commutative37.5%
unpow237.5%
Simplified37.5%
if 6.0000000000000005e-29 < a Initial program 56.9%
*-commutative56.9%
associate-*l*56.9%
associate-*l*56.9%
unpow256.9%
unpow256.9%
difference-of-squares61.1%
Simplified61.1%
Taylor expanded in angle around 0 56.8%
Taylor expanded in b around 0 35.9%
*-commutative35.9%
*-commutative35.9%
unpow235.9%
Simplified35.9%
Taylor expanded in angle around 0 35.9%
*-commutative35.9%
associate-*r*35.9%
*-commutative35.9%
unpow235.9%
*-commutative35.9%
associate-*l*35.9%
*-commutative35.9%
unpow235.9%
*-commutative35.9%
unpow235.9%
Simplified35.9%
Taylor expanded in angle around 0 35.9%
associate-*r*35.9%
unpow235.9%
associate-*r*42.4%
Simplified42.4%
Final simplification38.9%
NOTE: a should be positive before calling this function NOTE: b should be positive before calling this function (FPCore (a b angle) :precision binary64 (if (<= a 1.2e+141) (* (* angle -0.011111111111111112) (* PI (* a a))) (* PI (* -0.011111111111111112 (* a (* a angle))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
double tmp;
if (a <= 1.2e+141) {
tmp = (angle * -0.011111111111111112) * (((double) M_PI) * (a * a));
} else {
tmp = ((double) M_PI) * (-0.011111111111111112 * (a * (a * angle)));
}
return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
double tmp;
if (a <= 1.2e+141) {
tmp = (angle * -0.011111111111111112) * (Math.PI * (a * a));
} else {
tmp = Math.PI * (-0.011111111111111112 * (a * (a * angle)));
}
return tmp;
}
a = abs(a) b = abs(b) def code(a, b, angle): tmp = 0 if a <= 1.2e+141: tmp = (angle * -0.011111111111111112) * (math.pi * (a * a)) else: tmp = math.pi * (-0.011111111111111112 * (a * (a * angle))) return tmp
a = abs(a) b = abs(b) function code(a, b, angle) tmp = 0.0 if (a <= 1.2e+141) tmp = Float64(Float64(angle * -0.011111111111111112) * Float64(pi * Float64(a * a))); else tmp = Float64(pi * Float64(-0.011111111111111112 * Float64(a * Float64(a * angle)))); end return tmp end
a = abs(a) b = abs(b) function tmp_2 = code(a, b, angle) tmp = 0.0; if (a <= 1.2e+141) tmp = (angle * -0.011111111111111112) * (pi * (a * a)); else tmp = pi * (-0.011111111111111112 * (a * (a * angle))); end tmp_2 = tmp; end
NOTE: a should be positive before calling this function NOTE: b should be positive before calling this function code[a_, b_, angle_] := If[LessEqual[a, 1.2e+141], N[(N[(angle * -0.011111111111111112), $MachinePrecision] * N[(Pi * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(Pi * N[(-0.011111111111111112 * N[(a * N[(a * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.2 \cdot 10^{+141}:\\
\;\;\;\;\left(angle \cdot -0.011111111111111112\right) \cdot \left(\pi \cdot \left(a \cdot a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\pi \cdot \left(-0.011111111111111112 \cdot \left(a \cdot \left(a \cdot angle\right)\right)\right)\\
\end{array}
\end{array}
if a < 1.19999999999999999e141Initial program 59.6%
*-commutative59.6%
associate-*l*59.6%
associate-*l*59.6%
unpow259.6%
unpow259.6%
difference-of-squares61.0%
Simplified61.0%
Taylor expanded in angle around 0 57.6%
Taylor expanded in b around 0 35.7%
*-commutative35.7%
*-commutative35.7%
unpow235.7%
Simplified35.7%
Taylor expanded in angle around 0 35.7%
associate-*r*35.7%
*-commutative35.7%
unpow235.7%
Simplified35.7%
if 1.19999999999999999e141 < a Initial program 50.0%
*-commutative50.0%
associate-*l*50.0%
associate-*l*50.0%
unpow250.0%
unpow250.0%
difference-of-squares59.7%
Simplified59.7%
Taylor expanded in angle around 0 57.0%
Taylor expanded in b around 0 47.3%
*-commutative47.3%
*-commutative47.3%
unpow247.3%
Simplified47.3%
Taylor expanded in angle around 0 47.3%
*-commutative47.3%
associate-*r*47.3%
*-commutative47.3%
unpow247.3%
*-commutative47.3%
associate-*l*47.3%
*-commutative47.3%
unpow247.3%
*-commutative47.3%
unpow247.3%
Simplified47.3%
Taylor expanded in angle around 0 47.3%
unpow247.3%
associate-*r*62.2%
Simplified62.2%
Final simplification38.9%
NOTE: a should be positive before calling this function NOTE: b should be positive before calling this function (FPCore (a b angle) :precision binary64 (if (<= b 15000000000000.0) (* -0.011111111111111112 (* PI (* a (* a angle)))) (* 0.011111111111111112 (* angle (* PI (* b b))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
double tmp;
if (b <= 15000000000000.0) {
tmp = -0.011111111111111112 * (((double) M_PI) * (a * (a * angle)));
} else {
tmp = 0.011111111111111112 * (angle * (((double) M_PI) * (b * b)));
}
return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
double tmp;
if (b <= 15000000000000.0) {
tmp = -0.011111111111111112 * (Math.PI * (a * (a * angle)));
} else {
tmp = 0.011111111111111112 * (angle * (Math.PI * (b * b)));
}
return tmp;
}
a = abs(a) b = abs(b) def code(a, b, angle): tmp = 0 if b <= 15000000000000.0: tmp = -0.011111111111111112 * (math.pi * (a * (a * angle))) else: tmp = 0.011111111111111112 * (angle * (math.pi * (b * b))) return tmp
a = abs(a) b = abs(b) function code(a, b, angle) tmp = 0.0 if (b <= 15000000000000.0) tmp = Float64(-0.011111111111111112 * Float64(pi * Float64(a * Float64(a * angle)))); else tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(b * b)))); end return tmp end
a = abs(a) b = abs(b) function tmp_2 = code(a, b, angle) tmp = 0.0; if (b <= 15000000000000.0) tmp = -0.011111111111111112 * (pi * (a * (a * angle))); else tmp = 0.011111111111111112 * (angle * (pi * (b * b))); end tmp_2 = tmp; end
NOTE: a should be positive before calling this function NOTE: b should be positive before calling this function code[a_, b_, angle_] := If[LessEqual[b, 15000000000000.0], N[(-0.011111111111111112 * N[(Pi * N[(a * N[(a * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq 15000000000000:\\
\;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(a \cdot \left(a \cdot angle\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\
\end{array}
\end{array}
if b < 1.5e13Initial program 59.5%
*-commutative59.5%
associate-*l*59.5%
associate-*l*59.5%
unpow259.5%
unpow259.5%
difference-of-squares61.7%
Simplified61.7%
Taylor expanded in angle around 0 60.1%
Taylor expanded in b around 0 46.0%
*-commutative46.0%
*-commutative46.0%
unpow246.0%
Simplified46.0%
Taylor expanded in angle around 0 46.0%
*-commutative46.0%
associate-*r*46.0%
*-commutative46.0%
unpow246.0%
*-commutative46.0%
associate-*l*46.0%
*-commutative46.0%
unpow246.0%
*-commutative46.0%
unpow246.0%
Simplified46.0%
Taylor expanded in angle around 0 46.0%
associate-*r*46.0%
unpow246.0%
associate-*r*47.9%
Simplified47.9%
if 1.5e13 < b Initial program 55.5%
*-commutative55.5%
associate-*l*55.5%
associate-*l*55.5%
unpow255.5%
unpow255.5%
difference-of-squares58.4%
Simplified58.4%
Taylor expanded in angle around 0 50.3%
Taylor expanded in b around inf 46.1%
*-commutative46.1%
*-commutative46.1%
unpow246.1%
Simplified46.1%
Final simplification47.4%
NOTE: a should be positive before calling this function NOTE: b should be positive before calling this function (FPCore (a b angle) :precision binary64 (* -0.011111111111111112 (* PI (* a (* a angle)))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
return -0.011111111111111112 * (((double) M_PI) * (a * (a * angle)));
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
return -0.011111111111111112 * (Math.PI * (a * (a * angle)));
}
a = abs(a) b = abs(b) def code(a, b, angle): return -0.011111111111111112 * (math.pi * (a * (a * angle)))
a = abs(a) b = abs(b) function code(a, b, angle) return Float64(-0.011111111111111112 * Float64(pi * Float64(a * Float64(a * angle)))) end
a = abs(a) b = abs(b) function tmp = code(a, b, angle) tmp = -0.011111111111111112 * (pi * (a * (a * angle))); end
NOTE: a should be positive before calling this function NOTE: b should be positive before calling this function code[a_, b_, angle_] := N[(-0.011111111111111112 * N[(Pi * N[(a * N[(a * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
-0.011111111111111112 \cdot \left(\pi \cdot \left(a \cdot \left(a \cdot angle\right)\right)\right)
\end{array}
Initial program 58.5%
*-commutative58.5%
associate-*l*58.5%
associate-*l*58.5%
unpow258.5%
unpow258.5%
difference-of-squares60.8%
Simplified60.8%
Taylor expanded in angle around 0 57.5%
Taylor expanded in b around 0 37.1%
*-commutative37.1%
*-commutative37.1%
unpow237.1%
Simplified37.1%
Taylor expanded in angle around 0 37.1%
*-commutative37.1%
associate-*r*37.1%
*-commutative37.1%
unpow237.1%
*-commutative37.1%
associate-*l*37.1%
*-commutative37.1%
unpow237.1%
*-commutative37.1%
unpow237.1%
Simplified37.1%
Taylor expanded in angle around 0 37.1%
associate-*r*37.1%
unpow237.1%
associate-*r*39.2%
Simplified39.2%
Final simplification39.2%
herbie shell --seed 2023264
(FPCore (a b angle)
:name "ab-angle->ABCF B"
:precision binary64
(* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin (* PI (/ angle 180.0)))) (cos (* PI (/ angle 180.0)))))