Average Error: 31.9 → 22.1
Time: 1.5min
Precision: binary64
Cost: 65668
\[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
\[\begin{array}{l} t_0 := -2 \cdot \mathsf{fma}\left(a, a, b \cdot \left(-b\right)\right)\\ \mathbf{if}\;\frac{angle}{180} \leq -6 \cdot 10^{-93}:\\ \;\;\;\;\sin \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(t_0 \cdot \cos \left(\left(\left(\pi \cdot 0.005555555555555556\right) \cdot {\left(\sqrt[3]{angle}\right)}^{2}\right) \cdot {\left(\sqrt[3]{\sqrt[3]{angle}}\right)}^{3}\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{-47}:\\ \;\;\;\;\mathsf{fma}\left(angle \cdot \left(a + b\right), \left(\pi \cdot -0.011111111111111112\right) \cdot \left(a - b\right), 0 \cdot \left(a + b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(t_0 \cdot \cos \left({\left(\sqrt[3]{angle \cdot \left(\pi \cdot 0.005555555555555556\right)}\right)}^{3}\right)\right)\\ \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (*
  (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin (* PI (/ angle 180.0))))
  (cos (* PI (/ angle 180.0)))))
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0 (* -2.0 (fma a a (* b (- b))))))
   (if (<= (/ angle 180.0) -6e-93)
     (*
      (sin (* (/ angle 180.0) PI))
      (*
       t_0
       (cos
        (*
         (* (* PI 0.005555555555555556) (pow (cbrt angle) 2.0))
         (pow (cbrt (cbrt angle)) 3.0)))))
     (if (<= (/ angle 180.0) 5e-47)
       (fma
        (* angle (+ a b))
        (* (* PI -0.011111111111111112) (- a b))
        (* 0.0 (+ a b)))
       (*
        (sin (* PI (* angle 0.005555555555555556)))
        (*
         t_0
         (cos (pow (cbrt (* angle (* PI 0.005555555555555556))) 3.0))))))))
double code(double a, double b, double angle) {
	return ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin((((double) M_PI) * (angle / 180.0)))) * cos((((double) M_PI) * (angle / 180.0)));
}
double code(double a, double b, double angle) {
	double t_0 = -2.0 * fma(a, a, (b * -b));
	double tmp;
	if ((angle / 180.0) <= -6e-93) {
		tmp = sin(((angle / 180.0) * ((double) M_PI))) * (t_0 * cos((((((double) M_PI) * 0.005555555555555556) * pow(cbrt(angle), 2.0)) * pow(cbrt(cbrt(angle)), 3.0))));
	} else if ((angle / 180.0) <= 5e-47) {
		tmp = fma((angle * (a + b)), ((((double) M_PI) * -0.011111111111111112) * (a - b)), (0.0 * (a + b)));
	} else {
		tmp = sin((((double) M_PI) * (angle * 0.005555555555555556))) * (t_0 * cos(pow(cbrt((angle * (((double) M_PI) * 0.005555555555555556))), 3.0)));
	}
	return tmp;
}
function code(a, b, angle)
	return Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(Float64(pi * Float64(angle / 180.0)))) * cos(Float64(pi * Float64(angle / 180.0))))
end
function code(a, b, angle)
	t_0 = Float64(-2.0 * fma(a, a, Float64(b * Float64(-b))))
	tmp = 0.0
	if (Float64(angle / 180.0) <= -6e-93)
		tmp = Float64(sin(Float64(Float64(angle / 180.0) * pi)) * Float64(t_0 * cos(Float64(Float64(Float64(pi * 0.005555555555555556) * (cbrt(angle) ^ 2.0)) * (cbrt(cbrt(angle)) ^ 3.0)))));
	elseif (Float64(angle / 180.0) <= 5e-47)
		tmp = fma(Float64(angle * Float64(a + b)), Float64(Float64(pi * -0.011111111111111112) * Float64(a - b)), Float64(0.0 * Float64(a + b)));
	else
		tmp = Float64(sin(Float64(pi * Float64(angle * 0.005555555555555556))) * Float64(t_0 * cos((cbrt(Float64(angle * Float64(pi * 0.005555555555555556))) ^ 3.0))));
	end
	return tmp
end
code[a_, b_, angle_] := N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
code[a_, b_, angle_] := Block[{t$95$0 = N[(-2.0 * N[(a * a + N[(b * (-b)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], -6e-93], N[(N[Sin[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(t$95$0 * N[Cos[N[(N[(N[(Pi * 0.005555555555555556), $MachinePrecision] * N[Power[N[Power[angle, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Power[N[Power[angle, 1/3], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 5e-47], N[(N[(angle * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(N[(Pi * -0.011111111111111112), $MachinePrecision] * N[(a - b), $MachinePrecision]), $MachinePrecision] + N[(0.0 * N[(a + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(t$95$0 * N[Cos[N[Power[N[Power[N[(angle * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)
\begin{array}{l}
t_0 := -2 \cdot \mathsf{fma}\left(a, a, b \cdot \left(-b\right)\right)\\
\mathbf{if}\;\frac{angle}{180} \leq -6 \cdot 10^{-93}:\\
\;\;\;\;\sin \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(t_0 \cdot \cos \left(\left(\left(\pi \cdot 0.005555555555555556\right) \cdot {\left(\sqrt[3]{angle}\right)}^{2}\right) \cdot {\left(\sqrt[3]{\sqrt[3]{angle}}\right)}^{3}\right)\right)\\

\mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{-47}:\\
\;\;\;\;\mathsf{fma}\left(angle \cdot \left(a + b\right), \left(\pi \cdot -0.011111111111111112\right) \cdot \left(a - b\right), 0 \cdot \left(a + b\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(t_0 \cdot \cos \left({\left(\sqrt[3]{angle \cdot \left(\pi \cdot 0.005555555555555556\right)}\right)}^{3}\right)\right)\\


\end{array}

Error

Derivation

  1. Split input into 3 regimes
  2. if (/.f64 angle 180) < -6.0000000000000003e-93

    1. Initial program 40.1

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Simplified40.0

      \[\leadsto \color{blue}{\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(-2 \cdot \mathsf{fma}\left(a, a, b \cdot \left(-b\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      Proof
      (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 (*.f64 -2 (fma.f64 a a (*.f64 b (neg.f64 b)))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 (*.f64 (Rewrite<= metadata-eval (neg.f64 2)) (fma.f64 a a (*.f64 b (neg.f64 b)))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 (*.f64 (neg.f64 2) (fma.f64 a a (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 b b))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 (*.f64 (neg.f64 2) (fma.f64 a a (neg.f64 (Rewrite<= unpow2_binary64 (pow.f64 b 2))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 (*.f64 (neg.f64 2) (Rewrite<= fma-neg_binary64 (-.f64 (*.f64 a a) (pow.f64 b 2)))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 1 points increase in error, 0 points decrease in error
      (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 (*.f64 (neg.f64 2) (-.f64 (Rewrite<= unpow2_binary64 (pow.f64 a 2)) (pow.f64 b 2))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 (Rewrite<= distribute-lft-neg-in_binary64 (neg.f64 (*.f64 2 (-.f64 (pow.f64 a 2) (pow.f64 b 2))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 (Rewrite<= distribute-rgt-neg-out_binary64 (*.f64 2 (neg.f64 (-.f64 (pow.f64 a 2) (pow.f64 b 2))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 (*.f64 2 (Rewrite<= sub0-neg_binary64 (-.f64 0 (-.f64 (pow.f64 a 2) (pow.f64 b 2))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 (*.f64 2 (Rewrite<= associate-+l-_binary64 (+.f64 (-.f64 0 (pow.f64 a 2)) (pow.f64 b 2)))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 (*.f64 2 (+.f64 (Rewrite<= neg-sub0_binary64 (neg.f64 (pow.f64 a 2))) (pow.f64 b 2))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 (*.f64 2 (Rewrite<= +-commutative_binary64 (+.f64 (pow.f64 b 2) (neg.f64 (pow.f64 a 2))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 (*.f64 2 (Rewrite<= sub-neg_binary64 (-.f64 (pow.f64 b 2) (pow.f64 a 2)))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2)))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 13 points increase in error, 21 points decrease in error
      (*.f64 (Rewrite<= *-commutative_binary64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180)))): 0 points increase in error, 0 points decrease in error
    3. Applied egg-rr40.3

      \[\leadsto \sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(-2 \cdot \mathsf{fma}\left(a, a, b \cdot \left(-b\right)\right)\right) \cdot \cos \color{blue}{\left({\left(\sqrt[3]{angle \cdot \left(0.005555555555555556 \cdot \pi\right)}\right)}^{3}\right)}\right) \]
    4. Applied egg-rr40.6

      \[\leadsto \sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(-2 \cdot \mathsf{fma}\left(a, a, b \cdot \left(-b\right)\right)\right) \cdot \cos \color{blue}{\left(\left(\left(0.005555555555555556 \cdot \pi\right) \cdot {\left(\sqrt[3]{angle}\right)}^{2}\right) \cdot \sqrt[3]{angle}\right)}\right) \]
    5. Applied egg-rr40.5

      \[\leadsto \sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(-2 \cdot \mathsf{fma}\left(a, a, b \cdot \left(-b\right)\right)\right) \cdot \cos \left(\left(\left(0.005555555555555556 \cdot \pi\right) \cdot {\left(\sqrt[3]{angle}\right)}^{2}\right) \cdot \color{blue}{{\left(\sqrt[3]{\sqrt[3]{angle}}\right)}^{3}}\right)\right) \]

    if -6.0000000000000003e-93 < (/.f64 angle 180) < 5.00000000000000011e-47

    1. Initial program 21.0

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Simplified21.0

      \[\leadsto \color{blue}{\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(-2 \cdot \mathsf{fma}\left(a, a, b \cdot \left(-b\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      Proof
      (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 (*.f64 -2 (fma.f64 a a (*.f64 b (neg.f64 b)))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 (*.f64 (Rewrite<= metadata-eval (neg.f64 2)) (fma.f64 a a (*.f64 b (neg.f64 b)))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 (*.f64 (neg.f64 2) (fma.f64 a a (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 b b))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 (*.f64 (neg.f64 2) (fma.f64 a a (neg.f64 (Rewrite<= unpow2_binary64 (pow.f64 b 2))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 (*.f64 (neg.f64 2) (Rewrite<= fma-neg_binary64 (-.f64 (*.f64 a a) (pow.f64 b 2)))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 1 points increase in error, 0 points decrease in error
      (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 (*.f64 (neg.f64 2) (-.f64 (Rewrite<= unpow2_binary64 (pow.f64 a 2)) (pow.f64 b 2))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 (Rewrite<= distribute-lft-neg-in_binary64 (neg.f64 (*.f64 2 (-.f64 (pow.f64 a 2) (pow.f64 b 2))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 (Rewrite<= distribute-rgt-neg-out_binary64 (*.f64 2 (neg.f64 (-.f64 (pow.f64 a 2) (pow.f64 b 2))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 (*.f64 2 (Rewrite<= sub0-neg_binary64 (-.f64 0 (-.f64 (pow.f64 a 2) (pow.f64 b 2))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 (*.f64 2 (Rewrite<= associate-+l-_binary64 (+.f64 (-.f64 0 (pow.f64 a 2)) (pow.f64 b 2)))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 (*.f64 2 (+.f64 (Rewrite<= neg-sub0_binary64 (neg.f64 (pow.f64 a 2))) (pow.f64 b 2))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 (*.f64 2 (Rewrite<= +-commutative_binary64 (+.f64 (pow.f64 b 2) (neg.f64 (pow.f64 a 2))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 (*.f64 2 (Rewrite<= sub-neg_binary64 (-.f64 (pow.f64 b 2) (pow.f64 a 2)))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2)))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 13 points increase in error, 21 points decrease in error
      (*.f64 (Rewrite<= *-commutative_binary64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180)))): 0 points increase in error, 0 points decrease in error
    3. Taylor expanded in angle around 0 21.0

      \[\leadsto \color{blue}{-0.011111111111111112 \cdot \left(angle \cdot \left(\left(-1 \cdot {b}^{2} + {a}^{2}\right) \cdot \pi\right)\right)} \]
    4. Simplified21.0

      \[\leadsto \color{blue}{\pi \cdot \left(\left(a \cdot a - b \cdot b\right) \cdot \left(angle \cdot -0.011111111111111112\right)\right)} \]
      Proof
      (*.f64 (PI.f64) (*.f64 (-.f64 (*.f64 a a) (*.f64 b b)) (*.f64 angle -1/90))): 0 points increase in error, 0 points decrease in error
      (*.f64 (PI.f64) (*.f64 (-.f64 (Rewrite<= unpow2_binary64 (pow.f64 a 2)) (*.f64 b b)) (*.f64 angle -1/90))): 0 points increase in error, 0 points decrease in error
      (*.f64 (PI.f64) (*.f64 (-.f64 (pow.f64 a 2) (Rewrite<= unpow2_binary64 (pow.f64 b 2))) (*.f64 angle -1/90))): 0 points increase in error, 0 points decrease in error
      (*.f64 (PI.f64) (*.f64 (Rewrite<= unsub-neg_binary64 (+.f64 (pow.f64 a 2) (neg.f64 (pow.f64 b 2)))) (*.f64 angle -1/90))): 0 points increase in error, 0 points decrease in error
      (*.f64 (PI.f64) (*.f64 (+.f64 (pow.f64 a 2) (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (pow.f64 b 2)))) (*.f64 angle -1/90))): 0 points increase in error, 0 points decrease in error
      (*.f64 (PI.f64) (*.f64 (Rewrite<= +-commutative_binary64 (+.f64 (*.f64 -1 (pow.f64 b 2)) (pow.f64 a 2))) (*.f64 angle -1/90))): 0 points increase in error, 0 points decrease in error
      (*.f64 (PI.f64) (*.f64 (+.f64 (*.f64 -1 (pow.f64 b 2)) (pow.f64 a 2)) (Rewrite<= *-commutative_binary64 (*.f64 -1/90 angle)))): 0 points increase in error, 0 points decrease in error
      (*.f64 (PI.f64) (Rewrite<= *-commutative_binary64 (*.f64 (*.f64 -1/90 angle) (+.f64 (*.f64 -1 (pow.f64 b 2)) (pow.f64 a 2))))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= *-commutative_binary64 (*.f64 (*.f64 (*.f64 -1/90 angle) (+.f64 (*.f64 -1 (pow.f64 b 2)) (pow.f64 a 2))) (PI.f64))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-*r*_binary64 (*.f64 (*.f64 -1/90 angle) (*.f64 (+.f64 (*.f64 -1 (pow.f64 b 2)) (pow.f64 a 2)) (PI.f64)))): 24 points increase in error, 26 points decrease in error
      (Rewrite<= associate-*r*_binary64 (*.f64 -1/90 (*.f64 angle (*.f64 (+.f64 (*.f64 -1 (pow.f64 b 2)) (pow.f64 a 2)) (PI.f64))))): 25 points increase in error, 27 points decrease in error
    5. Taylor expanded in a around 0 21.0

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left({b}^{2} \cdot \pi\right)\right) + -0.011111111111111112 \cdot \left(angle \cdot \left({a}^{2} \cdot \pi\right)\right)} \]
    6. Simplified0.3

      \[\leadsto \color{blue}{\left(\left(-0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a - b\right)\right) \cdot \left(b + a\right)} \]
      Proof
      (*.f64 (*.f64 (*.f64 -1/90 (*.f64 angle (PI.f64))) (-.f64 a b)) (+.f64 b a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (*.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 -1/90 angle) (PI.f64))) (-.f64 a b)) (+.f64 b a)): 39 points increase in error, 22 points decrease in error
      (*.f64 (*.f64 (*.f64 (*.f64 -1/90 angle) (PI.f64)) (-.f64 a b)) (Rewrite<= +-commutative_binary64 (+.f64 a b))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-*r*_binary64 (*.f64 (*.f64 (*.f64 -1/90 angle) (PI.f64)) (*.f64 (-.f64 a b) (+.f64 a b)))): 65 points increase in error, 46 points decrease in error
      (*.f64 (*.f64 (*.f64 -1/90 angle) (PI.f64)) (Rewrite<= *-commutative_binary64 (*.f64 (+.f64 a b) (-.f64 a b)))): 0 points increase in error, 0 points decrease in error
      (*.f64 (*.f64 (*.f64 -1/90 angle) (PI.f64)) (Rewrite<= difference-of-squares_binary64 (-.f64 (*.f64 a a) (*.f64 b b)))): 1 points increase in error, 0 points decrease in error
      (*.f64 (*.f64 (*.f64 -1/90 angle) (PI.f64)) (-.f64 (Rewrite<= unpow2_binary64 (pow.f64 a 2)) (*.f64 b b))): 0 points increase in error, 0 points decrease in error
      (*.f64 (*.f64 (*.f64 -1/90 angle) (PI.f64)) (-.f64 (pow.f64 a 2) (Rewrite<= unpow2_binary64 (pow.f64 b 2)))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-*r*_binary64 (*.f64 (*.f64 -1/90 angle) (*.f64 (PI.f64) (-.f64 (pow.f64 a 2) (pow.f64 b 2))))): 26 points increase in error, 24 points decrease in error
      (*.f64 (*.f64 -1/90 angle) (*.f64 (PI.f64) (Rewrite=> sub-neg_binary64 (+.f64 (pow.f64 a 2) (neg.f64 (pow.f64 b 2)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (*.f64 -1/90 angle) (*.f64 (PI.f64) (+.f64 (pow.f64 a 2) (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (pow.f64 b 2)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (*.f64 -1/90 angle) (Rewrite=> distribute-rgt-in_binary64 (+.f64 (*.f64 (pow.f64 a 2) (PI.f64)) (*.f64 (*.f64 -1 (pow.f64 b 2)) (PI.f64))))): 3 points increase in error, 0 points decrease in error
      (Rewrite=> distribute-lft-in_binary64 (+.f64 (*.f64 (*.f64 -1/90 angle) (*.f64 (pow.f64 a 2) (PI.f64))) (*.f64 (*.f64 -1/90 angle) (*.f64 (*.f64 -1 (pow.f64 b 2)) (PI.f64))))): 0 points increase in error, 1 points decrease in error
      (+.f64 (Rewrite<= associate-*r*_binary64 (*.f64 -1/90 (*.f64 angle (*.f64 (pow.f64 a 2) (PI.f64))))) (*.f64 (*.f64 -1/90 angle) (*.f64 (*.f64 -1 (pow.f64 b 2)) (PI.f64)))): 11 points increase in error, 14 points decrease in error
      (+.f64 (*.f64 -1/90 (*.f64 angle (*.f64 (pow.f64 a 2) (PI.f64)))) (*.f64 (*.f64 -1/90 angle) (*.f64 (Rewrite=> mul-1-neg_binary64 (neg.f64 (pow.f64 b 2))) (PI.f64)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (*.f64 -1/90 (*.f64 angle (*.f64 (pow.f64 a 2) (PI.f64)))) (*.f64 (*.f64 -1/90 angle) (Rewrite=> distribute-lft-neg-out_binary64 (neg.f64 (*.f64 (pow.f64 b 2) (PI.f64)))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (*.f64 -1/90 (*.f64 angle (*.f64 (pow.f64 a 2) (PI.f64)))) (Rewrite=> distribute-rgt-neg-out_binary64 (neg.f64 (*.f64 (*.f64 -1/90 angle) (*.f64 (pow.f64 b 2) (PI.f64)))))): 0 points increase in error, 0 points decrease in error
      (Rewrite=> unsub-neg_binary64 (-.f64 (*.f64 -1/90 (*.f64 angle (*.f64 (pow.f64 a 2) (PI.f64)))) (*.f64 (*.f64 -1/90 angle) (*.f64 (pow.f64 b 2) (PI.f64))))): 0 points increase in error, 0 points decrease in error
      (Rewrite=> cancel-sign-sub-inv_binary64 (+.f64 (*.f64 -1/90 (*.f64 angle (*.f64 (pow.f64 a 2) (PI.f64)))) (*.f64 (neg.f64 (*.f64 -1/90 angle)) (*.f64 (pow.f64 b 2) (PI.f64))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (*.f64 -1/90 (*.f64 angle (*.f64 (pow.f64 a 2) (PI.f64)))) (*.f64 (Rewrite=> distribute-lft-neg-in_binary64 (*.f64 (neg.f64 -1/90) angle)) (*.f64 (pow.f64 b 2) (PI.f64)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (*.f64 -1/90 (*.f64 angle (*.f64 (pow.f64 a 2) (PI.f64)))) (*.f64 (*.f64 (Rewrite=> metadata-eval 1/90) angle) (*.f64 (pow.f64 b 2) (PI.f64)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (*.f64 -1/90 (*.f64 angle (*.f64 (pow.f64 a 2) (PI.f64)))) (Rewrite<= associate-*r*_binary64 (*.f64 1/90 (*.f64 angle (*.f64 (pow.f64 b 2) (PI.f64)))))): 13 points increase in error, 16 points decrease in error
      (Rewrite<= +-commutative_binary64 (+.f64 (*.f64 1/90 (*.f64 angle (*.f64 (pow.f64 b 2) (PI.f64)))) (*.f64 -1/90 (*.f64 angle (*.f64 (pow.f64 a 2) (PI.f64)))))): 0 points increase in error, 0 points decrease in error
    7. Applied egg-rr0.3

      \[\leadsto \color{blue}{\left(0 + \left(angle \cdot \pi\right) \cdot \left(-0.011111111111111112 \cdot \left(a - b\right)\right)\right)} \cdot \left(b + a\right) \]
    8. Applied egg-rr0.3

      \[\leadsto \color{blue}{\mathsf{fma}\left(\left(a + b\right) \cdot angle, \left(\pi \cdot -0.011111111111111112\right) \cdot \left(a - b\right), \left(a + b\right) \cdot 0\right)} \]

    if 5.00000000000000011e-47 < (/.f64 angle 180)

    1. Initial program 44.0

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Simplified44.0

      \[\leadsto \color{blue}{\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(-2 \cdot \mathsf{fma}\left(a, a, b \cdot \left(-b\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      Proof
      (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 (*.f64 -2 (fma.f64 a a (*.f64 b (neg.f64 b)))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 (*.f64 (Rewrite<= metadata-eval (neg.f64 2)) (fma.f64 a a (*.f64 b (neg.f64 b)))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 (*.f64 (neg.f64 2) (fma.f64 a a (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 b b))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 (*.f64 (neg.f64 2) (fma.f64 a a (neg.f64 (Rewrite<= unpow2_binary64 (pow.f64 b 2))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 (*.f64 (neg.f64 2) (Rewrite<= fma-neg_binary64 (-.f64 (*.f64 a a) (pow.f64 b 2)))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 1 points increase in error, 0 points decrease in error
      (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 (*.f64 (neg.f64 2) (-.f64 (Rewrite<= unpow2_binary64 (pow.f64 a 2)) (pow.f64 b 2))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 (Rewrite<= distribute-lft-neg-in_binary64 (neg.f64 (*.f64 2 (-.f64 (pow.f64 a 2) (pow.f64 b 2))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 (Rewrite<= distribute-rgt-neg-out_binary64 (*.f64 2 (neg.f64 (-.f64 (pow.f64 a 2) (pow.f64 b 2))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 (*.f64 2 (Rewrite<= sub0-neg_binary64 (-.f64 0 (-.f64 (pow.f64 a 2) (pow.f64 b 2))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 (*.f64 2 (Rewrite<= associate-+l-_binary64 (+.f64 (-.f64 0 (pow.f64 a 2)) (pow.f64 b 2)))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 (*.f64 2 (+.f64 (Rewrite<= neg-sub0_binary64 (neg.f64 (pow.f64 a 2))) (pow.f64 b 2))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 (*.f64 2 (Rewrite<= +-commutative_binary64 (+.f64 (pow.f64 b 2) (neg.f64 (pow.f64 a 2))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 (*.f64 2 (Rewrite<= sub-neg_binary64 (-.f64 (pow.f64 b 2) (pow.f64 a 2)))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))) (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2)))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))): 13 points increase in error, 21 points decrease in error
      (*.f64 (Rewrite<= *-commutative_binary64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180)))): 0 points increase in error, 0 points decrease in error
    3. Applied egg-rr44.1

      \[\leadsto \sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(-2 \cdot \mathsf{fma}\left(a, a, b \cdot \left(-b\right)\right)\right) \cdot \cos \color{blue}{\left({\left(\sqrt[3]{angle \cdot \left(0.005555555555555556 \cdot \pi\right)}\right)}^{3}\right)}\right) \]
    4. Taylor expanded in angle around inf 44.1

      \[\leadsto \color{blue}{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)} \cdot \left(\left(-2 \cdot \mathsf{fma}\left(a, a, b \cdot \left(-b\right)\right)\right) \cdot \cos \left({\left(\sqrt[3]{angle \cdot \left(0.005555555555555556 \cdot \pi\right)}\right)}^{3}\right)\right) \]
    5. Simplified44.2

      \[\leadsto \color{blue}{\sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)} \cdot \left(\left(-2 \cdot \mathsf{fma}\left(a, a, b \cdot \left(-b\right)\right)\right) \cdot \cos \left({\left(\sqrt[3]{angle \cdot \left(0.005555555555555556 \cdot \pi\right)}\right)}^{3}\right)\right) \]
      Proof
      (sin.f64 (*.f64 (PI.f64) (*.f64 1/180 angle))): 0 points increase in error, 0 points decrease in error
      (sin.f64 (Rewrite<= *-commutative_binary64 (*.f64 (*.f64 1/180 angle) (PI.f64)))): 0 points increase in error, 0 points decrease in error
      (sin.f64 (Rewrite<= associate-*r*_binary64 (*.f64 1/180 (*.f64 angle (PI.f64))))): 53 points increase in error, 48 points decrease in error
  3. Recombined 3 regimes into one program.
  4. Final simplification22.1

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq -6 \cdot 10^{-93}:\\ \;\;\;\;\sin \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(\left(-2 \cdot \mathsf{fma}\left(a, a, b \cdot \left(-b\right)\right)\right) \cdot \cos \left(\left(\left(\pi \cdot 0.005555555555555556\right) \cdot {\left(\sqrt[3]{angle}\right)}^{2}\right) \cdot {\left(\sqrt[3]{\sqrt[3]{angle}}\right)}^{3}\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{-47}:\\ \;\;\;\;\mathsf{fma}\left(angle \cdot \left(a + b\right), \left(\pi \cdot -0.011111111111111112\right) \cdot \left(a - b\right), 0 \cdot \left(a + b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(\left(-2 \cdot \mathsf{fma}\left(a, a, b \cdot \left(-b\right)\right)\right) \cdot \cos \left({\left(\sqrt[3]{angle \cdot \left(\pi \cdot 0.005555555555555556\right)}\right)}^{3}\right)\right)\\ \end{array} \]

Alternatives

Alternative 1
Error21.6
Cost72392
\[\begin{array}{l} t_0 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\ t_1 := {b}^{2} - {a}^{2}\\ \mathbf{if}\;t_1 \leq -2 \cdot 10^{+74}:\\ \;\;\;\;a \cdot \left(-2 \cdot \left(\sin t_0 \cdot \left(a \cdot \cos t_0\right)\right)\right)\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+299}:\\ \;\;\;\;\sin \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(\left(-2 \cdot \mathsf{fma}\left(a, a, b \cdot \left(-b\right)\right)\right) \cdot \cos \left({\left(\sqrt[3]{angle \cdot \left(\pi \cdot 0.005555555555555556\right)}\right)}^{3}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot \left(a - b\right)\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \left(a + b\right)\right)\\ \end{array} \]
Alternative 2
Error22.1
Cost59140
\[\begin{array}{l} t_0 := -2 \cdot \mathsf{fma}\left(a, a, b \cdot \left(-b\right)\right)\\ \mathbf{if}\;\frac{angle}{180} \leq -6 \cdot 10^{-93}:\\ \;\;\;\;\sin \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(t_0 \cdot \cos \left(\sqrt[3]{\pi} \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot {\left(\sqrt[3]{\pi}\right)}^{2}\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{-47}:\\ \;\;\;\;\mathsf{fma}\left(angle \cdot \left(a + b\right), \left(\pi \cdot -0.011111111111111112\right) \cdot \left(a - b\right), 0 \cdot \left(a + b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(t_0 \cdot \cos \left({\left(\sqrt[3]{angle \cdot \left(\pi \cdot 0.005555555555555556\right)}\right)}^{3}\right)\right)\\ \end{array} \]
Alternative 3
Error22.0
Cost46536
\[\begin{array}{l} t_0 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\ t_1 := -2 \cdot \mathsf{fma}\left(a, a, b \cdot \left(-b\right)\right)\\ \mathbf{if}\;\frac{angle}{180} \leq -6 \cdot 10^{-93}:\\ \;\;\;\;\sin \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(t_1 \cdot {\left(\sqrt[3]{\cos t_0}\right)}^{3}\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{-47}:\\ \;\;\;\;\mathsf{fma}\left(angle \cdot \left(a + b\right), \left(\pi \cdot -0.011111111111111112\right) \cdot \left(a - b\right), 0 \cdot \left(a + b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sin t_0 \cdot \left(t_1 \cdot \cos \left({\left(\sqrt[3]{angle \cdot \left(\pi \cdot 0.005555555555555556\right)}\right)}^{3}\right)\right)\\ \end{array} \]
Alternative 4
Error22.0
Cost46472
\[\begin{array}{l} t_0 := \frac{angle}{180} \cdot \pi\\ t_1 := -2 \cdot \mathsf{fma}\left(a, a, b \cdot \left(-b\right)\right)\\ \mathbf{if}\;\frac{angle}{180} \leq -6 \cdot 10^{-93}:\\ \;\;\;\;\sin t_0 \cdot \left(t_1 \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 10^{-13}:\\ \;\;\;\;\mathsf{fma}\left(angle \cdot \left(a + b\right), \left(\pi \cdot -0.011111111111111112\right) \cdot \left(a - b\right), 0 \cdot \left(a + b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sin \left(e^{\log \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)}\right) \cdot \left(t_1 \cdot \cos t_0\right)\\ \end{array} \]
Alternative 5
Error22.0
Cost46472
\[\begin{array}{l} t_0 := \frac{angle}{180} \cdot \pi\\ t_1 := -2 \cdot \mathsf{fma}\left(a, a, b \cdot \left(-b\right)\right)\\ \mathbf{if}\;\frac{angle}{180} \leq -6 \cdot 10^{-93}:\\ \;\;\;\;\sin t_0 \cdot \left(t_1 \cdot {\left(\sqrt[3]{\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}^{3}\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 10^{-13}:\\ \;\;\;\;\mathsf{fma}\left(angle \cdot \left(a + b\right), \left(\pi \cdot -0.011111111111111112\right) \cdot \left(a - b\right), 0 \cdot \left(a + b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sin \left(e^{\log \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)}\right) \cdot \left(t_1 \cdot \cos t_0\right)\\ \end{array} \]
Alternative 6
Error22.1
Cost46212
\[\begin{array}{l} t_0 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\ t_1 := \cos t_0\\ \mathbf{if}\;\frac{angle}{180} \leq -6 \cdot 10^{-93}:\\ \;\;\;\;\sin \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(\left(-2 \cdot \mathsf{fma}\left(a, a, b \cdot \left(-b\right)\right)\right) \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(t_1\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{-7}:\\ \;\;\;\;\mathsf{fma}\left(angle \cdot \left(a + b\right), \left(\pi \cdot -0.011111111111111112\right) \cdot \left(a - b\right), 0 \cdot \left(a + b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \left(\left(-2 \cdot \sin t_0\right) \cdot {\left(\mathsf{hypot}\left(a, b\right)\right)}^{2}\right)\\ \end{array} \]
Alternative 7
Error22.1
Cost39880
\[\begin{array}{l} t_0 := angle \cdot \left(\pi \cdot 0.005555555555555556\right)\\ \mathbf{if}\;\frac{angle}{180} \leq -6 \cdot 10^{-93}:\\ \;\;\;\;\sin \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(\left(-2 \cdot \mathsf{fma}\left(a, a, b \cdot \left(-b\right)\right)\right) \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{-7}:\\ \;\;\;\;\mathsf{fma}\left(angle \cdot \left(a + b\right), \left(\pi \cdot -0.011111111111111112\right) \cdot \left(a - b\right), 0 \cdot \left(a + b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sin t_0 \cdot \left({\left(\mathsf{hypot}\left(a, b\right)\right)}^{2} \cdot \left(-2 \cdot \cos t_0\right)\right)\\ \end{array} \]
Alternative 8
Error22.1
Cost39880
\[\begin{array}{l} t_0 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\ t_1 := \cos t_0\\ \mathbf{if}\;\frac{angle}{180} \leq -6 \cdot 10^{-93}:\\ \;\;\;\;\sin \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(\left(-2 \cdot \mathsf{fma}\left(a, a, b \cdot \left(-b\right)\right)\right) \cdot t_1\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{-7}:\\ \;\;\;\;\mathsf{fma}\left(angle \cdot \left(a + b\right), \left(\pi \cdot -0.011111111111111112\right) \cdot \left(a - b\right), 0 \cdot \left(a + b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \left(\left(-2 \cdot \sin t_0\right) \cdot {\left(\mathsf{hypot}\left(a, b\right)\right)}^{2}\right)\\ \end{array} \]
Alternative 9
Error22.0
Cost33672
\[\begin{array}{l} t_0 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\ \mathbf{if}\;\frac{angle}{180} \leq -6 \cdot 10^{-93}:\\ \;\;\;\;\sin t_0 \cdot \left(-2 \cdot \left(\cos t_0 \cdot \left(a \cdot a - b \cdot b\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{-47}:\\ \;\;\;\;\mathsf{fma}\left(angle \cdot \left(a + b\right), \left(\pi \cdot -0.011111111111111112\right) \cdot \left(a - b\right), 0 \cdot \left(a + b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sin \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(\left(-2 \cdot \mathsf{fma}\left(a, a, b \cdot \left(-b\right)\right)\right) \cdot \cos \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)\\ \end{array} \]
Alternative 10
Error22.0
Cost33672
\[\begin{array}{l} t_0 := \sin \left(\frac{angle}{180} \cdot \pi\right)\\ t_1 := -2 \cdot \mathsf{fma}\left(a, a, b \cdot \left(-b\right)\right)\\ \mathbf{if}\;\frac{angle}{180} \leq -6 \cdot 10^{-93}:\\ \;\;\;\;t_0 \cdot \left(t_1 \cdot \cos \left(\frac{angle \cdot \pi}{180}\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{-47}:\\ \;\;\;\;\mathsf{fma}\left(angle \cdot \left(a + b\right), \left(\pi \cdot -0.011111111111111112\right) \cdot \left(a - b\right), 0 \cdot \left(a + b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \left(t_1 \cdot \cos \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)\\ \end{array} \]
Alternative 11
Error22.0
Cost33672
\[\begin{array}{l} t_0 := \sin \left(\frac{angle}{180} \cdot \pi\right)\\ t_1 := -2 \cdot \mathsf{fma}\left(a, a, b \cdot \left(-b\right)\right)\\ \mathbf{if}\;\frac{angle}{180} \leq -6 \cdot 10^{-93}:\\ \;\;\;\;t_0 \cdot \left(t_1 \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{-47}:\\ \;\;\;\;\mathsf{fma}\left(angle \cdot \left(a + b\right), \left(\pi \cdot -0.011111111111111112\right) \cdot \left(a - b\right), 0 \cdot \left(a + b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \left(t_1 \cdot \cos \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)\\ \end{array} \]
Alternative 12
Error22.0
Cost27336
\[\begin{array}{l} t_0 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\ t_1 := \sin t_0 \cdot \left(-2 \cdot \left(\cos t_0 \cdot \left(a \cdot a - b \cdot b\right)\right)\right)\\ \mathbf{if}\;\frac{angle}{180} \leq -6 \cdot 10^{-93}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{-47}:\\ \;\;\;\;\mathsf{fma}\left(angle \cdot \left(a + b\right), \left(\pi \cdot -0.011111111111111112\right) \cdot \left(a - b\right), 0 \cdot \left(a + b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 13
Error22.7
Cost26820
\[\begin{array}{l} t_0 := angle \cdot \left(\pi \cdot 0.005555555555555556\right)\\ \mathbf{if}\;\frac{angle}{180} \leq -0.0001:\\ \;\;\;\;\left(b \cdot b\right) \cdot \left(2 \cdot \left(\sin t_0 \cdot \cos t_0\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 10^{-73}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot \left(a - b\right)\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \left(a + b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-2 \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(a \cdot a - b \cdot b\right)\\ \end{array} \]
Alternative 14
Error22.9
Cost20036
\[\begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq -0.0001:\\ \;\;\;\;2 \cdot \left({b}^{2} \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 10^{-73}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot \left(a - b\right)\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \left(a + b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-2 \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(a \cdot a - b \cdot b\right)\\ \end{array} \]
Alternative 15
Error22.8
Cost13960
\[\begin{array}{l} \mathbf{if}\;angle \leq -22000000000:\\ \;\;\;\;2 \cdot \left(\left(b \cdot b\right) \cdot \sin \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\\ \mathbf{elif}\;angle \leq 10^{-70}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot \left(a - b\right)\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \left(a + b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-2 \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(a \cdot a - b \cdot b\right)\\ \end{array} \]
Alternative 16
Error23.0
Cost13704
\[\begin{array}{l} t_0 := 2 \cdot \left(\left(b \cdot b\right) \cdot \sin \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\\ \mathbf{if}\;angle \leq -22000000000:\\ \;\;\;\;t_0\\ \mathbf{elif}\;angle \leq 0.19:\\ \;\;\;\;\left(-0.011111111111111112 \cdot \left(a - b\right)\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \left(a + b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 17
Error23.0
Cost13704
\[\begin{array}{l} \mathbf{if}\;angle \leq -22000000000:\\ \;\;\;\;2 \cdot \left(\left(b \cdot b\right) \cdot \sin \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\\ \mathbf{elif}\;angle \leq 7.2 \cdot 10^{-5}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot \left(a - b\right)\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \left(a + b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot \left(-2 \cdot \left(a \cdot a\right)\right)\\ \end{array} \]
Alternative 18
Error28.9
Cost7696
\[\begin{array}{l} t_0 := \left(a + b\right) \cdot \left(angle \cdot \left(b \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\ t_1 := -0.011111111111111112 \cdot \left(angle \cdot \pi\right)\\ t_2 := \left(a \cdot a - b \cdot b\right) \cdot t_1\\ \mathbf{if}\;b \leq -1.0743273005529817 \cdot 10^{+129}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;b \leq -7.026731714652038 \cdot 10^{-111}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 1.0276722293753029 \cdot 10^{-79}:\\ \;\;\;\;a \cdot \left(a \cdot t_1\right)\\ \mathbf{elif}\;b \leq 5.28065952667534 \cdot 10^{+111}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 19
Error29.9
Cost7432
\[\begin{array}{l} \mathbf{if}\;b \leq -1.0743273005529817 \cdot 10^{+129}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(\pi \cdot b\right) \cdot \left(angle \cdot 0.011111111111111112\right)\right)\\ \mathbf{elif}\;b \leq 1.438541669322709 \cdot 10^{+113}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(angle \cdot \left(\left(a + b\right) \cdot \left(\pi \cdot \left(a - b\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + b\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot b\right)\right)\right)\\ \end{array} \]
Alternative 20
Error29.9
Cost7432
\[\begin{array}{l} t_0 := \left(a + b\right) \cdot \left(angle \cdot \left(b \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{if}\;b \leq -1.0743273005529817 \cdot 10^{+129}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;b \leq 5.28065952667534 \cdot 10^{+111}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(angle \cdot \left(\left(a + b\right) \cdot \left(\pi \cdot \left(a - b\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 21
Error23.6
Cost7432
\[\begin{array}{l} t_0 := angle \cdot \left(-0.011111111111111112 \cdot \left(a \cdot \left(\left(1 + \pi \cdot a\right) + -1\right)\right)\right)\\ \mathbf{if}\;angle \leq -22000000000:\\ \;\;\;\;t_0\\ \mathbf{elif}\;angle \leq 7.2 \cdot 10^{-5}:\\ \;\;\;\;\left(\left(a - b\right) \cdot \left(-0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \left(a + b\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 22
Error23.6
Cost7432
\[\begin{array}{l} t_0 := angle \cdot \left(-0.011111111111111112 \cdot \left(a \cdot \left(\left(1 + \pi \cdot a\right) + -1\right)\right)\right)\\ \mathbf{if}\;angle \leq -22000000000:\\ \;\;\;\;t_0\\ \mathbf{elif}\;angle \leq 7.2 \cdot 10^{-5}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot \left(a - b\right)\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \left(a + b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 23
Error38.1
Cost7176
\[\begin{array}{l} t_0 := -0.011111111111111112 \cdot \left(angle \cdot \left(a \cdot \left(\pi \cdot a\right)\right)\right)\\ \mathbf{if}\;a \leq -4.367313716414988 \cdot 10^{-61}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;a \leq 1.2652414427620186 \cdot 10^{-55}:\\ \;\;\;\;angle \cdot \left(b \cdot \left(b \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 24
Error32.8
Cost7176
\[\begin{array}{l} t_0 := a \cdot \left(a \cdot \left(-0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\right)\\ \mathbf{if}\;a \leq -4.367313716414988 \cdot 10^{-61}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;a \leq 1.2652414427620186 \cdot 10^{-55}:\\ \;\;\;\;angle \cdot \left(b \cdot \left(b \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 25
Error31.5
Cost7176
\[\begin{array}{l} t_0 := b \cdot \left(b \cdot \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)\\ \mathbf{if}\;b \leq -260.7874411840524:\\ \;\;\;\;t_0\\ \mathbf{elif}\;b \leq 9.012448816682805 \cdot 10^{+42}:\\ \;\;\;\;a \cdot \left(a \cdot \left(-0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 26
Error31.5
Cost7176
\[\begin{array}{l} \mathbf{if}\;b \leq -260.7874411840524:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(\pi \cdot b\right) \cdot \left(angle \cdot 0.011111111111111112\right)\right)\\ \mathbf{elif}\;b \leq 9.012448816682805 \cdot 10^{+42}:\\ \;\;\;\;a \cdot \left(a \cdot \left(-0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(b \cdot \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)\\ \end{array} \]
Alternative 27
Error43.9
Cost6912
\[angle \cdot \left(b \cdot \left(b \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right) \]

Error

Reproduce

herbie shell --seed 2022294 
(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)))))