| Alternative 1 | |
|---|---|
| Error | 41.1 |
| Cost | 20172 |
(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 (* x-scale (- a))))
(if (<= y-scale -1.5e+117)
t_0
(if (<= y-scale -1.25e-51)
(* x-scale a)
(if (<= y-scale 1e-184)
(* 0.25 (* y-scale (* (sqrt 8.0) 0.0)))
(if (<= y-scale 6.2e+32)
(* 0.25 (* y-scale (* (sqrt 8.0) (hypot b b))))
(if (<= y-scale 7e+122)
t_0
(if (<= y-scale 3.3e+134)
(* 0.25 (* y-scale (sqrt (* (* b b) 16.0))))
(* x-scale 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 = x_45_scale * -a;
double tmp;
if (y_45_scale <= -1.5e+117) {
tmp = t_0;
} else if (y_45_scale <= -1.25e-51) {
tmp = x_45_scale * a;
} else if (y_45_scale <= 1e-184) {
tmp = 0.25 * (y_45_scale * (sqrt(8.0) * 0.0));
} else if (y_45_scale <= 6.2e+32) {
tmp = 0.25 * (y_45_scale * (sqrt(8.0) * hypot(b, b)));
} else if (y_45_scale <= 7e+122) {
tmp = t_0;
} else if (y_45_scale <= 3.3e+134) {
tmp = 0.25 * (y_45_scale * sqrt(((b * b) * 16.0)));
} else {
tmp = x_45_scale * 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 = x_45_scale * -a;
double tmp;
if (y_45_scale <= -1.5e+117) {
tmp = t_0;
} else if (y_45_scale <= -1.25e-51) {
tmp = x_45_scale * a;
} else if (y_45_scale <= 1e-184) {
tmp = 0.25 * (y_45_scale * (Math.sqrt(8.0) * 0.0));
} else if (y_45_scale <= 6.2e+32) {
tmp = 0.25 * (y_45_scale * (Math.sqrt(8.0) * Math.hypot(b, b)));
} else if (y_45_scale <= 7e+122) {
tmp = t_0;
} else if (y_45_scale <= 3.3e+134) {
tmp = 0.25 * (y_45_scale * Math.sqrt(((b * b) * 16.0)));
} else {
tmp = x_45_scale * 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 = x_45_scale * -a tmp = 0 if y_45_scale <= -1.5e+117: tmp = t_0 elif y_45_scale <= -1.25e-51: tmp = x_45_scale * a elif y_45_scale <= 1e-184: tmp = 0.25 * (y_45_scale * (math.sqrt(8.0) * 0.0)) elif y_45_scale <= 6.2e+32: tmp = 0.25 * (y_45_scale * (math.sqrt(8.0) * math.hypot(b, b))) elif y_45_scale <= 7e+122: tmp = t_0 elif y_45_scale <= 3.3e+134: tmp = 0.25 * (y_45_scale * math.sqrt(((b * b) * 16.0))) else: tmp = x_45_scale * 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 = Float64(x_45_scale * Float64(-a)) tmp = 0.0 if (y_45_scale <= -1.5e+117) tmp = t_0; elseif (y_45_scale <= -1.25e-51) tmp = Float64(x_45_scale * a); elseif (y_45_scale <= 1e-184) tmp = Float64(0.25 * Float64(y_45_scale * Float64(sqrt(8.0) * 0.0))); elseif (y_45_scale <= 6.2e+32) tmp = Float64(0.25 * Float64(y_45_scale * Float64(sqrt(8.0) * hypot(b, b)))); elseif (y_45_scale <= 7e+122) tmp = t_0; elseif (y_45_scale <= 3.3e+134) tmp = Float64(0.25 * Float64(y_45_scale * sqrt(Float64(Float64(b * b) * 16.0)))); else tmp = Float64(x_45_scale * 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 = x_45_scale * -a; tmp = 0.0; if (y_45_scale <= -1.5e+117) tmp = t_0; elseif (y_45_scale <= -1.25e-51) tmp = x_45_scale * a; elseif (y_45_scale <= 1e-184) tmp = 0.25 * (y_45_scale * (sqrt(8.0) * 0.0)); elseif (y_45_scale <= 6.2e+32) tmp = 0.25 * (y_45_scale * (sqrt(8.0) * hypot(b, b))); elseif (y_45_scale <= 7e+122) tmp = t_0; elseif (y_45_scale <= 3.3e+134) tmp = 0.25 * (y_45_scale * sqrt(((b * b) * 16.0))); else tmp = x_45_scale * 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[(x$45$scale * (-a)), $MachinePrecision]}, If[LessEqual[y$45$scale, -1.5e+117], t$95$0, If[LessEqual[y$45$scale, -1.25e-51], N[(x$45$scale * a), $MachinePrecision], If[LessEqual[y$45$scale, 1e-184], N[(0.25 * N[(y$45$scale * N[(N[Sqrt[8.0], $MachinePrecision] * 0.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale, 6.2e+32], N[(0.25 * N[(y$45$scale * N[(N[Sqrt[8.0], $MachinePrecision] * N[Sqrt[b ^ 2 + b ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale, 7e+122], t$95$0, If[LessEqual[y$45$scale, 3.3e+134], N[(0.25 * N[(y$45$scale * N[Sqrt[N[(N[(b * b), $MachinePrecision] * 16.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x$45$scale * a), $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 := x-scale \cdot \left(-a\right)\\
\mathbf{if}\;y-scale \leq -1.5 \cdot 10^{+117}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y-scale \leq -1.25 \cdot 10^{-51}:\\
\;\;\;\;x-scale \cdot a\\
\mathbf{elif}\;y-scale \leq 10^{-184}:\\
\;\;\;\;0.25 \cdot \left(y-scale \cdot \left(\sqrt{8} \cdot 0\right)\right)\\
\mathbf{elif}\;y-scale \leq 6.2 \cdot 10^{+32}:\\
\;\;\;\;0.25 \cdot \left(y-scale \cdot \left(\sqrt{8} \cdot \mathsf{hypot}\left(b, b\right)\right)\right)\\
\mathbf{elif}\;y-scale \leq 7 \cdot 10^{+122}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y-scale \leq 3.3 \cdot 10^{+134}:\\
\;\;\;\;0.25 \cdot \left(y-scale \cdot \sqrt{\left(b \cdot b\right) \cdot 16}\right)\\
\mathbf{else}:\\
\;\;\;\;x-scale \cdot a\\
\end{array}
Results
if y-scale < -1.5e117 or 6.19999999999999986e32 < y-scale < 7.00000000000000028e122Initial program 64.0
Taylor expanded in angle around 0 60.8
Simplified60.8
[Start]60.8 | \[ \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(2 \cdot \frac{{a}^{2}}{{y-scale}^{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}}}
\] |
|---|---|
associate-*r/ [=>]60.8 | \[ \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 \color{blue}{\frac{2 \cdot {a}^{2}}{{y-scale}^{2}}}}}{\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}}}
\] |
unpow2 [=>]60.8 | \[ \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 \frac{2 \cdot \color{blue}{\left(a \cdot a\right)}}{{y-scale}^{2}}}}{\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}}}
\] |
unpow2 [=>]60.8 | \[ \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 \frac{2 \cdot \left(a \cdot a\right)}{\color{blue}{y-scale \cdot y-scale}}}}{\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 47.2
Simplified47.2
[Start]47.2 | \[ -1 \cdot \left(x-scale \cdot a\right)
\] |
|---|---|
mul-1-neg [=>]47.2 | \[ \color{blue}{-x-scale \cdot a}
\] |
distribute-rgt-neg-in [=>]47.2 | \[ \color{blue}{x-scale \cdot \left(-a\right)}
\] |
if -1.5e117 < y-scale < -1.25000000000000001e-51 or 3.3e134 < y-scale Initial program 63.9
Taylor expanded in angle around 0 61.7
Simplified61.7
[Start]61.7 | \[ \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(2 \cdot \frac{{a}^{2}}{{y-scale}^{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}}}
\] |
|---|---|
associate-*r/ [=>]61.7 | \[ \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 \color{blue}{\frac{2 \cdot {a}^{2}}{{y-scale}^{2}}}}}{\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}}}
\] |
unpow2 [=>]61.7 | \[ \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 \frac{2 \cdot \color{blue}{\left(a \cdot a\right)}}{{y-scale}^{2}}}}{\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}}}
\] |
unpow2 [=>]61.7 | \[ \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 \frac{2 \cdot \left(a \cdot a\right)}{\color{blue}{y-scale \cdot y-scale}}}}{\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 0 47.0
if -1.25000000000000001e-51 < y-scale < 1.0000000000000001e-184Initial program 64.0
Simplified63.5
[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 x-scale around inf 63.2
Simplified63.2
[Start]63.2 | \[ 0.25 \cdot \left(\left(y-scale \cdot \sqrt{8}\right) \cdot \sqrt{\left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2} + {a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) - 0.5 \cdot \frac{-2 \cdot \left(\left({b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) \cdot \left(\frac{{b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}} + \frac{{a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}}\right)\right) + 4 \cdot \frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot \left({\left({b}^{2} - {a}^{2}\right)}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}{{y-scale}^{2}}}{\frac{{b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}} + \frac{{a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}}}}\right)
\] |
|---|
Taylor expanded in angle around 0 40.8
Simplified40.8
[Start]40.8 | \[ 0.25 \cdot \left(y-scale \cdot \left(\sqrt{8} \cdot \sqrt{{b}^{2} - -1 \cdot {b}^{2}}\right)\right)
\] |
|---|---|
unpow2 [=>]40.8 | \[ 0.25 \cdot \left(y-scale \cdot \left(\sqrt{8} \cdot \sqrt{\color{blue}{b \cdot b} - -1 \cdot {b}^{2}}\right)\right)
\] |
mul-1-neg [=>]40.8 | \[ 0.25 \cdot \left(y-scale \cdot \left(\sqrt{8} \cdot \sqrt{b \cdot b - \color{blue}{\left(-{b}^{2}\right)}}\right)\right)
\] |
unpow2 [=>]40.8 | \[ 0.25 \cdot \left(y-scale \cdot \left(\sqrt{8} \cdot \sqrt{b \cdot b - \left(-\color{blue}{b \cdot b}\right)}\right)\right)
\] |
Applied egg-rr40.8
Applied egg-rr31.3
Simplified31.3
[Start]31.3 | \[ 0.25 \cdot \left(y-scale \cdot \left(\sqrt{8} \cdot \left(b - b\right)\right)\right)
\] |
|---|---|
+-inverses [=>]31.3 | \[ 0.25 \cdot \left(y-scale \cdot \left(\sqrt{8} \cdot \color{blue}{0}\right)\right)
\] |
if 1.0000000000000001e-184 < y-scale < 6.19999999999999986e32Initial program 63.9
Simplified62.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 inf 60.0
Simplified60.1
[Start]60.0 | \[ 0.25 \cdot \left(\left(y-scale \cdot \sqrt{8}\right) \cdot \sqrt{\left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2} + {a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) - 0.5 \cdot \frac{-2 \cdot \left(\left({b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) \cdot \left(\frac{{b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}} + \frac{{a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}}\right)\right) + 4 \cdot \frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot \left({\left({b}^{2} - {a}^{2}\right)}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}{{y-scale}^{2}}}{\frac{{b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}} + \frac{{a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}}}}\right)
\] |
|---|
Taylor expanded in angle around 0 42.7
Simplified42.7
[Start]42.7 | \[ 0.25 \cdot \left(y-scale \cdot \left(\sqrt{8} \cdot \sqrt{{b}^{2} - -1 \cdot {b}^{2}}\right)\right)
\] |
|---|---|
unpow2 [=>]42.7 | \[ 0.25 \cdot \left(y-scale \cdot \left(\sqrt{8} \cdot \sqrt{\color{blue}{b \cdot b} - -1 \cdot {b}^{2}}\right)\right)
\] |
mul-1-neg [=>]42.7 | \[ 0.25 \cdot \left(y-scale \cdot \left(\sqrt{8} \cdot \sqrt{b \cdot b - \color{blue}{\left(-{b}^{2}\right)}}\right)\right)
\] |
unpow2 [=>]42.7 | \[ 0.25 \cdot \left(y-scale \cdot \left(\sqrt{8} \cdot \sqrt{b \cdot b - \left(-\color{blue}{b \cdot b}\right)}\right)\right)
\] |
Applied egg-rr42.7
Applied egg-rr42.7
Simplified39.7
[Start]42.7 | \[ 0.25 \cdot \left(y-scale \cdot \left(\sqrt{8} \cdot {\left(b \cdot \left(b + b\right)\right)}^{0.5}\right)\right)
\] |
|---|---|
unpow1/2 [=>]42.7 | \[ 0.25 \cdot \left(y-scale \cdot \left(\sqrt{8} \cdot \color{blue}{\sqrt{b \cdot \left(b + b\right)}}\right)\right)
\] |
distribute-lft-in [=>]42.7 | \[ 0.25 \cdot \left(y-scale \cdot \left(\sqrt{8} \cdot \sqrt{\color{blue}{b \cdot b + b \cdot b}}\right)\right)
\] |
hypot-def [=>]39.7 | \[ 0.25 \cdot \left(y-scale \cdot \left(\sqrt{8} \cdot \color{blue}{\mathsf{hypot}\left(b, b\right)}\right)\right)
\] |
if 7.00000000000000028e122 < y-scale < 3.3e134Initial program 64.0
Simplified63.6
[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 x-scale around inf 62.7
Simplified62.7
[Start]62.7 | \[ 0.25 \cdot \left(\left(y-scale \cdot \sqrt{8}\right) \cdot \sqrt{\left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2} + {a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) - 0.5 \cdot \frac{-2 \cdot \left(\left({b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) \cdot \left(\frac{{b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}} + \frac{{a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}}\right)\right) + 4 \cdot \frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot \left({\left({b}^{2} - {a}^{2}\right)}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}{{y-scale}^{2}}}{\frac{{b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}} + \frac{{a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}}}}\right)
\] |
|---|
Taylor expanded in angle around 0 53.5
Simplified53.5
[Start]53.5 | \[ 0.25 \cdot \left(y-scale \cdot \left(\sqrt{8} \cdot \sqrt{{b}^{2} - -1 \cdot {b}^{2}}\right)\right)
\] |
|---|---|
unpow2 [=>]53.5 | \[ 0.25 \cdot \left(y-scale \cdot \left(\sqrt{8} \cdot \sqrt{\color{blue}{b \cdot b} - -1 \cdot {b}^{2}}\right)\right)
\] |
mul-1-neg [=>]53.5 | \[ 0.25 \cdot \left(y-scale \cdot \left(\sqrt{8} \cdot \sqrt{b \cdot b - \color{blue}{\left(-{b}^{2}\right)}}\right)\right)
\] |
unpow2 [=>]53.5 | \[ 0.25 \cdot \left(y-scale \cdot \left(\sqrt{8} \cdot \sqrt{b \cdot b - \left(-\color{blue}{b \cdot b}\right)}\right)\right)
\] |
Applied egg-rr53.5
Applied egg-rr53.5
Simplified53.5
[Start]53.5 | \[ 0.25 \cdot \left(y-scale \cdot {\left(\left(8 \cdot b\right) \cdot \left(b + b\right)\right)}^{0.5}\right)
\] |
|---|---|
unpow1/2 [=>]53.5 | \[ 0.25 \cdot \left(y-scale \cdot \color{blue}{\sqrt{\left(8 \cdot b\right) \cdot \left(b + b\right)}}\right)
\] |
associate-*l* [=>]53.5 | \[ 0.25 \cdot \left(y-scale \cdot \sqrt{\color{blue}{8 \cdot \left(b \cdot \left(b + b\right)\right)}}\right)
\] |
distribute-lft-in [=>]53.5 | \[ 0.25 \cdot \left(y-scale \cdot \sqrt{8 \cdot \color{blue}{\left(b \cdot b + b \cdot b\right)}}\right)
\] |
distribute-rgt-in [=>]53.5 | \[ 0.25 \cdot \left(y-scale \cdot \sqrt{\color{blue}{\left(b \cdot b\right) \cdot 8 + \left(b \cdot b\right) \cdot 8}}\right)
\] |
distribute-lft-out [=>]53.5 | \[ 0.25 \cdot \left(y-scale \cdot \sqrt{\color{blue}{\left(b \cdot b\right) \cdot \left(8 + 8\right)}}\right)
\] |
metadata-eval [=>]53.5 | \[ 0.25 \cdot \left(y-scale \cdot \sqrt{\left(b \cdot b\right) \cdot \color{blue}{16}}\right)
\] |
Final simplification40.8
| Alternative 1 | |
|---|---|
| Error | 41.1 |
| Cost | 20172 |
| Alternative 2 | |
|---|---|
| Error | 42.1 |
| Cost | 7504 |
| Alternative 3 | |
|---|---|
| Error | 41.8 |
| Cost | 7112 |
| Alternative 4 | |
|---|---|
| Error | 49.7 |
| Cost | 653 |
| Alternative 5 | |
|---|---|
| Error | 49.7 |
| Cost | 192 |
herbie shell --seed 2023016
(FPCore (a b angle x-scale y-scale)
:name "b 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))))