| Alternative 1 | |
|---|---|
| Error | 49.4 |
| Cost | 46800 |
(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 (* angle 0.005555555555555556)))
(t_1 (* (cos (* angle (* 0.005555555555555556 PI))) (* b 4.0)))
(t_2 (* y-scale (* t_1 -0.25)))
(t_3
(*
x-scale
(sqrt
(*
(* 2.0 (+ (pow (* a (cos t_0)) 2.0) (pow (* b (sin t_0)) 2.0)))
8.0)))))
(if (<= x-scale -9.5e+54)
(* t_3 -0.25)
(if (<= x-scale -2.45e-144)
t_2
(if (<= x-scale -1.7e-252)
(* y-scale (* 0.25 t_1))
(if (<= x-scale 1.15e-198) t_2 (* 0.25 t_3)))))))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) * (angle * 0.005555555555555556);
double t_1 = cos((angle * (0.005555555555555556 * ((double) M_PI)))) * (b * 4.0);
double t_2 = y_45_scale * (t_1 * -0.25);
double t_3 = x_45_scale * sqrt(((2.0 * (pow((a * cos(t_0)), 2.0) + pow((b * sin(t_0)), 2.0))) * 8.0));
double tmp;
if (x_45_scale <= -9.5e+54) {
tmp = t_3 * -0.25;
} else if (x_45_scale <= -2.45e-144) {
tmp = t_2;
} else if (x_45_scale <= -1.7e-252) {
tmp = y_45_scale * (0.25 * t_1);
} else if (x_45_scale <= 1.15e-198) {
tmp = t_2;
} else {
tmp = 0.25 * t_3;
}
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 * (angle * 0.005555555555555556);
double t_1 = Math.cos((angle * (0.005555555555555556 * Math.PI))) * (b * 4.0);
double t_2 = y_45_scale * (t_1 * -0.25);
double t_3 = x_45_scale * Math.sqrt(((2.0 * (Math.pow((a * Math.cos(t_0)), 2.0) + Math.pow((b * Math.sin(t_0)), 2.0))) * 8.0));
double tmp;
if (x_45_scale <= -9.5e+54) {
tmp = t_3 * -0.25;
} else if (x_45_scale <= -2.45e-144) {
tmp = t_2;
} else if (x_45_scale <= -1.7e-252) {
tmp = y_45_scale * (0.25 * t_1);
} else if (x_45_scale <= 1.15e-198) {
tmp = t_2;
} else {
tmp = 0.25 * t_3;
}
return tmp;
}
def code(a, b, angle, x_45_scale, 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))
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = math.pi * (angle * 0.005555555555555556) t_1 = math.cos((angle * (0.005555555555555556 * math.pi))) * (b * 4.0) t_2 = y_45_scale * (t_1 * -0.25) t_3 = x_45_scale * math.sqrt(((2.0 * (math.pow((a * math.cos(t_0)), 2.0) + math.pow((b * math.sin(t_0)), 2.0))) * 8.0)) tmp = 0 if x_45_scale <= -9.5e+54: tmp = t_3 * -0.25 elif x_45_scale <= -2.45e-144: tmp = t_2 elif x_45_scale <= -1.7e-252: tmp = y_45_scale * (0.25 * t_1) elif x_45_scale <= 1.15e-198: tmp = t_2 else: tmp = 0.25 * t_3 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(angle * 0.005555555555555556)) t_1 = Float64(cos(Float64(angle * Float64(0.005555555555555556 * pi))) * Float64(b * 4.0)) t_2 = Float64(y_45_scale * Float64(t_1 * -0.25)) t_3 = Float64(x_45_scale * sqrt(Float64(Float64(2.0 * Float64((Float64(a * cos(t_0)) ^ 2.0) + (Float64(b * sin(t_0)) ^ 2.0))) * 8.0))) tmp = 0.0 if (x_45_scale <= -9.5e+54) tmp = Float64(t_3 * -0.25); elseif (x_45_scale <= -2.45e-144) tmp = t_2; elseif (x_45_scale <= -1.7e-252) tmp = Float64(y_45_scale * Float64(0.25 * t_1)); elseif (x_45_scale <= 1.15e-198) tmp = t_2; else tmp = Float64(0.25 * t_3); end return tmp end
function tmp = code(a, b, angle, x_45_scale, y_45_scale) tmp = -sqrt((((2.0 * ((4.0 * ((b * a) * (b * -a))) / ((x_45_scale * y_45_scale) ^ 2.0))) * ((b * a) * (b * -a))) * (((((((a * sin(((angle / 180.0) * pi))) ^ 2.0) + ((b * cos(((angle / 180.0) * pi))) ^ 2.0)) / x_45_scale) / x_45_scale) + (((((a * cos(((angle / 180.0) * pi))) ^ 2.0) + ((b * sin(((angle / 180.0) * pi))) ^ 2.0)) / y_45_scale) / y_45_scale)) + sqrt(((((((((a * sin(((angle / 180.0) * pi))) ^ 2.0) + ((b * cos(((angle / 180.0) * pi))) ^ 2.0)) / x_45_scale) / x_45_scale) - (((((a * cos(((angle / 180.0) * pi))) ^ 2.0) + ((b * sin(((angle / 180.0) * pi))) ^ 2.0)) / y_45_scale) / y_45_scale)) ^ 2.0) + ((((((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * sin(((angle / 180.0) * pi))) * cos(((angle / 180.0) * pi))) / x_45_scale) / y_45_scale) ^ 2.0)))))) / ((4.0 * ((b * a) * (b * -a))) / ((x_45_scale * y_45_scale) ^ 2.0)); end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) t_0 = pi * (angle * 0.005555555555555556); t_1 = cos((angle * (0.005555555555555556 * pi))) * (b * 4.0); t_2 = y_45_scale * (t_1 * -0.25); t_3 = x_45_scale * sqrt(((2.0 * (((a * cos(t_0)) ^ 2.0) + ((b * sin(t_0)) ^ 2.0))) * 8.0)); tmp = 0.0; if (x_45_scale <= -9.5e+54) tmp = t_3 * -0.25; elseif (x_45_scale <= -2.45e-144) tmp = t_2; elseif (x_45_scale <= -1.7e-252) tmp = y_45_scale * (0.25 * t_1); elseif (x_45_scale <= 1.15e-198) tmp = t_2; else tmp = 0.25 * t_3; end tmp_2 = 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[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Cos[N[(angle * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(b * 4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y$45$scale * N[(t$95$1 * -0.25), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x$45$scale * N[Sqrt[N[(N[(2.0 * N[(N[Power[N[(a * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 8.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$45$scale, -9.5e+54], N[(t$95$3 * -0.25), $MachinePrecision], If[LessEqual[x$45$scale, -2.45e-144], t$95$2, If[LessEqual[x$45$scale, -1.7e-252], N[(y$45$scale * N[(0.25 * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$45$scale, 1.15e-198], t$95$2, N[(0.25 * t$95$3), $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(angle \cdot 0.005555555555555556\right)\\
t_1 := \cos \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right) \cdot \left(b \cdot 4\right)\\
t_2 := y-scale \cdot \left(t_1 \cdot -0.25\right)\\
t_3 := x-scale \cdot \sqrt{\left(2 \cdot \left({\left(a \cdot \cos t_0\right)}^{2} + {\left(b \cdot \sin t_0\right)}^{2}\right)\right) \cdot 8}\\
\mathbf{if}\;x-scale \leq -9.5 \cdot 10^{+54}:\\
\;\;\;\;t_3 \cdot -0.25\\
\mathbf{elif}\;x-scale \leq -2.45 \cdot 10^{-144}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x-scale \leq -1.7 \cdot 10^{-252}:\\
\;\;\;\;y-scale \cdot \left(0.25 \cdot t_1\right)\\
\mathbf{elif}\;x-scale \leq 1.15 \cdot 10^{-198}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;0.25 \cdot t_3\\
\end{array}
Results
if x-scale < -9.4999999999999999e54Initial program 63.6
Simplified63.4
[Start]63.6 | \[ \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 x-scale around inf 62.6
Simplified62.3
[Start]62.6 | \[ \frac{{\left(x-scale \cdot y-scale\right)}^{2}}{4 \cdot \left(\left(b \cdot a\right) \cdot \left(\frac{y-scale \cdot x-scale}{a \cdot \left(b \cdot \sqrt{8}\right)} \cdot \sqrt{\frac{1}{2 \cdot \frac{{a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}} + 2 \cdot \frac{{b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}}}}\right)\right)}
\] |
|---|---|
rational.json-simplify-43 [=>]62.6 | \[ \frac{{\left(x-scale \cdot y-scale\right)}^{2}}{4 \cdot \left(\left(b \cdot a\right) \cdot \left(\frac{y-scale \cdot x-scale}{\color{blue}{b \cdot \left(\sqrt{8} \cdot a\right)}} \cdot \sqrt{\frac{1}{2 \cdot \frac{{a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}} + 2 \cdot \frac{{b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}}}}\right)\right)}
\] |
exponential.json-simplify-27 [=>]62.6 | \[ \frac{{\left(x-scale \cdot y-scale\right)}^{2}}{4 \cdot \left(\left(b \cdot a\right) \cdot \left(\frac{y-scale \cdot x-scale}{b \cdot \left(\sqrt{8} \cdot a\right)} \cdot \sqrt{\frac{1}{2 \cdot \frac{\color{blue}{{\left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}^{2}}}{{y-scale}^{2}} + 2 \cdot \frac{{b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}}}}\right)\right)}
\] |
exponential.json-simplify-27 [=>]62.3 | \[ \frac{{\left(x-scale \cdot y-scale\right)}^{2}}{4 \cdot \left(\left(b \cdot a\right) \cdot \left(\frac{y-scale \cdot x-scale}{b \cdot \left(\sqrt{8} \cdot a\right)} \cdot \sqrt{\frac{1}{2 \cdot \frac{{\left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}^{2}}{{y-scale}^{2}} + 2 \cdot \frac{\color{blue}{{\left(b \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}^{2}}}{{y-scale}^{2}}}}\right)\right)}
\] |
Taylor expanded in y-scale around -inf 42.2
Simplified39.0
[Start]42.2 | \[ -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)
\] |
|---|---|
rational.json-simplify-2 [=>]42.2 | \[ \color{blue}{\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) \cdot -0.25}
\] |
if -9.4999999999999999e54 < x-scale < -2.45000000000000005e-144 or -1.7e-252 < x-scale < 1.15000000000000007e-198Initial program 63.4
Simplified63.3
[Start]63.4 | \[ \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 x-scale around 0 62.3
Simplified62.1
[Start]62.3 | \[ \frac{{\left(x-scale \cdot y-scale\right)}^{2}}{4 \cdot \left(\left(b \cdot a\right) \cdot \left(\frac{y-scale \cdot {x-scale}^{2}}{a \cdot \left(b \cdot \sqrt{8}\right)} \cdot \sqrt{\frac{1}{2 \cdot \left({b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}}\right)\right)}
\] |
|---|---|
rational.json-simplify-43 [=>]62.3 | \[ \frac{{\left(x-scale \cdot y-scale\right)}^{2}}{4 \cdot \left(\left(b \cdot a\right) \cdot \left(\frac{y-scale \cdot {x-scale}^{2}}{\color{blue}{b \cdot \left(\sqrt{8} \cdot a\right)}} \cdot \sqrt{\frac{1}{2 \cdot \left({b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}}\right)\right)}
\] |
rational.json-simplify-46 [=>]62.3 | \[ \frac{{\left(x-scale \cdot y-scale\right)}^{2}}{4 \cdot \left(\left(b \cdot a\right) \cdot \left(\color{blue}{\frac{\frac{y-scale \cdot {x-scale}^{2}}{b}}{\sqrt{8} \cdot a}} \cdot \sqrt{\frac{1}{2 \cdot \left({b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}}\right)\right)}
\] |
exponential.json-simplify-27 [=>]62.3 | \[ \frac{{\left(x-scale \cdot y-scale\right)}^{2}}{4 \cdot \left(\left(b \cdot a\right) \cdot \left(\frac{\frac{y-scale \cdot {x-scale}^{2}}{b}}{\sqrt{8} \cdot a} \cdot \sqrt{\frac{1}{2 \cdot \color{blue}{{\left(b \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}^{2}} + 2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}}\right)\right)}
\] |
exponential.json-simplify-27 [=>]62.1 | \[ \frac{{\left(x-scale \cdot y-scale\right)}^{2}}{4 \cdot \left(\left(b \cdot a\right) \cdot \left(\frac{\frac{y-scale \cdot {x-scale}^{2}}{b}}{\sqrt{8} \cdot a} \cdot \sqrt{\frac{1}{2 \cdot {\left(b \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}^{2} + 2 \cdot \color{blue}{{\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}^{2}}}}\right)\right)}
\] |
Taylor expanded in b around -inf 51.8
Simplified51.7
[Start]51.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)
\] |
|---|---|
rational.json-simplify-43 [=>]51.8 | \[ \color{blue}{y-scale \cdot \left(\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) \cdot -0.25\right)}
\] |
rational.json-simplify-43 [=>]51.8 | \[ y-scale \cdot \left(\left(\sqrt{2} \cdot \color{blue}{\left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\sqrt{8} \cdot b\right)\right)}\right) \cdot -0.25\right)
\] |
rational.json-simplify-2 [<=]51.8 | \[ y-scale \cdot \left(\left(\sqrt{2} \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \color{blue}{\left(b \cdot \sqrt{8}\right)}\right)\right) \cdot -0.25\right)
\] |
rational.json-simplify-43 [=>]51.8 | \[ y-scale \cdot \left(\color{blue}{\left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b \cdot \sqrt{8}\right) \cdot \sqrt{2}\right)\right)} \cdot -0.25\right)
\] |
rational.json-simplify-43 [=>]51.8 | \[ y-scale \cdot \left(\left(\cos \color{blue}{\left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)} \cdot \left(\left(b \cdot \sqrt{8}\right) \cdot \sqrt{2}\right)\right) \cdot -0.25\right)
\] |
rational.json-simplify-2 [<=]51.8 | \[ y-scale \cdot \left(\left(\cos \left(angle \cdot \color{blue}{\left(0.005555555555555556 \cdot \pi\right)}\right) \cdot \left(\left(b \cdot \sqrt{8}\right) \cdot \sqrt{2}\right)\right) \cdot -0.25\right)
\] |
rational.json-simplify-2 [<=]51.8 | \[ y-scale \cdot \left(\left(\cos \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right) \cdot \color{blue}{\left(\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)\right)}\right) \cdot -0.25\right)
\] |
rational.json-simplify-43 [=>]51.9 | \[ y-scale \cdot \left(\left(\cos \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right) \cdot \color{blue}{\left(b \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)\right)}\right) \cdot -0.25\right)
\] |
exponential.json-simplify-20 [=>]51.7 | \[ y-scale \cdot \left(\left(\cos \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right) \cdot \left(b \cdot \color{blue}{\sqrt{2 \cdot 8}}\right)\right) \cdot -0.25\right)
\] |
metadata-eval [=>]51.7 | \[ y-scale \cdot \left(\left(\cos \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right) \cdot \left(b \cdot \sqrt{\color{blue}{16}}\right)\right) \cdot -0.25\right)
\] |
metadata-eval [=>]51.7 | \[ y-scale \cdot \left(\left(\cos \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right) \cdot \left(b \cdot \color{blue}{4}\right)\right) \cdot -0.25\right)
\] |
if -2.45000000000000005e-144 < x-scale < -1.7e-252Initial program 63.9
Simplified63.9
[Start]63.9 | \[ \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 x-scale around 0 63.6
Simplified63.6
[Start]63.6 | \[ \frac{{\left(x-scale \cdot y-scale\right)}^{2}}{4 \cdot \left(\left(b \cdot a\right) \cdot \left(\frac{y-scale \cdot {x-scale}^{2}}{a \cdot \left(b \cdot \sqrt{8}\right)} \cdot \sqrt{\frac{1}{2 \cdot \left({b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}}\right)\right)}
\] |
|---|---|
rational.json-simplify-43 [=>]63.6 | \[ \frac{{\left(x-scale \cdot y-scale\right)}^{2}}{4 \cdot \left(\left(b \cdot a\right) \cdot \left(\frac{y-scale \cdot {x-scale}^{2}}{\color{blue}{b \cdot \left(\sqrt{8} \cdot a\right)}} \cdot \sqrt{\frac{1}{2 \cdot \left({b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}}\right)\right)}
\] |
rational.json-simplify-46 [=>]63.6 | \[ \frac{{\left(x-scale \cdot y-scale\right)}^{2}}{4 \cdot \left(\left(b \cdot a\right) \cdot \left(\color{blue}{\frac{\frac{y-scale \cdot {x-scale}^{2}}{b}}{\sqrt{8} \cdot a}} \cdot \sqrt{\frac{1}{2 \cdot \left({b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}}\right)\right)}
\] |
exponential.json-simplify-27 [=>]63.6 | \[ \frac{{\left(x-scale \cdot y-scale\right)}^{2}}{4 \cdot \left(\left(b \cdot a\right) \cdot \left(\frac{\frac{y-scale \cdot {x-scale}^{2}}{b}}{\sqrt{8} \cdot a} \cdot \sqrt{\frac{1}{2 \cdot \color{blue}{{\left(b \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}^{2}} + 2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}}\right)\right)}
\] |
exponential.json-simplify-27 [=>]63.6 | \[ \frac{{\left(x-scale \cdot y-scale\right)}^{2}}{4 \cdot \left(\left(b \cdot a\right) \cdot \left(\frac{\frac{y-scale \cdot {x-scale}^{2}}{b}}{\sqrt{8} \cdot a} \cdot \sqrt{\frac{1}{2 \cdot {\left(b \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}^{2} + 2 \cdot \color{blue}{{\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}^{2}}}}\right)\right)}
\] |
Taylor expanded in b around inf 49.6
Simplified49.4
[Start]49.6 | \[ 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)
\] |
|---|---|
rational.json-simplify-43 [=>]49.6 | \[ \color{blue}{y-scale \cdot \left(\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) \cdot 0.25\right)}
\] |
rational.json-simplify-2 [=>]49.6 | \[ y-scale \cdot \color{blue}{\left(0.25 \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)}
\] |
rational.json-simplify-43 [=>]49.6 | \[ y-scale \cdot \left(0.25 \cdot \left(\sqrt{2} \cdot \color{blue}{\left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\sqrt{8} \cdot b\right)\right)}\right)\right)
\] |
rational.json-simplify-2 [<=]49.6 | \[ y-scale \cdot \left(0.25 \cdot \left(\sqrt{2} \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \color{blue}{\left(b \cdot \sqrt{8}\right)}\right)\right)\right)
\] |
rational.json-simplify-43 [=>]49.6 | \[ y-scale \cdot \left(0.25 \cdot \color{blue}{\left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b \cdot \sqrt{8}\right) \cdot \sqrt{2}\right)\right)}\right)
\] |
rational.json-simplify-43 [=>]49.5 | \[ y-scale \cdot \left(0.25 \cdot \left(\cos \color{blue}{\left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)} \cdot \left(\left(b \cdot \sqrt{8}\right) \cdot \sqrt{2}\right)\right)\right)
\] |
rational.json-simplify-2 [<=]49.5 | \[ y-scale \cdot \left(0.25 \cdot \left(\cos \left(angle \cdot \color{blue}{\left(0.005555555555555556 \cdot \pi\right)}\right) \cdot \left(\left(b \cdot \sqrt{8}\right) \cdot \sqrt{2}\right)\right)\right)
\] |
rational.json-simplify-2 [<=]49.5 | \[ y-scale \cdot \left(0.25 \cdot \left(\cos \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right) \cdot \color{blue}{\left(\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)\right)}\right)\right)
\] |
rational.json-simplify-43 [=>]49.6 | \[ y-scale \cdot \left(0.25 \cdot \left(\cos \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right) \cdot \color{blue}{\left(b \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)\right)}\right)\right)
\] |
exponential.json-simplify-20 [=>]49.4 | \[ y-scale \cdot \left(0.25 \cdot \left(\cos \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right) \cdot \left(b \cdot \color{blue}{\sqrt{2 \cdot 8}}\right)\right)\right)
\] |
metadata-eval [=>]49.4 | \[ y-scale \cdot \left(0.25 \cdot \left(\cos \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right) \cdot \left(b \cdot \sqrt{\color{blue}{16}}\right)\right)\right)
\] |
metadata-eval [=>]49.4 | \[ y-scale \cdot \left(0.25 \cdot \left(\cos \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right) \cdot \left(b \cdot \color{blue}{4}\right)\right)\right)
\] |
if 1.15000000000000007e-198 < x-scale Initial program 63.3
Simplified63.1
[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 x-scale around inf 62.6
Simplified62.5
[Start]62.6 | \[ \frac{{\left(x-scale \cdot y-scale\right)}^{2}}{4 \cdot \left(\left(b \cdot a\right) \cdot \left(\frac{y-scale \cdot x-scale}{a \cdot \left(b \cdot \sqrt{8}\right)} \cdot \sqrt{\frac{1}{2 \cdot \frac{{a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}} + 2 \cdot \frac{{b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}}}}\right)\right)}
\] |
|---|---|
rational.json-simplify-43 [=>]62.6 | \[ \frac{{\left(x-scale \cdot y-scale\right)}^{2}}{4 \cdot \left(\left(b \cdot a\right) \cdot \left(\frac{y-scale \cdot x-scale}{\color{blue}{b \cdot \left(\sqrt{8} \cdot a\right)}} \cdot \sqrt{\frac{1}{2 \cdot \frac{{a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}} + 2 \cdot \frac{{b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}}}}\right)\right)}
\] |
exponential.json-simplify-27 [=>]62.6 | \[ \frac{{\left(x-scale \cdot y-scale\right)}^{2}}{4 \cdot \left(\left(b \cdot a\right) \cdot \left(\frac{y-scale \cdot x-scale}{b \cdot \left(\sqrt{8} \cdot a\right)} \cdot \sqrt{\frac{1}{2 \cdot \frac{\color{blue}{{\left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}^{2}}}{{y-scale}^{2}} + 2 \cdot \frac{{b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}}}}\right)\right)}
\] |
exponential.json-simplify-27 [=>]62.5 | \[ \frac{{\left(x-scale \cdot y-scale\right)}^{2}}{4 \cdot \left(\left(b \cdot a\right) \cdot \left(\frac{y-scale \cdot x-scale}{b \cdot \left(\sqrt{8} \cdot a\right)} \cdot \sqrt{\frac{1}{2 \cdot \frac{{\left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}^{2}}{{y-scale}^{2}} + 2 \cdot \frac{\color{blue}{{\left(b \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}^{2}}}{{y-scale}^{2}}}}\right)\right)}
\] |
Taylor expanded in y-scale around 0 48.9
Simplified46.7
[Start]48.9 | \[ 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)
\] |
|---|---|
rational.json-simplify-2 [=>]48.9 | \[ 0.25 \cdot \color{blue}{\left(\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)} \cdot \left(x-scale \cdot \sqrt{8}\right)\right)}
\] |
rational.json-simplify-43 [=>]48.8 | \[ 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)}
\] |
exponential.json-simplify-20 [=>]48.8 | \[ 0.25 \cdot \left(x-scale \cdot \color{blue}{\sqrt{\left(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) \cdot 8}}\right)
\] |
Final simplification47.6
| Alternative 1 | |
|---|---|
| Error | 49.4 |
| Cost | 46800 |
| Alternative 2 | |
|---|---|
| Error | 49.4 |
| Cost | 40336 |
| Alternative 3 | |
|---|---|
| Error | 51.4 |
| Cost | 14096 |
| Alternative 4 | |
|---|---|
| Error | 51.6 |
| Cost | 1100 |
| Alternative 5 | |
|---|---|
| Error | 51.6 |
| Cost | 844 |
| Alternative 6 | |
|---|---|
| Error | 53.9 |
| Cost | 520 |
| Alternative 7 | |
|---|---|
| Error | 54.2 |
| Cost | 192 |
herbie shell --seed 2023067
(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))))