(FPCore (a b angle x-scale y-scale)
:precision binary64
(*
180.0
(/
(atan
(/
(-
(-
(/
(/
(+
(pow (* a (cos (* (/ angle 180.0) PI))) 2.0)
(pow (* b (sin (* (/ angle 180.0) PI))) 2.0))
y-scale)
y-scale)
(/
(/
(+
(pow (* a (sin (* (/ angle 180.0) PI))) 2.0)
(pow (* b (cos (* (/ angle 180.0) PI))) 2.0))
x-scale)
x-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))))
(/
(/
(*
(* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin (* (/ angle 180.0) PI)))
(cos (* (/ angle 180.0) PI)))
x-scale)
y-scale)))
PI)))(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (* 0.005555555555555556 angle) PI))
(t_1 (cos t_0))
(t_2 (sin t_0))
(t_3
(*
180.0
(/
(atan
(*
x-scale
(* -0.5 (* 2.0 (/ y-scale (/ (* t_2 (* x-scale x-scale)) t_1))))))
PI)))
(t_4 (* 0.005555555555555556 (* angle PI)))
(t_5 (sin t_4))
(t_6 (cos t_4)))
(if (<= b -2.8e+128)
t_3
(if (<= b -5.2e+36)
(* 180.0 (/ (atan (* t_5 (/ y-scale x-scale))) PI))
(if (<= b -1.2e+22)
t_3
(if (<= b -9e-286)
(*
180.0
(/
(atan (* t_5 (/ (/ y-scale (cos (pow (cbrt t_0) 3.0))) x-scale)))
PI))
(if (<= b 6.7e-12)
(* 180.0 (/ (atan (/ t_2 (* x-scale (/ t_1 y-scale)))) PI))
(if (<= b 6.6e+46)
t_3
(if (<= b 2.5e+78)
(* 180.0 (/ (atan (* t_5 (/ (/ y-scale t_6) x-scale))) PI))
(*
180.0
(/
(atan
(*
x-scale
(*
-0.5
(* 2.0 (/ (* y-scale t_6) (* t_5 (pow x-scale 2.0)))))))
PI)))))))))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (atan(((((((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) - (((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)) - 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)))) / (((((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))) / ((double) M_PI));
}
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (0.005555555555555556 * angle) * ((double) M_PI);
double t_1 = cos(t_0);
double t_2 = sin(t_0);
double t_3 = 180.0 * (atan((x_45_scale * (-0.5 * (2.0 * (y_45_scale / ((t_2 * (x_45_scale * x_45_scale)) / t_1)))))) / ((double) M_PI));
double t_4 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_5 = sin(t_4);
double t_6 = cos(t_4);
double tmp;
if (b <= -2.8e+128) {
tmp = t_3;
} else if (b <= -5.2e+36) {
tmp = 180.0 * (atan((t_5 * (y_45_scale / x_45_scale))) / ((double) M_PI));
} else if (b <= -1.2e+22) {
tmp = t_3;
} else if (b <= -9e-286) {
tmp = 180.0 * (atan((t_5 * ((y_45_scale / cos(pow(cbrt(t_0), 3.0))) / x_45_scale))) / ((double) M_PI));
} else if (b <= 6.7e-12) {
tmp = 180.0 * (atan((t_2 / (x_45_scale * (t_1 / y_45_scale)))) / ((double) M_PI));
} else if (b <= 6.6e+46) {
tmp = t_3;
} else if (b <= 2.5e+78) {
tmp = 180.0 * (atan((t_5 * ((y_45_scale / t_6) / x_45_scale))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((x_45_scale * (-0.5 * (2.0 * ((y_45_scale * t_6) / (t_5 * pow(x_45_scale, 2.0))))))) / ((double) M_PI));
}
return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (Math.atan(((((((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.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.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)))) / (((((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))) / Math.PI);
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (0.005555555555555556 * angle) * Math.PI;
double t_1 = Math.cos(t_0);
double t_2 = Math.sin(t_0);
double t_3 = 180.0 * (Math.atan((x_45_scale * (-0.5 * (2.0 * (y_45_scale / ((t_2 * (x_45_scale * x_45_scale)) / t_1)))))) / Math.PI);
double t_4 = 0.005555555555555556 * (angle * Math.PI);
double t_5 = Math.sin(t_4);
double t_6 = Math.cos(t_4);
double tmp;
if (b <= -2.8e+128) {
tmp = t_3;
} else if (b <= -5.2e+36) {
tmp = 180.0 * (Math.atan((t_5 * (y_45_scale / x_45_scale))) / Math.PI);
} else if (b <= -1.2e+22) {
tmp = t_3;
} else if (b <= -9e-286) {
tmp = 180.0 * (Math.atan((t_5 * ((y_45_scale / Math.cos(Math.pow(Math.cbrt(t_0), 3.0))) / x_45_scale))) / Math.PI);
} else if (b <= 6.7e-12) {
tmp = 180.0 * (Math.atan((t_2 / (x_45_scale * (t_1 / y_45_scale)))) / Math.PI);
} else if (b <= 6.6e+46) {
tmp = t_3;
} else if (b <= 2.5e+78) {
tmp = 180.0 * (Math.atan((t_5 * ((y_45_scale / t_6) / x_45_scale))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((x_45_scale * (-0.5 * (2.0 * ((y_45_scale * t_6) / (t_5 * Math.pow(x_45_scale, 2.0))))))) / Math.PI);
}
return tmp;
}
function code(a, b, angle, x_45_scale, y_45_scale) return Float64(180.0 * Float64(atan(Float64(Float64(Float64(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) - 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)) - 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(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))) / pi)) end
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(0.005555555555555556 * angle) * pi) t_1 = cos(t_0) t_2 = sin(t_0) t_3 = Float64(180.0 * Float64(atan(Float64(x_45_scale * Float64(-0.5 * Float64(2.0 * Float64(y_45_scale / Float64(Float64(t_2 * Float64(x_45_scale * x_45_scale)) / t_1)))))) / pi)) t_4 = Float64(0.005555555555555556 * Float64(angle * pi)) t_5 = sin(t_4) t_6 = cos(t_4) tmp = 0.0 if (b <= -2.8e+128) tmp = t_3; elseif (b <= -5.2e+36) tmp = Float64(180.0 * Float64(atan(Float64(t_5 * Float64(y_45_scale / x_45_scale))) / pi)); elseif (b <= -1.2e+22) tmp = t_3; elseif (b <= -9e-286) tmp = Float64(180.0 * Float64(atan(Float64(t_5 * Float64(Float64(y_45_scale / cos((cbrt(t_0) ^ 3.0))) / x_45_scale))) / pi)); elseif (b <= 6.7e-12) tmp = Float64(180.0 * Float64(atan(Float64(t_2 / Float64(x_45_scale * Float64(t_1 / y_45_scale)))) / pi)); elseif (b <= 6.6e+46) tmp = t_3; elseif (b <= 2.5e+78) tmp = Float64(180.0 * Float64(atan(Float64(t_5 * Float64(Float64(y_45_scale / t_6) / x_45_scale))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(x_45_scale * Float64(-0.5 * Float64(2.0 * Float64(Float64(y_45_scale * t_6) / Float64(t_5 * (x_45_scale ^ 2.0))))))) / pi)); end return tmp end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := N[(180.0 * N[(N[ArcTan[N[(N[(N[(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] - 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]), $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] / 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]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$3 = N[(180.0 * N[(N[ArcTan[N[(x$45$scale * N[(-0.5 * N[(2.0 * N[(y$45$scale / N[(N[(t$95$2 * N[(x$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[Sin[t$95$4], $MachinePrecision]}, Block[{t$95$6 = N[Cos[t$95$4], $MachinePrecision]}, If[LessEqual[b, -2.8e+128], t$95$3, If[LessEqual[b, -5.2e+36], N[(180.0 * N[(N[ArcTan[N[(t$95$5 * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -1.2e+22], t$95$3, If[LessEqual[b, -9e-286], N[(180.0 * N[(N[ArcTan[N[(t$95$5 * N[(N[(y$45$scale / N[Cos[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.7e-12], N[(180.0 * N[(N[ArcTan[N[(t$95$2 / N[(x$45$scale * N[(t$95$1 / y$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.6e+46], t$95$3, If[LessEqual[b, 2.5e+78], N[(180.0 * N[(N[ArcTan[N[(t$95$5 * N[(N[(y$45$scale / t$95$6), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(x$45$scale * N[(-0.5 * N[(2.0 * N[(N[(y$45$scale * t$95$6), $MachinePrecision] / N[(t$95$5 * N[Power[x$45$scale, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]]
180 \cdot \frac{\tan^{-1} \left(\frac{\left(\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} - \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}\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}}}{\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)}{\pi}
\begin{array}{l}
t_0 := \left(0.005555555555555556 \cdot angle\right) \cdot \pi\\
t_1 := \cos t_0\\
t_2 := \sin t_0\\
t_3 := 180 \cdot \frac{\tan^{-1} \left(x-scale \cdot \left(-0.5 \cdot \left(2 \cdot \frac{y-scale}{\frac{t_2 \cdot \left(x-scale \cdot x-scale\right)}{t_1}}\right)\right)\right)}{\pi}\\
t_4 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_5 := \sin t_4\\
t_6 := \cos t_4\\
\mathbf{if}\;b \leq -2.8 \cdot 10^{+128}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \leq -5.2 \cdot 10^{+36}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(t_5 \cdot \frac{y-scale}{x-scale}\right)}{\pi}\\
\mathbf{elif}\;b \leq -1.2 \cdot 10^{+22}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \leq -9 \cdot 10^{-286}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(t_5 \cdot \frac{\frac{y-scale}{\cos \left({\left(\sqrt[3]{t_0}\right)}^{3}\right)}}{x-scale}\right)}{\pi}\\
\mathbf{elif}\;b \leq 6.7 \cdot 10^{-12}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{t_2}{x-scale \cdot \frac{t_1}{y-scale}}\right)}{\pi}\\
\mathbf{elif}\;b \leq 6.6 \cdot 10^{+46}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \leq 2.5 \cdot 10^{+78}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(t_5 \cdot \frac{\frac{y-scale}{t_6}}{x-scale}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(x-scale \cdot \left(-0.5 \cdot \left(2 \cdot \frac{y-scale \cdot t_6}{t_5 \cdot {x-scale}^{2}}\right)\right)\right)}{\pi}\\
\end{array}



Bits error versus a



Bits error versus b



Bits error versus angle



Bits error versus x-scale



Bits error versus y-scale
Results
if b < -2.79999999999999983e128 or -5.2000000000000003e36 < b < -1.2e22 or 6.7000000000000001e-12 < b < 6.5999999999999996e46Initial program 57.1
Simplified55.9
Taylor expanded in x-scale around 0 54.3
Taylor expanded in a around 0 30.8
Simplified30.2
if -2.79999999999999983e128 < b < -5.2000000000000003e36Initial program 49.3
Simplified46.8
Taylor expanded in x-scale around 0 44.5
Taylor expanded in a around inf 40.1
Taylor expanded in x-scale around 0 38.3
Simplified37.8
Taylor expanded in angle around 0 37.6
if -1.2e22 < b < -9.0000000000000001e-286Initial program 53.1
Simplified51.5
Taylor expanded in x-scale around 0 48.0
Taylor expanded in a around inf 32.4
Taylor expanded in x-scale around 0 28.8
Simplified26.8
Applied egg-rr26.7
if -9.0000000000000001e-286 < b < 6.7000000000000001e-12Initial program 54.5
Simplified52.4
Taylor expanded in x-scale around 0 49.6
Taylor expanded in a around inf 32.3
Taylor expanded in x-scale around 0 27.6
Simplified26.1
Applied egg-rr26.0
if 6.5999999999999996e46 < b < 2.49999999999999992e78Initial program 50.8
Simplified48.1
Taylor expanded in x-scale around 0 40.7
Taylor expanded in a around inf 40.2
Taylor expanded in x-scale around 0 37.0
Simplified36.6
Applied egg-rr36.6
if 2.49999999999999992e78 < b Initial program 59.9
Simplified58.5
Taylor expanded in x-scale around 0 58.6
Taylor expanded in a around 0 29.6
Final simplification28.8
herbie shell --seed 2022165
(FPCore (a b angle x-scale y-scale)
:name "raw-angle from scale-rotated-ellipse"
:precision binary64
(* 180.0 (/ (atan (/ (- (- (/ (/ (+ (pow (* a (cos (* (/ angle 180.0) PI))) 2.0) (pow (* b (sin (* (/ angle 180.0) PI))) 2.0)) y-scale) y-scale) (/ (/ (+ (pow (* a (sin (* (/ angle 180.0) PI))) 2.0) (pow (* b (cos (* (/ angle 180.0) PI))) 2.0)) x-scale) x-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)))) (/ (/ (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin (* (/ angle 180.0) PI))) (cos (* (/ angle 180.0) PI))) x-scale) y-scale))) PI)))