| Alternative 1 | |
|---|---|
| Error | 46.0 |
| Cost | 33680 |
(FPCore (a b angle x-scale y-scale)
:precision binary64
(/
(-
(sqrt
(*
(*
(* 2.0 (/ (* 4.0 (* (* b a) (* b (- a)))) (pow (* x-scale y-scale) 2.0)))
(* (* b a) (* b (- a))))
(+
(+
(/
(/
(+
(pow (* a (sin (* (/ angle 180.0) PI))) 2.0)
(pow (* b (cos (* (/ angle 180.0) PI))) 2.0))
x-scale)
x-scale)
(/
(/
(+
(pow (* a (cos (* (/ angle 180.0) PI))) 2.0)
(pow (* b (sin (* (/ angle 180.0) PI))) 2.0))
y-scale)
y-scale))
(sqrt
(+
(pow
(-
(/
(/
(+
(pow (* a (sin (* (/ angle 180.0) PI))) 2.0)
(pow (* b (cos (* (/ angle 180.0) PI))) 2.0))
x-scale)
x-scale)
(/
(/
(+
(pow (* a (cos (* (/ angle 180.0) PI))) 2.0)
(pow (* b (sin (* (/ angle 180.0) PI))) 2.0))
y-scale)
y-scale))
2.0)
(pow
(/
(/
(*
(*
(* 2.0 (- (pow b 2.0) (pow a 2.0)))
(sin (* (/ angle 180.0) PI)))
(cos (* (/ angle 180.0) PI)))
x-scale)
y-scale)
2.0)))))))
(/ (* 4.0 (* (* b a) (* b (- a)))) (pow (* x-scale y-scale) 2.0))))(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* PI (* 0.005555555555555556 angle))) (t_1 (* (sqrt 8.0) b)))
(if (<= x-scale -6e-10)
(* 0.25 (* x-scale (* (sqrt 8.0) (* (sqrt 2.0) a))))
(if (<= x-scale -2.35e-287)
(*
0.25
(*
y-scale
(*
(sqrt 2.0)
(* b (* (sqrt 8.0) (cos (* 0.005555555555555556 (* angle PI))))))))
(if (<= x-scale 9.6e-192)
(* (* 0.25 y-scale) (* (sqrt 2.0) (fabs t_1)))
(if (<= x-scale 3.45e-171)
(* 0.25 (* (sqrt 2.0) (* y-scale (* t_1 (cos t_0)))))
(*
0.25
(*
x-scale
(*
4.0
(hypot
(* b (sin t_0))
(*
a
(cos
(*
PI
(pow (cbrt (* 0.005555555555555556 angle)) 3.0))))))))))))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
return -sqrt((((2.0 * ((4.0 * ((b * a) * (b * -a))) / pow((x_45_scale * y_45_scale), 2.0))) * ((b * a) * (b * -a))) * (((((pow((a * sin(((angle / 180.0) * ((double) M_PI)))), 2.0) + pow((b * cos(((angle / 180.0) * ((double) M_PI)))), 2.0)) / x_45_scale) / x_45_scale) + (((pow((a * cos(((angle / 180.0) * ((double) M_PI)))), 2.0) + pow((b * sin(((angle / 180.0) * ((double) M_PI)))), 2.0)) / y_45_scale) / y_45_scale)) + sqrt((pow(((((pow((a * sin(((angle / 180.0) * ((double) M_PI)))), 2.0) + pow((b * cos(((angle / 180.0) * ((double) M_PI)))), 2.0)) / x_45_scale) / x_45_scale) - (((pow((a * cos(((angle / 180.0) * ((double) M_PI)))), 2.0) + pow((b * sin(((angle / 180.0) * ((double) M_PI)))), 2.0)) / y_45_scale) / y_45_scale)), 2.0) + pow((((((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(((angle / 180.0) * ((double) M_PI)))) * cos(((angle / 180.0) * ((double) M_PI)))) / x_45_scale) / y_45_scale), 2.0)))))) / ((4.0 * ((b * a) * (b * -a))) / pow((x_45_scale * y_45_scale), 2.0));
}
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = ((double) M_PI) * (0.005555555555555556 * angle);
double t_1 = sqrt(8.0) * b;
double tmp;
if (x_45_scale <= -6e-10) {
tmp = 0.25 * (x_45_scale * (sqrt(8.0) * (sqrt(2.0) * a)));
} else if (x_45_scale <= -2.35e-287) {
tmp = 0.25 * (y_45_scale * (sqrt(2.0) * (b * (sqrt(8.0) * cos((0.005555555555555556 * (angle * ((double) M_PI))))))));
} else if (x_45_scale <= 9.6e-192) {
tmp = (0.25 * y_45_scale) * (sqrt(2.0) * fabs(t_1));
} else if (x_45_scale <= 3.45e-171) {
tmp = 0.25 * (sqrt(2.0) * (y_45_scale * (t_1 * cos(t_0))));
} else {
tmp = 0.25 * (x_45_scale * (4.0 * hypot((b * sin(t_0)), (a * cos((((double) M_PI) * pow(cbrt((0.005555555555555556 * angle)), 3.0)))))));
}
return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
return -Math.sqrt((((2.0 * ((4.0 * ((b * a) * (b * -a))) / Math.pow((x_45_scale * y_45_scale), 2.0))) * ((b * a) * (b * -a))) * (((((Math.pow((a * Math.sin(((angle / 180.0) * Math.PI))), 2.0) + Math.pow((b * Math.cos(((angle / 180.0) * Math.PI))), 2.0)) / x_45_scale) / x_45_scale) + (((Math.pow((a * Math.cos(((angle / 180.0) * Math.PI))), 2.0) + Math.pow((b * Math.sin(((angle / 180.0) * Math.PI))), 2.0)) / y_45_scale) / y_45_scale)) + Math.sqrt((Math.pow(((((Math.pow((a * Math.sin(((angle / 180.0) * Math.PI))), 2.0) + Math.pow((b * Math.cos(((angle / 180.0) * Math.PI))), 2.0)) / x_45_scale) / x_45_scale) - (((Math.pow((a * Math.cos(((angle / 180.0) * Math.PI))), 2.0) + Math.pow((b * Math.sin(((angle / 180.0) * Math.PI))), 2.0)) / y_45_scale) / y_45_scale)), 2.0) + Math.pow((((((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * Math.sin(((angle / 180.0) * Math.PI))) * Math.cos(((angle / 180.0) * Math.PI))) / x_45_scale) / y_45_scale), 2.0)))))) / ((4.0 * ((b * a) * (b * -a))) / Math.pow((x_45_scale * y_45_scale), 2.0));
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = Math.PI * (0.005555555555555556 * angle);
double t_1 = Math.sqrt(8.0) * b;
double tmp;
if (x_45_scale <= -6e-10) {
tmp = 0.25 * (x_45_scale * (Math.sqrt(8.0) * (Math.sqrt(2.0) * a)));
} else if (x_45_scale <= -2.35e-287) {
tmp = 0.25 * (y_45_scale * (Math.sqrt(2.0) * (b * (Math.sqrt(8.0) * Math.cos((0.005555555555555556 * (angle * Math.PI)))))));
} else if (x_45_scale <= 9.6e-192) {
tmp = (0.25 * y_45_scale) * (Math.sqrt(2.0) * Math.abs(t_1));
} else if (x_45_scale <= 3.45e-171) {
tmp = 0.25 * (Math.sqrt(2.0) * (y_45_scale * (t_1 * Math.cos(t_0))));
} else {
tmp = 0.25 * (x_45_scale * (4.0 * Math.hypot((b * Math.sin(t_0)), (a * Math.cos((Math.PI * Math.pow(Math.cbrt((0.005555555555555556 * angle)), 3.0)))))));
}
return tmp;
}
function code(a, b, angle, x_45_scale, y_45_scale) return Float64(Float64(-sqrt(Float64(Float64(Float64(2.0 * Float64(Float64(4.0 * Float64(Float64(b * a) * Float64(b * Float64(-a)))) / (Float64(x_45_scale * y_45_scale) ^ 2.0))) * Float64(Float64(b * a) * Float64(b * Float64(-a)))) * Float64(Float64(Float64(Float64(Float64((Float64(a * sin(Float64(Float64(angle / 180.0) * pi))) ^ 2.0) + (Float64(b * cos(Float64(Float64(angle / 180.0) * pi))) ^ 2.0)) / x_45_scale) / x_45_scale) + Float64(Float64(Float64((Float64(a * cos(Float64(Float64(angle / 180.0) * pi))) ^ 2.0) + (Float64(b * sin(Float64(Float64(angle / 180.0) * pi))) ^ 2.0)) / y_45_scale) / y_45_scale)) + sqrt(Float64((Float64(Float64(Float64(Float64((Float64(a * sin(Float64(Float64(angle / 180.0) * pi))) ^ 2.0) + (Float64(b * cos(Float64(Float64(angle / 180.0) * pi))) ^ 2.0)) / x_45_scale) / x_45_scale) - Float64(Float64(Float64((Float64(a * cos(Float64(Float64(angle / 180.0) * pi))) ^ 2.0) + (Float64(b * sin(Float64(Float64(angle / 180.0) * pi))) ^ 2.0)) / y_45_scale) / y_45_scale)) ^ 2.0) + (Float64(Float64(Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(Float64(Float64(angle / 180.0) * pi))) * cos(Float64(Float64(angle / 180.0) * pi))) / x_45_scale) / y_45_scale) ^ 2.0))))))) / Float64(Float64(4.0 * Float64(Float64(b * a) * Float64(b * Float64(-a)))) / (Float64(x_45_scale * y_45_scale) ^ 2.0))) end
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(pi * Float64(0.005555555555555556 * angle)) t_1 = Float64(sqrt(8.0) * b) tmp = 0.0 if (x_45_scale <= -6e-10) tmp = Float64(0.25 * Float64(x_45_scale * Float64(sqrt(8.0) * Float64(sqrt(2.0) * a)))); elseif (x_45_scale <= -2.35e-287) tmp = Float64(0.25 * Float64(y_45_scale * Float64(sqrt(2.0) * Float64(b * Float64(sqrt(8.0) * cos(Float64(0.005555555555555556 * Float64(angle * pi)))))))); elseif (x_45_scale <= 9.6e-192) tmp = Float64(Float64(0.25 * y_45_scale) * Float64(sqrt(2.0) * abs(t_1))); elseif (x_45_scale <= 3.45e-171) tmp = Float64(0.25 * Float64(sqrt(2.0) * Float64(y_45_scale * Float64(t_1 * cos(t_0))))); else tmp = Float64(0.25 * Float64(x_45_scale * Float64(4.0 * hypot(Float64(b * sin(t_0)), Float64(a * cos(Float64(pi * (cbrt(Float64(0.005555555555555556 * angle)) ^ 3.0)))))))); end return tmp end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := N[((-N[Sqrt[N[(N[(N[(2.0 * N[(N[(4.0 * N[(N[(b * a), $MachinePrecision] * N[(b * (-a)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[N[(x$45$scale * y$45$scale), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(b * a), $MachinePrecision] * N[(b * (-a)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(N[(N[Power[N[(a * N[Sin[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Cos[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision] / x$45$scale), $MachinePrecision] + N[(N[(N[(N[Power[N[(a * N[Cos[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Sin[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / y$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision]), $MachinePrecision] + N[Sqrt[N[(N[Power[N[(N[(N[(N[(N[Power[N[(a * N[Sin[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Cos[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision] / x$45$scale), $MachinePrecision] - N[(N[(N[(N[Power[N[(a * N[Cos[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Sin[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / y$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(N[(N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / N[(N[(4.0 * N[(N[(b * a), $MachinePrecision] * N[(b * (-a)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[N[(x$45$scale * y$45$scale), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Sqrt[8.0], $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[x$45$scale, -6e-10], N[(0.25 * N[(x$45$scale * N[(N[Sqrt[8.0], $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$45$scale, -2.35e-287], N[(0.25 * N[(y$45$scale * N[(N[Sqrt[2.0], $MachinePrecision] * N[(b * N[(N[Sqrt[8.0], $MachinePrecision] * N[Cos[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$45$scale, 9.6e-192], N[(N[(0.25 * y$45$scale), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * N[Abs[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$45$scale, 3.45e-171], N[(0.25 * N[(N[Sqrt[2.0], $MachinePrecision] * N[(y$45$scale * N[(t$95$1 * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.25 * N[(x$45$scale * N[(4.0 * N[Sqrt[N[(b * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] ^ 2 + N[(a * N[Cos[N[(Pi * N[Power[N[Power[N[(0.005555555555555556 * angle), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\frac{-\sqrt{\left(\left(2 \cdot \frac{4 \cdot \left(\left(b \cdot a\right) \cdot \left(b \cdot \left(-a\right)\right)\right)}{{\left(x-scale \cdot y-scale\right)}^{2}}\right) \cdot \left(\left(b \cdot a\right) \cdot \left(b \cdot \left(-a\right)\right)\right)\right) \cdot \left(\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} + \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale}\right) + \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale}\right)}^{2} + {\left(\frac{\frac{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}\right)}^{2}}\right)}}{\frac{4 \cdot \left(\left(b \cdot a\right) \cdot \left(b \cdot \left(-a\right)\right)\right)}{{\left(x-scale \cdot y-scale\right)}^{2}}}
\begin{array}{l}
t_0 := \pi \cdot \left(0.005555555555555556 \cdot angle\right)\\
t_1 := \sqrt{8} \cdot b\\
\mathbf{if}\;x-scale \leq -6 \cdot 10^{-10}:\\
\;\;\;\;0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot \left(\sqrt{2} \cdot a\right)\right)\right)\\
\mathbf{elif}\;x-scale \leq -2.35 \cdot 10^{-287}:\\
\;\;\;\;0.25 \cdot \left(y-scale \cdot \left(\sqrt{2} \cdot \left(b \cdot \left(\sqrt{8} \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x-scale \leq 9.6 \cdot 10^{-192}:\\
\;\;\;\;\left(0.25 \cdot y-scale\right) \cdot \left(\sqrt{2} \cdot \left|t_1\right|\right)\\
\mathbf{elif}\;x-scale \leq 3.45 \cdot 10^{-171}:\\
\;\;\;\;0.25 \cdot \left(\sqrt{2} \cdot \left(y-scale \cdot \left(t_1 \cdot \cos t_0\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.25 \cdot \left(x-scale \cdot \left(4 \cdot \mathsf{hypot}\left(b \cdot \sin t_0, a \cdot \cos \left(\pi \cdot {\left(\sqrt[3]{0.005555555555555556 \cdot angle}\right)}^{3}\right)\right)\right)\right)\\
\end{array}
Results
if x-scale < -6e-10Initial program 63.0
Simplified62.5
[Start]63.0 | \[ \frac{-\sqrt{\left(\left(2 \cdot \frac{4 \cdot \left(\left(b \cdot a\right) \cdot \left(b \cdot \left(-a\right)\right)\right)}{{\left(x-scale \cdot y-scale\right)}^{2}}\right) \cdot \left(\left(b \cdot a\right) \cdot \left(b \cdot \left(-a\right)\right)\right)\right) \cdot \left(\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} + \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale}\right) + \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale}\right)}^{2} + {\left(\frac{\frac{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}\right)}^{2}}\right)}}{\frac{4 \cdot \left(\left(b \cdot a\right) \cdot \left(b \cdot \left(-a\right)\right)\right)}{{\left(x-scale \cdot y-scale\right)}^{2}}}
\] |
|---|
Taylor expanded in y-scale around 0 63.3
Simplified63.3
[Start]63.3 | \[ 0.25 \cdot \left(\left(x-scale \cdot \sqrt{8}\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}\right)
\] |
|---|---|
associate-*l* [=>]63.3 | \[ 0.25 \cdot \color{blue}{\left(x-scale \cdot \left(\sqrt{8} \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}\right)\right)}
\] |
distribute-lft-out [=>]63.3 | \[ 0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}}\right)\right)
\] |
fma-def [=>]63.3 | \[ 0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot \sqrt{2 \cdot \color{blue}{\mathsf{fma}\left({a}^{2}, {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}, {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}}\right)\right)
\] |
unpow2 [=>]63.3 | \[ 0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot \sqrt{2 \cdot \mathsf{fma}\left(\color{blue}{a \cdot a}, {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}, {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}\right)\right)
\] |
*-commutative [=>]63.3 | \[ 0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot \sqrt{2 \cdot \mathsf{fma}\left(a \cdot a, {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}, \color{blue}{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}}\right)}\right)\right)
\] |
unpow2 [=>]63.3 | \[ 0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot \sqrt{2 \cdot \mathsf{fma}\left(a \cdot a, {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}, {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot \color{blue}{\left(b \cdot b\right)}\right)}\right)\right)
\] |
Taylor expanded in angle around 0 51.9
if -6e-10 < x-scale < -2.3499999999999999e-287Initial program 63.5
Simplified63.2
[Start]63.5 | \[ \frac{-\sqrt{\left(\left(2 \cdot \frac{4 \cdot \left(\left(b \cdot a\right) \cdot \left(b \cdot \left(-a\right)\right)\right)}{{\left(x-scale \cdot y-scale\right)}^{2}}\right) \cdot \left(\left(b \cdot a\right) \cdot \left(b \cdot \left(-a\right)\right)\right)\right) \cdot \left(\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} + \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale}\right) + \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale}\right)}^{2} + {\left(\frac{\frac{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}\right)}^{2}}\right)}}{\frac{4 \cdot \left(\left(b \cdot a\right) \cdot \left(b \cdot \left(-a\right)\right)\right)}{{\left(x-scale \cdot y-scale\right)}^{2}}}
\] |
|---|
Taylor expanded in b around inf 62.5
Simplified62.7
[Start]62.5 | \[ {\left(x-scale \cdot y-scale\right)}^{2} \cdot \left(-0.25 \cdot \left(-1 \cdot \left(\frac{b \cdot \sqrt{8}}{x-scale \cdot y-scale} \cdot \sqrt{\sqrt{4 \cdot \frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}} + {\left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} - \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}}\right)}^{2}} + \left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}}\right)}\right)\right)\right)
\] |
|---|---|
mul-1-neg [=>]62.5 | \[ {\left(x-scale \cdot y-scale\right)}^{2} \cdot \left(-0.25 \cdot \color{blue}{\left(-\frac{b \cdot \sqrt{8}}{x-scale \cdot y-scale} \cdot \sqrt{\sqrt{4 \cdot \frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}} + {\left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} - \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}}\right)}^{2}} + \left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}}\right)}\right)}\right)
\] |
Taylor expanded in x-scale around 0 51.6
if -2.3499999999999999e-287 < x-scale < 9.5999999999999997e-192Initial program 64.0
Simplified64.0
[Start]64.0 | \[ \frac{-\sqrt{\left(\left(2 \cdot \frac{4 \cdot \left(\left(b \cdot a\right) \cdot \left(b \cdot \left(-a\right)\right)\right)}{{\left(x-scale \cdot y-scale\right)}^{2}}\right) \cdot \left(\left(b \cdot a\right) \cdot \left(b \cdot \left(-a\right)\right)\right)\right) \cdot \left(\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} + \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale}\right) + \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale}\right)}^{2} + {\left(\frac{\frac{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}\right)}^{2}}\right)}}{\frac{4 \cdot \left(\left(b \cdot a\right) \cdot \left(b \cdot \left(-a\right)\right)\right)}{{\left(x-scale \cdot y-scale\right)}^{2}}}
\] |
|---|
Taylor expanded in angle around 0 47.2
Simplified47.2
[Start]47.2 | \[ 0.25 \cdot \left(y-scale \cdot \left(\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)\right)\right)
\] |
|---|---|
associate-*r* [=>]47.2 | \[ \color{blue}{\left(0.25 \cdot y-scale\right) \cdot \left(\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)\right)}
\] |
*-commutative [=>]47.2 | \[ \left(0.25 \cdot y-scale\right) \cdot \color{blue}{\left(\left(b \cdot \sqrt{8}\right) \cdot \sqrt{2}\right)}
\] |
*-commutative [=>]47.2 | \[ \left(0.25 \cdot y-scale\right) \cdot \left(\color{blue}{\left(\sqrt{8} \cdot b\right)} \cdot \sqrt{2}\right)
\] |
Applied egg-rr52.0
Simplified46.6
[Start]52.0 | \[ \left(0.25 \cdot y-scale\right) \cdot \left(\sqrt{8 \cdot \left(b \cdot b\right)} \cdot \sqrt{2}\right)
\] |
|---|---|
rem-square-sqrt [<=]52.1 | \[ \left(0.25 \cdot y-scale\right) \cdot \left(\sqrt{\color{blue}{\left(\sqrt{8} \cdot \sqrt{8}\right)} \cdot \left(b \cdot b\right)} \cdot \sqrt{2}\right)
\] |
swap-sqr [<=]52.0 | \[ \left(0.25 \cdot y-scale\right) \cdot \left(\sqrt{\color{blue}{\left(\sqrt{8} \cdot b\right) \cdot \left(\sqrt{8} \cdot b\right)}} \cdot \sqrt{2}\right)
\] |
rem-sqrt-square [=>]46.6 | \[ \left(0.25 \cdot y-scale\right) \cdot \left(\color{blue}{\left|\sqrt{8} \cdot b\right|} \cdot \sqrt{2}\right)
\] |
*-commutative [<=]46.6 | \[ \left(0.25 \cdot y-scale\right) \cdot \left(\left|\color{blue}{b \cdot \sqrt{8}}\right| \cdot \sqrt{2}\right)
\] |
if 9.5999999999999997e-192 < x-scale < 3.4499999999999999e-171Initial program 64.0
Simplified64.0
[Start]64.0 | \[ \frac{-\sqrt{\left(\left(2 \cdot \frac{4 \cdot \left(\left(b \cdot a\right) \cdot \left(b \cdot \left(-a\right)\right)\right)}{{\left(x-scale \cdot y-scale\right)}^{2}}\right) \cdot \left(\left(b \cdot a\right) \cdot \left(b \cdot \left(-a\right)\right)\right)\right) \cdot \left(\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} + \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale}\right) + \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale}\right)}^{2} + {\left(\frac{\frac{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}\right)}^{2}}\right)}}{\frac{4 \cdot \left(\left(b \cdot a\right) \cdot \left(b \cdot \left(-a\right)\right)\right)}{{\left(x-scale \cdot y-scale\right)}^{2}}}
\] |
|---|
Taylor expanded in b around inf 64.0
Simplified64.0
[Start]64.0 | \[ {\left(x-scale \cdot y-scale\right)}^{2} \cdot \left(-0.25 \cdot \left(-1 \cdot \left(\frac{b \cdot \sqrt{8}}{x-scale \cdot y-scale} \cdot \sqrt{\sqrt{4 \cdot \frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}} + {\left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} - \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}}\right)}^{2}} + \left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}}\right)}\right)\right)\right)
\] |
|---|---|
mul-1-neg [=>]64.0 | \[ {\left(x-scale \cdot y-scale\right)}^{2} \cdot \left(-0.25 \cdot \color{blue}{\left(-\frac{b \cdot \sqrt{8}}{x-scale \cdot y-scale} \cdot \sqrt{\sqrt{4 \cdot \frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}} + {\left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} - \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}}\right)}^{2}} + \left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}}\right)}\right)}\right)
\] |
Taylor expanded in x-scale around 0 48.8
Simplified48.9
[Start]48.8 | \[ 0.25 \cdot \left(y-scale \cdot \left(\sqrt{2} \cdot \left(b \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sqrt{8}\right)\right)\right)\right)
\] |
|---|---|
associate-*r* [=>]48.8 | \[ 0.25 \cdot \color{blue}{\left(\left(y-scale \cdot \sqrt{2}\right) \cdot \left(b \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sqrt{8}\right)\right)\right)}
\] |
*-commutative [=>]48.8 | \[ 0.25 \cdot \left(\left(y-scale \cdot \sqrt{2}\right) \cdot \color{blue}{\left(\left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sqrt{8}\right) \cdot b\right)}\right)
\] |
associate-*r* [<=]48.8 | \[ 0.25 \cdot \left(\left(y-scale \cdot \sqrt{2}\right) \cdot \color{blue}{\left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\sqrt{8} \cdot b\right)\right)}\right)
\] |
*-commutative [<=]48.8 | \[ 0.25 \cdot \left(\left(y-scale \cdot \sqrt{2}\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \color{blue}{\left(b \cdot \sqrt{8}\right)}\right)\right)
\] |
associate-*r* [<=]48.8 | \[ 0.25 \cdot \color{blue}{\left(y-scale \cdot \left(\sqrt{2} \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b \cdot \sqrt{8}\right)\right)\right)\right)}
\] |
*-commutative [=>]48.8 | \[ 0.25 \cdot \color{blue}{\left(\left(\sqrt{2} \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b \cdot \sqrt{8}\right)\right)\right) \cdot y-scale\right)}
\] |
associate-*l* [=>]48.8 | \[ 0.25 \cdot \color{blue}{\left(\sqrt{2} \cdot \left(\left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b \cdot \sqrt{8}\right)\right) \cdot y-scale\right)\right)}
\] |
if 3.4499999999999999e-171 < x-scale Initial program 63.3
Simplified62.9
[Start]63.3 | \[ \frac{-\sqrt{\left(\left(2 \cdot \frac{4 \cdot \left(\left(b \cdot a\right) \cdot \left(b \cdot \left(-a\right)\right)\right)}{{\left(x-scale \cdot y-scale\right)}^{2}}\right) \cdot \left(\left(b \cdot a\right) \cdot \left(b \cdot \left(-a\right)\right)\right)\right) \cdot \left(\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} + \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale}\right) + \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale}\right)}^{2} + {\left(\frac{\frac{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}\right)}^{2}}\right)}}{\frac{4 \cdot \left(\left(b \cdot a\right) \cdot \left(b \cdot \left(-a\right)\right)\right)}{{\left(x-scale \cdot y-scale\right)}^{2}}}
\] |
|---|
Taylor expanded in y-scale around 0 48.1
Simplified48.0
[Start]48.1 | \[ 0.25 \cdot \left(\left(x-scale \cdot \sqrt{8}\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}\right)
\] |
|---|---|
associate-*l* [=>]48.0 | \[ 0.25 \cdot \color{blue}{\left(x-scale \cdot \left(\sqrt{8} \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}\right)\right)}
\] |
distribute-lft-out [=>]48.0 | \[ 0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}}\right)\right)
\] |
fma-def [=>]48.0 | \[ 0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot \sqrt{2 \cdot \color{blue}{\mathsf{fma}\left({a}^{2}, {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}, {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}}\right)\right)
\] |
unpow2 [=>]48.0 | \[ 0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot \sqrt{2 \cdot \mathsf{fma}\left(\color{blue}{a \cdot a}, {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}, {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}\right)\right)
\] |
*-commutative [=>]48.0 | \[ 0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot \sqrt{2 \cdot \mathsf{fma}\left(a \cdot a, {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}, \color{blue}{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}}\right)}\right)\right)
\] |
unpow2 [=>]48.0 | \[ 0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot \sqrt{2 \cdot \mathsf{fma}\left(a \cdot a, {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}, {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot \color{blue}{\left(b \cdot b\right)}\right)}\right)\right)
\] |
Taylor expanded in angle around inf 48.1
Simplified38.3
[Start]48.1 | \[ 0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot \left(\sqrt{2} \cdot \sqrt{{a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)\right)\right)
\] |
|---|---|
+-commutative [=>]48.1 | \[ 0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot \left(\sqrt{2} \cdot \sqrt{\color{blue}{{b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}}\right)\right)\right)
\] |
unpow2 [=>]48.1 | \[ 0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot \left(\sqrt{2} \cdot \sqrt{\color{blue}{\left(b \cdot b\right)} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)\right)\right)
\] |
unpow2 [=>]48.1 | \[ 0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot \left(\sqrt{2} \cdot \sqrt{\left(b \cdot b\right) \cdot \color{blue}{\left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)} + {a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)\right)\right)
\] |
swap-sqr [<=]46.3 | \[ 0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot \left(\sqrt{2} \cdot \sqrt{\color{blue}{\left(b \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \left(b \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)} + {a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)\right)\right)
\] |
unpow2 [=>]46.3 | \[ 0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot \left(\sqrt{2} \cdot \sqrt{\left(b \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \left(b \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) + \color{blue}{\left(a \cdot a\right)} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)\right)\right)
\] |
unpow2 [=>]46.3 | \[ 0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot \left(\sqrt{2} \cdot \sqrt{\left(b \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \left(b \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) + \left(a \cdot a\right) \cdot \color{blue}{\left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}}\right)\right)\right)
\] |
swap-sqr [<=]46.3 | \[ 0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot \left(\sqrt{2} \cdot \sqrt{\left(b \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \left(b \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) + \color{blue}{\left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}}\right)\right)\right)
\] |
Applied egg-rr48.8
Simplified38.1
[Start]48.8 | \[ 0.25 \cdot \left(x-scale \cdot \left(e^{\mathsf{log1p}\left(\mathsf{hypot}\left(\sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot b, \cos \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot a\right) \cdot 4\right)} - 1\right)\right)
\] |
|---|---|
expm1-def [=>]38.9 | \[ 0.25 \cdot \left(x-scale \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\mathsf{hypot}\left(\sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot b, \cos \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot a\right) \cdot 4\right)\right)}\right)
\] |
expm1-log1p [=>]38.1 | \[ 0.25 \cdot \left(x-scale \cdot \color{blue}{\left(\mathsf{hypot}\left(\sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot b, \cos \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot a\right) \cdot 4\right)}\right)
\] |
*-commutative [=>]38.1 | \[ 0.25 \cdot \left(x-scale \cdot \color{blue}{\left(4 \cdot \mathsf{hypot}\left(\sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot b, \cos \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot a\right)\right)}\right)
\] |
associate-*r* [=>]38.1 | \[ 0.25 \cdot \left(x-scale \cdot \left(4 \cdot \mathsf{hypot}\left(\sin \color{blue}{\left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)} \cdot b, \cos \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot a\right)\right)\right)
\] |
*-commutative [=>]38.1 | \[ 0.25 \cdot \left(x-scale \cdot \left(4 \cdot \mathsf{hypot}\left(\sin \left(\color{blue}{\left(\pi \cdot angle\right)} \cdot 0.005555555555555556\right) \cdot b, \cos \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot a\right)\right)\right)
\] |
associate-*l* [=>]38.1 | \[ 0.25 \cdot \left(x-scale \cdot \left(4 \cdot \mathsf{hypot}\left(\sin \color{blue}{\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} \cdot b, \cos \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot a\right)\right)\right)
\] |
associate-*r* [=>]38.1 | \[ 0.25 \cdot \left(x-scale \cdot \left(4 \cdot \mathsf{hypot}\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot b, \cos \color{blue}{\left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)} \cdot a\right)\right)\right)
\] |
*-commutative [=>]38.1 | \[ 0.25 \cdot \left(x-scale \cdot \left(4 \cdot \mathsf{hypot}\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot b, \cos \left(\color{blue}{\left(\pi \cdot angle\right)} \cdot 0.005555555555555556\right) \cdot a\right)\right)\right)
\] |
associate-*l* [=>]38.1 | \[ 0.25 \cdot \left(x-scale \cdot \left(4 \cdot \mathsf{hypot}\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot b, \cos \color{blue}{\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} \cdot a\right)\right)\right)
\] |
Applied egg-rr38.1
Final simplification46.0
| Alternative 1 | |
|---|---|
| Error | 46.0 |
| Cost | 33680 |
| Alternative 2 | |
|---|---|
| Error | 46.0 |
| Cost | 27024 |
| Alternative 3 | |
|---|---|
| Error | 46.0 |
| Cost | 26760 |
| Alternative 4 | |
|---|---|
| Error | 46.1 |
| Cost | 20560 |
| Alternative 5 | |
|---|---|
| Error | 48.6 |
| Cost | 20040 |
| Alternative 6 | |
|---|---|
| Error | 51.9 |
| Cost | 13904 |
| Alternative 7 | |
|---|---|
| Error | 51.5 |
| Cost | 13772 |
| Alternative 8 | |
|---|---|
| Error | 53.8 |
| Cost | 713 |
| Alternative 9 | |
|---|---|
| Error | 54.1 |
| Cost | 192 |
herbie shell --seed 2023060
(FPCore (a b angle x-scale y-scale)
:name "a from scale-rotated-ellipse"
:precision binary64
(/ (- (sqrt (* (* (* 2.0 (/ (* 4.0 (* (* b a) (* b (- a)))) (pow (* x-scale y-scale) 2.0))) (* (* b a) (* b (- a)))) (+ (+ (/ (/ (+ (pow (* a (sin (* (/ angle 180.0) PI))) 2.0) (pow (* b (cos (* (/ angle 180.0) PI))) 2.0)) x-scale) x-scale) (/ (/ (+ (pow (* a (cos (* (/ angle 180.0) PI))) 2.0) (pow (* b (sin (* (/ angle 180.0) PI))) 2.0)) y-scale) y-scale)) (sqrt (+ (pow (- (/ (/ (+ (pow (* a (sin (* (/ angle 180.0) PI))) 2.0) (pow (* b (cos (* (/ angle 180.0) PI))) 2.0)) x-scale) x-scale) (/ (/ (+ (pow (* a (cos (* (/ angle 180.0) PI))) 2.0) (pow (* b (sin (* (/ angle 180.0) PI))) 2.0)) y-scale) y-scale)) 2.0) (pow (/ (/ (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin (* (/ angle 180.0) PI))) (cos (* (/ angle 180.0) PI))) x-scale) y-scale) 2.0))))))) (/ (* 4.0 (* (* b a) (* b (- a)))) (pow (* x-scale y-scale) 2.0))))