
(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}
Herbie found 16 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}
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(let* ((t_0 (* PI (/ angle_m 180.0))))
(*
angle_s
(if (<=
(* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))
-5e-65)
(*
(* (* (sin (* (/ angle_m 180.0) PI)) (+ a b)) (- b a))
(*
2.0
(*
(cos (/ (/ (fma PI (- angle_m) (* PI angle_m)) -180.0) 2.0))
(cos (* (* angle_m 0.005555555555555556) PI)))))
(*
(* (* (sin (* (* 0.005555555555555556 angle_m) PI)) (+ a b)) (- b a))
(*
(sin
(fma
(* (* angle_m 0.005555555555555556) (cbrt (* PI PI)))
(cbrt PI)
(* 0.5 PI)))
2.0))))))angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
double t_0 = ((double) M_PI) * (angle_m / 180.0);
double tmp;
if ((((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0)) <= -5e-65) {
tmp = ((sin(((angle_m / 180.0) * ((double) M_PI))) * (a + b)) * (b - a)) * (2.0 * (cos(((fma(((double) M_PI), -angle_m, (((double) M_PI) * angle_m)) / -180.0) / 2.0)) * cos(((angle_m * 0.005555555555555556) * ((double) M_PI)))));
} else {
tmp = ((sin(((0.005555555555555556 * angle_m) * ((double) M_PI))) * (a + b)) * (b - a)) * (sin(fma(((angle_m * 0.005555555555555556) * cbrt((((double) M_PI) * ((double) M_PI)))), cbrt(((double) M_PI)), (0.5 * ((double) M_PI)))) * 2.0);
}
return angle_s * tmp;
}
angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b, angle_m) t_0 = Float64(pi * Float64(angle_m / 180.0)) tmp = 0.0 if (Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) <= -5e-65) tmp = Float64(Float64(Float64(sin(Float64(Float64(angle_m / 180.0) * pi)) * Float64(a + b)) * Float64(b - a)) * Float64(2.0 * Float64(cos(Float64(Float64(fma(pi, Float64(-angle_m), Float64(pi * angle_m)) / -180.0) / 2.0)) * cos(Float64(Float64(angle_m * 0.005555555555555556) * pi))))); else tmp = Float64(Float64(Float64(sin(Float64(Float64(0.005555555555555556 * angle_m) * pi)) * Float64(a + b)) * Float64(b - a)) * Float64(sin(fma(Float64(Float64(angle_m * 0.005555555555555556) * cbrt(Float64(pi * pi))), cbrt(pi), Float64(0.5 * pi))) * 2.0)); end return Float64(angle_s * tmp) end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := Block[{t$95$0 = N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[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], -5e-65], N[(N[(N[(N[Sin[N[(N[(angle$95$m / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[Cos[N[(N[(N[(Pi * (-angle$95$m) + N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision] / -180.0), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(N[(angle$95$m * 0.005555555555555556), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Sin[N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[N[(N[(N[(angle$95$m * 0.005555555555555556), $MachinePrecision] * N[Power[N[(Pi * Pi), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] * N[Power[Pi, 1/3], $MachinePrecision] + N[(0.5 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle\_m}{180}\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0 \leq -5 \cdot 10^{-65}:\\
\;\;\;\;\left(\left(\sin \left(\frac{angle\_m}{180} \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \left(\cos \left(\frac{\frac{\mathsf{fma}\left(\pi, -angle\_m, \pi \cdot angle\_m\right)}{-180}}{2}\right) \cdot \cos \left(\left(angle\_m \cdot 0.005555555555555556\right) \cdot \pi\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \left(\sin \left(\mathsf{fma}\left(\left(angle\_m \cdot 0.005555555555555556\right) \cdot \sqrt[3]{\pi \cdot \pi}, \sqrt[3]{\pi}, 0.5 \cdot \pi\right)\right) \cdot 2\right)\\
\end{array}
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < -4.99999999999999983e-65Initial program 54.4%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites67.6%
Applied rewrites67.8%
lift-cos.f64N/A
sin-+PI/2-revN/A
lift-/.f64N/A
lift-PI.f64N/A
div-add-revN/A
Applied rewrites67.9%
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flipN/A
lower-/.f6468.0
Applied rewrites68.0%
if -4.99999999999999983e-65 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) Initial program 54.4%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites67.6%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f6467.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.7
Applied rewrites67.7%
lift-fma.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
metadata-evalN/A
mult-flipN/A
lift-PI.f64N/A
lift-/.f64N/A
*-commutativeN/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flipN/A
lift-/.f64N/A
lift-PI.f64N/A
add-cube-cbrtN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites67.8%
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(*
angle_s
(if (<= (* 2.0 (- (pow b 2.0) (pow a 2.0))) -4e+93)
(*
(* (* a (sin (* 0.005555555555555556 (* angle_m PI)))) (- b a))
(*
2.0
(*
(cos (/ (/ (fma PI (- angle_m) (* PI angle_m)) -180.0) 2.0))
(cos (* (* angle_m 0.005555555555555556) PI)))))
(*
(* (* (sin (* (* 0.005555555555555556 angle_m) PI)) (+ a b)) (- b a))
(*
(sin
(fma
(* (* angle_m 0.005555555555555556) (cbrt (* PI PI)))
(cbrt PI)
(* 0.5 PI)))
2.0)))))angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
double tmp;
if ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) <= -4e+93) {
tmp = ((a * sin((0.005555555555555556 * (angle_m * ((double) M_PI))))) * (b - a)) * (2.0 * (cos(((fma(((double) M_PI), -angle_m, (((double) M_PI) * angle_m)) / -180.0) / 2.0)) * cos(((angle_m * 0.005555555555555556) * ((double) M_PI)))));
} else {
tmp = ((sin(((0.005555555555555556 * angle_m) * ((double) M_PI))) * (a + b)) * (b - a)) * (sin(fma(((angle_m * 0.005555555555555556) * cbrt((((double) M_PI) * ((double) M_PI)))), cbrt(((double) M_PI)), (0.5 * ((double) M_PI)))) * 2.0);
}
return angle_s * tmp;
}
angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b, angle_m) tmp = 0.0 if (Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) <= -4e+93) tmp = Float64(Float64(Float64(a * sin(Float64(0.005555555555555556 * Float64(angle_m * pi)))) * Float64(b - a)) * Float64(2.0 * Float64(cos(Float64(Float64(fma(pi, Float64(-angle_m), Float64(pi * angle_m)) / -180.0) / 2.0)) * cos(Float64(Float64(angle_m * 0.005555555555555556) * pi))))); else tmp = Float64(Float64(Float64(sin(Float64(Float64(0.005555555555555556 * angle_m) * pi)) * Float64(a + b)) * Float64(b - a)) * Float64(sin(fma(Float64(Float64(angle_m * 0.005555555555555556) * cbrt(Float64(pi * pi))), cbrt(pi), Float64(0.5 * pi))) * 2.0)); end return Float64(angle_s * tmp) end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -4e+93], N[(N[(N[(a * N[Sin[N[(0.005555555555555556 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[Cos[N[(N[(N[(Pi * (-angle$95$m) + N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision] / -180.0), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(N[(angle$95$m * 0.005555555555555556), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Sin[N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[N[(N[(N[(angle$95$m * 0.005555555555555556), $MachinePrecision] * N[Power[N[(Pi * Pi), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] * N[Power[Pi, 1/3], $MachinePrecision] + N[(0.5 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq -4 \cdot 10^{+93}:\\
\;\;\;\;\left(\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right)\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \left(\cos \left(\frac{\frac{\mathsf{fma}\left(\pi, -angle\_m, \pi \cdot angle\_m\right)}{-180}}{2}\right) \cdot \cos \left(\left(angle\_m \cdot 0.005555555555555556\right) \cdot \pi\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \left(\sin \left(\mathsf{fma}\left(\left(angle\_m \cdot 0.005555555555555556\right) \cdot \sqrt[3]{\pi \cdot \pi}, \sqrt[3]{\pi}, 0.5 \cdot \pi\right)\right) \cdot 2\right)\\
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -4.00000000000000017e93Initial program 54.4%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites67.6%
Applied rewrites67.8%
lift-cos.f64N/A
sin-+PI/2-revN/A
lift-/.f64N/A
lift-PI.f64N/A
div-add-revN/A
Applied rewrites67.9%
Taylor expanded in a around inf
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6442.2
Applied rewrites42.2%
if -4.00000000000000017e93 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 54.4%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites67.6%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f6467.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.7
Applied rewrites67.7%
lift-fma.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
metadata-evalN/A
mult-flipN/A
lift-PI.f64N/A
lift-/.f64N/A
*-commutativeN/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flipN/A
lift-/.f64N/A
lift-PI.f64N/A
add-cube-cbrtN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites67.8%
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(let* ((t_0 (cbrt (* PI PI))))
(*
angle_s
(if (<= angle_m 8.5e+118)
(*
(* (sin (* 0.011111111111111112 (* t_0 (* (cbrt PI) angle_m)))) (- b a))
(+ b a))
(*
(* (* (sin (* (* 0.005555555555555556 angle_m) PI)) (+ a b)) (- b a))
(*
(sin
(fma (* (* angle_m 0.005555555555555556) t_0) (cbrt PI) (* 0.5 PI)))
2.0))))))angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
double t_0 = cbrt((((double) M_PI) * ((double) M_PI)));
double tmp;
if (angle_m <= 8.5e+118) {
tmp = (sin((0.011111111111111112 * (t_0 * (cbrt(((double) M_PI)) * angle_m)))) * (b - a)) * (b + a);
} else {
tmp = ((sin(((0.005555555555555556 * angle_m) * ((double) M_PI))) * (a + b)) * (b - a)) * (sin(fma(((angle_m * 0.005555555555555556) * t_0), cbrt(((double) M_PI)), (0.5 * ((double) M_PI)))) * 2.0);
}
return angle_s * tmp;
}
angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b, angle_m) t_0 = cbrt(Float64(pi * pi)) tmp = 0.0 if (angle_m <= 8.5e+118) tmp = Float64(Float64(sin(Float64(0.011111111111111112 * Float64(t_0 * Float64(cbrt(pi) * angle_m)))) * Float64(b - a)) * Float64(b + a)); else tmp = Float64(Float64(Float64(sin(Float64(Float64(0.005555555555555556 * angle_m) * pi)) * Float64(a + b)) * Float64(b - a)) * Float64(sin(fma(Float64(Float64(angle_m * 0.005555555555555556) * t_0), cbrt(pi), Float64(0.5 * pi))) * 2.0)); end return Float64(angle_s * tmp) end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := Block[{t$95$0 = N[Power[N[(Pi * Pi), $MachinePrecision], 1/3], $MachinePrecision]}, N[(angle$95$s * If[LessEqual[angle$95$m, 8.5e+118], N[(N[(N[Sin[N[(0.011111111111111112 * N[(t$95$0 * N[(N[Power[Pi, 1/3], $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Sin[N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[N[(N[(N[(angle$95$m * 0.005555555555555556), $MachinePrecision] * t$95$0), $MachinePrecision] * N[Power[Pi, 1/3], $MachinePrecision] + N[(0.5 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := \sqrt[3]{\pi \cdot \pi}\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 8.5 \cdot 10^{+118}:\\
\;\;\;\;\left(\sin \left(0.011111111111111112 \cdot \left(t\_0 \cdot \left(\sqrt[3]{\pi} \cdot angle\_m\right)\right)\right) \cdot \left(b - a\right)\right) \cdot \left(b + a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \left(\sin \left(\mathsf{fma}\left(\left(angle\_m \cdot 0.005555555555555556\right) \cdot t\_0, \sqrt[3]{\pi}, 0.5 \cdot \pi\right)\right) \cdot 2\right)\\
\end{array}
\end{array}
\end{array}
if angle < 8.50000000000000033e118Initial program 54.4%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites67.6%
Applied rewrites67.8%
Applied rewrites67.6%
lift-*.f64N/A
lift-PI.f64N/A
add-cube-cbrtN/A
associate-*l*N/A
lower-*.f64N/A
lift-PI.f64N/A
lift-PI.f64N/A
cbrt-unprodN/A
lift-PI.f64N/A
lift-PI.f64N/A
lower-cbrt.f64N/A
lift-PI.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower-cbrt.f6467.7
Applied rewrites67.7%
if 8.50000000000000033e118 < angle Initial program 54.4%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites67.6%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f6467.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.7
Applied rewrites67.7%
lift-fma.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
metadata-evalN/A
mult-flipN/A
lift-PI.f64N/A
lift-/.f64N/A
*-commutativeN/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flipN/A
lift-/.f64N/A
lift-PI.f64N/A
add-cube-cbrtN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites67.8%
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(*
angle_s
(if (<= angle_m 6.4e+140)
(*
(*
(sin (* 0.011111111111111112 (* (cbrt (* PI PI)) (* (cbrt PI) angle_m))))
(- b a))
(+ b a))
(*
(* (* 2.0 (* (- b a) (+ b a))) (sin (* PI (/ angle_m 180.0))))
(sin (fma 0.5 PI (fabs (* (* 0.005555555555555556 angle_m) PI))))))))angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
double tmp;
if (angle_m <= 6.4e+140) {
tmp = (sin((0.011111111111111112 * (cbrt((((double) M_PI) * ((double) M_PI))) * (cbrt(((double) M_PI)) * angle_m)))) * (b - a)) * (b + a);
} else {
tmp = ((2.0 * ((b - a) * (b + a))) * sin((((double) M_PI) * (angle_m / 180.0)))) * sin(fma(0.5, ((double) M_PI), fabs(((0.005555555555555556 * angle_m) * ((double) M_PI)))));
}
return angle_s * tmp;
}
angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b, angle_m) tmp = 0.0 if (angle_m <= 6.4e+140) tmp = Float64(Float64(sin(Float64(0.011111111111111112 * Float64(cbrt(Float64(pi * pi)) * Float64(cbrt(pi) * angle_m)))) * Float64(b - a)) * Float64(b + a)); else tmp = Float64(Float64(Float64(2.0 * Float64(Float64(b - a) * Float64(b + a))) * sin(Float64(pi * Float64(angle_m / 180.0)))) * sin(fma(0.5, pi, abs(Float64(Float64(0.005555555555555556 * angle_m) * pi))))); end return Float64(angle_s * tmp) end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[angle$95$m, 6.4e+140], N[(N[(N[Sin[N[(0.011111111111111112 * N[(N[Power[N[(Pi * Pi), $MachinePrecision], 1/3], $MachinePrecision] * N[(N[Power[Pi, 1/3], $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(0.5 * Pi + N[Abs[N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 6.4 \cdot 10^{+140}:\\
\;\;\;\;\left(\sin \left(0.011111111111111112 \cdot \left(\sqrt[3]{\pi \cdot \pi} \cdot \left(\sqrt[3]{\pi} \cdot angle\_m\right)\right)\right) \cdot \left(b - a\right)\right) \cdot \left(b + a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(2 \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \sin \left(\pi \cdot \frac{angle\_m}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(0.5, \pi, \left|\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right|\right)\right)\\
\end{array}
\end{array}
if angle < 6.40000000000000021e140Initial program 54.4%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites67.6%
Applied rewrites67.8%
Applied rewrites67.6%
lift-*.f64N/A
lift-PI.f64N/A
add-cube-cbrtN/A
associate-*l*N/A
lower-*.f64N/A
lift-PI.f64N/A
lift-PI.f64N/A
cbrt-unprodN/A
lift-PI.f64N/A
lift-PI.f64N/A
lower-cbrt.f64N/A
lift-PI.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower-cbrt.f6467.7
Applied rewrites67.7%
if 6.40000000000000021e140 < angle Initial program 54.4%
lift-cos.f64N/A
cos-fabs-revN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
+-commutativeN/A
lift-PI.f64N/A
mult-flipN/A
*-commutativeN/A
lower-fma.f64N/A
metadata-evalN/A
lower-fabs.f6454.5
lift-*.f64N/A
*-commutativeN/A
lower-*.f6454.5
lift-/.f64N/A
mult-flipN/A
*-commutativeN/A
lower-*.f64N/A
metadata-eval54.5
Applied rewrites54.5%
lift--.f64N/A
lift-pow.f64N/A
pow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squares-revN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f6458.4
lift-+.f64N/A
+-commutativeN/A
lower-+.f6458.4
Applied rewrites58.4%
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(*
angle_s
(if (<= angle_m 5.5e+140)
(*
(*
(sin (* 0.011111111111111112 (* (cbrt (* PI PI)) (* (cbrt PI) angle_m))))
(- b a))
(+ b a))
(*
(* (* (sin (* (* 0.005555555555555556 angle_m) PI)) (+ a b)) (- b a))
(* (sin (* PI (fma angle_m 0.005555555555555556 0.5))) 2.0)))))angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
double tmp;
if (angle_m <= 5.5e+140) {
tmp = (sin((0.011111111111111112 * (cbrt((((double) M_PI) * ((double) M_PI))) * (cbrt(((double) M_PI)) * angle_m)))) * (b - a)) * (b + a);
} else {
tmp = ((sin(((0.005555555555555556 * angle_m) * ((double) M_PI))) * (a + b)) * (b - a)) * (sin((((double) M_PI) * fma(angle_m, 0.005555555555555556, 0.5))) * 2.0);
}
return angle_s * tmp;
}
angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b, angle_m) tmp = 0.0 if (angle_m <= 5.5e+140) tmp = Float64(Float64(sin(Float64(0.011111111111111112 * Float64(cbrt(Float64(pi * pi)) * Float64(cbrt(pi) * angle_m)))) * Float64(b - a)) * Float64(b + a)); else tmp = Float64(Float64(Float64(sin(Float64(Float64(0.005555555555555556 * angle_m) * pi)) * Float64(a + b)) * Float64(b - a)) * Float64(sin(Float64(pi * fma(angle_m, 0.005555555555555556, 0.5))) * 2.0)); end return Float64(angle_s * tmp) end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[angle$95$m, 5.5e+140], N[(N[(N[Sin[N[(0.011111111111111112 * N[(N[Power[N[(Pi * Pi), $MachinePrecision], 1/3], $MachinePrecision] * N[(N[Power[Pi, 1/3], $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Sin[N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[N[(Pi * N[(angle$95$m * 0.005555555555555556 + 0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 5.5 \cdot 10^{+140}:\\
\;\;\;\;\left(\sin \left(0.011111111111111112 \cdot \left(\sqrt[3]{\pi \cdot \pi} \cdot \left(\sqrt[3]{\pi} \cdot angle\_m\right)\right)\right) \cdot \left(b - a\right)\right) \cdot \left(b + a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \left(\sin \left(\pi \cdot \mathsf{fma}\left(angle\_m, 0.005555555555555556, 0.5\right)\right) \cdot 2\right)\\
\end{array}
\end{array}
if angle < 5.5e140Initial program 54.4%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites67.6%
Applied rewrites67.8%
Applied rewrites67.6%
lift-*.f64N/A
lift-PI.f64N/A
add-cube-cbrtN/A
associate-*l*N/A
lower-*.f64N/A
lift-PI.f64N/A
lift-PI.f64N/A
cbrt-unprodN/A
lift-PI.f64N/A
lift-PI.f64N/A
lower-cbrt.f64N/A
lift-PI.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower-cbrt.f6467.7
Applied rewrites67.7%
if 5.5e140 < angle Initial program 54.4%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites67.6%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f6467.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.7
Applied rewrites67.7%
lift-fma.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
metadata-evalN/A
mult-flipN/A
lift-PI.f64N/A
lift-/.f64N/A
*-commutativeN/A
distribute-rgt-outN/A
lower-*.f64N/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
lower-fma.f6467.7
Applied rewrites67.7%
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(*
angle_s
(if (<= a 1.5e+154)
(*
(*
(sin (* 0.011111111111111112 (* (cbrt (* PI PI)) (* (cbrt PI) angle_m))))
(- b a))
(+ b a))
(* (* 0.011111111111111112 (- b a)) (* (* (+ b a) PI) angle_m)))))angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
double tmp;
if (a <= 1.5e+154) {
tmp = (sin((0.011111111111111112 * (cbrt((((double) M_PI) * ((double) M_PI))) * (cbrt(((double) M_PI)) * angle_m)))) * (b - a)) * (b + a);
} else {
tmp = (0.011111111111111112 * (b - a)) * (((b + a) * ((double) M_PI)) * angle_m);
}
return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
double tmp;
if (a <= 1.5e+154) {
tmp = (Math.sin((0.011111111111111112 * (Math.cbrt((Math.PI * Math.PI)) * (Math.cbrt(Math.PI) * angle_m)))) * (b - a)) * (b + a);
} else {
tmp = (0.011111111111111112 * (b - a)) * (((b + a) * Math.PI) * angle_m);
}
return angle_s * tmp;
}
angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b, angle_m) tmp = 0.0 if (a <= 1.5e+154) tmp = Float64(Float64(sin(Float64(0.011111111111111112 * Float64(cbrt(Float64(pi * pi)) * Float64(cbrt(pi) * angle_m)))) * Float64(b - a)) * Float64(b + a)); else tmp = Float64(Float64(0.011111111111111112 * Float64(b - a)) * Float64(Float64(Float64(b + a) * pi) * angle_m)); end return Float64(angle_s * tmp) end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[a, 1.5e+154], N[(N[(N[Sin[N[(0.011111111111111112 * N[(N[Power[N[(Pi * Pi), $MachinePrecision], 1/3], $MachinePrecision] * N[(N[Power[Pi, 1/3], $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision], N[(N[(0.011111111111111112 * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(b + a), $MachinePrecision] * Pi), $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;a \leq 1.5 \cdot 10^{+154}:\\
\;\;\;\;\left(\sin \left(0.011111111111111112 \cdot \left(\sqrt[3]{\pi \cdot \pi} \cdot \left(\sqrt[3]{\pi} \cdot angle\_m\right)\right)\right) \cdot \left(b - a\right)\right) \cdot \left(b + a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.011111111111111112 \cdot \left(b - a\right)\right) \cdot \left(\left(\left(b + a\right) \cdot \pi\right) \cdot angle\_m\right)\\
\end{array}
\end{array}
if a < 1.50000000000000013e154Initial program 54.4%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites67.6%
Applied rewrites67.8%
Applied rewrites67.6%
lift-*.f64N/A
lift-PI.f64N/A
add-cube-cbrtN/A
associate-*l*N/A
lower-*.f64N/A
lift-PI.f64N/A
lift-PI.f64N/A
cbrt-unprodN/A
lift-PI.f64N/A
lift-PI.f64N/A
lower-cbrt.f64N/A
lift-PI.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower-cbrt.f6467.7
Applied rewrites67.7%
if 1.50000000000000013e154 < a Initial program 54.4%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6451.2
Applied rewrites51.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.2
lift--.f64N/A
lift-pow.f64N/A
pow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squares-revN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f6455.1
lift-+.f64N/A
+-commutativeN/A
lower-+.f6455.1
Applied rewrites55.1%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6462.5
Applied rewrites62.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6462.7
Applied rewrites62.7%
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(*
angle_s
(if (<= (* 2.0 (- (pow b 2.0) (pow a 2.0))) -2e+301)
(* (* 0.011111111111111112 (- b a)) (* (* (+ b a) PI) angle_m))
(* (* (sin (* (* 0.011111111111111112 angle_m) PI)) (- b a)) (+ b a)))))angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
double tmp;
if ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) <= -2e+301) {
tmp = (0.011111111111111112 * (b - a)) * (((b + a) * ((double) M_PI)) * angle_m);
} else {
tmp = (sin(((0.011111111111111112 * angle_m) * ((double) M_PI))) * (b - a)) * (b + a);
}
return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
double tmp;
if ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) <= -2e+301) {
tmp = (0.011111111111111112 * (b - a)) * (((b + a) * Math.PI) * angle_m);
} else {
tmp = (Math.sin(((0.011111111111111112 * angle_m) * Math.PI)) * (b - a)) * (b + a);
}
return angle_s * tmp;
}
angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a, b, angle_m): tmp = 0 if (2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) <= -2e+301: tmp = (0.011111111111111112 * (b - a)) * (((b + a) * math.pi) * angle_m) else: tmp = (math.sin(((0.011111111111111112 * angle_m) * math.pi)) * (b - a)) * (b + a) return angle_s * tmp
angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b, angle_m) tmp = 0.0 if (Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) <= -2e+301) tmp = Float64(Float64(0.011111111111111112 * Float64(b - a)) * Float64(Float64(Float64(b + a) * pi) * angle_m)); else tmp = Float64(Float64(sin(Float64(Float64(0.011111111111111112 * angle_m) * pi)) * Float64(b - a)) * Float64(b + a)); end return Float64(angle_s * tmp) end
angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp_2 = code(angle_s, a, b, angle_m) tmp = 0.0; if ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) <= -2e+301) tmp = (0.011111111111111112 * (b - a)) * (((b + a) * pi) * angle_m); else tmp = (sin(((0.011111111111111112 * angle_m) * pi)) * (b - a)) * (b + a); end tmp_2 = angle_s * tmp; end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2e+301], N[(N[(0.011111111111111112 * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(b + a), $MachinePrecision] * Pi), $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sin[N[(N[(0.011111111111111112 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq -2 \cdot 10^{+301}:\\
\;\;\;\;\left(0.011111111111111112 \cdot \left(b - a\right)\right) \cdot \left(\left(\left(b + a\right) \cdot \pi\right) \cdot angle\_m\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\sin \left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \pi\right) \cdot \left(b - a\right)\right) \cdot \left(b + a\right)\\
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -2.00000000000000011e301Initial program 54.4%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6451.2
Applied rewrites51.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.2
lift--.f64N/A
lift-pow.f64N/A
pow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squares-revN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f6455.1
lift-+.f64N/A
+-commutativeN/A
lower-+.f6455.1
Applied rewrites55.1%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6462.5
Applied rewrites62.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6462.7
Applied rewrites62.7%
if -2.00000000000000011e301 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 54.4%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites67.6%
Applied rewrites67.8%
Applied rewrites67.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6467.6
Applied rewrites67.6%
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(let* ((t_0 (* PI (/ angle_m 180.0))))
(*
angle_s
(if (<=
(* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))
2e+214)
(* (* (sin (* 0.011111111111111112 (* PI angle_m))) (- b a)) (+ b a))
(* (* (* 0.011111111111111112 (* (- b a) angle_m)) (+ b a)) PI)))))angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
double t_0 = ((double) M_PI) * (angle_m / 180.0);
double tmp;
if ((((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0)) <= 2e+214) {
tmp = (sin((0.011111111111111112 * (((double) M_PI) * angle_m))) * (b - a)) * (b + a);
} else {
tmp = ((0.011111111111111112 * ((b - a) * angle_m)) * (b + a)) * ((double) M_PI);
}
return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
double t_0 = Math.PI * (angle_m / 180.0);
double tmp;
if ((((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * Math.sin(t_0)) * Math.cos(t_0)) <= 2e+214) {
tmp = (Math.sin((0.011111111111111112 * (Math.PI * angle_m))) * (b - a)) * (b + a);
} else {
tmp = ((0.011111111111111112 * ((b - a) * angle_m)) * (b + a)) * Math.PI;
}
return angle_s * tmp;
}
angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a, b, angle_m): t_0 = math.pi * (angle_m / 180.0) tmp = 0 if (((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * math.sin(t_0)) * math.cos(t_0)) <= 2e+214: tmp = (math.sin((0.011111111111111112 * (math.pi * angle_m))) * (b - a)) * (b + a) else: tmp = ((0.011111111111111112 * ((b - a) * angle_m)) * (b + a)) * math.pi return angle_s * tmp
angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b, angle_m) t_0 = Float64(pi * Float64(angle_m / 180.0)) tmp = 0.0 if (Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) <= 2e+214) tmp = Float64(Float64(sin(Float64(0.011111111111111112 * Float64(pi * angle_m))) * Float64(b - a)) * Float64(b + a)); else tmp = Float64(Float64(Float64(0.011111111111111112 * Float64(Float64(b - a) * angle_m)) * Float64(b + a)) * pi); end return Float64(angle_s * tmp) end
angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp_2 = code(angle_s, a, b, angle_m) t_0 = pi * (angle_m / 180.0); tmp = 0.0; if ((((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) <= 2e+214) tmp = (sin((0.011111111111111112 * (pi * angle_m))) * (b - a)) * (b + a); else tmp = ((0.011111111111111112 * ((b - a) * angle_m)) * (b + a)) * pi; end tmp_2 = angle_s * tmp; end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := Block[{t$95$0 = N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[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], 2e+214], N[(N[(N[Sin[N[(0.011111111111111112 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.011111111111111112 * N[(N[(b - a), $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle\_m}{180}\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0 \leq 2 \cdot 10^{+214}:\\
\;\;\;\;\left(\sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right) \cdot \left(b - a\right)\right) \cdot \left(b + a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(0.011111111111111112 \cdot \left(\left(b - a\right) \cdot angle\_m\right)\right) \cdot \left(b + a\right)\right) \cdot \pi\\
\end{array}
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < 1.9999999999999999e214Initial program 54.4%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites67.6%
Applied rewrites67.8%
Applied rewrites67.6%
if 1.9999999999999999e214 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) Initial program 54.4%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6451.2
Applied rewrites51.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.2
lift--.f64N/A
lift-pow.f64N/A
pow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squares-revN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f6455.1
lift-+.f64N/A
+-commutativeN/A
lower-+.f6455.1
Applied rewrites55.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6462.6
Applied rewrites62.6%
angle\_m = (fabs.f64 angle) angle\_s = (copysign.f64 #s(literal 1 binary64) angle) (FPCore (angle_s a b angle_m) :precision binary64 (* angle_s (* (* (sin (* (* 0.011111111111111112 PI) angle_m)) (- b a)) (+ b a))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
return angle_s * ((sin(((0.011111111111111112 * ((double) M_PI)) * angle_m)) * (b - a)) * (b + a));
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
return angle_s * ((Math.sin(((0.011111111111111112 * Math.PI) * angle_m)) * (b - a)) * (b + a));
}
angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a, b, angle_m): return angle_s * ((math.sin(((0.011111111111111112 * math.pi) * angle_m)) * (b - a)) * (b + a))
angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b, angle_m) return Float64(angle_s * Float64(Float64(sin(Float64(Float64(0.011111111111111112 * pi) * angle_m)) * Float64(b - a)) * Float64(b + a))) end
angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp = code(angle_s, a, b, angle_m) tmp = angle_s * ((sin(((0.011111111111111112 * pi) * angle_m)) * (b - a)) * (b + a)); end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * N[(N[(N[Sin[N[(N[(0.011111111111111112 * Pi), $MachinePrecision] * angle$95$m), $MachinePrecision]], $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \left(\left(\sin \left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\_m\right) \cdot \left(b - a\right)\right) \cdot \left(b + a\right)\right)
\end{array}
Initial program 54.4%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites67.6%
Applied rewrites67.8%
Applied rewrites67.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6467.5
Applied rewrites67.5%
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(*
angle_s
(if (<= (pow a 2.0) 2e-178)
(* (* b (sin (* 0.011111111111111112 (* angle_m PI)))) (+ b a))
(* (* 0.011111111111111112 (- b a)) (* (* (+ b a) PI) angle_m)))))angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
double tmp;
if (pow(a, 2.0) <= 2e-178) {
tmp = (b * sin((0.011111111111111112 * (angle_m * ((double) M_PI))))) * (b + a);
} else {
tmp = (0.011111111111111112 * (b - a)) * (((b + a) * ((double) M_PI)) * angle_m);
}
return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
double tmp;
if (Math.pow(a, 2.0) <= 2e-178) {
tmp = (b * Math.sin((0.011111111111111112 * (angle_m * Math.PI)))) * (b + a);
} else {
tmp = (0.011111111111111112 * (b - a)) * (((b + a) * Math.PI) * angle_m);
}
return angle_s * tmp;
}
angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a, b, angle_m): tmp = 0 if math.pow(a, 2.0) <= 2e-178: tmp = (b * math.sin((0.011111111111111112 * (angle_m * math.pi)))) * (b + a) else: tmp = (0.011111111111111112 * (b - a)) * (((b + a) * math.pi) * angle_m) return angle_s * tmp
angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b, angle_m) tmp = 0.0 if ((a ^ 2.0) <= 2e-178) tmp = Float64(Float64(b * sin(Float64(0.011111111111111112 * Float64(angle_m * pi)))) * Float64(b + a)); else tmp = Float64(Float64(0.011111111111111112 * Float64(b - a)) * Float64(Float64(Float64(b + a) * pi) * angle_m)); end return Float64(angle_s * tmp) end
angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp_2 = code(angle_s, a, b, angle_m) tmp = 0.0; if ((a ^ 2.0) <= 2e-178) tmp = (b * sin((0.011111111111111112 * (angle_m * pi)))) * (b + a); else tmp = (0.011111111111111112 * (b - a)) * (((b + a) * pi) * angle_m); end tmp_2 = angle_s * tmp; end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[Power[a, 2.0], $MachinePrecision], 2e-178], N[(N[(b * N[Sin[N[(0.011111111111111112 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision], N[(N[(0.011111111111111112 * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(b + a), $MachinePrecision] * Pi), $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;{a}^{2} \leq 2 \cdot 10^{-178}:\\
\;\;\;\;\left(b \cdot \sin \left(0.011111111111111112 \cdot \left(angle\_m \cdot \pi\right)\right)\right) \cdot \left(b + a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.011111111111111112 \cdot \left(b - a\right)\right) \cdot \left(\left(\left(b + a\right) \cdot \pi\right) \cdot angle\_m\right)\\
\end{array}
\end{array}
if (pow.f64 a #s(literal 2 binary64)) < 1.9999999999999999e-178Initial program 54.4%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites67.6%
Applied rewrites67.8%
Applied rewrites67.6%
Taylor expanded in a around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6442.7
Applied rewrites42.7%
if 1.9999999999999999e-178 < (pow.f64 a #s(literal 2 binary64)) Initial program 54.4%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6451.2
Applied rewrites51.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.2
lift--.f64N/A
lift-pow.f64N/A
pow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squares-revN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f6455.1
lift-+.f64N/A
+-commutativeN/A
lower-+.f6455.1
Applied rewrites55.1%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6462.5
Applied rewrites62.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6462.7
Applied rewrites62.7%
angle\_m = (fabs.f64 angle) angle\_s = (copysign.f64 #s(literal 1 binary64) angle) (FPCore (angle_s a b angle_m) :precision binary64 (* angle_s (* (* (* 0.011111111111111112 (* (- b a) angle_m)) (+ b a)) PI)))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
return angle_s * (((0.011111111111111112 * ((b - a) * angle_m)) * (b + a)) * ((double) M_PI));
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
return angle_s * (((0.011111111111111112 * ((b - a) * angle_m)) * (b + a)) * Math.PI);
}
angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a, b, angle_m): return angle_s * (((0.011111111111111112 * ((b - a) * angle_m)) * (b + a)) * math.pi)
angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b, angle_m) return Float64(angle_s * Float64(Float64(Float64(0.011111111111111112 * Float64(Float64(b - a) * angle_m)) * Float64(b + a)) * pi)) end
angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp = code(angle_s, a, b, angle_m) tmp = angle_s * (((0.011111111111111112 * ((b - a) * angle_m)) * (b + a)) * pi); end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * N[(N[(N[(0.011111111111111112 * N[(N[(b - a), $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \left(\left(\left(0.011111111111111112 \cdot \left(\left(b - a\right) \cdot angle\_m\right)\right) \cdot \left(b + a\right)\right) \cdot \pi\right)
\end{array}
Initial program 54.4%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6451.2
Applied rewrites51.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.2
lift--.f64N/A
lift-pow.f64N/A
pow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squares-revN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f6455.1
lift-+.f64N/A
+-commutativeN/A
lower-+.f6455.1
Applied rewrites55.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6462.6
Applied rewrites62.6%
angle\_m = (fabs.f64 angle) angle\_s = (copysign.f64 #s(literal 1 binary64) angle) (FPCore (angle_s a b angle_m) :precision binary64 (* angle_s (* (* 0.011111111111111112 (- b a)) (* (* (+ b a) PI) angle_m))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
return angle_s * ((0.011111111111111112 * (b - a)) * (((b + a) * ((double) M_PI)) * angle_m));
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
return angle_s * ((0.011111111111111112 * (b - a)) * (((b + a) * Math.PI) * angle_m));
}
angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a, b, angle_m): return angle_s * ((0.011111111111111112 * (b - a)) * (((b + a) * math.pi) * angle_m))
angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b, angle_m) return Float64(angle_s * Float64(Float64(0.011111111111111112 * Float64(b - a)) * Float64(Float64(Float64(b + a) * pi) * angle_m))) end
angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp = code(angle_s, a, b, angle_m) tmp = angle_s * ((0.011111111111111112 * (b - a)) * (((b + a) * pi) * angle_m)); end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * N[(N[(0.011111111111111112 * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(b + a), $MachinePrecision] * Pi), $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \left(\left(0.011111111111111112 \cdot \left(b - a\right)\right) \cdot \left(\left(\left(b + a\right) \cdot \pi\right) \cdot angle\_m\right)\right)
\end{array}
Initial program 54.4%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6451.2
Applied rewrites51.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.2
lift--.f64N/A
lift-pow.f64N/A
pow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squares-revN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f6455.1
lift-+.f64N/A
+-commutativeN/A
lower-+.f6455.1
Applied rewrites55.1%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6462.5
Applied rewrites62.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6462.7
Applied rewrites62.7%
angle\_m = (fabs.f64 angle) angle\_s = (copysign.f64 #s(literal 1 binary64) angle) (FPCore (angle_s a b angle_m) :precision binary64 (* angle_s (* 0.011111111111111112 (* (- b a) (* (* (+ b a) PI) angle_m)))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
return angle_s * (0.011111111111111112 * ((b - a) * (((b + a) * ((double) M_PI)) * angle_m)));
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
return angle_s * (0.011111111111111112 * ((b - a) * (((b + a) * Math.PI) * angle_m)));
}
angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a, b, angle_m): return angle_s * (0.011111111111111112 * ((b - a) * (((b + a) * math.pi) * angle_m)))
angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b, angle_m) return Float64(angle_s * Float64(0.011111111111111112 * Float64(Float64(b - a) * Float64(Float64(Float64(b + a) * pi) * angle_m)))) end
angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp = code(angle_s, a, b, angle_m) tmp = angle_s * (0.011111111111111112 * ((b - a) * (((b + a) * pi) * angle_m))); end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * N[(0.011111111111111112 * N[(N[(b - a), $MachinePrecision] * N[(N[(N[(b + a), $MachinePrecision] * Pi), $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \left(0.011111111111111112 \cdot \left(\left(b - a\right) \cdot \left(\left(\left(b + a\right) \cdot \pi\right) \cdot angle\_m\right)\right)\right)
\end{array}
Initial program 54.4%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6451.2
Applied rewrites51.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.2
lift--.f64N/A
lift-pow.f64N/A
pow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squares-revN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f6455.1
lift-+.f64N/A
+-commutativeN/A
lower-+.f6455.1
Applied rewrites55.1%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6462.5
Applied rewrites62.5%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6462.5
Applied rewrites62.5%
angle\_m = (fabs.f64 angle) angle\_s = (copysign.f64 #s(literal 1 binary64) angle) (FPCore (angle_s a b angle_m) :precision binary64 (* angle_s (* 0.011111111111111112 (* (* (- b a) angle_m) (* (+ b a) PI)))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
return angle_s * (0.011111111111111112 * (((b - a) * angle_m) * ((b + a) * ((double) M_PI))));
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
return angle_s * (0.011111111111111112 * (((b - a) * angle_m) * ((b + a) * Math.PI)));
}
angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a, b, angle_m): return angle_s * (0.011111111111111112 * (((b - a) * angle_m) * ((b + a) * math.pi)))
angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b, angle_m) return Float64(angle_s * Float64(0.011111111111111112 * Float64(Float64(Float64(b - a) * angle_m) * Float64(Float64(b + a) * pi)))) end
angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp = code(angle_s, a, b, angle_m) tmp = angle_s * (0.011111111111111112 * (((b - a) * angle_m) * ((b + a) * pi))); end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * N[(0.011111111111111112 * N[(N[(N[(b - a), $MachinePrecision] * angle$95$m), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \left(0.011111111111111112 \cdot \left(\left(\left(b - a\right) \cdot angle\_m\right) \cdot \left(\left(b + a\right) \cdot \pi\right)\right)\right)
\end{array}
Initial program 54.4%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6451.2
Applied rewrites51.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.2
lift--.f64N/A
lift-pow.f64N/A
pow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squares-revN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f6455.1
lift-+.f64N/A
+-commutativeN/A
lower-+.f6455.1
Applied rewrites55.1%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6462.5
Applied rewrites62.5%
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(let* ((t_0 (* (- b a) angle_m)))
(*
angle_s
(if (<= (* 2.0 (- (pow b 2.0) (pow a 2.0))) 2e-248)
(* 0.011111111111111112 (* t_0 (* a PI)))
(* 0.011111111111111112 (* t_0 (* b PI)))))))angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
double t_0 = (b - a) * angle_m;
double tmp;
if ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) <= 2e-248) {
tmp = 0.011111111111111112 * (t_0 * (a * ((double) M_PI)));
} else {
tmp = 0.011111111111111112 * (t_0 * (b * ((double) M_PI)));
}
return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
double t_0 = (b - a) * angle_m;
double tmp;
if ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) <= 2e-248) {
tmp = 0.011111111111111112 * (t_0 * (a * Math.PI));
} else {
tmp = 0.011111111111111112 * (t_0 * (b * Math.PI));
}
return angle_s * tmp;
}
angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a, b, angle_m): t_0 = (b - a) * angle_m tmp = 0 if (2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) <= 2e-248: tmp = 0.011111111111111112 * (t_0 * (a * math.pi)) else: tmp = 0.011111111111111112 * (t_0 * (b * math.pi)) return angle_s * tmp
angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b, angle_m) t_0 = Float64(Float64(b - a) * angle_m) tmp = 0.0 if (Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) <= 2e-248) tmp = Float64(0.011111111111111112 * Float64(t_0 * Float64(a * pi))); else tmp = Float64(0.011111111111111112 * Float64(t_0 * Float64(b * pi))); end return Float64(angle_s * tmp) end
angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp_2 = code(angle_s, a, b, angle_m) t_0 = (b - a) * angle_m; tmp = 0.0; if ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) <= 2e-248) tmp = 0.011111111111111112 * (t_0 * (a * pi)); else tmp = 0.011111111111111112 * (t_0 * (b * pi)); end tmp_2 = angle_s * tmp; end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := Block[{t$95$0 = N[(N[(b - a), $MachinePrecision] * angle$95$m), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e-248], N[(0.011111111111111112 * N[(t$95$0 * N[(a * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(t$95$0 * N[(b * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := \left(b - a\right) \cdot angle\_m\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq 2 \cdot 10^{-248}:\\
\;\;\;\;0.011111111111111112 \cdot \left(t\_0 \cdot \left(a \cdot \pi\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(t\_0 \cdot \left(b \cdot \pi\right)\right)\\
\end{array}
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < 1.99999999999999996e-248Initial program 54.4%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6451.2
Applied rewrites51.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.2
lift--.f64N/A
lift-pow.f64N/A
pow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squares-revN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f6455.1
lift-+.f64N/A
+-commutativeN/A
lower-+.f6455.1
Applied rewrites55.1%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6462.5
Applied rewrites62.5%
Taylor expanded in a around inf
lower-*.f64N/A
lower-PI.f6441.4
Applied rewrites41.4%
if 1.99999999999999996e-248 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 54.4%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6451.2
Applied rewrites51.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.2
lift--.f64N/A
lift-pow.f64N/A
pow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squares-revN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f6455.1
lift-+.f64N/A
+-commutativeN/A
lower-+.f6455.1
Applied rewrites55.1%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6462.5
Applied rewrites62.5%
Taylor expanded in a around 0
lower-*.f64N/A
lower-PI.f6442.1
Applied rewrites42.1%
angle\_m = (fabs.f64 angle) angle\_s = (copysign.f64 #s(literal 1 binary64) angle) (FPCore (angle_s a b angle_m) :precision binary64 (* angle_s (* 0.011111111111111112 (* (* (- b a) angle_m) (* a PI)))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
return angle_s * (0.011111111111111112 * (((b - a) * angle_m) * (a * ((double) M_PI))));
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
return angle_s * (0.011111111111111112 * (((b - a) * angle_m) * (a * Math.PI)));
}
angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a, b, angle_m): return angle_s * (0.011111111111111112 * (((b - a) * angle_m) * (a * math.pi)))
angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b, angle_m) return Float64(angle_s * Float64(0.011111111111111112 * Float64(Float64(Float64(b - a) * angle_m) * Float64(a * pi)))) end
angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp = code(angle_s, a, b, angle_m) tmp = angle_s * (0.011111111111111112 * (((b - a) * angle_m) * (a * pi))); end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * N[(0.011111111111111112 * N[(N[(N[(b - a), $MachinePrecision] * angle$95$m), $MachinePrecision] * N[(a * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \left(0.011111111111111112 \cdot \left(\left(\left(b - a\right) \cdot angle\_m\right) \cdot \left(a \cdot \pi\right)\right)\right)
\end{array}
Initial program 54.4%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6451.2
Applied rewrites51.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.2
lift--.f64N/A
lift-pow.f64N/A
pow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squares-revN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f6455.1
lift-+.f64N/A
+-commutativeN/A
lower-+.f6455.1
Applied rewrites55.1%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6462.5
Applied rewrites62.5%
Taylor expanded in a around inf
lower-*.f64N/A
lower-PI.f6441.4
Applied rewrites41.4%
herbie shell --seed 2025159
(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)))))