(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 (* angle (* 0.005555555555555556 PI)))
(t_1 (cbrt t_0))
(t_2 (pow t_1 2.0))
(t_3 (* 0.005555555555555556 (* angle PI)))
(t_4 (cos t_3))
(t_5 (* y-scale t_4))
(t_6
(*
180.0
(/ (atan (* -0.5 (* 2.0 (/ t_5 (* x-scale (sin t_0)))))) PI)))
(t_7 (cbrt t_4))
(t_8 (cbrt t_1))
(t_9 (sin t_3))
(t_10
(*
180.0
(/
(atan (* -0.5 (* -2.0 (* t_9 (/ y-scale (* t_4 x-scale))))))
PI))))
(if (<= b -4.6944195482419136e+81)
(*
180.0
(/
(atan
(*
-0.5
(* 2.0 (/ t_5 (* x-scale (sin (* (pow t_8 2.0) (* t_2 t_8))))))))
PI))
(if (<= b -1.3936038867054728e+32)
t_10
(if (<= b -3.3500045837300815e-14)
(*
180.0
(/
(atan (* -0.5 (* 2.0 (/ (* y-scale (fabs t_4)) (* x-scale t_9)))))
PI))
(if (<= b -1.0610374634486236e-170)
t_10
(if (<= b -9.374647424775587e-197)
(*
180.0
(/
(atan
(*
-0.5
(*
2.0
(/
t_5
(*
x-scale
(sin
(*
(cbrt 0.005555555555555556)
(* t_2 (cbrt (* angle PI))))))))))
PI))
(if (<= b 2.1551102717128373e-173)
t_10
(if (<= b 1.0591296397635784e-101)
t_6
(if (<= b 1.032677708088545e-62)
(*
180.0
(/
(atan
(* -0.5 (* -2.0 (/ (* y-scale t_9) (* x-scale t_4)))))
PI))
(if (<= b 1.7900732988487222e+47)
(*
180.0
(/
(atan
(*
-0.5
(*
2.0
(/
(* y-scale (* (pow t_7 2.0) t_7))
(* x-scale (sin (pow (cbrt t_3) 3.0)))))))
PI))
(if (<= b 3.1767141429136584e+89) t_10 t_6))))))))))))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 = angle * (0.005555555555555556 * ((double) M_PI));
double t_1 = cbrt(t_0);
double t_2 = pow(t_1, 2.0);
double t_3 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_4 = cos(t_3);
double t_5 = y_45_scale * t_4;
double t_6 = 180.0 * (atan((-0.5 * (2.0 * (t_5 / (x_45_scale * sin(t_0)))))) / ((double) M_PI));
double t_7 = cbrt(t_4);
double t_8 = cbrt(t_1);
double t_9 = sin(t_3);
double t_10 = 180.0 * (atan((-0.5 * (-2.0 * (t_9 * (y_45_scale / (t_4 * x_45_scale)))))) / ((double) M_PI));
double tmp;
if (b <= -4.6944195482419136e+81) {
tmp = 180.0 * (atan((-0.5 * (2.0 * (t_5 / (x_45_scale * sin((pow(t_8, 2.0) * (t_2 * t_8)))))))) / ((double) M_PI));
} else if (b <= -1.3936038867054728e+32) {
tmp = t_10;
} else if (b <= -3.3500045837300815e-14) {
tmp = 180.0 * (atan((-0.5 * (2.0 * ((y_45_scale * fabs(t_4)) / (x_45_scale * t_9))))) / ((double) M_PI));
} else if (b <= -1.0610374634486236e-170) {
tmp = t_10;
} else if (b <= -9.374647424775587e-197) {
tmp = 180.0 * (atan((-0.5 * (2.0 * (t_5 / (x_45_scale * sin((cbrt(0.005555555555555556) * (t_2 * cbrt((angle * ((double) M_PI))))))))))) / ((double) M_PI));
} else if (b <= 2.1551102717128373e-173) {
tmp = t_10;
} else if (b <= 1.0591296397635784e-101) {
tmp = t_6;
} else if (b <= 1.032677708088545e-62) {
tmp = 180.0 * (atan((-0.5 * (-2.0 * ((y_45_scale * t_9) / (x_45_scale * t_4))))) / ((double) M_PI));
} else if (b <= 1.7900732988487222e+47) {
tmp = 180.0 * (atan((-0.5 * (2.0 * ((y_45_scale * (pow(t_7, 2.0) * t_7)) / (x_45_scale * sin(pow(cbrt(t_3), 3.0))))))) / ((double) M_PI));
} else if (b <= 3.1767141429136584e+89) {
tmp = t_10;
} else {
tmp = t_6;
}
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 = angle * (0.005555555555555556 * Math.PI);
double t_1 = Math.cbrt(t_0);
double t_2 = Math.pow(t_1, 2.0);
double t_3 = 0.005555555555555556 * (angle * Math.PI);
double t_4 = Math.cos(t_3);
double t_5 = y_45_scale * t_4;
double t_6 = 180.0 * (Math.atan((-0.5 * (2.0 * (t_5 / (x_45_scale * Math.sin(t_0)))))) / Math.PI);
double t_7 = Math.cbrt(t_4);
double t_8 = Math.cbrt(t_1);
double t_9 = Math.sin(t_3);
double t_10 = 180.0 * (Math.atan((-0.5 * (-2.0 * (t_9 * (y_45_scale / (t_4 * x_45_scale)))))) / Math.PI);
double tmp;
if (b <= -4.6944195482419136e+81) {
tmp = 180.0 * (Math.atan((-0.5 * (2.0 * (t_5 / (x_45_scale * Math.sin((Math.pow(t_8, 2.0) * (t_2 * t_8)))))))) / Math.PI);
} else if (b <= -1.3936038867054728e+32) {
tmp = t_10;
} else if (b <= -3.3500045837300815e-14) {
tmp = 180.0 * (Math.atan((-0.5 * (2.0 * ((y_45_scale * Math.abs(t_4)) / (x_45_scale * t_9))))) / Math.PI);
} else if (b <= -1.0610374634486236e-170) {
tmp = t_10;
} else if (b <= -9.374647424775587e-197) {
tmp = 180.0 * (Math.atan((-0.5 * (2.0 * (t_5 / (x_45_scale * Math.sin((Math.cbrt(0.005555555555555556) * (t_2 * Math.cbrt((angle * Math.PI)))))))))) / Math.PI);
} else if (b <= 2.1551102717128373e-173) {
tmp = t_10;
} else if (b <= 1.0591296397635784e-101) {
tmp = t_6;
} else if (b <= 1.032677708088545e-62) {
tmp = 180.0 * (Math.atan((-0.5 * (-2.0 * ((y_45_scale * t_9) / (x_45_scale * t_4))))) / Math.PI);
} else if (b <= 1.7900732988487222e+47) {
tmp = 180.0 * (Math.atan((-0.5 * (2.0 * ((y_45_scale * (Math.pow(t_7, 2.0) * t_7)) / (x_45_scale * Math.sin(Math.pow(Math.cbrt(t_3), 3.0))))))) / Math.PI);
} else if (b <= 3.1767141429136584e+89) {
tmp = t_10;
} else {
tmp = t_6;
}
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(angle * Float64(0.005555555555555556 * pi)) t_1 = cbrt(t_0) t_2 = t_1 ^ 2.0 t_3 = Float64(0.005555555555555556 * Float64(angle * pi)) t_4 = cos(t_3) t_5 = Float64(y_45_scale * t_4) t_6 = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(2.0 * Float64(t_5 / Float64(x_45_scale * sin(t_0)))))) / pi)) t_7 = cbrt(t_4) t_8 = cbrt(t_1) t_9 = sin(t_3) t_10 = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(-2.0 * Float64(t_9 * Float64(y_45_scale / Float64(t_4 * x_45_scale)))))) / pi)) tmp = 0.0 if (b <= -4.6944195482419136e+81) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(2.0 * Float64(t_5 / Float64(x_45_scale * sin(Float64((t_8 ^ 2.0) * Float64(t_2 * t_8)))))))) / pi)); elseif (b <= -1.3936038867054728e+32) tmp = t_10; elseif (b <= -3.3500045837300815e-14) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(2.0 * Float64(Float64(y_45_scale * abs(t_4)) / Float64(x_45_scale * t_9))))) / pi)); elseif (b <= -1.0610374634486236e-170) tmp = t_10; elseif (b <= -9.374647424775587e-197) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(2.0 * Float64(t_5 / Float64(x_45_scale * sin(Float64(cbrt(0.005555555555555556) * Float64(t_2 * cbrt(Float64(angle * pi)))))))))) / pi)); elseif (b <= 2.1551102717128373e-173) tmp = t_10; elseif (b <= 1.0591296397635784e-101) tmp = t_6; elseif (b <= 1.032677708088545e-62) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(-2.0 * Float64(Float64(y_45_scale * t_9) / Float64(x_45_scale * t_4))))) / pi)); elseif (b <= 1.7900732988487222e+47) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(2.0 * Float64(Float64(y_45_scale * Float64((t_7 ^ 2.0) * t_7)) / Float64(x_45_scale * sin((cbrt(t_3) ^ 3.0))))))) / pi)); elseif (b <= 3.1767141429136584e+89) tmp = t_10; else tmp = t_6; 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[(angle * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[t$95$0, 1/3], $MachinePrecision]}, Block[{t$95$2 = N[Power[t$95$1, 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Cos[t$95$3], $MachinePrecision]}, Block[{t$95$5 = N[(y$45$scale * t$95$4), $MachinePrecision]}, Block[{t$95$6 = N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(2.0 * N[(t$95$5 / N[(x$45$scale * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[Power[t$95$4, 1/3], $MachinePrecision]}, Block[{t$95$8 = N[Power[t$95$1, 1/3], $MachinePrecision]}, Block[{t$95$9 = N[Sin[t$95$3], $MachinePrecision]}, Block[{t$95$10 = N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(-2.0 * N[(t$95$9 * N[(y$45$scale / N[(t$95$4 * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -4.6944195482419136e+81], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(2.0 * N[(t$95$5 / N[(x$45$scale * N[Sin[N[(N[Power[t$95$8, 2.0], $MachinePrecision] * N[(t$95$2 * t$95$8), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -1.3936038867054728e+32], t$95$10, If[LessEqual[b, -3.3500045837300815e-14], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(2.0 * N[(N[(y$45$scale * N[Abs[t$95$4], $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * t$95$9), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -1.0610374634486236e-170], t$95$10, If[LessEqual[b, -9.374647424775587e-197], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(2.0 * N[(t$95$5 / N[(x$45$scale * N[Sin[N[(N[Power[0.005555555555555556, 1/3], $MachinePrecision] * N[(t$95$2 * N[Power[N[(angle * Pi), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.1551102717128373e-173], t$95$10, If[LessEqual[b, 1.0591296397635784e-101], t$95$6, If[LessEqual[b, 1.032677708088545e-62], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(-2.0 * N[(N[(y$45$scale * t$95$9), $MachinePrecision] / N[(x$45$scale * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.7900732988487222e+47], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(2.0 * N[(N[(y$45$scale * N[(N[Power[t$95$7, 2.0], $MachinePrecision] * t$95$7), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[Sin[N[Power[N[Power[t$95$3, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.1767141429136584e+89], t$95$10, t$95$6]]]]]]]]]]]]]]]]]]]]]
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 := angle \cdot \left(0.005555555555555556 \cdot \pi\right)\\
t_1 := \sqrt[3]{t_0}\\
t_2 := {t_1}^{2}\\
t_3 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_4 := \cos t_3\\
t_5 := y-scale \cdot t_4\\
t_6 := 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(2 \cdot \frac{t_5}{x-scale \cdot \sin t_0}\right)\right)}{\pi}\\
t_7 := \sqrt[3]{t_4}\\
t_8 := \sqrt[3]{t_1}\\
t_9 := \sin t_3\\
t_10 := 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(-2 \cdot \left(t_9 \cdot \frac{y-scale}{t_4 \cdot x-scale}\right)\right)\right)}{\pi}\\
\mathbf{if}\;b \leq -4.6944195482419136 \cdot 10^{+81}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(2 \cdot \frac{t_5}{x-scale \cdot \sin \left({t_8}^{2} \cdot \left(t_2 \cdot t_8\right)\right)}\right)\right)}{\pi}\\
\mathbf{elif}\;b \leq -1.3936038867054728 \cdot 10^{+32}:\\
\;\;\;\;t_10\\
\mathbf{elif}\;b \leq -3.3500045837300815 \cdot 10^{-14}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(2 \cdot \frac{y-scale \cdot \left|t_4\right|}{x-scale \cdot t_9}\right)\right)}{\pi}\\
\mathbf{elif}\;b \leq -1.0610374634486236 \cdot 10^{-170}:\\
\;\;\;\;t_10\\
\mathbf{elif}\;b \leq -9.374647424775587 \cdot 10^{-197}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(2 \cdot \frac{t_5}{x-scale \cdot \sin \left(\sqrt[3]{0.005555555555555556} \cdot \left(t_2 \cdot \sqrt[3]{angle \cdot \pi}\right)\right)}\right)\right)}{\pi}\\
\mathbf{elif}\;b \leq 2.1551102717128373 \cdot 10^{-173}:\\
\;\;\;\;t_10\\
\mathbf{elif}\;b \leq 1.0591296397635784 \cdot 10^{-101}:\\
\;\;\;\;t_6\\
\mathbf{elif}\;b \leq 1.032677708088545 \cdot 10^{-62}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(-2 \cdot \frac{y-scale \cdot t_9}{x-scale \cdot t_4}\right)\right)}{\pi}\\
\mathbf{elif}\;b \leq 1.7900732988487222 \cdot 10^{+47}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(2 \cdot \frac{y-scale \cdot \left({t_7}^{2} \cdot t_7\right)}{x-scale \cdot \sin \left({\left(\sqrt[3]{t_3}\right)}^{3}\right)}\right)\right)}{\pi}\\
\mathbf{elif}\;b \leq 3.1767141429136584 \cdot 10^{+89}:\\
\;\;\;\;t_10\\
\mathbf{else}:\\
\;\;\;\;t_6\\
\end{array}
Results
if b < -4.69441954824191357e81Initial program 60.1
Simplified60.6
Taylor expanded in x-scale around 0 56.1
Simplified56.3
Taylor expanded in b around inf 25.8
Applied egg-rr25.9
Applied egg-rr26.2
if -4.69441954824191357e81 < b < -1.3936038867054728e32 or -3.35000458373008151e-14 < b < -1.06103746344862355e-170 or -9.3746474247755867e-197 < b < 2.1551102717128373e-173 or 1.7900732988487222e47 < b < 3.1767141429136584e89Initial program 53.2
Simplified53.2
Taylor expanded in x-scale around 0 43.2
Simplified42.5
Taylor expanded in b around 0 28.0
Simplified26.4
if -1.3936038867054728e32 < b < -3.35000458373008151e-14Initial program 48.9
Simplified48.3
Taylor expanded in x-scale around 0 35.9
Simplified35.8
Taylor expanded in b around inf 37.0
Applied egg-rr37.0
if -1.06103746344862355e-170 < b < -9.3746474247755867e-197Initial program 59.2
Simplified59.4
Taylor expanded in x-scale around 0 47.4
Simplified47.1
Taylor expanded in b around inf 43.4
Applied egg-rr42.2
Applied egg-rr43.7
if 2.1551102717128373e-173 < b < 1.0591296397635784e-101 or 3.1767141429136584e89 < b Initial program 58.0
Simplified58.5
Taylor expanded in x-scale around 0 51.7
Simplified51.7
Taylor expanded in b around inf 29.6
Applied egg-rr29.3
Applied egg-rr30.0
if 1.0591296397635784e-101 < b < 1.03267770808854507e-62Initial program 49.2
Simplified49.0
Taylor expanded in x-scale around 0 36.5
Simplified37.2
Taylor expanded in b around 0 32.0
if 1.03267770808854507e-62 < b < 1.7900732988487222e47Initial program 48.3
Simplified48.9
Taylor expanded in x-scale around 0 38.3
Simplified36.8
Taylor expanded in b around inf 36.9
Applied egg-rr36.4
Applied egg-rr36.4
Final simplification28.9
herbie shell --seed 2022203
(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)))