
(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 21 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 (<= (/ angle 180.0) -5e+151)
(* (+ b a) (fabs (* (- b a) (sin (* angle (* PI 0.011111111111111112))))))
(if (<= (/ angle 180.0) -2e+21)
(*
(+ b a)
(*
(- b a)
(sin (* 2.0 (* PI (* 0.005555555555555556 (pow (/ 1.0 angle) -1.0)))))))
(if (<= (/ angle 180.0) 3e+112)
(*
(+ b a)
(*
(- b a)
(sin (* 2.0 (* (* 0.005555555555555556 angle) (cbrt (pow PI 3.0)))))))
(* (sin (* 2.0 (* angle (/ PI 180.0)))) (* (+ b a) (- b a)))))))a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
double tmp;
if ((angle / 180.0) <= -5e+151) {
tmp = (b + a) * fabs(((b - a) * sin((angle * (((double) M_PI) * 0.011111111111111112)))));
} else if ((angle / 180.0) <= -2e+21) {
tmp = (b + a) * ((b - a) * sin((2.0 * (((double) M_PI) * (0.005555555555555556 * pow((1.0 / angle), -1.0))))));
} else if ((angle / 180.0) <= 3e+112) {
tmp = (b + a) * ((b - a) * sin((2.0 * ((0.005555555555555556 * angle) * cbrt(pow(((double) M_PI), 3.0))))));
} else {
tmp = sin((2.0 * (angle * (((double) M_PI) / 180.0)))) * ((b + a) * (b - a));
}
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) <= -5e+151) {
tmp = (b + a) * Math.abs(((b - a) * Math.sin((angle * (Math.PI * 0.011111111111111112)))));
} else if ((angle / 180.0) <= -2e+21) {
tmp = (b + a) * ((b - a) * Math.sin((2.0 * (Math.PI * (0.005555555555555556 * Math.pow((1.0 / angle), -1.0))))));
} else if ((angle / 180.0) <= 3e+112) {
tmp = (b + a) * ((b - a) * Math.sin((2.0 * ((0.005555555555555556 * angle) * Math.cbrt(Math.pow(Math.PI, 3.0))))));
} else {
tmp = Math.sin((2.0 * (angle * (Math.PI / 180.0)))) * ((b + a) * (b - a));
}
return tmp;
}
a = abs(a) b = abs(b) function code(a, b, angle) tmp = 0.0 if (Float64(angle / 180.0) <= -5e+151) tmp = Float64(Float64(b + a) * abs(Float64(Float64(b - a) * sin(Float64(angle * Float64(pi * 0.011111111111111112)))))); elseif (Float64(angle / 180.0) <= -2e+21) tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(2.0 * Float64(pi * Float64(0.005555555555555556 * (Float64(1.0 / angle) ^ -1.0))))))); elseif (Float64(angle / 180.0) <= 3e+112) tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(2.0 * Float64(Float64(0.005555555555555556 * angle) * cbrt((pi ^ 3.0))))))); else tmp = Float64(sin(Float64(2.0 * Float64(angle * Float64(pi / 180.0)))) * Float64(Float64(b + a) * Float64(b - a))); 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], -5e+151], N[(N[(b + a), $MachinePrecision] * N[Abs[N[(N[(b - a), $MachinePrecision] * N[Sin[N[(angle * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], -2e+21], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(2.0 * N[(Pi * N[(0.005555555555555556 * N[Power[N[(1.0 / angle), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 3e+112], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(2.0 * N[(N[(0.005555555555555556 * angle), $MachinePrecision] * N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(2.0 * N[(angle * N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{angle}{180} \leq -5 \cdot 10^{+151}:\\
\;\;\;\;\left(b + a\right) \cdot \left|\left(b - a\right) \cdot \sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right|\\
\mathbf{elif}\;\frac{angle}{180} \leq -2 \cdot 10^{+21}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(0.005555555555555556 \cdot {\left(\frac{1}{angle}\right)}^{-1}\right)\right)\right)\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq 3 \cdot 10^{+112}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\left(0.005555555555555556 \cdot angle\right) \cdot \sqrt[3]{{\pi}^{3}}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(2 \cdot \left(angle \cdot \frac{\pi}{180}\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle 180) < -5.0000000000000002e151Initial program 31.0%
*-commutative31.0%
associate-*l*31.0%
associate-*l*31.0%
unpow231.0%
unpow231.0%
difference-of-squares31.0%
Simplified31.0%
difference-of-squares31.0%
*-commutative31.0%
prod-diff18.9%
fma-neg18.9%
distribute-lft-in18.9%
Applied egg-rr19.4%
*-commutative19.4%
distribute-rgt-out19.4%
*-commutative19.4%
Simplified34.6%
metadata-eval34.6%
div-inv31.0%
clear-num34.4%
Applied egg-rr34.4%
add-sqr-sqrt18.9%
sqrt-unprod30.8%
pow230.8%
*-commutative30.8%
*-commutative30.8%
associate-/r/30.6%
metadata-eval30.6%
*-commutative30.6%
associate-*r*30.5%
associate-*l*30.5%
metadata-eval30.5%
Applied egg-rr30.5%
unpow230.5%
rem-sqrt-square30.5%
*-commutative30.5%
*-commutative30.5%
associate-*l*30.6%
Simplified30.6%
if -5.0000000000000002e151 < (/.f64 angle 180) < -2e21Initial program 25.7%
*-commutative25.7%
associate-*l*25.7%
associate-*l*25.7%
unpow225.7%
unpow225.7%
difference-of-squares29.1%
Simplified29.1%
difference-of-squares25.7%
*-commutative25.7%
prod-diff15.3%
fma-neg15.3%
distribute-lft-in15.3%
Applied egg-rr15.9%
*-commutative15.9%
distribute-rgt-out15.9%
*-commutative15.9%
Simplified29.7%
metadata-eval29.7%
div-inv29.1%
add-cube-cbrt32.7%
pow330.9%
div-inv31.1%
metadata-eval31.1%
Applied egg-rr31.1%
rem-cube-cbrt29.7%
metadata-eval29.7%
div-inv29.1%
clear-num31.1%
inv-pow31.1%
div-inv26.1%
unpow-prod-down36.7%
metadata-eval36.7%
Applied egg-rr36.7%
if -2e21 < (/.f64 angle 180) < 2.99999999999999979e112Initial program 68.5%
*-commutative68.5%
associate-*l*68.5%
associate-*l*68.5%
unpow268.5%
unpow268.5%
difference-of-squares69.9%
Simplified69.9%
difference-of-squares68.5%
*-commutative68.5%
prod-diff59.8%
fma-neg59.8%
distribute-lft-in59.8%
Applied egg-rr61.1%
*-commutative61.1%
distribute-rgt-out61.1%
*-commutative61.1%
Simplified86.0%
add-cbrt-cube90.3%
pow390.3%
Applied egg-rr90.3%
if 2.99999999999999979e112 < (/.f64 angle 180) Initial program 54.0%
*-commutative54.0%
associate-*l*54.0%
associate-*l*54.0%
unpow254.0%
unpow254.0%
difference-of-squares56.6%
Simplified56.6%
Taylor expanded in angle around inf 47.6%
Applied egg-rr37.4%
expm1-def39.5%
expm1-log1p56.8%
*-commutative56.8%
+-commutative56.8%
*-commutative56.8%
metadata-eval56.8%
associate-/r/56.8%
associate-*r/51.8%
*-rgt-identity51.8%
associate-/r/59.4%
Simplified59.4%
Final simplification72.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 (<= (- (pow b 2.0) (pow a 2.0)) 1e-221)
(*
(+ b a)
(*
(- b a)
(sin (* 2.0 (* PI (* 0.005555555555555556 (pow (/ 1.0 angle) -1.0)))))))
(*
(+ b a)
(*
(- b a)
(sin (* 2.0 (* (pow (sqrt PI) 2.0) (* 0.005555555555555556 angle))))))))a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
double tmp;
if ((pow(b, 2.0) - pow(a, 2.0)) <= 1e-221) {
tmp = (b + a) * ((b - a) * sin((2.0 * (((double) M_PI) * (0.005555555555555556 * pow((1.0 / angle), -1.0))))));
} else {
tmp = (b + a) * ((b - a) * sin((2.0 * (pow(sqrt(((double) M_PI)), 2.0) * (0.005555555555555556 * angle)))));
}
return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
double tmp;
if ((Math.pow(b, 2.0) - Math.pow(a, 2.0)) <= 1e-221) {
tmp = (b + a) * ((b - a) * Math.sin((2.0 * (Math.PI * (0.005555555555555556 * Math.pow((1.0 / angle), -1.0))))));
} else {
tmp = (b + a) * ((b - a) * Math.sin((2.0 * (Math.pow(Math.sqrt(Math.PI), 2.0) * (0.005555555555555556 * angle)))));
}
return tmp;
}
a = abs(a) b = abs(b) def code(a, b, angle): tmp = 0 if (math.pow(b, 2.0) - math.pow(a, 2.0)) <= 1e-221: tmp = (b + a) * ((b - a) * math.sin((2.0 * (math.pi * (0.005555555555555556 * math.pow((1.0 / angle), -1.0)))))) else: tmp = (b + a) * ((b - a) * math.sin((2.0 * (math.pow(math.sqrt(math.pi), 2.0) * (0.005555555555555556 * angle))))) return tmp
a = abs(a) b = abs(b) function code(a, b, angle) tmp = 0.0 if (Float64((b ^ 2.0) - (a ^ 2.0)) <= 1e-221) tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(2.0 * Float64(pi * Float64(0.005555555555555556 * (Float64(1.0 / angle) ^ -1.0))))))); else tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(2.0 * Float64((sqrt(pi) ^ 2.0) * Float64(0.005555555555555556 * angle)))))); end return tmp end
a = abs(a) b = abs(b) function tmp_2 = code(a, b, angle) tmp = 0.0; if (((b ^ 2.0) - (a ^ 2.0)) <= 1e-221) tmp = (b + a) * ((b - a) * sin((2.0 * (pi * (0.005555555555555556 * ((1.0 / angle) ^ -1.0)))))); else tmp = (b + a) * ((b - a) * sin((2.0 * ((sqrt(pi) ^ 2.0) * (0.005555555555555556 * 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[N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision], 1e-221], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(2.0 * N[(Pi * N[(0.005555555555555556 * N[Power[N[(1.0 / angle), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(2.0 * N[(N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision] * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;{b}^{2} - {a}^{2} \leq 10^{-221}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(0.005555555555555556 \cdot {\left(\frac{1}{angle}\right)}^{-1}\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left({\left(\sqrt{\pi}\right)}^{2} \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b 2) (pow.f64 a 2)) < 1.00000000000000002e-221Initial program 65.8%
*-commutative65.8%
associate-*l*65.8%
associate-*l*65.8%
unpow265.8%
unpow265.8%
difference-of-squares65.8%
Simplified65.8%
difference-of-squares65.8%
*-commutative65.8%
prod-diff45.3%
fma-neg45.3%
distribute-lft-in45.3%
Applied egg-rr45.6%
*-commutative45.6%
distribute-rgt-out45.5%
*-commutative45.5%
Simplified73.3%
metadata-eval73.3%
div-inv73.0%
add-cube-cbrt70.3%
pow370.0%
div-inv70.7%
metadata-eval70.7%
Applied egg-rr70.7%
rem-cube-cbrt73.3%
metadata-eval73.3%
div-inv73.0%
clear-num73.4%
inv-pow73.4%
div-inv72.1%
unpow-prod-down73.8%
metadata-eval73.8%
Applied egg-rr73.8%
if 1.00000000000000002e-221 < (-.f64 (pow.f64 b 2) (pow.f64 a 2)) Initial program 44.8%
*-commutative44.8%
associate-*l*44.8%
associate-*l*44.8%
unpow244.8%
unpow244.8%
difference-of-squares48.7%
Simplified48.7%
difference-of-squares44.8%
*-commutative44.8%
prod-diff44.8%
fma-neg44.8%
distribute-lft-in44.8%
Applied egg-rr46.7%
*-commutative46.7%
distribute-rgt-out46.7%
*-commutative46.7%
Simplified62.7%
add-sqr-sqrt70.2%
pow270.2%
Applied egg-rr70.2%
Final simplification72.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 (<= (/ angle 180.0) 3e+112) (* (+ b a) (* (- b a) (sin (* 2.0 (/ (* PI angle) 180.0))))) (* (sin (* 2.0 (* angle (/ PI 180.0)))) (* (+ b a) (- b a)))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
double tmp;
if ((angle / 180.0) <= 3e+112) {
tmp = (b + a) * ((b - a) * sin((2.0 * ((((double) M_PI) * angle) / 180.0))));
} else {
tmp = sin((2.0 * (angle * (((double) M_PI) / 180.0)))) * ((b + a) * (b - a));
}
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) <= 3e+112) {
tmp = (b + a) * ((b - a) * Math.sin((2.0 * ((Math.PI * angle) / 180.0))));
} else {
tmp = Math.sin((2.0 * (angle * (Math.PI / 180.0)))) * ((b + a) * (b - a));
}
return tmp;
}
a = abs(a) b = abs(b) def code(a, b, angle): tmp = 0 if (angle / 180.0) <= 3e+112: tmp = (b + a) * ((b - a) * math.sin((2.0 * ((math.pi * angle) / 180.0)))) else: tmp = math.sin((2.0 * (angle * (math.pi / 180.0)))) * ((b + a) * (b - a)) return tmp
a = abs(a) b = abs(b) function code(a, b, angle) tmp = 0.0 if (Float64(angle / 180.0) <= 3e+112) tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(2.0 * Float64(Float64(pi * angle) / 180.0))))); else tmp = Float64(sin(Float64(2.0 * Float64(angle * Float64(pi / 180.0)))) * Float64(Float64(b + a) * Float64(b - a))); end return tmp end
a = abs(a) b = abs(b) function tmp_2 = code(a, b, angle) tmp = 0.0; if ((angle / 180.0) <= 3e+112) tmp = (b + a) * ((b - a) * sin((2.0 * ((pi * angle) / 180.0)))); else tmp = sin((2.0 * (angle * (pi / 180.0)))) * ((b + a) * (b - a)); 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], 3e+112], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(2.0 * N[(N[(Pi * angle), $MachinePrecision] / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(2.0 * N[(angle * N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{angle}{180} \leq 3 \cdot 10^{+112}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \frac{\pi \cdot angle}{180}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(2 \cdot \left(angle \cdot \frac{\pi}{180}\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle 180) < 2.99999999999999979e112Initial program 57.1%
*-commutative57.1%
associate-*l*57.1%
associate-*l*57.1%
unpow257.1%
unpow257.1%
difference-of-squares58.6%
Simplified58.6%
difference-of-squares57.1%
*-commutative57.1%
prod-diff47.7%
fma-neg47.7%
distribute-lft-in47.7%
Applied egg-rr48.8%
*-commutative48.8%
distribute-rgt-out48.7%
*-commutative48.7%
Simplified70.7%
metadata-eval70.7%
div-inv70.5%
associate-*r/72.3%
Applied egg-rr72.3%
if 2.99999999999999979e112 < (/.f64 angle 180) Initial program 54.0%
*-commutative54.0%
associate-*l*54.0%
associate-*l*54.0%
unpow254.0%
unpow254.0%
difference-of-squares56.6%
Simplified56.6%
Taylor expanded in angle around inf 47.6%
Applied egg-rr37.4%
expm1-def39.5%
expm1-log1p56.8%
*-commutative56.8%
+-commutative56.8%
*-commutative56.8%
metadata-eval56.8%
associate-/r/56.8%
associate-*r/51.8%
*-rgt-identity51.8%
associate-/r/59.4%
Simplified59.4%
Final simplification70.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 3.6e+189) (* (+ b a) (* (- b a) (sin (* 2.0 (/ PI (/ 180.0 angle)))))) (* (+ b a) (* (sin (* PI (* angle 0.011111111111111112))) (- a)))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
double tmp;
if (a <= 3.6e+189) {
tmp = (b + a) * ((b - a) * sin((2.0 * (((double) M_PI) / (180.0 / angle)))));
} else {
tmp = (b + a) * (sin((((double) M_PI) * (angle * 0.011111111111111112))) * -a);
}
return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
double tmp;
if (a <= 3.6e+189) {
tmp = (b + a) * ((b - a) * Math.sin((2.0 * (Math.PI / (180.0 / angle)))));
} else {
tmp = (b + a) * (Math.sin((Math.PI * (angle * 0.011111111111111112))) * -a);
}
return tmp;
}
a = abs(a) b = abs(b) def code(a, b, angle): tmp = 0 if a <= 3.6e+189: tmp = (b + a) * ((b - a) * math.sin((2.0 * (math.pi / (180.0 / angle))))) else: tmp = (b + a) * (math.sin((math.pi * (angle * 0.011111111111111112))) * -a) return tmp
a = abs(a) b = abs(b) function code(a, b, angle) tmp = 0.0 if (a <= 3.6e+189) tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(2.0 * Float64(pi / Float64(180.0 / angle)))))); else tmp = Float64(Float64(b + a) * Float64(sin(Float64(pi * Float64(angle * 0.011111111111111112))) * Float64(-a))); end return tmp end
a = abs(a) b = abs(b) function tmp_2 = code(a, b, angle) tmp = 0.0; if (a <= 3.6e+189) tmp = (b + a) * ((b - a) * sin((2.0 * (pi / (180.0 / angle))))); else tmp = (b + a) * (sin((pi * (angle * 0.011111111111111112))) * -a); 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, 3.6e+189], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(2.0 * N[(Pi / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + a), $MachinePrecision] * N[(N[Sin[N[(Pi * N[(angle * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-a)), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 3.6 \cdot 10^{+189}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \frac{\pi}{\frac{180}{angle}}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \left(-a\right)\right)\\
\end{array}
\end{array}
if a < 3.60000000000000008e189Initial program 57.7%
*-commutative57.7%
associate-*l*57.7%
associate-*l*57.7%
unpow257.7%
unpow257.7%
difference-of-squares58.6%
Simplified58.6%
difference-of-squares57.7%
*-commutative57.7%
prod-diff50.2%
fma-neg50.2%
distribute-lft-in50.2%
Applied egg-rr51.3%
*-commutative51.3%
distribute-rgt-out51.2%
*-commutative51.2%
Simplified67.7%
metadata-eval67.7%
div-inv67.5%
clear-num68.3%
Applied egg-rr68.3%
un-div-inv68.3%
Applied egg-rr68.3%
if 3.60000000000000008e189 < a Initial program 47.0%
*-commutative47.0%
associate-*l*47.0%
associate-*l*47.0%
unpow247.0%
unpow247.0%
difference-of-squares55.4%
Simplified55.4%
difference-of-squares47.0%
*-commutative47.0%
prod-diff0.0%
fma-neg0.0%
distribute-lft-in0.0%
Applied egg-rr0.0%
*-commutative0.0%
distribute-rgt-out0.0%
*-commutative0.0%
Simplified76.9%
metadata-eval76.9%
div-inv76.9%
clear-num80.6%
Applied egg-rr80.6%
Taylor expanded in b around 0 76.7%
mul-1-neg76.7%
*-commutative76.7%
*-commutative76.7%
*-commutative76.7%
distribute-rgt-neg-out76.7%
associate-*l*80.8%
Simplified80.8%
Final simplification69.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 (* (+ b a) (* (- b a) (sin (* 2.0 (* PI (/ 1.0 (/ 180.0 angle))))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
return (b + a) * ((b - a) * sin((2.0 * (((double) M_PI) * (1.0 / (180.0 / 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((2.0 * (Math.PI * (1.0 / (180.0 / angle))))));
}
a = abs(a) b = abs(b) def code(a, b, angle): return (b + a) * ((b - a) * math.sin((2.0 * (math.pi * (1.0 / (180.0 / angle))))))
a = abs(a) b = abs(b) function code(a, b, angle) return Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(2.0 * Float64(pi * Float64(1.0 / Float64(180.0 / angle))))))) end
a = abs(a) b = abs(b) function tmp = code(a, b, angle) tmp = (b + a) * ((b - a) * sin((2.0 * (pi * (1.0 / (180.0 / 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[(2.0 * N[(Pi * N[(1.0 / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]), $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(2 \cdot \left(\pi \cdot \frac{1}{\frac{180}{angle}}\right)\right)\right)
\end{array}
Initial program 56.6%
*-commutative56.6%
associate-*l*56.6%
associate-*l*56.6%
unpow256.6%
unpow256.6%
difference-of-squares58.3%
Simplified58.3%
difference-of-squares56.6%
*-commutative56.6%
prod-diff45.1%
fma-neg45.1%
distribute-lft-in45.1%
Applied egg-rr46.1%
*-commutative46.1%
distribute-rgt-out46.0%
*-commutative46.0%
Simplified68.6%
metadata-eval68.6%
div-inv68.5%
clear-num69.5%
Applied egg-rr69.5%
Final simplification69.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
(let* ((t_0 (sin (* angle (* PI 0.011111111111111112)))))
(if (<= a 1.5e-101)
(* (+ b a) (* b t_0))
(if (<= a 3.6e+173)
(* (+ b a) (* (* angle 0.011111111111111112) (* (- b a) PI)))
(* (+ b a) (* a (- t_0)))))))a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
double t_0 = sin((angle * (((double) M_PI) * 0.011111111111111112)));
double tmp;
if (a <= 1.5e-101) {
tmp = (b + a) * (b * t_0);
} else if (a <= 3.6e+173) {
tmp = (b + a) * ((angle * 0.011111111111111112) * ((b - a) * ((double) M_PI)));
} else {
tmp = (b + a) * (a * -t_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((angle * (Math.PI * 0.011111111111111112)));
double tmp;
if (a <= 1.5e-101) {
tmp = (b + a) * (b * t_0);
} else if (a <= 3.6e+173) {
tmp = (b + a) * ((angle * 0.011111111111111112) * ((b - a) * Math.PI));
} else {
tmp = (b + a) * (a * -t_0);
}
return tmp;
}
a = abs(a) b = abs(b) def code(a, b, angle): t_0 = math.sin((angle * (math.pi * 0.011111111111111112))) tmp = 0 if a <= 1.5e-101: tmp = (b + a) * (b * t_0) elif a <= 3.6e+173: tmp = (b + a) * ((angle * 0.011111111111111112) * ((b - a) * math.pi)) else: tmp = (b + a) * (a * -t_0) return tmp
a = abs(a) b = abs(b) function code(a, b, angle) t_0 = sin(Float64(angle * Float64(pi * 0.011111111111111112))) tmp = 0.0 if (a <= 1.5e-101) tmp = Float64(Float64(b + a) * Float64(b * t_0)); elseif (a <= 3.6e+173) tmp = Float64(Float64(b + a) * Float64(Float64(angle * 0.011111111111111112) * Float64(Float64(b - a) * pi))); else tmp = Float64(Float64(b + a) * Float64(a * Float64(-t_0))); end return tmp end
a = abs(a) b = abs(b) function tmp_2 = code(a, b, angle) t_0 = sin((angle * (pi * 0.011111111111111112))); tmp = 0.0; if (a <= 1.5e-101) tmp = (b + a) * (b * t_0); elseif (a <= 3.6e+173) tmp = (b + a) * ((angle * 0.011111111111111112) * ((b - a) * pi)); else tmp = (b + a) * (a * -t_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[(angle * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[a, 1.5e-101], N[(N[(b + a), $MachinePrecision] * N[(b * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.6e+173], N[(N[(b + a), $MachinePrecision] * N[(N[(angle * 0.011111111111111112), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + a), $MachinePrecision] * N[(a * (-t$95$0)), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
t_0 := \sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\\
\mathbf{if}\;a \leq 1.5 \cdot 10^{-101}:\\
\;\;\;\;\left(b + a\right) \cdot \left(b \cdot t_0\right)\\
\mathbf{elif}\;a \leq 3.6 \cdot 10^{+173}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(\left(b - a\right) \cdot \pi\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b + a\right) \cdot \left(a \cdot \left(-t_0\right)\right)\\
\end{array}
\end{array}
if a < 1.5000000000000002e-101Initial program 57.6%
*-commutative57.6%
associate-*l*57.6%
associate-*l*57.6%
unpow257.6%
unpow257.6%
difference-of-squares58.3%
Simplified58.3%
difference-of-squares57.6%
*-commutative57.6%
prod-diff49.8%
fma-neg49.8%
distribute-lft-in49.9%
Applied egg-rr50.5%
*-commutative50.5%
distribute-rgt-out50.5%
*-commutative50.5%
Simplified65.4%
metadata-eval65.4%
div-inv65.4%
clear-num65.8%
Applied egg-rr65.8%
Taylor expanded in b around inf 44.6%
*-commutative44.6%
associate-*l*46.3%
Simplified46.3%
if 1.5000000000000002e-101 < a < 3.6000000000000002e173Initial program 58.6%
*-commutative58.6%
associate-*l*58.6%
associate-*l*58.6%
unpow258.6%
unpow258.6%
difference-of-squares58.6%
Simplified58.6%
difference-of-squares58.6%
*-commutative58.6%
prod-diff55.3%
fma-neg55.3%
distribute-lft-in55.4%
Applied egg-rr56.0%
*-commutative56.0%
distribute-rgt-out55.9%
*-commutative55.9%
Simplified71.6%
metadata-eval71.6%
div-inv71.0%
clear-num72.7%
Applied egg-rr72.7%
Taylor expanded in angle around 0 67.5%
associate-*r*67.5%
Simplified67.5%
if 3.6000000000000002e173 < a Initial program 47.6%
*-commutative47.6%
associate-*l*47.6%
associate-*l*47.6%
unpow247.6%
unpow247.6%
difference-of-squares57.7%
Simplified57.7%
difference-of-squares47.6%
*-commutative47.6%
prod-diff0.0%
fma-neg0.0%
distribute-lft-in0.0%
Applied egg-rr3.1%
*-commutative3.1%
distribute-rgt-out3.1%
*-commutative3.1%
Simplified78.1%
metadata-eval78.1%
div-inv78.1%
clear-num81.2%
Applied egg-rr81.2%
Taylor expanded in b around 0 75.0%
mul-1-neg75.0%
*-commutative75.0%
*-commutative75.0%
*-commutative75.0%
distribute-rgt-neg-out75.0%
*-commutative75.0%
associate-*l*75.1%
Simplified75.1%
Final simplification55.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 2.2e-101)
(* (+ b a) (* b (sin (* angle (* PI 0.011111111111111112)))))
(if (<= a 2.5e+173)
(* (+ b a) (* (* angle 0.011111111111111112) (* (- b a) PI)))
(* (+ b a) (* (sin (* PI (* angle 0.011111111111111112))) (- a))))))a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
double tmp;
if (a <= 2.2e-101) {
tmp = (b + a) * (b * sin((angle * (((double) M_PI) * 0.011111111111111112))));
} else if (a <= 2.5e+173) {
tmp = (b + a) * ((angle * 0.011111111111111112) * ((b - a) * ((double) M_PI)));
} else {
tmp = (b + a) * (sin((((double) M_PI) * (angle * 0.011111111111111112))) * -a);
}
return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
double tmp;
if (a <= 2.2e-101) {
tmp = (b + a) * (b * Math.sin((angle * (Math.PI * 0.011111111111111112))));
} else if (a <= 2.5e+173) {
tmp = (b + a) * ((angle * 0.011111111111111112) * ((b - a) * Math.PI));
} else {
tmp = (b + a) * (Math.sin((Math.PI * (angle * 0.011111111111111112))) * -a);
}
return tmp;
}
a = abs(a) b = abs(b) def code(a, b, angle): tmp = 0 if a <= 2.2e-101: tmp = (b + a) * (b * math.sin((angle * (math.pi * 0.011111111111111112)))) elif a <= 2.5e+173: tmp = (b + a) * ((angle * 0.011111111111111112) * ((b - a) * math.pi)) else: tmp = (b + a) * (math.sin((math.pi * (angle * 0.011111111111111112))) * -a) return tmp
a = abs(a) b = abs(b) function code(a, b, angle) tmp = 0.0 if (a <= 2.2e-101) tmp = Float64(Float64(b + a) * Float64(b * sin(Float64(angle * Float64(pi * 0.011111111111111112))))); elseif (a <= 2.5e+173) tmp = Float64(Float64(b + a) * Float64(Float64(angle * 0.011111111111111112) * Float64(Float64(b - a) * pi))); else tmp = Float64(Float64(b + a) * Float64(sin(Float64(pi * Float64(angle * 0.011111111111111112))) * Float64(-a))); end return tmp end
a = abs(a) b = abs(b) function tmp_2 = code(a, b, angle) tmp = 0.0; if (a <= 2.2e-101) tmp = (b + a) * (b * sin((angle * (pi * 0.011111111111111112)))); elseif (a <= 2.5e+173) tmp = (b + a) * ((angle * 0.011111111111111112) * ((b - a) * pi)); else tmp = (b + a) * (sin((pi * (angle * 0.011111111111111112))) * -a); 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, 2.2e-101], N[(N[(b + a), $MachinePrecision] * N[(b * N[Sin[N[(angle * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.5e+173], N[(N[(b + a), $MachinePrecision] * N[(N[(angle * 0.011111111111111112), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + a), $MachinePrecision] * N[(N[Sin[N[(Pi * N[(angle * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-a)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.2 \cdot 10^{-101}:\\
\;\;\;\;\left(b + a\right) \cdot \left(b \cdot \sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\
\mathbf{elif}\;a \leq 2.5 \cdot 10^{+173}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(\left(b - a\right) \cdot \pi\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \left(-a\right)\right)\\
\end{array}
\end{array}
if a < 2.1999999999999999e-101Initial program 57.6%
*-commutative57.6%
associate-*l*57.6%
associate-*l*57.6%
unpow257.6%
unpow257.6%
difference-of-squares58.3%
Simplified58.3%
difference-of-squares57.6%
*-commutative57.6%
prod-diff49.8%
fma-neg49.8%
distribute-lft-in49.9%
Applied egg-rr50.5%
*-commutative50.5%
distribute-rgt-out50.5%
*-commutative50.5%
Simplified65.4%
metadata-eval65.4%
div-inv65.4%
clear-num65.8%
Applied egg-rr65.8%
Taylor expanded in b around inf 44.6%
*-commutative44.6%
associate-*l*46.3%
Simplified46.3%
if 2.1999999999999999e-101 < a < 2.50000000000000017e173Initial program 58.6%
*-commutative58.6%
associate-*l*58.6%
associate-*l*58.6%
unpow258.6%
unpow258.6%
difference-of-squares58.6%
Simplified58.6%
difference-of-squares58.6%
*-commutative58.6%
prod-diff55.3%
fma-neg55.3%
distribute-lft-in55.4%
Applied egg-rr56.0%
*-commutative56.0%
distribute-rgt-out55.9%
*-commutative55.9%
Simplified71.6%
metadata-eval71.6%
div-inv71.0%
clear-num72.7%
Applied egg-rr72.7%
Taylor expanded in angle around 0 67.5%
associate-*r*67.5%
Simplified67.5%
if 2.50000000000000017e173 < a Initial program 47.6%
*-commutative47.6%
associate-*l*47.6%
associate-*l*47.6%
unpow247.6%
unpow247.6%
difference-of-squares57.7%
Simplified57.7%
difference-of-squares47.6%
*-commutative47.6%
prod-diff0.0%
fma-neg0.0%
distribute-lft-in0.0%
Applied egg-rr3.1%
*-commutative3.1%
distribute-rgt-out3.1%
*-commutative3.1%
Simplified78.1%
metadata-eval78.1%
div-inv78.1%
clear-num81.2%
Applied egg-rr81.2%
Taylor expanded in b around 0 75.0%
mul-1-neg75.0%
*-commutative75.0%
*-commutative75.0%
*-commutative75.0%
distribute-rgt-neg-out75.0%
associate-*l*78.3%
Simplified78.3%
Final simplification55.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 9.8e-128) (* (* 2.0 (* b b)) (sin (* PI (* 0.005555555555555556 angle)))) (* (+ b a) (* (- b a) (* PI (* angle 0.011111111111111112))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
double tmp;
if (a <= 9.8e-128) {
tmp = (2.0 * (b * b)) * sin((((double) M_PI) * (0.005555555555555556 * angle)));
} else {
tmp = (b + a) * ((b - a) * (((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 (a <= 9.8e-128) {
tmp = (2.0 * (b * b)) * Math.sin((Math.PI * (0.005555555555555556 * angle)));
} else {
tmp = (b + a) * ((b - a) * (Math.PI * (angle * 0.011111111111111112)));
}
return tmp;
}
a = abs(a) b = abs(b) def code(a, b, angle): tmp = 0 if a <= 9.8e-128: tmp = (2.0 * (b * b)) * math.sin((math.pi * (0.005555555555555556 * angle))) else: tmp = (b + a) * ((b - a) * (math.pi * (angle * 0.011111111111111112))) return tmp
a = abs(a) b = abs(b) function code(a, b, angle) tmp = 0.0 if (a <= 9.8e-128) tmp = Float64(Float64(2.0 * Float64(b * b)) * sin(Float64(pi * Float64(0.005555555555555556 * angle)))); else tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * Float64(pi * Float64(angle * 0.011111111111111112)))); end return tmp end
a = abs(a) b = abs(b) function tmp_2 = code(a, b, angle) tmp = 0.0; if (a <= 9.8e-128) tmp = (2.0 * (b * b)) * sin((pi * (0.005555555555555556 * angle))); else tmp = (b + a) * ((b - a) * (pi * (angle * 0.011111111111111112))); 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, 9.8e-128], N[(N[(2.0 * N[(b * b), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[(Pi * N[(angle * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 9.8 \cdot 10^{-128}:\\
\;\;\;\;\left(2 \cdot \left(b \cdot b\right)\right) \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\\
\end{array}
\end{array}
if a < 9.79999999999999979e-128Initial program 57.5%
*-commutative57.5%
associate-*l*57.5%
associate-*l*57.5%
unpow257.5%
unpow257.5%
difference-of-squares58.3%
Simplified58.3%
Taylor expanded in angle around inf 58.7%
Taylor expanded in angle around 0 58.3%
Taylor expanded in b around inf 38.7%
associate-*r*38.7%
unpow238.7%
associate-*r*38.8%
*-commutative38.8%
*-commutative38.8%
Simplified38.8%
if 9.79999999999999979e-128 < a Initial program 55.4%
*-commutative55.4%
associate-*l*55.4%
associate-*l*55.4%
unpow255.4%
unpow255.4%
difference-of-squares58.3%
Simplified58.3%
difference-of-squares55.4%
*-commutative55.4%
prod-diff39.2%
fma-neg39.2%
distribute-lft-in39.2%
Applied egg-rr40.5%
*-commutative40.5%
distribute-rgt-out40.5%
*-commutative40.5%
Simplified73.4%
Taylor expanded in angle around 0 66.6%
associate-*r*66.6%
Simplified66.6%
Final simplification50.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 1e-97) (* (+ b a) (* b (sin (* 0.011111111111111112 (* PI angle))))) (* (+ b a) (* (* angle 0.011111111111111112) (* (- b a) PI)))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
double tmp;
if (a <= 1e-97) {
tmp = (b + a) * (b * sin((0.011111111111111112 * (((double) M_PI) * angle))));
} else {
tmp = (b + a) * ((angle * 0.011111111111111112) * ((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 <= 1e-97) {
tmp = (b + a) * (b * Math.sin((0.011111111111111112 * (Math.PI * angle))));
} else {
tmp = (b + a) * ((angle * 0.011111111111111112) * ((b - a) * Math.PI));
}
return tmp;
}
a = abs(a) b = abs(b) def code(a, b, angle): tmp = 0 if a <= 1e-97: tmp = (b + a) * (b * math.sin((0.011111111111111112 * (math.pi * angle)))) else: tmp = (b + a) * ((angle * 0.011111111111111112) * ((b - a) * math.pi)) return tmp
a = abs(a) b = abs(b) function code(a, b, angle) tmp = 0.0 if (a <= 1e-97) tmp = Float64(Float64(b + a) * Float64(b * sin(Float64(0.011111111111111112 * Float64(pi * angle))))); else tmp = Float64(Float64(b + a) * Float64(Float64(angle * 0.011111111111111112) * 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 <= 1e-97) tmp = (b + a) * (b * sin((0.011111111111111112 * (pi * angle)))); else tmp = (b + a) * ((angle * 0.011111111111111112) * ((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, 1e-97], 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[(N[(angle * 0.011111111111111112), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 10^{-97}:\\
\;\;\;\;\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(\left(angle \cdot 0.011111111111111112\right) \cdot \left(\left(b - a\right) \cdot \pi\right)\right)\\
\end{array}
\end{array}
if a < 1.00000000000000004e-97Initial program 57.6%
*-commutative57.6%
associate-*l*57.6%
associate-*l*57.6%
unpow257.6%
unpow257.6%
difference-of-squares58.3%
Simplified58.3%
difference-of-squares57.6%
*-commutative57.6%
prod-diff49.8%
fma-neg49.8%
distribute-lft-in49.9%
Applied egg-rr50.5%
*-commutative50.5%
distribute-rgt-out50.5%
*-commutative50.5%
Simplified65.4%
metadata-eval65.4%
div-inv65.4%
clear-num65.8%
Applied egg-rr65.8%
Taylor expanded in b around inf 44.6%
if 1.00000000000000004e-97 < a Initial program 55.1%
*-commutative55.1%
associate-*l*55.1%
associate-*l*55.1%
unpow255.1%
unpow255.1%
difference-of-squares58.3%
Simplified58.3%
difference-of-squares55.1%
*-commutative55.1%
prod-diff37.6%
fma-neg37.6%
distribute-lft-in37.7%
Applied egg-rr39.1%
*-commutative39.1%
distribute-rgt-out39.0%
*-commutative39.0%
Simplified73.7%
metadata-eval73.7%
div-inv73.3%
clear-num75.4%
Applied egg-rr75.4%
Taylor expanded in angle around 0 67.8%
associate-*r*67.9%
Simplified67.9%
Final simplification53.7%
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 4.5e-101) (* (+ b a) (* b (sin (* angle (* PI 0.011111111111111112))))) (* (+ b a) (* (* angle 0.011111111111111112) (* (- b a) PI)))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
double tmp;
if (a <= 4.5e-101) {
tmp = (b + a) * (b * sin((angle * (((double) M_PI) * 0.011111111111111112))));
} else {
tmp = (b + a) * ((angle * 0.011111111111111112) * ((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 <= 4.5e-101) {
tmp = (b + a) * (b * Math.sin((angle * (Math.PI * 0.011111111111111112))));
} else {
tmp = (b + a) * ((angle * 0.011111111111111112) * ((b - a) * Math.PI));
}
return tmp;
}
a = abs(a) b = abs(b) def code(a, b, angle): tmp = 0 if a <= 4.5e-101: tmp = (b + a) * (b * math.sin((angle * (math.pi * 0.011111111111111112)))) else: tmp = (b + a) * ((angle * 0.011111111111111112) * ((b - a) * math.pi)) return tmp
a = abs(a) b = abs(b) function code(a, b, angle) tmp = 0.0 if (a <= 4.5e-101) tmp = Float64(Float64(b + a) * Float64(b * sin(Float64(angle * Float64(pi * 0.011111111111111112))))); else tmp = Float64(Float64(b + a) * Float64(Float64(angle * 0.011111111111111112) * 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 <= 4.5e-101) tmp = (b + a) * (b * sin((angle * (pi * 0.011111111111111112)))); else tmp = (b + a) * ((angle * 0.011111111111111112) * ((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, 4.5e-101], N[(N[(b + a), $MachinePrecision] * N[(b * N[Sin[N[(angle * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + a), $MachinePrecision] * N[(N[(angle * 0.011111111111111112), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 4.5 \cdot 10^{-101}:\\
\;\;\;\;\left(b + a\right) \cdot \left(b \cdot \sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(\left(b - a\right) \cdot \pi\right)\right)\\
\end{array}
\end{array}
if a < 4.4999999999999998e-101Initial program 57.6%
*-commutative57.6%
associate-*l*57.6%
associate-*l*57.6%
unpow257.6%
unpow257.6%
difference-of-squares58.3%
Simplified58.3%
difference-of-squares57.6%
*-commutative57.6%
prod-diff49.8%
fma-neg49.8%
distribute-lft-in49.9%
Applied egg-rr50.5%
*-commutative50.5%
distribute-rgt-out50.5%
*-commutative50.5%
Simplified65.4%
metadata-eval65.4%
div-inv65.4%
clear-num65.8%
Applied egg-rr65.8%
Taylor expanded in b around inf 44.6%
*-commutative44.6%
associate-*l*46.3%
Simplified46.3%
if 4.4999999999999998e-101 < a Initial program 55.1%
*-commutative55.1%
associate-*l*55.1%
associate-*l*55.1%
unpow255.1%
unpow255.1%
difference-of-squares58.3%
Simplified58.3%
difference-of-squares55.1%
*-commutative55.1%
prod-diff37.6%
fma-neg37.6%
distribute-lft-in37.7%
Applied egg-rr39.1%
*-commutative39.1%
distribute-rgt-out39.0%
*-commutative39.0%
Simplified73.7%
metadata-eval73.7%
div-inv73.3%
clear-num75.4%
Applied egg-rr75.4%
Taylor expanded in angle around 0 67.8%
associate-*r*67.9%
Simplified67.9%
Final simplification54.7%
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 56.6%
*-commutative56.6%
associate-*l*56.6%
associate-*l*56.6%
unpow256.6%
unpow256.6%
difference-of-squares58.3%
Simplified58.3%
difference-of-squares56.6%
*-commutative56.6%
prod-diff45.1%
fma-neg45.1%
distribute-lft-in45.1%
Applied egg-rr46.1%
*-commutative46.1%
distribute-rgt-out46.0%
*-commutative46.0%
Simplified68.6%
Taylor expanded in angle around inf 68.5%
Final simplification68.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 (* (+ b a) (* (- b a) (sin (* PI (* angle 0.011111111111111112))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
return (b + a) * ((b - a) * sin((((double) M_PI) * (angle * 0.011111111111111112))));
}
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((Math.PI * (angle * 0.011111111111111112))));
}
a = abs(a) b = abs(b) def code(a, b, angle): return (b + a) * ((b - a) * math.sin((math.pi * (angle * 0.011111111111111112))))
a = abs(a) b = abs(b) function code(a, b, angle) return Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(pi * Float64(angle * 0.011111111111111112))))) end
a = abs(a) b = abs(b) function tmp = code(a, b, angle) tmp = (b + a) * ((b - a) * sin((pi * (angle * 0.011111111111111112)))); 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[(Pi * N[(angle * 0.011111111111111112), $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(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)
\end{array}
Initial program 56.6%
*-commutative56.6%
associate-*l*56.6%
associate-*l*56.6%
unpow256.6%
unpow256.6%
difference-of-squares58.3%
Simplified58.3%
difference-of-squares56.6%
*-commutative56.6%
prod-diff45.1%
fma-neg45.1%
distribute-lft-in45.1%
Applied egg-rr46.1%
*-commutative46.1%
distribute-rgt-out46.0%
*-commutative46.0%
Simplified68.6%
Taylor expanded in angle around inf 68.5%
associate-*r*68.6%
Simplified68.6%
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 (<= b 6.8e+132) (* 0.011111111111111112 (* angle (* PI (* (+ b a) (- b a))))) (* PI (* 0.011111111111111112 (* b (* b angle))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
double tmp;
if (b <= 6.8e+132) {
tmp = 0.011111111111111112 * (angle * (((double) M_PI) * ((b + a) * (b - a))));
} else {
tmp = ((double) M_PI) * (0.011111111111111112 * (b * (b * angle)));
}
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.8e+132) {
tmp = 0.011111111111111112 * (angle * (Math.PI * ((b + a) * (b - a))));
} else {
tmp = Math.PI * (0.011111111111111112 * (b * (b * angle)));
}
return tmp;
}
a = abs(a) b = abs(b) def code(a, b, angle): tmp = 0 if b <= 6.8e+132: tmp = 0.011111111111111112 * (angle * (math.pi * ((b + a) * (b - a)))) else: tmp = math.pi * (0.011111111111111112 * (b * (b * angle))) return tmp
a = abs(a) b = abs(b) function code(a, b, angle) tmp = 0.0 if (b <= 6.8e+132) tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(Float64(b + a) * Float64(b - a))))); else tmp = Float64(pi * Float64(0.011111111111111112 * Float64(b * Float64(b * angle)))); end return tmp end
a = abs(a) b = abs(b) function tmp_2 = code(a, b, angle) tmp = 0.0; if (b <= 6.8e+132) tmp = 0.011111111111111112 * (angle * (pi * ((b + a) * (b - a)))); else tmp = pi * (0.011111111111111112 * (b * (b * 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[b, 6.8e+132], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(Pi * N[(0.011111111111111112 * N[(b * N[(b * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq 6.8 \cdot 10^{+132}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\pi \cdot \left(0.011111111111111112 \cdot \left(b \cdot \left(b \cdot angle\right)\right)\right)\\
\end{array}
\end{array}
if b < 6.80000000000000051e132Initial program 58.9%
*-commutative58.9%
associate-*l*58.9%
associate-*l*58.9%
unpow258.9%
unpow258.9%
difference-of-squares59.4%
Simplified59.4%
Taylor expanded in angle around 0 54.8%
if 6.80000000000000051e132 < b Initial program 41.1%
*-commutative41.1%
associate-*l*41.1%
associate-*l*41.1%
unpow241.1%
unpow241.1%
difference-of-squares50.8%
Simplified50.8%
Taylor expanded in angle around 0 47.8%
Taylor expanded in a around 0 47.2%
associate-*r*47.2%
*-commutative47.2%
unpow247.2%
Simplified47.2%
Taylor expanded in angle around 0 47.2%
*-commutative47.2%
associate-*r*47.2%
unpow247.2%
*-commutative47.2%
associate-*l*47.2%
*-commutative47.2%
associate-*r*66.6%
*-commutative66.6%
Simplified66.6%
Final simplification56.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 1.5e+67) (* (+ b a) (* 0.011111111111111112 (* angle (* (- b a) PI)))) (* (* PI angle) (* -0.011111111111111112 (* a a)))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
double tmp;
if (angle <= 1.5e+67) {
tmp = (b + a) * (0.011111111111111112 * (angle * ((b - a) * ((double) M_PI))));
} else {
tmp = (((double) M_PI) * angle) * (-0.011111111111111112 * (a * a));
}
return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
double tmp;
if (angle <= 1.5e+67) {
tmp = (b + a) * (0.011111111111111112 * (angle * ((b - a) * Math.PI)));
} else {
tmp = (Math.PI * angle) * (-0.011111111111111112 * (a * a));
}
return tmp;
}
a = abs(a) b = abs(b) def code(a, b, angle): tmp = 0 if angle <= 1.5e+67: tmp = (b + a) * (0.011111111111111112 * (angle * ((b - a) * math.pi))) else: tmp = (math.pi * angle) * (-0.011111111111111112 * (a * a)) return tmp
a = abs(a) b = abs(b) function code(a, b, angle) tmp = 0.0 if (angle <= 1.5e+67) tmp = Float64(Float64(b + a) * Float64(0.011111111111111112 * Float64(angle * Float64(Float64(b - a) * pi)))); else tmp = Float64(Float64(pi * angle) * Float64(-0.011111111111111112 * Float64(a * a))); end return tmp end
a = abs(a) b = abs(b) function tmp_2 = code(a, b, angle) tmp = 0.0; if (angle <= 1.5e+67) tmp = (b + a) * (0.011111111111111112 * (angle * ((b - a) * pi))); else tmp = (pi * angle) * (-0.011111111111111112 * (a * a)); 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, 1.5e+67], N[(N[(b + a), $MachinePrecision] * N[(0.011111111111111112 * N[(angle * N[(N[(b - a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(Pi * angle), $MachinePrecision] * N[(-0.011111111111111112 * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 1.5 \cdot 10^{+67}:\\
\;\;\;\;\left(b + a\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \pi\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\pi \cdot angle\right) \cdot \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right)\\
\end{array}
\end{array}
if angle < 1.50000000000000005e67Initial program 59.9%
*-commutative59.9%
associate-*l*59.9%
associate-*l*59.9%
unpow259.9%
unpow259.9%
difference-of-squares61.5%
Simplified61.5%
difference-of-squares59.9%
*-commutative59.9%
prod-diff50.3%
fma-neg50.3%
distribute-lft-in50.3%
Applied egg-rr51.5%
*-commutative51.5%
distribute-rgt-out51.5%
*-commutative51.5%
Simplified74.8%
metadata-eval74.8%
div-inv74.2%
clear-num75.5%
Applied egg-rr75.5%
Taylor expanded in angle around 0 71.7%
if 1.50000000000000005e67 < angle Initial program 43.6%
*-commutative43.6%
associate-*l*43.6%
associate-*l*43.6%
unpow243.6%
unpow243.6%
difference-of-squares45.6%
Simplified45.6%
Taylor expanded in angle around 0 28.8%
Taylor expanded in a around inf 29.7%
associate-*r*29.7%
unpow229.7%
Simplified29.7%
Final simplification63.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 (<= angle 1.5e+67) (* (+ b a) (* (* angle 0.011111111111111112) (* (- b a) PI))) (* (* PI angle) (* -0.011111111111111112 (* a a)))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
double tmp;
if (angle <= 1.5e+67) {
tmp = (b + a) * ((angle * 0.011111111111111112) * ((b - a) * ((double) M_PI)));
} else {
tmp = (((double) M_PI) * angle) * (-0.011111111111111112 * (a * a));
}
return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
double tmp;
if (angle <= 1.5e+67) {
tmp = (b + a) * ((angle * 0.011111111111111112) * ((b - a) * Math.PI));
} else {
tmp = (Math.PI * angle) * (-0.011111111111111112 * (a * a));
}
return tmp;
}
a = abs(a) b = abs(b) def code(a, b, angle): tmp = 0 if angle <= 1.5e+67: tmp = (b + a) * ((angle * 0.011111111111111112) * ((b - a) * math.pi)) else: tmp = (math.pi * angle) * (-0.011111111111111112 * (a * a)) return tmp
a = abs(a) b = abs(b) function code(a, b, angle) tmp = 0.0 if (angle <= 1.5e+67) tmp = Float64(Float64(b + a) * Float64(Float64(angle * 0.011111111111111112) * Float64(Float64(b - a) * pi))); else tmp = Float64(Float64(pi * angle) * Float64(-0.011111111111111112 * Float64(a * a))); end return tmp end
a = abs(a) b = abs(b) function tmp_2 = code(a, b, angle) tmp = 0.0; if (angle <= 1.5e+67) tmp = (b + a) * ((angle * 0.011111111111111112) * ((b - a) * pi)); else tmp = (pi * angle) * (-0.011111111111111112 * (a * a)); 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, 1.5e+67], N[(N[(b + a), $MachinePrecision] * N[(N[(angle * 0.011111111111111112), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(Pi * angle), $MachinePrecision] * N[(-0.011111111111111112 * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 1.5 \cdot 10^{+67}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(\left(b - a\right) \cdot \pi\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\pi \cdot angle\right) \cdot \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right)\\
\end{array}
\end{array}
if angle < 1.50000000000000005e67Initial program 59.9%
*-commutative59.9%
associate-*l*59.9%
associate-*l*59.9%
unpow259.9%
unpow259.9%
difference-of-squares61.5%
Simplified61.5%
difference-of-squares59.9%
*-commutative59.9%
prod-diff50.3%
fma-neg50.3%
distribute-lft-in50.3%
Applied egg-rr51.5%
*-commutative51.5%
distribute-rgt-out51.5%
*-commutative51.5%
Simplified74.8%
metadata-eval74.8%
div-inv74.2%
clear-num75.5%
Applied egg-rr75.5%
Taylor expanded in angle around 0 71.7%
associate-*r*71.8%
Simplified71.8%
if 1.50000000000000005e67 < angle Initial program 43.6%
*-commutative43.6%
associate-*l*43.6%
associate-*l*43.6%
unpow243.6%
unpow243.6%
difference-of-squares45.6%
Simplified45.6%
Taylor expanded in angle around 0 28.8%
Taylor expanded in a around inf 29.7%
associate-*r*29.7%
unpow229.7%
Simplified29.7%
Final simplification63.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 (<= b 7e+80) (* 0.011111111111111112 (* angle (* PI (- (* a a))))) (* PI (* 0.011111111111111112 (* b (* b angle))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
double tmp;
if (b <= 7e+80) {
tmp = 0.011111111111111112 * (angle * (((double) M_PI) * -(a * a)));
} else {
tmp = ((double) M_PI) * (0.011111111111111112 * (b * (b * angle)));
}
return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
double tmp;
if (b <= 7e+80) {
tmp = 0.011111111111111112 * (angle * (Math.PI * -(a * a)));
} else {
tmp = Math.PI * (0.011111111111111112 * (b * (b * angle)));
}
return tmp;
}
a = abs(a) b = abs(b) def code(a, b, angle): tmp = 0 if b <= 7e+80: tmp = 0.011111111111111112 * (angle * (math.pi * -(a * a))) else: tmp = math.pi * (0.011111111111111112 * (b * (b * angle))) return tmp
a = abs(a) b = abs(b) function code(a, b, angle) tmp = 0.0 if (b <= 7e+80) tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(-Float64(a * a))))); else tmp = Float64(pi * Float64(0.011111111111111112 * Float64(b * Float64(b * angle)))); end return tmp end
a = abs(a) b = abs(b) function tmp_2 = code(a, b, angle) tmp = 0.0; if (b <= 7e+80) tmp = 0.011111111111111112 * (angle * (pi * -(a * a))); else tmp = pi * (0.011111111111111112 * (b * (b * 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[b, 7e+80], N[(0.011111111111111112 * N[(angle * N[(Pi * (-N[(a * a), $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(Pi * N[(0.011111111111111112 * N[(b * N[(b * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq 7 \cdot 10^{+80}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(-a \cdot a\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\pi \cdot \left(0.011111111111111112 \cdot \left(b \cdot \left(b \cdot angle\right)\right)\right)\\
\end{array}
\end{array}
if b < 6.99999999999999987e80Initial program 60.0%
*-commutative60.0%
associate-*l*60.0%
associate-*l*60.0%
unpow260.0%
unpow260.0%
difference-of-squares60.5%
Simplified60.5%
Taylor expanded in angle around 0 55.9%
Taylor expanded in a around inf 41.7%
associate-*r*41.7%
*-commutative41.7%
mul-1-neg41.7%
unpow241.7%
Simplified41.7%
if 6.99999999999999987e80 < b Initial program 39.8%
*-commutative39.8%
associate-*l*39.8%
associate-*l*39.8%
unpow239.8%
unpow239.8%
difference-of-squares47.3%
Simplified47.3%
Taylor expanded in angle around 0 44.0%
Taylor expanded in a around 0 45.8%
associate-*r*45.8%
*-commutative45.8%
unpow245.8%
Simplified45.8%
Taylor expanded in angle around 0 45.8%
*-commutative45.8%
associate-*r*45.8%
unpow245.8%
*-commutative45.8%
associate-*l*45.7%
*-commutative45.7%
associate-*r*60.7%
*-commutative60.7%
Simplified60.7%
Final simplification44.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 2e+99) (* 0.011111111111111112 (* PI (* angle (* b b)))) (* PI (* 0.011111111111111112 (* b (* b angle))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
double tmp;
if (b <= 2e+99) {
tmp = 0.011111111111111112 * (((double) M_PI) * (angle * (b * b)));
} else {
tmp = ((double) M_PI) * (0.011111111111111112 * (b * (b * angle)));
}
return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
double tmp;
if (b <= 2e+99) {
tmp = 0.011111111111111112 * (Math.PI * (angle * (b * b)));
} else {
tmp = Math.PI * (0.011111111111111112 * (b * (b * angle)));
}
return tmp;
}
a = abs(a) b = abs(b) def code(a, b, angle): tmp = 0 if b <= 2e+99: tmp = 0.011111111111111112 * (math.pi * (angle * (b * b))) else: tmp = math.pi * (0.011111111111111112 * (b * (b * angle))) return tmp
a = abs(a) b = abs(b) function code(a, b, angle) tmp = 0.0 if (b <= 2e+99) tmp = Float64(0.011111111111111112 * Float64(pi * Float64(angle * Float64(b * b)))); else tmp = Float64(pi * Float64(0.011111111111111112 * Float64(b * Float64(b * angle)))); end return tmp end
a = abs(a) b = abs(b) function tmp_2 = code(a, b, angle) tmp = 0.0; if (b <= 2e+99) tmp = 0.011111111111111112 * (pi * (angle * (b * b))); else tmp = pi * (0.011111111111111112 * (b * (b * 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[b, 2e+99], N[(0.011111111111111112 * N[(Pi * N[(angle * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(Pi * N[(0.011111111111111112 * N[(b * N[(b * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2 \cdot 10^{+99}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(b \cdot b\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\pi \cdot \left(0.011111111111111112 \cdot \left(b \cdot \left(b \cdot angle\right)\right)\right)\\
\end{array}
\end{array}
if b < 1.9999999999999999e99Initial program 59.7%
*-commutative59.7%
associate-*l*59.7%
associate-*l*59.7%
unpow259.7%
unpow259.7%
difference-of-squares60.2%
Simplified60.2%
Taylor expanded in angle around 0 55.6%
Taylor expanded in a around 0 30.1%
associate-*r*30.1%
*-commutative30.1%
unpow230.1%
Simplified30.1%
if 1.9999999999999999e99 < b Initial program 39.9%
*-commutative39.9%
associate-*l*39.9%
associate-*l*39.9%
unpow239.9%
unpow239.9%
difference-of-squares47.9%
Simplified47.9%
Taylor expanded in angle around 0 44.7%
Taylor expanded in a around 0 46.6%
associate-*r*46.6%
*-commutative46.6%
unpow246.6%
Simplified46.6%
Taylor expanded in angle around 0 46.6%
*-commutative46.6%
associate-*r*46.6%
unpow246.6%
*-commutative46.6%
associate-*l*46.6%
*-commutative46.6%
associate-*r*62.7%
*-commutative62.7%
Simplified62.7%
Final simplification35.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 (<= b 1.08e+77) (* (* PI angle) (* -0.011111111111111112 (* a a))) (* PI (* 0.011111111111111112 (* b (* b angle))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
double tmp;
if (b <= 1.08e+77) {
tmp = (((double) M_PI) * angle) * (-0.011111111111111112 * (a * a));
} else {
tmp = ((double) M_PI) * (0.011111111111111112 * (b * (b * angle)));
}
return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
double tmp;
if (b <= 1.08e+77) {
tmp = (Math.PI * angle) * (-0.011111111111111112 * (a * a));
} else {
tmp = Math.PI * (0.011111111111111112 * (b * (b * angle)));
}
return tmp;
}
a = abs(a) b = abs(b) def code(a, b, angle): tmp = 0 if b <= 1.08e+77: tmp = (math.pi * angle) * (-0.011111111111111112 * (a * a)) else: tmp = math.pi * (0.011111111111111112 * (b * (b * angle))) return tmp
a = abs(a) b = abs(b) function code(a, b, angle) tmp = 0.0 if (b <= 1.08e+77) tmp = Float64(Float64(pi * angle) * Float64(-0.011111111111111112 * Float64(a * a))); else tmp = Float64(pi * Float64(0.011111111111111112 * Float64(b * Float64(b * angle)))); end return tmp end
a = abs(a) b = abs(b) function tmp_2 = code(a, b, angle) tmp = 0.0; if (b <= 1.08e+77) tmp = (pi * angle) * (-0.011111111111111112 * (a * a)); else tmp = pi * (0.011111111111111112 * (b * (b * 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[b, 1.08e+77], N[(N[(Pi * angle), $MachinePrecision] * N[(-0.011111111111111112 * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(Pi * N[(0.011111111111111112 * N[(b * N[(b * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.08 \cdot 10^{+77}:\\
\;\;\;\;\left(\pi \cdot angle\right) \cdot \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\pi \cdot \left(0.011111111111111112 \cdot \left(b \cdot \left(b \cdot angle\right)\right)\right)\\
\end{array}
\end{array}
if b < 1.07999999999999996e77Initial program 60.0%
*-commutative60.0%
associate-*l*60.0%
associate-*l*60.0%
unpow260.0%
unpow260.0%
difference-of-squares60.5%
Simplified60.5%
Taylor expanded in angle around 0 55.9%
Taylor expanded in a around inf 41.7%
associate-*r*41.7%
unpow241.7%
Simplified41.7%
if 1.07999999999999996e77 < b Initial program 39.8%
*-commutative39.8%
associate-*l*39.8%
associate-*l*39.8%
unpow239.8%
unpow239.8%
difference-of-squares47.3%
Simplified47.3%
Taylor expanded in angle around 0 44.0%
Taylor expanded in a around 0 45.8%
associate-*r*45.8%
*-commutative45.8%
unpow245.8%
Simplified45.8%
Taylor expanded in angle around 0 45.8%
*-commutative45.8%
associate-*r*45.8%
unpow245.8%
*-commutative45.8%
associate-*l*45.7%
*-commutative45.7%
associate-*r*60.7%
*-commutative60.7%
Simplified60.7%
Final simplification44.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 3.7e+77) (* -0.011111111111111112 (* PI (* angle (* a a)))) (* PI (* 0.011111111111111112 (* b (* b angle))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
double tmp;
if (b <= 3.7e+77) {
tmp = -0.011111111111111112 * (((double) M_PI) * (angle * (a * a)));
} else {
tmp = ((double) M_PI) * (0.011111111111111112 * (b * (b * angle)));
}
return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
double tmp;
if (b <= 3.7e+77) {
tmp = -0.011111111111111112 * (Math.PI * (angle * (a * a)));
} else {
tmp = Math.PI * (0.011111111111111112 * (b * (b * angle)));
}
return tmp;
}
a = abs(a) b = abs(b) def code(a, b, angle): tmp = 0 if b <= 3.7e+77: tmp = -0.011111111111111112 * (math.pi * (angle * (a * a))) else: tmp = math.pi * (0.011111111111111112 * (b * (b * angle))) return tmp
a = abs(a) b = abs(b) function code(a, b, angle) tmp = 0.0 if (b <= 3.7e+77) tmp = Float64(-0.011111111111111112 * Float64(pi * Float64(angle * Float64(a * a)))); else tmp = Float64(pi * Float64(0.011111111111111112 * Float64(b * Float64(b * angle)))); end return tmp end
a = abs(a) b = abs(b) function tmp_2 = code(a, b, angle) tmp = 0.0; if (b <= 3.7e+77) tmp = -0.011111111111111112 * (pi * (angle * (a * a))); else tmp = pi * (0.011111111111111112 * (b * (b * 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[b, 3.7e+77], N[(-0.011111111111111112 * N[(Pi * N[(angle * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(Pi * N[(0.011111111111111112 * N[(b * N[(b * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq 3.7 \cdot 10^{+77}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(a \cdot a\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\pi \cdot \left(0.011111111111111112 \cdot \left(b \cdot \left(b \cdot angle\right)\right)\right)\\
\end{array}
\end{array}
if b < 3.69999999999999995e77Initial program 60.0%
*-commutative60.0%
associate-*l*60.0%
associate-*l*60.0%
unpow260.0%
unpow260.0%
difference-of-squares60.5%
Simplified60.5%
Taylor expanded in angle around 0 55.9%
Taylor expanded in a around inf 41.7%
*-commutative41.7%
associate-*r*41.7%
*-commutative41.7%
*-commutative41.7%
unpow241.7%
Simplified41.7%
if 3.69999999999999995e77 < b Initial program 39.8%
*-commutative39.8%
associate-*l*39.8%
associate-*l*39.8%
unpow239.8%
unpow239.8%
difference-of-squares47.3%
Simplified47.3%
Taylor expanded in angle around 0 44.0%
Taylor expanded in a around 0 45.8%
associate-*r*45.8%
*-commutative45.8%
unpow245.8%
Simplified45.8%
Taylor expanded in angle around 0 45.8%
*-commutative45.8%
associate-*r*45.8%
unpow245.8%
*-commutative45.8%
associate-*l*45.7%
*-commutative45.7%
associate-*r*60.7%
*-commutative60.7%
Simplified60.7%
Final simplification44.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 (* 0.011111111111111112 (* angle (* PI (* b b)))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
return 0.011111111111111112 * (angle * (((double) M_PI) * (b * b)));
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
return 0.011111111111111112 * (angle * (Math.PI * (b * b)));
}
a = abs(a) b = abs(b) def code(a, b, angle): return 0.011111111111111112 * (angle * (math.pi * (b * b)))
a = abs(a) b = abs(b) function code(a, b, angle) return Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(b * b)))) end
a = abs(a) b = abs(b) function tmp = code(a, b, angle) tmp = 0.011111111111111112 * (angle * (pi * (b * b))); 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[(angle * N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)
\end{array}
Initial program 56.6%
*-commutative56.6%
associate-*l*56.6%
associate-*l*56.6%
unpow256.6%
unpow256.6%
difference-of-squares58.3%
Simplified58.3%
Taylor expanded in angle around 0 53.9%
Taylor expanded in a around 0 32.7%
*-commutative32.7%
unpow232.7%
Simplified32.7%
Final simplification32.7%
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 (* angle (* b b)))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
return 0.011111111111111112 * (((double) M_PI) * (angle * (b * b)));
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
return 0.011111111111111112 * (Math.PI * (angle * (b * b)));
}
a = abs(a) b = abs(b) def code(a, b, angle): return 0.011111111111111112 * (math.pi * (angle * (b * b)))
a = abs(a) b = abs(b) function code(a, b, angle) return Float64(0.011111111111111112 * Float64(pi * Float64(angle * Float64(b * b)))) end
a = abs(a) b = abs(b) function tmp = code(a, b, angle) tmp = 0.011111111111111112 * (pi * (angle * (b * b))); 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[(angle * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(b \cdot b\right)\right)\right)
\end{array}
Initial program 56.6%
*-commutative56.6%
associate-*l*56.6%
associate-*l*56.6%
unpow256.6%
unpow256.6%
difference-of-squares58.3%
Simplified58.3%
Taylor expanded in angle around 0 53.9%
Taylor expanded in a around 0 32.7%
associate-*r*32.7%
*-commutative32.7%
unpow232.7%
Simplified32.7%
Final simplification32.7%
herbie shell --seed 2023268
(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)))))