| Alternative 1 | |
|---|---|
| Error | 76.01% |
| Cost | 72076 |
(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 (cos (* 0.005555555555555556 (* PI angle))))
(t_1 (* (* y-scale 0.25) (* b -4.0)))
(t_2 (* -0.25 (* (sqrt 2.0) (* x-scale (* a (* (sqrt 8.0) t_0)))))))
(if (<= x-scale -4.4e+117)
(* 0.25 (* x-scale (* 4.0 (* a t_0))))
(if (<= x-scale -1.2e-5)
t_2
(if (<= x-scale -2.8e-27)
t_1
(if (<= x-scale -1.18e-198)
(* (* y-scale 0.25) (* b 4.0))
(if (<= x-scale -5.8e-202)
t_2
(if (<= x-scale 1.8e-181)
t_1
(*
0.25
(*
x-scale
(*
4.0
(hypot
(* b (sin (* (* 0.005555555555555556 PI) angle)))
a))))))))))))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 = cos((0.005555555555555556 * (((double) M_PI) * angle)));
double t_1 = (y_45_scale * 0.25) * (b * -4.0);
double t_2 = -0.25 * (sqrt(2.0) * (x_45_scale * (a * (sqrt(8.0) * t_0))));
double tmp;
if (x_45_scale <= -4.4e+117) {
tmp = 0.25 * (x_45_scale * (4.0 * (a * t_0)));
} else if (x_45_scale <= -1.2e-5) {
tmp = t_2;
} else if (x_45_scale <= -2.8e-27) {
tmp = t_1;
} else if (x_45_scale <= -1.18e-198) {
tmp = (y_45_scale * 0.25) * (b * 4.0);
} else if (x_45_scale <= -5.8e-202) {
tmp = t_2;
} else if (x_45_scale <= 1.8e-181) {
tmp = t_1;
} else {
tmp = 0.25 * (x_45_scale * (4.0 * hypot((b * sin(((0.005555555555555556 * ((double) M_PI)) * angle))), a)));
}
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.cos((0.005555555555555556 * (Math.PI * angle)));
double t_1 = (y_45_scale * 0.25) * (b * -4.0);
double t_2 = -0.25 * (Math.sqrt(2.0) * (x_45_scale * (a * (Math.sqrt(8.0) * t_0))));
double tmp;
if (x_45_scale <= -4.4e+117) {
tmp = 0.25 * (x_45_scale * (4.0 * (a * t_0)));
} else if (x_45_scale <= -1.2e-5) {
tmp = t_2;
} else if (x_45_scale <= -2.8e-27) {
tmp = t_1;
} else if (x_45_scale <= -1.18e-198) {
tmp = (y_45_scale * 0.25) * (b * 4.0);
} else if (x_45_scale <= -5.8e-202) {
tmp = t_2;
} else if (x_45_scale <= 1.8e-181) {
tmp = t_1;
} else {
tmp = 0.25 * (x_45_scale * (4.0 * Math.hypot((b * Math.sin(((0.005555555555555556 * Math.PI) * angle))), a)));
}
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.cos((0.005555555555555556 * (math.pi * angle))) t_1 = (y_45_scale * 0.25) * (b * -4.0) t_2 = -0.25 * (math.sqrt(2.0) * (x_45_scale * (a * (math.sqrt(8.0) * t_0)))) tmp = 0 if x_45_scale <= -4.4e+117: tmp = 0.25 * (x_45_scale * (4.0 * (a * t_0))) elif x_45_scale <= -1.2e-5: tmp = t_2 elif x_45_scale <= -2.8e-27: tmp = t_1 elif x_45_scale <= -1.18e-198: tmp = (y_45_scale * 0.25) * (b * 4.0) elif x_45_scale <= -5.8e-202: tmp = t_2 elif x_45_scale <= 1.8e-181: tmp = t_1 else: tmp = 0.25 * (x_45_scale * (4.0 * math.hypot((b * math.sin(((0.005555555555555556 * math.pi) * angle))), a))) 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 = cos(Float64(0.005555555555555556 * Float64(pi * angle))) t_1 = Float64(Float64(y_45_scale * 0.25) * Float64(b * -4.0)) t_2 = Float64(-0.25 * Float64(sqrt(2.0) * Float64(x_45_scale * Float64(a * Float64(sqrt(8.0) * t_0))))) tmp = 0.0 if (x_45_scale <= -4.4e+117) tmp = Float64(0.25 * Float64(x_45_scale * Float64(4.0 * Float64(a * t_0)))); elseif (x_45_scale <= -1.2e-5) tmp = t_2; elseif (x_45_scale <= -2.8e-27) tmp = t_1; elseif (x_45_scale <= -1.18e-198) tmp = Float64(Float64(y_45_scale * 0.25) * Float64(b * 4.0)); elseif (x_45_scale <= -5.8e-202) tmp = t_2; elseif (x_45_scale <= 1.8e-181) tmp = t_1; else tmp = Float64(0.25 * Float64(x_45_scale * Float64(4.0 * hypot(Float64(b * sin(Float64(Float64(0.005555555555555556 * pi) * angle))), a)))); 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 = cos((0.005555555555555556 * (pi * angle))); t_1 = (y_45_scale * 0.25) * (b * -4.0); t_2 = -0.25 * (sqrt(2.0) * (x_45_scale * (a * (sqrt(8.0) * t_0)))); tmp = 0.0; if (x_45_scale <= -4.4e+117) tmp = 0.25 * (x_45_scale * (4.0 * (a * t_0))); elseif (x_45_scale <= -1.2e-5) tmp = t_2; elseif (x_45_scale <= -2.8e-27) tmp = t_1; elseif (x_45_scale <= -1.18e-198) tmp = (y_45_scale * 0.25) * (b * 4.0); elseif (x_45_scale <= -5.8e-202) tmp = t_2; elseif (x_45_scale <= 1.8e-181) tmp = t_1; else tmp = 0.25 * (x_45_scale * (4.0 * hypot((b * sin(((0.005555555555555556 * pi) * angle))), a))); 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[Cos[N[(0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[(y$45$scale * 0.25), $MachinePrecision] * N[(b * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-0.25 * N[(N[Sqrt[2.0], $MachinePrecision] * N[(x$45$scale * N[(a * N[(N[Sqrt[8.0], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$45$scale, -4.4e+117], N[(0.25 * N[(x$45$scale * N[(4.0 * N[(a * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$45$scale, -1.2e-5], t$95$2, If[LessEqual[x$45$scale, -2.8e-27], t$95$1, If[LessEqual[x$45$scale, -1.18e-198], N[(N[(y$45$scale * 0.25), $MachinePrecision] * N[(b * 4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$45$scale, -5.8e-202], t$95$2, If[LessEqual[x$45$scale, 1.8e-181], t$95$1, N[(0.25 * N[(x$45$scale * N[(4.0 * N[Sqrt[N[(b * N[Sin[N[(N[(0.005555555555555556 * Pi), $MachinePrecision] * angle), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] ^ 2 + a ^ 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 := \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\\
t_1 := \left(y-scale \cdot 0.25\right) \cdot \left(b \cdot -4\right)\\
t_2 := -0.25 \cdot \left(\sqrt{2} \cdot \left(x-scale \cdot \left(a \cdot \left(\sqrt{8} \cdot t_0\right)\right)\right)\right)\\
\mathbf{if}\;x-scale \leq -4.4 \cdot 10^{+117}:\\
\;\;\;\;0.25 \cdot \left(x-scale \cdot \left(4 \cdot \left(a \cdot t_0\right)\right)\right)\\
\mathbf{elif}\;x-scale \leq -1.2 \cdot 10^{-5}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x-scale \leq -2.8 \cdot 10^{-27}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x-scale \leq -1.18 \cdot 10^{-198}:\\
\;\;\;\;\left(y-scale \cdot 0.25\right) \cdot \left(b \cdot 4\right)\\
\mathbf{elif}\;x-scale \leq -5.8 \cdot 10^{-202}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x-scale \leq 1.8 \cdot 10^{-181}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;0.25 \cdot \left(x-scale \cdot \left(4 \cdot \mathsf{hypot}\left(b \cdot \sin \left(\left(0.005555555555555556 \cdot \pi\right) \cdot angle\right), a\right)\right)\right)\\
\end{array}
Results
if x-scale < -4.40000000000000028e117Initial program 99.46
Simplified99
[Start]99.46 | \[ \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 99.01
Simplified99
[Start]99.01 | \[ 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* [=>]99 | \[ 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 [=>]99 | \[ 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 [=>]99 | \[ 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 [=>]99 | \[ 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 [=>]99 | \[ 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 [=>]99 | \[ 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 a around inf 79.5
Applied egg-rr97.59
Simplified79.29
[Start]97.59 | \[ 0.25 \cdot \left(x-scale \cdot \left(e^{\mathsf{log1p}\left(\left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \cdot 4\right)} - 1\right)\right)
\] |
|---|---|
expm1-def [=>]85.57 | \[ 0.25 \cdot \left(x-scale \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \cdot 4\right)\right)}\right)
\] |
expm1-log1p [=>]79.29 | \[ 0.25 \cdot \left(x-scale \cdot \color{blue}{\left(\left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \cdot 4\right)}\right)
\] |
*-commutative [=>]79.29 | \[ 0.25 \cdot \left(x-scale \cdot \color{blue}{\left(4 \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)}\right)
\] |
if -4.40000000000000028e117 < x-scale < -1.2e-5 or -1.18000000000000006e-198 < x-scale < -5.79999999999999976e-202Initial program 98.09
Simplified98.03
[Start]98.09 | \[ \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 a around -inf 93.27
Simplified92.58
[Start]93.27 | \[ -0.25 \cdot \left(\left(y-scale \cdot \left(x-scale \cdot \left(a \cdot \sqrt{8}\right)\right)\right) \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}}{{y-scale}^{2} \cdot {x-scale}^{2}} + {\left(\frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} - \frac{{\cos \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}}{{y-scale}^{2}} + \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}\right)}\right)
\] |
|---|---|
associate-*l* [=>]92.58 | \[ -0.25 \cdot \color{blue}{\left(y-scale \cdot \left(\left(x-scale \cdot \left(a \cdot \sqrt{8}\right)\right) \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}}{{y-scale}^{2} \cdot {x-scale}^{2}} + {\left(\frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} - \frac{{\cos \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}}{{y-scale}^{2}} + \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}\right)}\right)\right)}
\] |
Taylor expanded in x-scale around inf 90.29
Simplified90.31
[Start]90.29 | \[ -0.25 \cdot \left(y-scale \cdot \left(\left(\left(x-scale \cdot a\right) \cdot \sqrt{8}\right) \cdot \sqrt{\left(\frac{{\sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} + \frac{{\cos \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right) + \frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}}}\right)\right)
\] |
|---|---|
*-commutative [=>]90.29 | \[ -0.25 \cdot \left(y-scale \cdot \left(\left(\left(x-scale \cdot a\right) \cdot \sqrt{8}\right) \cdot \sqrt{\left(\frac{{\sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} + \frac{{\cos \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right) + \frac{{\cos \color{blue}{\left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)}}^{2}}{{y-scale}^{2}}}\right)\right)
\] |
associate-*r* [<=]90.31 | \[ -0.25 \cdot \left(y-scale \cdot \left(\left(\left(x-scale \cdot a\right) \cdot \sqrt{8}\right) \cdot \sqrt{\left(\frac{{\sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} + \frac{{\cos \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right) + \frac{{\cos \color{blue}{\left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)}}^{2}}{{y-scale}^{2}}}\right)\right)
\] |
*-commutative [<=]90.31 | \[ -0.25 \cdot \left(y-scale \cdot \left(\left(\left(x-scale \cdot a\right) \cdot \sqrt{8}\right) \cdot \sqrt{\left(\frac{{\sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} + \frac{{\cos \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right) + \frac{{\cos \left(angle \cdot \color{blue}{\left(0.005555555555555556 \cdot \pi\right)}\right)}^{2}}{{y-scale}^{2}}}\right)\right)
\] |
unpow2 [=>]90.31 | \[ -0.25 \cdot \left(y-scale \cdot \left(\left(\left(x-scale \cdot a\right) \cdot \sqrt{8}\right) \cdot \sqrt{\left(\frac{{\sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} + \frac{{\cos \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right) + \frac{{\cos \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)}^{2}}{\color{blue}{y-scale \cdot y-scale}}}\right)\right)
\] |
*-commutative [=>]90.31 | \[ -0.25 \cdot \left(y-scale \cdot \left(\left(\left(x-scale \cdot a\right) \cdot \sqrt{8}\right) \cdot \sqrt{\left(\frac{{\sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} + \frac{{\cos \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right) + \frac{{\cos \left(angle \cdot \color{blue}{\left(\pi \cdot 0.005555555555555556\right)}\right)}^{2}}{y-scale \cdot y-scale}}\right)\right)
\] |
Applied egg-rr86.7
Taylor expanded in y-scale around 0 82.78
if -1.2e-5 < x-scale < -2.8e-27 or -5.79999999999999976e-202 < x-scale < 1.8e-181Initial program 99.73
Simplified99.76
[Start]99.73 | \[ \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 76.37
Simplified76.36
[Start]76.37 | \[ 0.25 \cdot \left(y-scale \cdot \left(\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)\right)\right)
\] |
|---|---|
associate-*r* [=>]76.36 | \[ \color{blue}{\left(0.25 \cdot y-scale\right) \cdot \left(\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)\right)}
\] |
*-commutative [=>]76.36 | \[ \left(0.25 \cdot y-scale\right) \cdot \color{blue}{\left(\left(b \cdot \sqrt{8}\right) \cdot \sqrt{2}\right)}
\] |
*-commutative [=>]76.36 | \[ \left(0.25 \cdot y-scale\right) \cdot \left(\color{blue}{\left(\sqrt{8} \cdot b\right)} \cdot \sqrt{2}\right)
\] |
Applied egg-rr83.97
Simplified83.97
[Start]83.97 | \[ \left(0.25 \cdot y-scale\right) \cdot \sqrt{2 \cdot \left(8 \cdot \left(b \cdot b\right)\right)}
\] |
|---|---|
associate-*r* [=>]83.97 | \[ \left(0.25 \cdot y-scale\right) \cdot \sqrt{\color{blue}{\left(2 \cdot 8\right) \cdot \left(b \cdot b\right)}}
\] |
associate-*r* [=>]83.97 | \[ \left(0.25 \cdot y-scale\right) \cdot \sqrt{\color{blue}{\left(\left(2 \cdot 8\right) \cdot b\right) \cdot b}}
\] |
metadata-eval [=>]83.97 | \[ \left(0.25 \cdot y-scale\right) \cdot \sqrt{\left(\color{blue}{16} \cdot b\right) \cdot b}
\] |
Taylor expanded in b around -inf 76.94
Simplified76.94
[Start]76.94 | \[ \left(0.25 \cdot y-scale\right) \cdot \left(-4 \cdot b\right)
\] |
|---|---|
*-commutative [=>]76.94 | \[ \left(0.25 \cdot y-scale\right) \cdot \color{blue}{\left(b \cdot -4\right)}
\] |
if -2.8e-27 < x-scale < -1.18000000000000006e-198Initial program 99.19
Simplified98.48
[Start]99.19 | \[ \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 80.33
Simplified80.33
[Start]80.33 | \[ 0.25 \cdot \left(y-scale \cdot \left(\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)\right)\right)
\] |
|---|---|
associate-*r* [=>]80.33 | \[ \color{blue}{\left(0.25 \cdot y-scale\right) \cdot \left(\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)\right)}
\] |
*-commutative [=>]80.33 | \[ \left(0.25 \cdot y-scale\right) \cdot \color{blue}{\left(\left(b \cdot \sqrt{8}\right) \cdot \sqrt{2}\right)}
\] |
*-commutative [=>]80.33 | \[ \left(0.25 \cdot y-scale\right) \cdot \left(\color{blue}{\left(\sqrt{8} \cdot b\right)} \cdot \sqrt{2}\right)
\] |
Applied egg-rr86.94
Simplified86.94
[Start]86.94 | \[ \left(0.25 \cdot y-scale\right) \cdot \sqrt{2 \cdot \left(8 \cdot \left(b \cdot b\right)\right)}
\] |
|---|---|
associate-*r* [=>]86.94 | \[ \left(0.25 \cdot y-scale\right) \cdot \sqrt{\color{blue}{\left(2 \cdot 8\right) \cdot \left(b \cdot b\right)}}
\] |
associate-*r* [=>]86.94 | \[ \left(0.25 \cdot y-scale\right) \cdot \sqrt{\color{blue}{\left(\left(2 \cdot 8\right) \cdot b\right) \cdot b}}
\] |
metadata-eval [=>]86.94 | \[ \left(0.25 \cdot y-scale\right) \cdot \sqrt{\left(\color{blue}{16} \cdot b\right) \cdot b}
\] |
Taylor expanded in b around 0 80.14
if 1.8e-181 < x-scale Initial program 98.87
Simplified98.43
[Start]98.87 | \[ \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 75.62
Simplified75.6
[Start]75.62 | \[ 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* [=>]75.6 | \[ 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 [=>]75.6 | \[ 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 [=>]75.6 | \[ 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 [=>]75.6 | \[ 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 [=>]75.6 | \[ 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 [=>]75.6 | \[ 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 75.68
Simplified59.63
[Start]75.68 | \[ 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 [=>]75.68 | \[ 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 [=>]75.68 | \[ 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 [=>]75.68 | \[ 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 [<=]72.48 | \[ 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 [=>]72.48 | \[ 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 [=>]72.48 | \[ 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 [<=]72.48 | \[ 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)
\] |
Taylor expanded in angle around 0 59.43
Applied egg-rr74.88
Simplified59.03
[Start]74.88 | \[ 0.25 \cdot \left(x-scale \cdot \left(e^{\mathsf{log1p}\left(\mathsf{hypot}\left(b \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right), a\right) \cdot 4\right)} - 1\right)\right)
\] |
|---|---|
expm1-def [=>]60.59 | \[ 0.25 \cdot \left(x-scale \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\mathsf{hypot}\left(b \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right), a\right) \cdot 4\right)\right)}\right)
\] |
expm1-log1p [=>]59.07 | \[ 0.25 \cdot \left(x-scale \cdot \color{blue}{\left(\mathsf{hypot}\left(b \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right), a\right) \cdot 4\right)}\right)
\] |
*-commutative [=>]59.07 | \[ 0.25 \cdot \left(x-scale \cdot \color{blue}{\left(4 \cdot \mathsf{hypot}\left(b \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right), a\right)\right)}\right)
\] |
associate-*r* [=>]59.03 | \[ 0.25 \cdot \left(x-scale \cdot \left(4 \cdot \mathsf{hypot}\left(b \cdot \sin \color{blue}{\left(\left(0.005555555555555556 \cdot \pi\right) \cdot angle\right)}, a\right)\right)\right)
\] |
Final simplification71.65
| Alternative 1 | |
|---|---|
| Error | 76.01% |
| Cost | 72076 |
| Alternative 2 | |
|---|---|
| Error | 76.02% |
| Cost | 60185 |
| Alternative 3 | |
|---|---|
| Error | 71.47% |
| Cost | 26892 |
| Alternative 4 | |
|---|---|
| Error | 71.65% |
| Cost | 20824 |
| Alternative 5 | |
|---|---|
| Error | 76.67% |
| Cost | 20569 |
| Alternative 6 | |
|---|---|
| Error | 80.1% |
| Cost | 14300 |
| Alternative 7 | |
|---|---|
| Error | 79.51% |
| Cost | 14300 |
| Alternative 8 | |
|---|---|
| Error | 80.09% |
| Cost | 13904 |
| Alternative 9 | |
|---|---|
| Error | 80.1% |
| Cost | 13904 |
| Alternative 10 | |
|---|---|
| Error | 80.1% |
| Cost | 13904 |
| Alternative 11 | |
|---|---|
| Error | 84.84% |
| Cost | 713 |
| Alternative 12 | |
|---|---|
| Error | 83.6% |
| Cost | 448 |
herbie shell --seed 2023090
(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))))