
(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 18 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}
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0
(*
(* (* (sin (* (* angle 0.005555555555555556) PI)) 2.0) (- b_m a))
(+ a b_m))))
(if (<= b_m 1e+70)
(* (cos (* (* PI 0.005555555555555556) angle)) t_0)
(if (<= b_m 5e+170)
(*
(cos (* (/ angle 180.0) (* (sqrt (sqrt PI)) (sqrt (* (sqrt PI) PI)))))
t_0)
(* 1.0 t_0)))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = ((sin(((angle * 0.005555555555555556) * ((double) M_PI))) * 2.0) * (b_m - a)) * (a + b_m);
double tmp;
if (b_m <= 1e+70) {
tmp = cos(((((double) M_PI) * 0.005555555555555556) * angle)) * t_0;
} else if (b_m <= 5e+170) {
tmp = cos(((angle / 180.0) * (sqrt(sqrt(((double) M_PI))) * sqrt((sqrt(((double) M_PI)) * ((double) M_PI)))))) * t_0;
} else {
tmp = 1.0 * t_0;
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double t_0 = ((Math.sin(((angle * 0.005555555555555556) * Math.PI)) * 2.0) * (b_m - a)) * (a + b_m);
double tmp;
if (b_m <= 1e+70) {
tmp = Math.cos(((Math.PI * 0.005555555555555556) * angle)) * t_0;
} else if (b_m <= 5e+170) {
tmp = Math.cos(((angle / 180.0) * (Math.sqrt(Math.sqrt(Math.PI)) * Math.sqrt((Math.sqrt(Math.PI) * Math.PI))))) * t_0;
} else {
tmp = 1.0 * t_0;
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): t_0 = ((math.sin(((angle * 0.005555555555555556) * math.pi)) * 2.0) * (b_m - a)) * (a + b_m) tmp = 0 if b_m <= 1e+70: tmp = math.cos(((math.pi * 0.005555555555555556) * angle)) * t_0 elif b_m <= 5e+170: tmp = math.cos(((angle / 180.0) * (math.sqrt(math.sqrt(math.pi)) * math.sqrt((math.sqrt(math.pi) * math.pi))))) * t_0 else: tmp = 1.0 * t_0 return tmp
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64(Float64(Float64(sin(Float64(Float64(angle * 0.005555555555555556) * pi)) * 2.0) * Float64(b_m - a)) * Float64(a + b_m)) tmp = 0.0 if (b_m <= 1e+70) tmp = Float64(cos(Float64(Float64(pi * 0.005555555555555556) * angle)) * t_0); elseif (b_m <= 5e+170) tmp = Float64(cos(Float64(Float64(angle / 180.0) * Float64(sqrt(sqrt(pi)) * sqrt(Float64(sqrt(pi) * pi))))) * t_0); else tmp = Float64(1.0 * t_0); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) t_0 = ((sin(((angle * 0.005555555555555556) * pi)) * 2.0) * (b_m - a)) * (a + b_m); tmp = 0.0; if (b_m <= 1e+70) tmp = cos(((pi * 0.005555555555555556) * angle)) * t_0; elseif (b_m <= 5e+170) tmp = cos(((angle / 180.0) * (sqrt(sqrt(pi)) * sqrt((sqrt(pi) * pi))))) * t_0; else tmp = 1.0 * t_0; end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[(N[(N[Sin[N[(N[(angle * 0.005555555555555556), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 1e+70], N[(N[Cos[N[(N[(Pi * 0.005555555555555556), $MachinePrecision] * angle), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[b$95$m, 5e+170], N[(N[Cos[N[(N[(angle / 180.0), $MachinePrecision] * N[(N[Sqrt[N[Sqrt[Pi], $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(N[Sqrt[Pi], $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], N[(1.0 * t$95$0), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \left(\left(\sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right) \cdot 2\right) \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\right)\\
\mathbf{if}\;b\_m \leq 10^{+70}:\\
\;\;\;\;\cos \left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\right) \cdot t\_0\\
\mathbf{elif}\;b\_m \leq 5 \cdot 10^{+170}:\\
\;\;\;\;\cos \left(\frac{angle}{180} \cdot \left(\sqrt{\sqrt{\pi}} \cdot \sqrt{\sqrt{\pi} \cdot \pi}\right)\right) \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;1 \cdot t\_0\\
\end{array}
\end{array}
if b < 1.00000000000000007e70Initial program 55.8%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6465.5
Applied rewrites65.1%
lift-*.f64N/A
lift-/.f64N/A
div-invN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6467.7
Applied rewrites67.7%
if 1.00000000000000007e70 < b < 4.99999999999999977e170Initial program 50.8%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6465.7
Applied rewrites68.7%
rem-square-sqrtN/A
sqrt-unprodN/A
lift-PI.f64N/A
add-sqr-sqrtN/A
associate-*r*N/A
sqrt-prodN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lift-PI.f64N/A
add-sqr-sqrtN/A
pow3N/A
cube-unmultN/A
add-sqr-sqrtN/A
lift-PI.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
lift-PI.f64N/A
lower-sqrt.f6477.9
Applied rewrites77.9%
if 4.99999999999999977e170 < b Initial program 44.1%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6479.9
Applied rewrites77.0%
Taylor expanded in angle around 0
Applied rewrites88.4%
Final simplification71.5%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (- (pow b_m 2.0) (pow a 2.0))))
(if (<= t_0 (- INFINITY))
(* (* (* PI (+ a b_m)) (* 0.011111111111111112 angle)) (- b_m a))
(if (<= t_0 2e-133)
(* (sin (* (* PI angle) 0.011111111111111112)) (* (- a) a))
(*
(*
(*
(*
(*
(fma
(* (* angle angle) -2.8577960676726107e-8)
(* (* PI PI) PI)
(* PI 0.005555555555555556))
angle)
2.0)
(- b_m a))
(+ a b_m))
1.0)))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = pow(b_m, 2.0) - pow(a, 2.0);
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = ((((double) M_PI) * (a + b_m)) * (0.011111111111111112 * angle)) * (b_m - a);
} else if (t_0 <= 2e-133) {
tmp = sin(((((double) M_PI) * angle) * 0.011111111111111112)) * (-a * a);
} else {
tmp = ((((fma(((angle * angle) * -2.8577960676726107e-8), ((((double) M_PI) * ((double) M_PI)) * ((double) M_PI)), (((double) M_PI) * 0.005555555555555556)) * angle) * 2.0) * (b_m - a)) * (a + b_m)) * 1.0;
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64((b_m ^ 2.0) - (a ^ 2.0)) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = Float64(Float64(Float64(pi * Float64(a + b_m)) * Float64(0.011111111111111112 * angle)) * Float64(b_m - a)); elseif (t_0 <= 2e-133) tmp = Float64(sin(Float64(Float64(pi * angle) * 0.011111111111111112)) * Float64(Float64(-a) * a)); else tmp = Float64(Float64(Float64(Float64(Float64(fma(Float64(Float64(angle * angle) * -2.8577960676726107e-8), Float64(Float64(pi * pi) * pi), Float64(pi * 0.005555555555555556)) * angle) * 2.0) * Float64(b_m - a)) * Float64(a + b_m)) * 1.0); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(N[(N[(Pi * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(0.011111111111111112 * angle), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e-133], N[(N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision] * N[((-a) * a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(N[(N[(N[(angle * angle), $MachinePrecision] * -2.8577960676726107e-8), $MachinePrecision] * N[(N[(Pi * Pi), $MachinePrecision] * Pi), $MachinePrecision] + N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision] * 2.0), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := {b\_m}^{2} - {a}^{2}\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;\left(\left(\pi \cdot \left(a + b\_m\right)\right) \cdot \left(0.011111111111111112 \cdot angle\right)\right) \cdot \left(b\_m - a\right)\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-133}:\\
\;\;\;\;\sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left(\left(-a\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(\left(\mathsf{fma}\left(\left(angle \cdot angle\right) \cdot -2.8577960676726107 \cdot 10^{-8}, \left(\pi \cdot \pi\right) \cdot \pi, \pi \cdot 0.005555555555555556\right) \cdot angle\right) \cdot 2\right) \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\right)\right) \cdot 1\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -inf.0Initial program 63.2%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6459.0
Applied rewrites59.0%
Applied rewrites80.7%
if -inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 2.0000000000000001e-133Initial program 60.5%
Applied rewrites11.7%
Taylor expanded in b around 0
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
unpow2N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6459.3
Applied rewrites59.3%
if 2.0000000000000001e-133 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 44.8%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6465.9
Applied rewrites65.5%
Taylor expanded in angle around 0
Applied rewrites74.8%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow3N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f64N/A
lower-PI.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6469.3
Applied rewrites69.3%
Final simplification67.9%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (- (pow b_m 2.0) (pow a 2.0))))
(if (<= t_0 -5e-254)
(* (* (* -0.011111111111111112 a) angle) (* PI a))
(if (<= t_0 2e+50)
(* (* b_m b_m) (sin (* (* PI angle) 0.011111111111111112)))
(*
(*
(*
(*
(*
(fma
(* (* angle angle) -2.8577960676726107e-8)
(* (* PI PI) PI)
(* PI 0.005555555555555556))
angle)
2.0)
(- b_m a))
(+ a b_m))
1.0)))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = pow(b_m, 2.0) - pow(a, 2.0);
double tmp;
if (t_0 <= -5e-254) {
tmp = ((-0.011111111111111112 * a) * angle) * (((double) M_PI) * a);
} else if (t_0 <= 2e+50) {
tmp = (b_m * b_m) * sin(((((double) M_PI) * angle) * 0.011111111111111112));
} else {
tmp = ((((fma(((angle * angle) * -2.8577960676726107e-8), ((((double) M_PI) * ((double) M_PI)) * ((double) M_PI)), (((double) M_PI) * 0.005555555555555556)) * angle) * 2.0) * (b_m - a)) * (a + b_m)) * 1.0;
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64((b_m ^ 2.0) - (a ^ 2.0)) tmp = 0.0 if (t_0 <= -5e-254) tmp = Float64(Float64(Float64(-0.011111111111111112 * a) * angle) * Float64(pi * a)); elseif (t_0 <= 2e+50) tmp = Float64(Float64(b_m * b_m) * sin(Float64(Float64(pi * angle) * 0.011111111111111112))); else tmp = Float64(Float64(Float64(Float64(Float64(fma(Float64(Float64(angle * angle) * -2.8577960676726107e-8), Float64(Float64(pi * pi) * pi), Float64(pi * 0.005555555555555556)) * angle) * 2.0) * Float64(b_m - a)) * Float64(a + b_m)) * 1.0); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -5e-254], N[(N[(N[(-0.011111111111111112 * a), $MachinePrecision] * angle), $MachinePrecision] * N[(Pi * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+50], N[(N[(b$95$m * b$95$m), $MachinePrecision] * N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(N[(N[(N[(angle * angle), $MachinePrecision] * -2.8577960676726107e-8), $MachinePrecision] * N[(N[(Pi * Pi), $MachinePrecision] * Pi), $MachinePrecision] + N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision] * 2.0), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := {b\_m}^{2} - {a}^{2}\\
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{-254}:\\
\;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot angle\right) \cdot \left(\pi \cdot a\right)\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+50}:\\
\;\;\;\;\left(b\_m \cdot b\_m\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(\left(\mathsf{fma}\left(\left(angle \cdot angle\right) \cdot -2.8577960676726107 \cdot 10^{-8}, \left(\pi \cdot \pi\right) \cdot \pi, \pi \cdot 0.005555555555555556\right) \cdot angle\right) \cdot 2\right) \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\right)\right) \cdot 1\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -5.0000000000000003e-254Initial program 61.6%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6457.5
Applied rewrites57.5%
Taylor expanded in b around 0
Applied rewrites57.3%
Applied rewrites66.9%
Applied rewrites67.0%
if -5.0000000000000003e-254 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 2.0000000000000002e50Initial program 57.2%
Applied rewrites17.9%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
lower-*.f6458.4
Applied rewrites58.4%
if 2.0000000000000002e50 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 43.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6468.5
Applied rewrites67.7%
Taylor expanded in angle around 0
Applied rewrites78.8%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow3N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f64N/A
lower-PI.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6473.3
Applied rewrites73.3%
Final simplification67.8%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0
(*
(* (* (sin (* (* angle 0.005555555555555556) PI)) 2.0) (- b_m a))
(+ a b_m))))
(if (<= (pow b_m 2.0) 1e+197)
(* (cos (* (* PI 0.005555555555555556) angle)) t_0)
(* 1.0 t_0))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = ((sin(((angle * 0.005555555555555556) * ((double) M_PI))) * 2.0) * (b_m - a)) * (a + b_m);
double tmp;
if (pow(b_m, 2.0) <= 1e+197) {
tmp = cos(((((double) M_PI) * 0.005555555555555556) * angle)) * t_0;
} else {
tmp = 1.0 * t_0;
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double t_0 = ((Math.sin(((angle * 0.005555555555555556) * Math.PI)) * 2.0) * (b_m - a)) * (a + b_m);
double tmp;
if (Math.pow(b_m, 2.0) <= 1e+197) {
tmp = Math.cos(((Math.PI * 0.005555555555555556) * angle)) * t_0;
} else {
tmp = 1.0 * t_0;
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): t_0 = ((math.sin(((angle * 0.005555555555555556) * math.pi)) * 2.0) * (b_m - a)) * (a + b_m) tmp = 0 if math.pow(b_m, 2.0) <= 1e+197: tmp = math.cos(((math.pi * 0.005555555555555556) * angle)) * t_0 else: tmp = 1.0 * t_0 return tmp
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64(Float64(Float64(sin(Float64(Float64(angle * 0.005555555555555556) * pi)) * 2.0) * Float64(b_m - a)) * Float64(a + b_m)) tmp = 0.0 if ((b_m ^ 2.0) <= 1e+197) tmp = Float64(cos(Float64(Float64(pi * 0.005555555555555556) * angle)) * t_0); else tmp = Float64(1.0 * t_0); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) t_0 = ((sin(((angle * 0.005555555555555556) * pi)) * 2.0) * (b_m - a)) * (a + b_m); tmp = 0.0; if ((b_m ^ 2.0) <= 1e+197) tmp = cos(((pi * 0.005555555555555556) * angle)) * t_0; else tmp = 1.0 * t_0; end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[(N[(N[Sin[N[(N[(angle * 0.005555555555555556), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Power[b$95$m, 2.0], $MachinePrecision], 1e+197], N[(N[Cos[N[(N[(Pi * 0.005555555555555556), $MachinePrecision] * angle), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], N[(1.0 * t$95$0), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \left(\left(\sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right) \cdot 2\right) \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\right)\\
\mathbf{if}\;{b\_m}^{2} \leq 10^{+197}:\\
\;\;\;\;\cos \left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\right) \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;1 \cdot t\_0\\
\end{array}
\end{array}
if (pow.f64 b #s(literal 2 binary64)) < 9.9999999999999995e196Initial program 60.4%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6465.5
Applied rewrites65.4%
lift-*.f64N/A
lift-/.f64N/A
div-invN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6467.4
Applied rewrites67.4%
if 9.9999999999999995e196 < (pow.f64 b #s(literal 2 binary64)) Initial program 41.9%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6471.1
Applied rewrites70.0%
Taylor expanded in angle around 0
Applied rewrites83.4%
Final simplification73.2%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (* (* angle 0.005555555555555556) PI)) (t_1 (sin t_0)))
(if (<= (pow b_m 2.0) 1e-127)
(* (* (cos t_0) (+ a b_m)) (* t_1 (* 2.0 (- b_m a))))
(* 1.0 (* (* (* t_1 2.0) (- b_m a)) (+ a b_m))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = (angle * 0.005555555555555556) * ((double) M_PI);
double t_1 = sin(t_0);
double tmp;
if (pow(b_m, 2.0) <= 1e-127) {
tmp = (cos(t_0) * (a + b_m)) * (t_1 * (2.0 * (b_m - a)));
} else {
tmp = 1.0 * (((t_1 * 2.0) * (b_m - a)) * (a + b_m));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double t_0 = (angle * 0.005555555555555556) * Math.PI;
double t_1 = Math.sin(t_0);
double tmp;
if (Math.pow(b_m, 2.0) <= 1e-127) {
tmp = (Math.cos(t_0) * (a + b_m)) * (t_1 * (2.0 * (b_m - a)));
} else {
tmp = 1.0 * (((t_1 * 2.0) * (b_m - a)) * (a + b_m));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): t_0 = (angle * 0.005555555555555556) * math.pi t_1 = math.sin(t_0) tmp = 0 if math.pow(b_m, 2.0) <= 1e-127: tmp = (math.cos(t_0) * (a + b_m)) * (t_1 * (2.0 * (b_m - a))) else: tmp = 1.0 * (((t_1 * 2.0) * (b_m - a)) * (a + b_m)) return tmp
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64(Float64(angle * 0.005555555555555556) * pi) t_1 = sin(t_0) tmp = 0.0 if ((b_m ^ 2.0) <= 1e-127) tmp = Float64(Float64(cos(t_0) * Float64(a + b_m)) * Float64(t_1 * Float64(2.0 * Float64(b_m - a)))); else tmp = Float64(1.0 * Float64(Float64(Float64(t_1 * 2.0) * Float64(b_m - a)) * Float64(a + b_m))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) t_0 = (angle * 0.005555555555555556) * pi; t_1 = sin(t_0); tmp = 0.0; if ((b_m ^ 2.0) <= 1e-127) tmp = (cos(t_0) * (a + b_m)) * (t_1 * (2.0 * (b_m - a))); else tmp = 1.0 * (((t_1 * 2.0) * (b_m - a)) * (a + b_m)); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[(angle * 0.005555555555555556), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[N[Power[b$95$m, 2.0], $MachinePrecision], 1e-127], N[(N[(N[Cos[t$95$0], $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(t$95$1 * N[(2.0 * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 * N[(N[(N[(t$95$1 * 2.0), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \left(angle \cdot 0.005555555555555556\right) \cdot \pi\\
t_1 := \sin t\_0\\
\mathbf{if}\;{b\_m}^{2} \leq 10^{-127}:\\
\;\;\;\;\left(\cos t\_0 \cdot \left(a + b\_m\right)\right) \cdot \left(t\_1 \cdot \left(2 \cdot \left(b\_m - a\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;1 \cdot \left(\left(\left(t\_1 \cdot 2\right) \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\right)\right)\\
\end{array}
\end{array}
if (pow.f64 b #s(literal 2 binary64)) < 1e-127Initial program 60.0%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6467.3
Applied rewrites67.0%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites67.0%
if 1e-127 < (pow.f64 b #s(literal 2 binary64)) Initial program 49.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6467.7
Applied rewrites67.1%
Taylor expanded in angle around 0
Applied rewrites75.8%
Final simplification72.3%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(if (<= (pow b_m 2.0) 1e-145)
(*
(*
(*
(* (sin (* (* (/ -1.0 (/ -1.0 angle)) PI) 0.005555555555555556)) 2.0)
(- b_m a))
(+ a b_m))
1.0)
(*
1.0
(*
(* (* (sin (* (* angle 0.005555555555555556) PI)) 2.0) (- b_m a))
(+ a b_m)))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (pow(b_m, 2.0) <= 1e-145) {
tmp = (((sin((((-1.0 / (-1.0 / angle)) * ((double) M_PI)) * 0.005555555555555556)) * 2.0) * (b_m - a)) * (a + b_m)) * 1.0;
} else {
tmp = 1.0 * (((sin(((angle * 0.005555555555555556) * ((double) M_PI))) * 2.0) * (b_m - a)) * (a + b_m));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double tmp;
if (Math.pow(b_m, 2.0) <= 1e-145) {
tmp = (((Math.sin((((-1.0 / (-1.0 / angle)) * Math.PI) * 0.005555555555555556)) * 2.0) * (b_m - a)) * (a + b_m)) * 1.0;
} else {
tmp = 1.0 * (((Math.sin(((angle * 0.005555555555555556) * Math.PI)) * 2.0) * (b_m - a)) * (a + b_m));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): tmp = 0 if math.pow(b_m, 2.0) <= 1e-145: tmp = (((math.sin((((-1.0 / (-1.0 / angle)) * math.pi) * 0.005555555555555556)) * 2.0) * (b_m - a)) * (a + b_m)) * 1.0 else: tmp = 1.0 * (((math.sin(((angle * 0.005555555555555556) * math.pi)) * 2.0) * (b_m - a)) * (a + b_m)) return tmp
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if ((b_m ^ 2.0) <= 1e-145) tmp = Float64(Float64(Float64(Float64(sin(Float64(Float64(Float64(-1.0 / Float64(-1.0 / angle)) * pi) * 0.005555555555555556)) * 2.0) * Float64(b_m - a)) * Float64(a + b_m)) * 1.0); else tmp = Float64(1.0 * Float64(Float64(Float64(sin(Float64(Float64(angle * 0.005555555555555556) * pi)) * 2.0) * Float64(b_m - a)) * Float64(a + b_m))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) tmp = 0.0; if ((b_m ^ 2.0) <= 1e-145) tmp = (((sin((((-1.0 / (-1.0 / angle)) * pi) * 0.005555555555555556)) * 2.0) * (b_m - a)) * (a + b_m)) * 1.0; else tmp = 1.0 * (((sin(((angle * 0.005555555555555556) * pi)) * 2.0) * (b_m - a)) * (a + b_m)); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[N[Power[b$95$m, 2.0], $MachinePrecision], 1e-145], N[(N[(N[(N[(N[Sin[N[(N[(N[(-1.0 / N[(-1.0 / angle), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], N[(1.0 * N[(N[(N[(N[Sin[N[(N[(angle * 0.005555555555555556), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;{b\_m}^{2} \leq 10^{-145}:\\
\;\;\;\;\left(\left(\left(\sin \left(\left(\frac{-1}{\frac{-1}{angle}} \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot 2\right) \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\right)\right) \cdot 1\\
\mathbf{else}:\\
\;\;\;\;1 \cdot \left(\left(\left(\sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right) \cdot 2\right) \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\right)\right)\\
\end{array}
\end{array}
if (pow.f64 b #s(literal 2 binary64)) < 9.99999999999999915e-146Initial program 60.4%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6468.1
Applied rewrites67.8%
Taylor expanded in angle around 0
Applied rewrites60.1%
lift-*.f64N/A
lift-*.f64N/A
metadata-evalN/A
associate-/r/N/A
lift-/.f64N/A
associate-*l/N/A
lift-/.f64N/A
div-invN/A
times-fracN/A
metadata-evalN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6464.3
Applied rewrites64.3%
lift-/.f64N/A
frac-2negN/A
div-invN/A
lower-*.f64N/A
lower-neg.f64N/A
frac-2negN/A
metadata-evalN/A
lift-/.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
distribute-frac-neg2N/A
metadata-evalN/A
frac-2negN/A
lift-/.f64N/A
lower-/.f6466.3
Applied rewrites66.3%
if 9.99999999999999915e-146 < (pow.f64 b #s(literal 2 binary64)) Initial program 49.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6467.2
Applied rewrites66.6%
Taylor expanded in angle around 0
Applied rewrites74.9%
Final simplification71.7%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0
(*
(* (* (sin (* (* angle 0.005555555555555556) PI)) 2.0) (- b_m a))
(+ a b_m))))
(if (<= b_m 2.65e+57) (* (cos (/ PI (/ 180.0 angle))) t_0) (* 1.0 t_0))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = ((sin(((angle * 0.005555555555555556) * ((double) M_PI))) * 2.0) * (b_m - a)) * (a + b_m);
double tmp;
if (b_m <= 2.65e+57) {
tmp = cos((((double) M_PI) / (180.0 / angle))) * t_0;
} else {
tmp = 1.0 * t_0;
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double t_0 = ((Math.sin(((angle * 0.005555555555555556) * Math.PI)) * 2.0) * (b_m - a)) * (a + b_m);
double tmp;
if (b_m <= 2.65e+57) {
tmp = Math.cos((Math.PI / (180.0 / angle))) * t_0;
} else {
tmp = 1.0 * t_0;
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): t_0 = ((math.sin(((angle * 0.005555555555555556) * math.pi)) * 2.0) * (b_m - a)) * (a + b_m) tmp = 0 if b_m <= 2.65e+57: tmp = math.cos((math.pi / (180.0 / angle))) * t_0 else: tmp = 1.0 * t_0 return tmp
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64(Float64(Float64(sin(Float64(Float64(angle * 0.005555555555555556) * pi)) * 2.0) * Float64(b_m - a)) * Float64(a + b_m)) tmp = 0.0 if (b_m <= 2.65e+57) tmp = Float64(cos(Float64(pi / Float64(180.0 / angle))) * t_0); else tmp = Float64(1.0 * t_0); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) t_0 = ((sin(((angle * 0.005555555555555556) * pi)) * 2.0) * (b_m - a)) * (a + b_m); tmp = 0.0; if (b_m <= 2.65e+57) tmp = cos((pi / (180.0 / angle))) * t_0; else tmp = 1.0 * t_0; end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[(N[(N[Sin[N[(N[(angle * 0.005555555555555556), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 2.65e+57], N[(N[Cos[N[(Pi / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], N[(1.0 * t$95$0), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \left(\left(\sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right) \cdot 2\right) \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\right)\\
\mathbf{if}\;b\_m \leq 2.65 \cdot 10^{+57}:\\
\;\;\;\;\cos \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;1 \cdot t\_0\\
\end{array}
\end{array}
if b < 2.64999999999999993e57Initial program 55.4%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6465.2
Applied rewrites64.7%
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6466.5
Applied rewrites66.5%
if 2.64999999999999993e57 < b Initial program 48.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6474.8
Applied rewrites74.4%
Taylor expanded in angle around 0
Applied rewrites80.0%
Final simplification69.7%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(if (<= (pow b_m 2.0) 2e-150)
(* (* (sin (* (* PI angle) 0.011111111111111112)) (- b_m a)) (+ a b_m))
(*
1.0
(*
(* (* (sin (* (* angle 0.005555555555555556) PI)) 2.0) (- b_m a))
(+ a b_m)))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (pow(b_m, 2.0) <= 2e-150) {
tmp = (sin(((((double) M_PI) * angle) * 0.011111111111111112)) * (b_m - a)) * (a + b_m);
} else {
tmp = 1.0 * (((sin(((angle * 0.005555555555555556) * ((double) M_PI))) * 2.0) * (b_m - a)) * (a + b_m));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double tmp;
if (Math.pow(b_m, 2.0) <= 2e-150) {
tmp = (Math.sin(((Math.PI * angle) * 0.011111111111111112)) * (b_m - a)) * (a + b_m);
} else {
tmp = 1.0 * (((Math.sin(((angle * 0.005555555555555556) * Math.PI)) * 2.0) * (b_m - a)) * (a + b_m));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): tmp = 0 if math.pow(b_m, 2.0) <= 2e-150: tmp = (math.sin(((math.pi * angle) * 0.011111111111111112)) * (b_m - a)) * (a + b_m) else: tmp = 1.0 * (((math.sin(((angle * 0.005555555555555556) * math.pi)) * 2.0) * (b_m - a)) * (a + b_m)) return tmp
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if ((b_m ^ 2.0) <= 2e-150) tmp = Float64(Float64(sin(Float64(Float64(pi * angle) * 0.011111111111111112)) * Float64(b_m - a)) * Float64(a + b_m)); else tmp = Float64(1.0 * Float64(Float64(Float64(sin(Float64(Float64(angle * 0.005555555555555556) * pi)) * 2.0) * Float64(b_m - a)) * Float64(a + b_m))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) tmp = 0.0; if ((b_m ^ 2.0) <= 2e-150) tmp = (sin(((pi * angle) * 0.011111111111111112)) * (b_m - a)) * (a + b_m); else tmp = 1.0 * (((sin(((angle * 0.005555555555555556) * pi)) * 2.0) * (b_m - a)) * (a + b_m)); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[N[Power[b$95$m, 2.0], $MachinePrecision], 2e-150], N[(N[(N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision], N[(1.0 * N[(N[(N[(N[Sin[N[(N[(angle * 0.005555555555555556), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;{b\_m}^{2} \leq 2 \cdot 10^{-150}:\\
\;\;\;\;\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\right)\\
\mathbf{else}:\\
\;\;\;\;1 \cdot \left(\left(\left(\sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right) \cdot 2\right) \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\right)\right)\\
\end{array}
\end{array}
if (pow.f64 b #s(literal 2 binary64)) < 2.00000000000000001e-150Initial program 61.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites66.0%
if 2.00000000000000001e-150 < (pow.f64 b #s(literal 2 binary64)) Initial program 49.3%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6466.8
Applied rewrites66.2%
Taylor expanded in angle around 0
Applied rewrites74.5%
Final simplification71.3%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (if (<= (- (pow b_m 2.0) (pow a 2.0)) -5e-254) (* (* (* -0.011111111111111112 a) angle) (* PI a)) (* (* (* (* b_m b_m) PI) angle) 0.011111111111111112)))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if ((pow(b_m, 2.0) - pow(a, 2.0)) <= -5e-254) {
tmp = ((-0.011111111111111112 * a) * angle) * (((double) M_PI) * a);
} else {
tmp = (((b_m * b_m) * ((double) M_PI)) * angle) * 0.011111111111111112;
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double tmp;
if ((Math.pow(b_m, 2.0) - Math.pow(a, 2.0)) <= -5e-254) {
tmp = ((-0.011111111111111112 * a) * angle) * (Math.PI * a);
} else {
tmp = (((b_m * b_m) * Math.PI) * angle) * 0.011111111111111112;
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): tmp = 0 if (math.pow(b_m, 2.0) - math.pow(a, 2.0)) <= -5e-254: tmp = ((-0.011111111111111112 * a) * angle) * (math.pi * a) else: tmp = (((b_m * b_m) * math.pi) * angle) * 0.011111111111111112 return tmp
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (Float64((b_m ^ 2.0) - (a ^ 2.0)) <= -5e-254) tmp = Float64(Float64(Float64(-0.011111111111111112 * a) * angle) * Float64(pi * a)); else tmp = Float64(Float64(Float64(Float64(b_m * b_m) * pi) * angle) * 0.011111111111111112); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) tmp = 0.0; if (((b_m ^ 2.0) - (a ^ 2.0)) <= -5e-254) tmp = ((-0.011111111111111112 * a) * angle) * (pi * a); else tmp = (((b_m * b_m) * pi) * angle) * 0.011111111111111112; end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision], -5e-254], N[(N[(N[(-0.011111111111111112 * a), $MachinePrecision] * angle), $MachinePrecision] * N[(Pi * a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(b$95$m * b$95$m), $MachinePrecision] * Pi), $MachinePrecision] * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;{b\_m}^{2} - {a}^{2} \leq -5 \cdot 10^{-254}:\\
\;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot angle\right) \cdot \left(\pi \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(b\_m \cdot b\_m\right) \cdot \pi\right) \cdot angle\right) \cdot 0.011111111111111112\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -5.0000000000000003e-254Initial program 61.6%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6457.5
Applied rewrites57.5%
Taylor expanded in b around 0
Applied rewrites57.3%
Applied rewrites66.9%
Applied rewrites67.0%
if -5.0000000000000003e-254 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 48.0%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6453.1
Applied rewrites53.1%
Taylor expanded in b around inf
Applied rewrites50.2%
Final simplification57.2%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(if (<= (/ angle 180.0) 4e+24)
(* (* (sin (* (* PI angle) 0.011111111111111112)) (- b_m a)) (+ a b_m))
(if (<= (/ angle 180.0) 1e+92)
(* (* PI angle) (* (* a a) -0.011111111111111112))
(*
(* (- b_m a) (+ a b_m))
(sin (* (* (* angle 0.005555555555555556) PI) 2.0))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if ((angle / 180.0) <= 4e+24) {
tmp = (sin(((((double) M_PI) * angle) * 0.011111111111111112)) * (b_m - a)) * (a + b_m);
} else if ((angle / 180.0) <= 1e+92) {
tmp = (((double) M_PI) * angle) * ((a * a) * -0.011111111111111112);
} else {
tmp = ((b_m - a) * (a + b_m)) * sin((((angle * 0.005555555555555556) * ((double) M_PI)) * 2.0));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double tmp;
if ((angle / 180.0) <= 4e+24) {
tmp = (Math.sin(((Math.PI * angle) * 0.011111111111111112)) * (b_m - a)) * (a + b_m);
} else if ((angle / 180.0) <= 1e+92) {
tmp = (Math.PI * angle) * ((a * a) * -0.011111111111111112);
} else {
tmp = ((b_m - a) * (a + b_m)) * Math.sin((((angle * 0.005555555555555556) * Math.PI) * 2.0));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): tmp = 0 if (angle / 180.0) <= 4e+24: tmp = (math.sin(((math.pi * angle) * 0.011111111111111112)) * (b_m - a)) * (a + b_m) elif (angle / 180.0) <= 1e+92: tmp = (math.pi * angle) * ((a * a) * -0.011111111111111112) else: tmp = ((b_m - a) * (a + b_m)) * math.sin((((angle * 0.005555555555555556) * math.pi) * 2.0)) return tmp
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (Float64(angle / 180.0) <= 4e+24) tmp = Float64(Float64(sin(Float64(Float64(pi * angle) * 0.011111111111111112)) * Float64(b_m - a)) * Float64(a + b_m)); elseif (Float64(angle / 180.0) <= 1e+92) tmp = Float64(Float64(pi * angle) * Float64(Float64(a * a) * -0.011111111111111112)); else tmp = Float64(Float64(Float64(b_m - a) * Float64(a + b_m)) * sin(Float64(Float64(Float64(angle * 0.005555555555555556) * pi) * 2.0))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) tmp = 0.0; if ((angle / 180.0) <= 4e+24) tmp = (sin(((pi * angle) * 0.011111111111111112)) * (b_m - a)) * (a + b_m); elseif ((angle / 180.0) <= 1e+92) tmp = (pi * angle) * ((a * a) * -0.011111111111111112); else tmp = ((b_m - a) * (a + b_m)) * sin((((angle * 0.005555555555555556) * pi) * 2.0)); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], 4e+24], N[(N[(N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1e+92], N[(N[(Pi * angle), $MachinePrecision] * N[(N[(a * a), $MachinePrecision] * -0.011111111111111112), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b$95$m - a), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(N[(angle * 0.005555555555555556), $MachinePrecision] * Pi), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;\frac{angle}{180} \leq 4 \cdot 10^{+24}:\\
\;\;\;\;\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq 10^{+92}:\\
\;\;\;\;\left(\pi \cdot angle\right) \cdot \left(\left(a \cdot a\right) \cdot -0.011111111111111112\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b\_m - a\right) \cdot \left(a + b\_m\right)\right) \cdot \sin \left(\left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right) \cdot 2\right)\\
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 3.9999999999999999e24Initial program 60.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites77.0%
if 3.9999999999999999e24 < (/.f64 angle #s(literal 180 binary64)) < 1e92Initial program 27.6%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6449.0
Applied rewrites49.0%
Taylor expanded in b around 0
Applied rewrites49.3%
if 1e92 < (/.f64 angle #s(literal 180 binary64)) Initial program 35.0%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6441.7
Applied rewrites41.2%
Applied rewrites45.5%
Final simplification69.4%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (* (* 0.011111111111111112 PI) angle)))
(if (<= (/ angle 180.0) 1e+29)
(* (* (sin (* (* PI angle) 0.011111111111111112)) (- b_m a)) (+ a b_m))
(if (<= (/ angle 180.0) 1e+67)
(* (* t_0 (- b_m a)) (+ a b_m))
(* (* (- b_m a) (+ a b_m)) (sin t_0))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = (0.011111111111111112 * ((double) M_PI)) * angle;
double tmp;
if ((angle / 180.0) <= 1e+29) {
tmp = (sin(((((double) M_PI) * angle) * 0.011111111111111112)) * (b_m - a)) * (a + b_m);
} else if ((angle / 180.0) <= 1e+67) {
tmp = (t_0 * (b_m - a)) * (a + b_m);
} else {
tmp = ((b_m - a) * (a + b_m)) * sin(t_0);
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double t_0 = (0.011111111111111112 * Math.PI) * angle;
double tmp;
if ((angle / 180.0) <= 1e+29) {
tmp = (Math.sin(((Math.PI * angle) * 0.011111111111111112)) * (b_m - a)) * (a + b_m);
} else if ((angle / 180.0) <= 1e+67) {
tmp = (t_0 * (b_m - a)) * (a + b_m);
} else {
tmp = ((b_m - a) * (a + b_m)) * Math.sin(t_0);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): t_0 = (0.011111111111111112 * math.pi) * angle tmp = 0 if (angle / 180.0) <= 1e+29: tmp = (math.sin(((math.pi * angle) * 0.011111111111111112)) * (b_m - a)) * (a + b_m) elif (angle / 180.0) <= 1e+67: tmp = (t_0 * (b_m - a)) * (a + b_m) else: tmp = ((b_m - a) * (a + b_m)) * math.sin(t_0) return tmp
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64(Float64(0.011111111111111112 * pi) * angle) tmp = 0.0 if (Float64(angle / 180.0) <= 1e+29) tmp = Float64(Float64(sin(Float64(Float64(pi * angle) * 0.011111111111111112)) * Float64(b_m - a)) * Float64(a + b_m)); elseif (Float64(angle / 180.0) <= 1e+67) tmp = Float64(Float64(t_0 * Float64(b_m - a)) * Float64(a + b_m)); else tmp = Float64(Float64(Float64(b_m - a) * Float64(a + b_m)) * sin(t_0)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) t_0 = (0.011111111111111112 * pi) * angle; tmp = 0.0; if ((angle / 180.0) <= 1e+29) tmp = (sin(((pi * angle) * 0.011111111111111112)) * (b_m - a)) * (a + b_m); elseif ((angle / 180.0) <= 1e+67) tmp = (t_0 * (b_m - a)) * (a + b_m); else tmp = ((b_m - a) * (a + b_m)) * sin(t_0); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[(0.011111111111111112 * Pi), $MachinePrecision] * angle), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1e+29], N[(N[(N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1e+67], N[(N[(t$95$0 * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b$95$m - a), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \left(0.011111111111111112 \cdot \pi\right) \cdot angle\\
\mathbf{if}\;\frac{angle}{180} \leq 10^{+29}:\\
\;\;\;\;\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq 10^{+67}:\\
\;\;\;\;\left(t\_0 \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b\_m - a\right) \cdot \left(a + b\_m\right)\right) \cdot \sin t\_0\\
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 9.99999999999999914e28Initial program 60.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites77.0%
if 9.99999999999999914e28 < (/.f64 angle #s(literal 180 binary64)) < 9.99999999999999983e66Initial program 25.4%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6464.5
Applied rewrites64.5%
Applied rewrites64.5%
if 9.99999999999999983e66 < (/.f64 angle #s(literal 180 binary64)) Initial program 33.8%
Applied rewrites1.8%
Applied rewrites43.0%
Final simplification69.2%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (* (* 0.011111111111111112 PI) angle)))
(if (<= (/ angle 180.0) 1e+67)
(* (* t_0 (- b_m a)) (+ a b_m))
(* (* (- b_m a) (+ a b_m)) (sin t_0)))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = (0.011111111111111112 * ((double) M_PI)) * angle;
double tmp;
if ((angle / 180.0) <= 1e+67) {
tmp = (t_0 * (b_m - a)) * (a + b_m);
} else {
tmp = ((b_m - a) * (a + b_m)) * sin(t_0);
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double t_0 = (0.011111111111111112 * Math.PI) * angle;
double tmp;
if ((angle / 180.0) <= 1e+67) {
tmp = (t_0 * (b_m - a)) * (a + b_m);
} else {
tmp = ((b_m - a) * (a + b_m)) * Math.sin(t_0);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): t_0 = (0.011111111111111112 * math.pi) * angle tmp = 0 if (angle / 180.0) <= 1e+67: tmp = (t_0 * (b_m - a)) * (a + b_m) else: tmp = ((b_m - a) * (a + b_m)) * math.sin(t_0) return tmp
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64(Float64(0.011111111111111112 * pi) * angle) tmp = 0.0 if (Float64(angle / 180.0) <= 1e+67) tmp = Float64(Float64(t_0 * Float64(b_m - a)) * Float64(a + b_m)); else tmp = Float64(Float64(Float64(b_m - a) * Float64(a + b_m)) * sin(t_0)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) t_0 = (0.011111111111111112 * pi) * angle; tmp = 0.0; if ((angle / 180.0) <= 1e+67) tmp = (t_0 * (b_m - a)) * (a + b_m); else tmp = ((b_m - a) * (a + b_m)) * sin(t_0); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[(0.011111111111111112 * Pi), $MachinePrecision] * angle), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1e+67], N[(N[(t$95$0 * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b$95$m - a), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \left(0.011111111111111112 \cdot \pi\right) \cdot angle\\
\mathbf{if}\;\frac{angle}{180} \leq 10^{+67}:\\
\;\;\;\;\left(t\_0 \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b\_m - a\right) \cdot \left(a + b\_m\right)\right) \cdot \sin t\_0\\
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 9.99999999999999983e66Initial program 59.3%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6462.9
Applied rewrites62.9%
Applied rewrites73.6%
if 9.99999999999999983e66 < (/.f64 angle #s(literal 180 binary64)) Initial program 33.8%
Applied rewrites1.8%
Applied rewrites43.0%
Final simplification66.9%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (if (<= (/ angle 180.0) 1e+67) (* (* (* (* 0.011111111111111112 PI) angle) (- b_m a)) (+ a b_m)) (* (* (- b_m a) (+ a b_m)) (sin (* (* PI angle) 0.011111111111111112)))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if ((angle / 180.0) <= 1e+67) {
tmp = (((0.011111111111111112 * ((double) M_PI)) * angle) * (b_m - a)) * (a + b_m);
} else {
tmp = ((b_m - a) * (a + b_m)) * sin(((((double) M_PI) * angle) * 0.011111111111111112));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double tmp;
if ((angle / 180.0) <= 1e+67) {
tmp = (((0.011111111111111112 * Math.PI) * angle) * (b_m - a)) * (a + b_m);
} else {
tmp = ((b_m - a) * (a + b_m)) * Math.sin(((Math.PI * angle) * 0.011111111111111112));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): tmp = 0 if (angle / 180.0) <= 1e+67: tmp = (((0.011111111111111112 * math.pi) * angle) * (b_m - a)) * (a + b_m) else: tmp = ((b_m - a) * (a + b_m)) * math.sin(((math.pi * angle) * 0.011111111111111112)) return tmp
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (Float64(angle / 180.0) <= 1e+67) tmp = Float64(Float64(Float64(Float64(0.011111111111111112 * pi) * angle) * Float64(b_m - a)) * Float64(a + b_m)); else tmp = Float64(Float64(Float64(b_m - a) * Float64(a + b_m)) * sin(Float64(Float64(pi * angle) * 0.011111111111111112))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) tmp = 0.0; if ((angle / 180.0) <= 1e+67) tmp = (((0.011111111111111112 * pi) * angle) * (b_m - a)) * (a + b_m); else tmp = ((b_m - a) * (a + b_m)) * sin(((pi * angle) * 0.011111111111111112)); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1e+67], N[(N[(N[(N[(0.011111111111111112 * Pi), $MachinePrecision] * angle), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b$95$m - a), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;\frac{angle}{180} \leq 10^{+67}:\\
\;\;\;\;\left(\left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right) \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b\_m - a\right) \cdot \left(a + b\_m\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\\
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 9.99999999999999983e66Initial program 59.3%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6462.9
Applied rewrites62.9%
Applied rewrites73.6%
if 9.99999999999999983e66 < (/.f64 angle #s(literal 180 binary64)) Initial program 33.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f64N/A
Applied rewrites39.2%
Final simplification66.1%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (if (<= (pow a 2.0) 4e+218) (* (* (- b_m a) (+ a b_m)) (* (* 0.011111111111111112 PI) angle)) (* (* (* -0.011111111111111112 a) angle) (* PI a))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (pow(a, 2.0) <= 4e+218) {
tmp = ((b_m - a) * (a + b_m)) * ((0.011111111111111112 * ((double) M_PI)) * angle);
} else {
tmp = ((-0.011111111111111112 * a) * angle) * (((double) M_PI) * a);
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double tmp;
if (Math.pow(a, 2.0) <= 4e+218) {
tmp = ((b_m - a) * (a + b_m)) * ((0.011111111111111112 * Math.PI) * angle);
} else {
tmp = ((-0.011111111111111112 * a) * angle) * (Math.PI * a);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): tmp = 0 if math.pow(a, 2.0) <= 4e+218: tmp = ((b_m - a) * (a + b_m)) * ((0.011111111111111112 * math.pi) * angle) else: tmp = ((-0.011111111111111112 * a) * angle) * (math.pi * a) return tmp
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if ((a ^ 2.0) <= 4e+218) tmp = Float64(Float64(Float64(b_m - a) * Float64(a + b_m)) * Float64(Float64(0.011111111111111112 * pi) * angle)); else tmp = Float64(Float64(Float64(-0.011111111111111112 * a) * angle) * Float64(pi * a)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) tmp = 0.0; if ((a ^ 2.0) <= 4e+218) tmp = ((b_m - a) * (a + b_m)) * ((0.011111111111111112 * pi) * angle); else tmp = ((-0.011111111111111112 * a) * angle) * (pi * a); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[N[Power[a, 2.0], $MachinePrecision], 4e+218], N[(N[(N[(b$95$m - a), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(0.011111111111111112 * Pi), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-0.011111111111111112 * a), $MachinePrecision] * angle), $MachinePrecision] * N[(Pi * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;{a}^{2} \leq 4 \cdot 10^{+218}:\\
\;\;\;\;\left(\left(b\_m - a\right) \cdot \left(a + b\_m\right)\right) \cdot \left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot angle\right) \cdot \left(\pi \cdot a\right)\\
\end{array}
\end{array}
if (pow.f64 a #s(literal 2 binary64)) < 4.00000000000000033e218Initial program 59.2%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6455.5
Applied rewrites55.5%
if 4.00000000000000033e218 < (pow.f64 a #s(literal 2 binary64)) Initial program 42.9%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6453.8
Applied rewrites53.8%
Taylor expanded in b around 0
Applied rewrites55.0%
Applied rewrites66.8%
Applied rewrites66.8%
Final simplification59.3%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(if (<= b_m 1e+162)
(* (* (* (* 0.011111111111111112 PI) angle) (- b_m a)) (+ a b_m))
(*
(*
(*
(*
(*
(fma
(* (* angle angle) -2.8577960676726107e-8)
(* (* PI PI) PI)
(* PI 0.005555555555555556))
angle)
2.0)
(- b_m a))
(+ a b_m))
1.0)))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (b_m <= 1e+162) {
tmp = (((0.011111111111111112 * ((double) M_PI)) * angle) * (b_m - a)) * (a + b_m);
} else {
tmp = ((((fma(((angle * angle) * -2.8577960676726107e-8), ((((double) M_PI) * ((double) M_PI)) * ((double) M_PI)), (((double) M_PI) * 0.005555555555555556)) * angle) * 2.0) * (b_m - a)) * (a + b_m)) * 1.0;
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (b_m <= 1e+162) tmp = Float64(Float64(Float64(Float64(0.011111111111111112 * pi) * angle) * Float64(b_m - a)) * Float64(a + b_m)); else tmp = Float64(Float64(Float64(Float64(Float64(fma(Float64(Float64(angle * angle) * -2.8577960676726107e-8), Float64(Float64(pi * pi) * pi), Float64(pi * 0.005555555555555556)) * angle) * 2.0) * Float64(b_m - a)) * Float64(a + b_m)) * 1.0); end return tmp end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[b$95$m, 1e+162], N[(N[(N[(N[(0.011111111111111112 * Pi), $MachinePrecision] * angle), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(N[(N[(N[(angle * angle), $MachinePrecision] * -2.8577960676726107e-8), $MachinePrecision] * N[(N[(Pi * Pi), $MachinePrecision] * Pi), $MachinePrecision] + N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision] * 2.0), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 10^{+162}:\\
\;\;\;\;\left(\left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right) \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(\left(\mathsf{fma}\left(\left(angle \cdot angle\right) \cdot -2.8577960676726107 \cdot 10^{-8}, \left(\pi \cdot \pi\right) \cdot \pi, \pi \cdot 0.005555555555555556\right) \cdot angle\right) \cdot 2\right) \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\right)\right) \cdot 1\\
\end{array}
\end{array}
if b < 9.9999999999999994e161Initial program 55.3%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6455.3
Applied rewrites55.3%
Applied rewrites61.3%
if 9.9999999999999994e161 < b Initial program 45.1%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6482.0
Applied rewrites79.3%
Taylor expanded in angle around 0
Applied rewrites84.5%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow3N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f64N/A
lower-PI.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6479.5
Applied rewrites79.5%
Final simplification64.1%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (* (* (* (* 0.011111111111111112 PI) angle) (- b_m a)) (+ a b_m)))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
return (((0.011111111111111112 * ((double) M_PI)) * angle) * (b_m - a)) * (a + b_m);
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
return (((0.011111111111111112 * Math.PI) * angle) * (b_m - a)) * (a + b_m);
}
b_m = math.fabs(b) def code(a, b_m, angle): return (((0.011111111111111112 * math.pi) * angle) * (b_m - a)) * (a + b_m)
b_m = abs(b) function code(a, b_m, angle) return Float64(Float64(Float64(Float64(0.011111111111111112 * pi) * angle) * Float64(b_m - a)) * Float64(a + b_m)) end
b_m = abs(b); function tmp = code(a, b_m, angle) tmp = (((0.011111111111111112 * pi) * angle) * (b_m - a)) * (a + b_m); end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := N[(N[(N[(N[(0.011111111111111112 * Pi), $MachinePrecision] * angle), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
\left(\left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right) \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\right)
\end{array}
Initial program 53.7%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6454.9
Applied rewrites54.9%
Applied rewrites62.9%
Final simplification62.9%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (* (* (* -0.011111111111111112 a) angle) (* PI a)))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
return ((-0.011111111111111112 * a) * angle) * (((double) M_PI) * a);
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
return ((-0.011111111111111112 * a) * angle) * (Math.PI * a);
}
b_m = math.fabs(b) def code(a, b_m, angle): return ((-0.011111111111111112 * a) * angle) * (math.pi * a)
b_m = abs(b) function code(a, b_m, angle) return Float64(Float64(Float64(-0.011111111111111112 * a) * angle) * Float64(pi * a)) end
b_m = abs(b); function tmp = code(a, b_m, angle) tmp = ((-0.011111111111111112 * a) * angle) * (pi * a); end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := N[(N[(N[(-0.011111111111111112 * a), $MachinePrecision] * angle), $MachinePrecision] * N[(Pi * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
\left(\left(-0.011111111111111112 \cdot a\right) \cdot angle\right) \cdot \left(\pi \cdot a\right)
\end{array}
Initial program 53.7%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6454.9
Applied rewrites54.9%
Taylor expanded in b around 0
Applied rewrites37.5%
Applied rewrites40.4%
Applied rewrites40.4%
Final simplification40.4%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (* (* (* PI angle) a) (* -0.011111111111111112 a)))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
return ((((double) M_PI) * angle) * a) * (-0.011111111111111112 * a);
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
return ((Math.PI * angle) * a) * (-0.011111111111111112 * a);
}
b_m = math.fabs(b) def code(a, b_m, angle): return ((math.pi * angle) * a) * (-0.011111111111111112 * a)
b_m = abs(b) function code(a, b_m, angle) return Float64(Float64(Float64(pi * angle) * a) * Float64(-0.011111111111111112 * a)) end
b_m = abs(b); function tmp = code(a, b_m, angle) tmp = ((pi * angle) * a) * (-0.011111111111111112 * a); end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := N[(N[(N[(Pi * angle), $MachinePrecision] * a), $MachinePrecision] * N[(-0.011111111111111112 * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
\left(\left(\pi \cdot angle\right) \cdot a\right) \cdot \left(-0.011111111111111112 \cdot a\right)
\end{array}
Initial program 53.7%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6454.9
Applied rewrites54.9%
Taylor expanded in b around 0
Applied rewrites37.5%
Applied rewrites40.4%
Final simplification40.4%
herbie shell --seed 2024235
(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)))))