
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (/ angle 180.0) PI))
(t_1 (cos t_0))
(t_2 (sin t_0))
(t_3
(/
(/ (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) t_2) t_1) x-scale)
y-scale))
(t_4
(/ (/ (+ (pow (* a t_1) 2.0) (pow (* b t_2) 2.0)) y-scale) y-scale))
(t_5
(/ (/ (+ (pow (* a t_2) 2.0) (pow (* b t_1) 2.0)) x-scale) x-scale)))
(*
180.0
(/
(atan
(/ (- (- t_4 t_5) (sqrt (+ (pow (- t_5 t_4) 2.0) (pow t_3 2.0)))) t_3))
PI))))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (angle / 180.0) * ((double) M_PI);
double t_1 = cos(t_0);
double t_2 = sin(t_0);
double t_3 = ((((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale;
double t_4 = ((pow((a * t_1), 2.0) + pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale;
double t_5 = ((pow((a * t_2), 2.0) + pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale;
return 180.0 * (atan((((t_4 - t_5) - sqrt((pow((t_5 - t_4), 2.0) + pow(t_3, 2.0)))) / t_3)) / ((double) M_PI));
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (angle / 180.0) * Math.PI;
double t_1 = Math.cos(t_0);
double t_2 = Math.sin(t_0);
double t_3 = ((((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale;
double t_4 = ((Math.pow((a * t_1), 2.0) + Math.pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale;
double t_5 = ((Math.pow((a * t_2), 2.0) + Math.pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale;
return 180.0 * (Math.atan((((t_4 - t_5) - Math.sqrt((Math.pow((t_5 - t_4), 2.0) + Math.pow(t_3, 2.0)))) / t_3)) / Math.PI);
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = (angle / 180.0) * math.pi t_1 = math.cos(t_0) t_2 = math.sin(t_0) t_3 = ((((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale t_4 = ((math.pow((a * t_1), 2.0) + math.pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale t_5 = ((math.pow((a * t_2), 2.0) + math.pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale return 180.0 * (math.atan((((t_4 - t_5) - math.sqrt((math.pow((t_5 - t_4), 2.0) + math.pow(t_3, 2.0)))) / t_3)) / math.pi)
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(angle / 180.0) * pi) t_1 = cos(t_0) t_2 = sin(t_0) t_3 = Float64(Float64(Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale) t_4 = Float64(Float64(Float64((Float64(a * t_1) ^ 2.0) + (Float64(b * t_2) ^ 2.0)) / y_45_scale) / y_45_scale) t_5 = Float64(Float64(Float64((Float64(a * t_2) ^ 2.0) + (Float64(b * t_1) ^ 2.0)) / x_45_scale) / x_45_scale) return Float64(180.0 * Float64(atan(Float64(Float64(Float64(t_4 - t_5) - sqrt(Float64((Float64(t_5 - t_4) ^ 2.0) + (t_3 ^ 2.0)))) / t_3)) / pi)) end
function tmp = code(a, b, angle, x_45_scale, y_45_scale) t_0 = (angle / 180.0) * pi; t_1 = cos(t_0); t_2 = sin(t_0); t_3 = ((((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale; t_4 = ((((a * t_1) ^ 2.0) + ((b * t_2) ^ 2.0)) / y_45_scale) / y_45_scale; t_5 = ((((a * t_2) ^ 2.0) + ((b * t_1) ^ 2.0)) / x_45_scale) / x_45_scale; tmp = 180.0 * (atan((((t_4 - t_5) - sqrt((((t_5 - t_4) ^ 2.0) + (t_3 ^ 2.0)))) / t_3)) / pi); end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(angle / 180.0), $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[(N[(N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] * t$95$1), $MachinePrecision] / x$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[Power[N[(a * t$95$1), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * t$95$2), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / y$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(N[Power[N[(a * t$95$2), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * t$95$1), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision] / x$45$scale), $MachinePrecision]}, N[(180.0 * N[(N[ArcTan[N[(N[(N[(t$95$4 - t$95$5), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(t$95$5 - t$95$4), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[t$95$3, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{angle}{180} \cdot \pi\\
t_1 := \cos t\_0\\
t_2 := \sin t\_0\\
t_3 := \frac{\frac{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot t\_2\right) \cdot t\_1}{x-scale}}{y-scale}\\
t_4 := \frac{\frac{{\left(a \cdot t\_1\right)}^{2} + {\left(b \cdot t\_2\right)}^{2}}{y-scale}}{y-scale}\\
t_5 := \frac{\frac{{\left(a \cdot t\_2\right)}^{2} + {\left(b \cdot t\_1\right)}^{2}}{x-scale}}{x-scale}\\
180 \cdot \frac{\tan^{-1} \left(\frac{\left(t\_4 - t\_5\right) - \sqrt{{\left(t\_5 - t\_4\right)}^{2} + {t\_3}^{2}}}{t\_3}\right)}{\pi}
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (/ angle 180.0) PI))
(t_1 (cos t_0))
(t_2 (sin t_0))
(t_3
(/
(/ (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) t_2) t_1) x-scale)
y-scale))
(t_4
(/ (/ (+ (pow (* a t_1) 2.0) (pow (* b t_2) 2.0)) y-scale) y-scale))
(t_5
(/ (/ (+ (pow (* a t_2) 2.0) (pow (* b t_1) 2.0)) x-scale) x-scale)))
(*
180.0
(/
(atan
(/ (- (- t_4 t_5) (sqrt (+ (pow (- t_5 t_4) 2.0) (pow t_3 2.0)))) t_3))
PI))))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (angle / 180.0) * ((double) M_PI);
double t_1 = cos(t_0);
double t_2 = sin(t_0);
double t_3 = ((((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale;
double t_4 = ((pow((a * t_1), 2.0) + pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale;
double t_5 = ((pow((a * t_2), 2.0) + pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale;
return 180.0 * (atan((((t_4 - t_5) - sqrt((pow((t_5 - t_4), 2.0) + pow(t_3, 2.0)))) / t_3)) / ((double) M_PI));
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (angle / 180.0) * Math.PI;
double t_1 = Math.cos(t_0);
double t_2 = Math.sin(t_0);
double t_3 = ((((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale;
double t_4 = ((Math.pow((a * t_1), 2.0) + Math.pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale;
double t_5 = ((Math.pow((a * t_2), 2.0) + Math.pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale;
return 180.0 * (Math.atan((((t_4 - t_5) - Math.sqrt((Math.pow((t_5 - t_4), 2.0) + Math.pow(t_3, 2.0)))) / t_3)) / Math.PI);
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = (angle / 180.0) * math.pi t_1 = math.cos(t_0) t_2 = math.sin(t_0) t_3 = ((((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale t_4 = ((math.pow((a * t_1), 2.0) + math.pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale t_5 = ((math.pow((a * t_2), 2.0) + math.pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale return 180.0 * (math.atan((((t_4 - t_5) - math.sqrt((math.pow((t_5 - t_4), 2.0) + math.pow(t_3, 2.0)))) / t_3)) / math.pi)
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(angle / 180.0) * pi) t_1 = cos(t_0) t_2 = sin(t_0) t_3 = Float64(Float64(Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale) t_4 = Float64(Float64(Float64((Float64(a * t_1) ^ 2.0) + (Float64(b * t_2) ^ 2.0)) / y_45_scale) / y_45_scale) t_5 = Float64(Float64(Float64((Float64(a * t_2) ^ 2.0) + (Float64(b * t_1) ^ 2.0)) / x_45_scale) / x_45_scale) return Float64(180.0 * Float64(atan(Float64(Float64(Float64(t_4 - t_5) - sqrt(Float64((Float64(t_5 - t_4) ^ 2.0) + (t_3 ^ 2.0)))) / t_3)) / pi)) end
function tmp = code(a, b, angle, x_45_scale, y_45_scale) t_0 = (angle / 180.0) * pi; t_1 = cos(t_0); t_2 = sin(t_0); t_3 = ((((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale; t_4 = ((((a * t_1) ^ 2.0) + ((b * t_2) ^ 2.0)) / y_45_scale) / y_45_scale; t_5 = ((((a * t_2) ^ 2.0) + ((b * t_1) ^ 2.0)) / x_45_scale) / x_45_scale; tmp = 180.0 * (atan((((t_4 - t_5) - sqrt((((t_5 - t_4) ^ 2.0) + (t_3 ^ 2.0)))) / t_3)) / pi); end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(angle / 180.0), $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[(N[(N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] * t$95$1), $MachinePrecision] / x$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[Power[N[(a * t$95$1), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * t$95$2), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / y$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(N[Power[N[(a * t$95$2), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * t$95$1), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision] / x$45$scale), $MachinePrecision]}, N[(180.0 * N[(N[ArcTan[N[(N[(N[(t$95$4 - t$95$5), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(t$95$5 - t$95$4), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[t$95$3, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{angle}{180} \cdot \pi\\
t_1 := \cos t\_0\\
t_2 := \sin t\_0\\
t_3 := \frac{\frac{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot t\_2\right) \cdot t\_1}{x-scale}}{y-scale}\\
t_4 := \frac{\frac{{\left(a \cdot t\_1\right)}^{2} + {\left(b \cdot t\_2\right)}^{2}}{y-scale}}{y-scale}\\
t_5 := \frac{\frac{{\left(a \cdot t\_2\right)}^{2} + {\left(b \cdot t\_1\right)}^{2}}{x-scale}}{x-scale}\\
180 \cdot \frac{\tan^{-1} \left(\frac{\left(t\_4 - t\_5\right) - \sqrt{{\left(t\_5 - t\_4\right)}^{2} + {t\_3}^{2}}}{t\_3}\right)}{\pi}
\end{array}
\end{array}
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (* 0.005555555555555556 angle) PI))
(t_1 (sin t_0))
(t_2 (cos t_0)))
(if (<= b_m 2.4e+90)
(* 180.0 (/ (atan (/ (* (/ y-scale x-scale) t_1) t_2)) PI))
(* 180.0 (/ (atan (* y-scale (/ (/ t_2 x-scale) (- t_1)))) PI)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (0.005555555555555556 * angle) * ((double) M_PI);
double t_1 = sin(t_0);
double t_2 = cos(t_0);
double tmp;
if (b_m <= 2.4e+90) {
tmp = 180.0 * (atan((((y_45_scale / x_45_scale) * t_1) / t_2)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((y_45_scale * ((t_2 / x_45_scale) / -t_1))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (0.005555555555555556 * angle) * Math.PI;
double t_1 = Math.sin(t_0);
double t_2 = Math.cos(t_0);
double tmp;
if (b_m <= 2.4e+90) {
tmp = 180.0 * (Math.atan((((y_45_scale / x_45_scale) * t_1) / t_2)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((y_45_scale * ((t_2 / x_45_scale) / -t_1))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): t_0 = (0.005555555555555556 * angle) * math.pi t_1 = math.sin(t_0) t_2 = math.cos(t_0) tmp = 0 if b_m <= 2.4e+90: tmp = 180.0 * (math.atan((((y_45_scale / x_45_scale) * t_1) / t_2)) / math.pi) else: tmp = 180.0 * (math.atan((y_45_scale * ((t_2 / x_45_scale) / -t_1))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(0.005555555555555556 * angle) * pi) t_1 = sin(t_0) t_2 = cos(t_0) tmp = 0.0 if (b_m <= 2.4e+90) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(y_45_scale / x_45_scale) * t_1) / t_2)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(y_45_scale * Float64(Float64(t_2 / x_45_scale) / Float64(-t_1)))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = (0.005555555555555556 * angle) * pi; t_1 = sin(t_0); t_2 = cos(t_0); tmp = 0.0; if (b_m <= 2.4e+90) tmp = 180.0 * (atan((((y_45_scale / x_45_scale) * t_1) / t_2)) / pi); else tmp = 180.0 * (atan((y_45_scale * ((t_2 / x_45_scale) / -t_1))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Cos[t$95$0], $MachinePrecision]}, If[LessEqual[b$95$m, 2.4e+90], N[(180.0 * N[(N[ArcTan[N[(N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * t$95$1), $MachinePrecision] / t$95$2), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(y$45$scale * N[(N[(t$95$2 / x$45$scale), $MachinePrecision] / (-t$95$1)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \left(0.005555555555555556 \cdot angle\right) \cdot \pi\\
t_1 := \sin t\_0\\
t_2 := \cos t\_0\\
\mathbf{if}\;b\_m \leq 2.4 \cdot 10^{+90}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\frac{y-scale}{x-scale} \cdot t\_1}{t\_2}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(y-scale \cdot \frac{\frac{t\_2}{x-scale}}{-t\_1}\right)}{\pi}\\
\end{array}
\end{array}
if b < 2.4000000000000001e90Initial program 15.1%
Simplified14.1%
Taylor expanded in x-scale around 0 27.5%
Simplified30.8%
Taylor expanded in a around inf 49.7%
times-frac51.8%
Simplified51.8%
associate-*r/51.8%
associate-*r*50.6%
associate-*r*51.3%
Applied egg-rr51.3%
if 2.4000000000000001e90 < b Initial program 4.6%
Simplified2.3%
Taylor expanded in x-scale around 0 11.3%
Simplified11.6%
add-cbrt-cube11.6%
Applied egg-rr11.6%
Taylor expanded in a around 0 64.9%
mul-1-neg64.9%
associate-/l*64.9%
distribute-lft-neg-in64.9%
associate-/r*64.9%
associate-*r*63.7%
*-commutative63.7%
associate-*r*69.2%
*-commutative69.2%
Simplified69.2%
Final simplification54.4%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (* 0.005555555555555556 angle) PI))
(t_1 (sin t_0))
(t_2 (cos t_0)))
(if (<= b_m 3.2e+90)
(* 180.0 (/ (atan (/ (* (/ y-scale x-scale) t_1) t_2)) PI))
(* 180.0 (/ (atan (* (/ t_2 t_1) (/ y-scale (- x-scale)))) PI)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (0.005555555555555556 * angle) * ((double) M_PI);
double t_1 = sin(t_0);
double t_2 = cos(t_0);
double tmp;
if (b_m <= 3.2e+90) {
tmp = 180.0 * (atan((((y_45_scale / x_45_scale) * t_1) / t_2)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((t_2 / t_1) * (y_45_scale / -x_45_scale))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (0.005555555555555556 * angle) * Math.PI;
double t_1 = Math.sin(t_0);
double t_2 = Math.cos(t_0);
double tmp;
if (b_m <= 3.2e+90) {
tmp = 180.0 * (Math.atan((((y_45_scale / x_45_scale) * t_1) / t_2)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((t_2 / t_1) * (y_45_scale / -x_45_scale))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): t_0 = (0.005555555555555556 * angle) * math.pi t_1 = math.sin(t_0) t_2 = math.cos(t_0) tmp = 0 if b_m <= 3.2e+90: tmp = 180.0 * (math.atan((((y_45_scale / x_45_scale) * t_1) / t_2)) / math.pi) else: tmp = 180.0 * (math.atan(((t_2 / t_1) * (y_45_scale / -x_45_scale))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(0.005555555555555556 * angle) * pi) t_1 = sin(t_0) t_2 = cos(t_0) tmp = 0.0 if (b_m <= 3.2e+90) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(y_45_scale / x_45_scale) * t_1) / t_2)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(t_2 / t_1) * Float64(y_45_scale / Float64(-x_45_scale)))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = (0.005555555555555556 * angle) * pi; t_1 = sin(t_0); t_2 = cos(t_0); tmp = 0.0; if (b_m <= 3.2e+90) tmp = 180.0 * (atan((((y_45_scale / x_45_scale) * t_1) / t_2)) / pi); else tmp = 180.0 * (atan(((t_2 / t_1) * (y_45_scale / -x_45_scale))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Cos[t$95$0], $MachinePrecision]}, If[LessEqual[b$95$m, 3.2e+90], N[(180.0 * N[(N[ArcTan[N[(N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * t$95$1), $MachinePrecision] / t$95$2), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(t$95$2 / t$95$1), $MachinePrecision] * N[(y$45$scale / (-x$45$scale)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \left(0.005555555555555556 \cdot angle\right) \cdot \pi\\
t_1 := \sin t\_0\\
t_2 := \cos t\_0\\
\mathbf{if}\;b\_m \leq 3.2 \cdot 10^{+90}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\frac{y-scale}{x-scale} \cdot t\_1}{t\_2}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{t\_2}{t\_1} \cdot \frac{y-scale}{-x-scale}\right)}{\pi}\\
\end{array}
\end{array}
if b < 3.19999999999999998e90Initial program 15.1%
Simplified14.1%
Taylor expanded in x-scale around 0 27.5%
Simplified30.8%
Taylor expanded in a around inf 49.7%
times-frac51.8%
Simplified51.8%
associate-*r/51.8%
associate-*r*50.6%
associate-*r*51.3%
Applied egg-rr51.3%
if 3.19999999999999998e90 < b Initial program 4.6%
Simplified2.3%
Taylor expanded in x-scale around 0 2.5%
associate-*r/2.5%
Simplified2.7%
Taylor expanded in a around 0 64.9%
mul-1-neg64.9%
times-frac62.9%
associate-*r*61.7%
*-commutative61.7%
associate-*r*67.2%
*-commutative67.2%
Simplified67.2%
Final simplification54.1%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (* 0.005555555555555556 angle) PI))
(t_1 (* 0.005555555555555556 (* angle PI))))
(if (<= b_m 1.02e+90)
(* 180.0 (/ (atan (/ (* (/ y-scale x-scale) (sin t_0)) (cos t_0))) PI))
(*
180.0
(/ (atan (* (/ (cos t_1) (sin t_1)) (/ y-scale (- x-scale)))) PI)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (0.005555555555555556 * angle) * ((double) M_PI);
double t_1 = 0.005555555555555556 * (angle * ((double) M_PI));
double tmp;
if (b_m <= 1.02e+90) {
tmp = 180.0 * (atan((((y_45_scale / x_45_scale) * sin(t_0)) / cos(t_0))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((cos(t_1) / sin(t_1)) * (y_45_scale / -x_45_scale))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (0.005555555555555556 * angle) * Math.PI;
double t_1 = 0.005555555555555556 * (angle * Math.PI);
double tmp;
if (b_m <= 1.02e+90) {
tmp = 180.0 * (Math.atan((((y_45_scale / x_45_scale) * Math.sin(t_0)) / Math.cos(t_0))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((Math.cos(t_1) / Math.sin(t_1)) * (y_45_scale / -x_45_scale))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): t_0 = (0.005555555555555556 * angle) * math.pi t_1 = 0.005555555555555556 * (angle * math.pi) tmp = 0 if b_m <= 1.02e+90: tmp = 180.0 * (math.atan((((y_45_scale / x_45_scale) * math.sin(t_0)) / math.cos(t_0))) / math.pi) else: tmp = 180.0 * (math.atan(((math.cos(t_1) / math.sin(t_1)) * (y_45_scale / -x_45_scale))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(0.005555555555555556 * angle) * pi) t_1 = Float64(0.005555555555555556 * Float64(angle * pi)) tmp = 0.0 if (b_m <= 1.02e+90) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(y_45_scale / x_45_scale) * sin(t_0)) / cos(t_0))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(cos(t_1) / sin(t_1)) * Float64(y_45_scale / Float64(-x_45_scale)))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = (0.005555555555555556 * angle) * pi; t_1 = 0.005555555555555556 * (angle * pi); tmp = 0.0; if (b_m <= 1.02e+90) tmp = 180.0 * (atan((((y_45_scale / x_45_scale) * sin(t_0)) / cos(t_0))) / pi); else tmp = 180.0 * (atan(((cos(t_1) / sin(t_1)) * (y_45_scale / -x_45_scale))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$1 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 1.02e+90], N[(180.0 * N[(N[ArcTan[N[(N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] / N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[Cos[t$95$1], $MachinePrecision] / N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision] * N[(y$45$scale / (-x$45$scale)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \left(0.005555555555555556 \cdot angle\right) \cdot \pi\\
t_1 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;b\_m \leq 1.02 \cdot 10^{+90}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\frac{y-scale}{x-scale} \cdot \sin t\_0}{\cos t\_0}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\cos t\_1}{\sin t\_1} \cdot \frac{y-scale}{-x-scale}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.02000000000000005e90Initial program 15.2%
Simplified14.1%
Taylor expanded in x-scale around 0 27.5%
Simplified30.8%
Taylor expanded in a around inf 49.9%
times-frac52.1%
Simplified52.1%
associate-*r/52.1%
associate-*r*50.8%
associate-*r*51.4%
Applied egg-rr51.4%
if 1.02000000000000005e90 < b Initial program 4.5%
Simplified2.3%
Taylor expanded in x-scale around 0 11.5%
Simplified11.8%
Taylor expanded in a around 0 63.9%
mul-1-neg63.9%
times-frac61.9%
Simplified61.9%
Final simplification53.3%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (* 0.005555555555555556 angle) PI)))
(if (<= b_m 2.4e+90)
(* 180.0 (/ (atan (/ (* (/ y-scale x-scale) (sin t_0)) (cos t_0))) PI))
(* 180.0 (/ (atan (* (/ y-scale angle) (/ -180.0 (* x-scale PI)))) PI)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (0.005555555555555556 * angle) * ((double) M_PI);
double tmp;
if (b_m <= 2.4e+90) {
tmp = 180.0 * (atan((((y_45_scale / x_45_scale) * sin(t_0)) / cos(t_0))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((y_45_scale / angle) * (-180.0 / (x_45_scale * ((double) M_PI))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (0.005555555555555556 * angle) * Math.PI;
double tmp;
if (b_m <= 2.4e+90) {
tmp = 180.0 * (Math.atan((((y_45_scale / x_45_scale) * Math.sin(t_0)) / Math.cos(t_0))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((y_45_scale / angle) * (-180.0 / (x_45_scale * Math.PI)))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): t_0 = (0.005555555555555556 * angle) * math.pi tmp = 0 if b_m <= 2.4e+90: tmp = 180.0 * (math.atan((((y_45_scale / x_45_scale) * math.sin(t_0)) / math.cos(t_0))) / math.pi) else: tmp = 180.0 * (math.atan(((y_45_scale / angle) * (-180.0 / (x_45_scale * math.pi)))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(0.005555555555555556 * angle) * pi) tmp = 0.0 if (b_m <= 2.4e+90) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(y_45_scale / x_45_scale) * sin(t_0)) / cos(t_0))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / angle) * Float64(-180.0 / Float64(x_45_scale * pi)))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = (0.005555555555555556 * angle) * pi; tmp = 0.0; if (b_m <= 2.4e+90) tmp = 180.0 * (atan((((y_45_scale / x_45_scale) * sin(t_0)) / cos(t_0))) / pi); else tmp = 180.0 * (atan(((y_45_scale / angle) * (-180.0 / (x_45_scale * pi)))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]}, If[LessEqual[b$95$m, 2.4e+90], N[(180.0 * N[(N[ArcTan[N[(N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] / N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / angle), $MachinePrecision] * N[(-180.0 / N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \left(0.005555555555555556 \cdot angle\right) \cdot \pi\\
\mathbf{if}\;b\_m \leq 2.4 \cdot 10^{+90}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\frac{y-scale}{x-scale} \cdot \sin t\_0}{\cos t\_0}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{angle} \cdot \frac{-180}{x-scale \cdot \pi}\right)}{\pi}\\
\end{array}
\end{array}
if b < 2.4000000000000001e90Initial program 15.1%
Simplified14.1%
Taylor expanded in x-scale around 0 27.5%
Simplified30.8%
Taylor expanded in a around inf 49.7%
times-frac51.8%
Simplified51.8%
associate-*r/51.8%
associate-*r*50.6%
associate-*r*51.3%
Applied egg-rr51.3%
if 2.4000000000000001e90 < b Initial program 4.6%
Simplified2.3%
Taylor expanded in angle around 0 2.4%
times-frac4.6%
distribute-lft-out--4.6%
Simplified4.6%
Taylor expanded in a around 0 51.0%
associate-*r/51.0%
associate-/r*51.0%
Applied egg-rr51.0%
associate-*r/51.0%
associate-/l/51.0%
*-commutative51.0%
associate-/l*51.0%
*-commutative51.0%
times-frac51.1%
*-commutative51.1%
Simplified51.1%
Final simplification51.2%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 1.22e+91)
(/
(*
180.0
(atan
(* (/ y-scale x-scale) (tan (* (* 0.005555555555555556 angle) PI)))))
PI)
(* 180.0 (/ (atan (* (/ y-scale angle) (/ -180.0 (* x-scale PI)))) PI))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 1.22e+91) {
tmp = (180.0 * atan(((y_45_scale / x_45_scale) * tan(((0.005555555555555556 * angle) * ((double) M_PI)))))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((y_45_scale / angle) * (-180.0 / (x_45_scale * ((double) M_PI))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 1.22e+91) {
tmp = (180.0 * Math.atan(((y_45_scale / x_45_scale) * Math.tan(((0.005555555555555556 * angle) * Math.PI))))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((y_45_scale / angle) * (-180.0 / (x_45_scale * Math.PI)))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if b_m <= 1.22e+91: tmp = (180.0 * math.atan(((y_45_scale / x_45_scale) * math.tan(((0.005555555555555556 * angle) * math.pi))))) / math.pi else: tmp = 180.0 * (math.atan(((y_45_scale / angle) * (-180.0 / (x_45_scale * math.pi)))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 1.22e+91) tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale / x_45_scale) * tan(Float64(Float64(0.005555555555555556 * angle) * pi))))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / angle) * Float64(-180.0 / Float64(x_45_scale * pi)))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 1.22e+91) tmp = (180.0 * atan(((y_45_scale / x_45_scale) * tan(((0.005555555555555556 * angle) * pi))))) / pi; else tmp = 180.0 * (atan(((y_45_scale / angle) * (-180.0 / (x_45_scale * pi)))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 1.22e+91], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Tan[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / angle), $MachinePrecision] * N[(-180.0 / N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 1.22 \cdot 10^{+91}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{angle} \cdot \frac{-180}{x-scale \cdot \pi}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.2199999999999999e91Initial program 15.1%
Simplified14.1%
Taylor expanded in x-scale around 0 27.5%
Simplified30.8%
Taylor expanded in a around inf 49.7%
times-frac51.8%
Simplified51.8%
associate-*r/51.8%
quot-tan51.8%
associate-*r*51.3%
Applied egg-rr51.3%
if 1.2199999999999999e91 < b Initial program 4.6%
Simplified2.3%
Taylor expanded in angle around 0 2.4%
times-frac4.6%
distribute-lft-out--4.6%
Simplified4.6%
Taylor expanded in a around 0 51.0%
associate-*r/51.0%
associate-/r*51.0%
Applied egg-rr51.0%
associate-*r/51.0%
associate-/l/51.0%
*-commutative51.0%
associate-/l*51.0%
*-commutative51.0%
times-frac51.1%
*-commutative51.1%
Simplified51.1%
Final simplification51.2%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 1.58e+94)
(*
180.0
(/
(atan (* (/ y-scale x-scale) (tan (* 0.005555555555555556 (* angle PI)))))
PI))
(* 180.0 (/ (atan (* (/ y-scale angle) (/ -180.0 (* x-scale PI)))) PI))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 1.58e+94) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * tan((0.005555555555555556 * (angle * ((double) M_PI)))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((y_45_scale / angle) * (-180.0 / (x_45_scale * ((double) M_PI))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 1.58e+94) {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * Math.tan((0.005555555555555556 * (angle * Math.PI))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((y_45_scale / angle) * (-180.0 / (x_45_scale * Math.PI)))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if b_m <= 1.58e+94: tmp = 180.0 * (math.atan(((y_45_scale / x_45_scale) * math.tan((0.005555555555555556 * (angle * math.pi))))) / math.pi) else: tmp = 180.0 * (math.atan(((y_45_scale / angle) * (-180.0 / (x_45_scale * math.pi)))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 1.58e+94) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * tan(Float64(0.005555555555555556 * Float64(angle * pi))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / angle) * Float64(-180.0 / Float64(x_45_scale * pi)))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 1.58e+94) tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * tan((0.005555555555555556 * (angle * pi))))) / pi); else tmp = 180.0 * (atan(((y_45_scale / angle) * (-180.0 / (x_45_scale * pi)))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 1.58e+94], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Tan[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / angle), $MachinePrecision] * N[(-180.0 / N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 1.58 \cdot 10^{+94}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{angle} \cdot \frac{-180}{x-scale \cdot \pi}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.58e94Initial program 15.1%
Simplified14.1%
Taylor expanded in x-scale around 0 27.5%
Simplified30.8%
Taylor expanded in a around inf 49.7%
times-frac51.8%
Simplified51.8%
add-cbrt-cube42.6%
pow1/329.9%
Applied egg-rr29.4%
Taylor expanded in y-scale around 0 49.7%
associate-*r*49.1%
*-commutative49.1%
associate-*l/51.3%
*-commutative51.3%
associate-*r*51.8%
Simplified51.8%
if 1.58e94 < b Initial program 4.6%
Simplified2.3%
Taylor expanded in angle around 0 2.4%
times-frac4.6%
distribute-lft-out--4.6%
Simplified4.6%
Taylor expanded in a around 0 51.0%
associate-*r/51.0%
associate-/r*51.0%
Applied egg-rr51.0%
associate-*r/51.0%
associate-/l/51.0%
*-commutative51.0%
associate-/l*51.0%
*-commutative51.0%
times-frac51.1%
*-commutative51.1%
Simplified51.1%
Final simplification51.7%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 1.22e+98)
(*
180.0
(/
(atan (* y-scale (/ (tan (* 0.005555555555555556 (* angle PI))) x-scale)))
PI))
(* 180.0 (/ (atan (* (/ y-scale angle) (/ -180.0 (* x-scale PI)))) PI))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 1.22e+98) {
tmp = 180.0 * (atan((y_45_scale * (tan((0.005555555555555556 * (angle * ((double) M_PI)))) / x_45_scale))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((y_45_scale / angle) * (-180.0 / (x_45_scale * ((double) M_PI))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 1.22e+98) {
tmp = 180.0 * (Math.atan((y_45_scale * (Math.tan((0.005555555555555556 * (angle * Math.PI))) / x_45_scale))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((y_45_scale / angle) * (-180.0 / (x_45_scale * Math.PI)))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if b_m <= 1.22e+98: tmp = 180.0 * (math.atan((y_45_scale * (math.tan((0.005555555555555556 * (angle * math.pi))) / x_45_scale))) / math.pi) else: tmp = 180.0 * (math.atan(((y_45_scale / angle) * (-180.0 / (x_45_scale * math.pi)))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 1.22e+98) tmp = Float64(180.0 * Float64(atan(Float64(y_45_scale * Float64(tan(Float64(0.005555555555555556 * Float64(angle * pi))) / x_45_scale))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / angle) * Float64(-180.0 / Float64(x_45_scale * pi)))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 1.22e+98) tmp = 180.0 * (atan((y_45_scale * (tan((0.005555555555555556 * (angle * pi))) / x_45_scale))) / pi); else tmp = 180.0 * (atan(((y_45_scale / angle) * (-180.0 / (x_45_scale * pi)))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 1.22e+98], N[(180.0 * N[(N[ArcTan[N[(y$45$scale * N[(N[Tan[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / angle), $MachinePrecision] * N[(-180.0 / N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 1.22 \cdot 10^{+98}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(y-scale \cdot \frac{\tan \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}{x-scale}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{angle} \cdot \frac{-180}{x-scale \cdot \pi}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.22e98Initial program 15.1%
Simplified14.1%
Taylor expanded in x-scale around 0 27.5%
Simplified30.8%
Taylor expanded in a around inf 49.7%
times-frac51.8%
Simplified51.8%
associate-*r/51.8%
quot-tan51.8%
associate-*r*51.3%
Applied egg-rr51.3%
associate-*r/51.3%
associate-*l/49.1%
associate-/l*48.6%
associate-*r*49.2%
Simplified49.2%
if 1.22e98 < b Initial program 4.6%
Simplified2.3%
Taylor expanded in angle around 0 2.4%
times-frac4.6%
distribute-lft-out--4.6%
Simplified4.6%
Taylor expanded in a around 0 51.0%
associate-*r/51.0%
associate-/r*51.0%
Applied egg-rr51.0%
associate-*r/51.0%
associate-/l/51.0%
*-commutative51.0%
associate-/l*51.0%
*-commutative51.0%
times-frac51.1%
*-commutative51.1%
Simplified51.1%
Final simplification49.5%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= a 8.2e-70)
(* 180.0 (/ (atan (* (/ y-scale angle) (/ -180.0 (* x-scale PI)))) PI))
(*
180.0
(/
(atan (* 0.005555555555555556 (* angle (* y-scale (/ PI x-scale)))))
PI))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (a <= 8.2e-70) {
tmp = 180.0 * (atan(((y_45_scale / angle) * (-180.0 / (x_45_scale * ((double) M_PI))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.005555555555555556 * (angle * (y_45_scale * (((double) M_PI) / x_45_scale))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (a <= 8.2e-70) {
tmp = 180.0 * (Math.atan(((y_45_scale / angle) * (-180.0 / (x_45_scale * Math.PI)))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((0.005555555555555556 * (angle * (y_45_scale * (Math.PI / x_45_scale))))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if a <= 8.2e-70: tmp = 180.0 * (math.atan(((y_45_scale / angle) * (-180.0 / (x_45_scale * math.pi)))) / math.pi) else: tmp = 180.0 * (math.atan((0.005555555555555556 * (angle * (y_45_scale * (math.pi / x_45_scale))))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (a <= 8.2e-70) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / angle) * Float64(-180.0 / Float64(x_45_scale * pi)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(0.005555555555555556 * Float64(angle * Float64(y_45_scale * Float64(pi / x_45_scale))))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (a <= 8.2e-70) tmp = 180.0 * (atan(((y_45_scale / angle) * (-180.0 / (x_45_scale * pi)))) / pi); else tmp = 180.0 * (atan((0.005555555555555556 * (angle * (y_45_scale * (pi / x_45_scale))))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[a, 8.2e-70], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / angle), $MachinePrecision] * N[(-180.0 / N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.005555555555555556 * N[(angle * N[(y$45$scale * N[(Pi / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;a \leq 8.2 \cdot 10^{-70}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{angle} \cdot \frac{-180}{x-scale \cdot \pi}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.005555555555555556 \cdot \left(angle \cdot \left(y-scale \cdot \frac{\pi}{x-scale}\right)\right)\right)}{\pi}\\
\end{array}
\end{array}
if a < 8.19999999999999955e-70Initial program 12.3%
Simplified10.9%
Taylor expanded in angle around 0 12.1%
times-frac11.4%
distribute-lft-out--11.4%
Simplified11.4%
Taylor expanded in a around 0 40.0%
associate-*r/40.0%
associate-/r*40.0%
Applied egg-rr40.0%
associate-*r/40.0%
associate-/l/40.0%
*-commutative40.0%
associate-/l*40.0%
*-commutative40.0%
times-frac40.1%
*-commutative40.1%
Simplified40.1%
if 8.19999999999999955e-70 < a Initial program 15.1%
Simplified14.1%
Taylor expanded in x-scale around 0 26.2%
Simplified31.0%
Taylor expanded in a around inf 51.6%
times-frac53.8%
Simplified53.8%
Taylor expanded in angle around 0 48.6%
associate-/l*50.7%
associate-/l*50.7%
Simplified50.7%
Final simplification43.7%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= a 5e-66)
(* 180.0 (/ (atan (* -180.0 (/ y-scale (* angle (* x-scale PI))))) PI))
(*
180.0
(/
(atan (* 0.005555555555555556 (* angle (* y-scale (/ PI x-scale)))))
PI))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (a <= 5e-66) {
tmp = 180.0 * (atan((-180.0 * (y_45_scale / (angle * (x_45_scale * ((double) M_PI)))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.005555555555555556 * (angle * (y_45_scale * (((double) M_PI) / x_45_scale))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (a <= 5e-66) {
tmp = 180.0 * (Math.atan((-180.0 * (y_45_scale / (angle * (x_45_scale * Math.PI))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((0.005555555555555556 * (angle * (y_45_scale * (Math.PI / x_45_scale))))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if a <= 5e-66: tmp = 180.0 * (math.atan((-180.0 * (y_45_scale / (angle * (x_45_scale * math.pi))))) / math.pi) else: tmp = 180.0 * (math.atan((0.005555555555555556 * (angle * (y_45_scale * (math.pi / x_45_scale))))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (a <= 5e-66) tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(y_45_scale / Float64(angle * Float64(x_45_scale * pi))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(0.005555555555555556 * Float64(angle * Float64(y_45_scale * Float64(pi / x_45_scale))))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (a <= 5e-66) tmp = 180.0 * (atan((-180.0 * (y_45_scale / (angle * (x_45_scale * pi))))) / pi); else tmp = 180.0 * (atan((0.005555555555555556 * (angle * (y_45_scale * (pi / x_45_scale))))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[a, 5e-66], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(y$45$scale / N[(angle * N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.005555555555555556 * N[(angle * N[(y$45$scale * N[(Pi / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;a \leq 5 \cdot 10^{-66}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.005555555555555556 \cdot \left(angle \cdot \left(y-scale \cdot \frac{\pi}{x-scale}\right)\right)\right)}{\pi}\\
\end{array}
\end{array}
if a < 4.99999999999999962e-66Initial program 12.3%
Simplified10.9%
Taylor expanded in angle around 0 12.1%
times-frac11.4%
distribute-lft-out--11.4%
Simplified11.4%
Taylor expanded in a around 0 40.0%
if 4.99999999999999962e-66 < a Initial program 15.1%
Simplified14.1%
Taylor expanded in x-scale around 0 26.2%
Simplified31.0%
Taylor expanded in a around inf 51.6%
times-frac53.8%
Simplified53.8%
Taylor expanded in angle around 0 48.6%
associate-/l*50.7%
associate-/l*50.7%
Simplified50.7%
b_m = (fabs.f64 b) (FPCore (a b_m angle x-scale y-scale) :precision binary64 (* 180.0 (/ (atan (* -180.0 (/ y-scale (* angle (* x-scale PI))))) PI)))
b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (atan((-180.0 * (y_45_scale / (angle * (x_45_scale * ((double) M_PI)))))) / ((double) M_PI));
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (Math.atan((-180.0 * (y_45_scale / (angle * (x_45_scale * Math.PI))))) / Math.PI);
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): return 180.0 * (math.atan((-180.0 * (y_45_scale / (angle * (x_45_scale * math.pi))))) / math.pi)
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) return Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(y_45_scale / Float64(angle * Float64(x_45_scale * pi))))) / pi)) end
b_m = abs(b); function tmp = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 180.0 * (atan((-180.0 * (y_45_scale / (angle * (x_45_scale * pi))))) / pi); end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(y$45$scale / N[(angle * N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)}{\pi}
\end{array}
Initial program 13.3%
Simplified12.0%
Taylor expanded in angle around 0 11.0%
times-frac10.5%
distribute-lft-out--10.5%
Simplified10.5%
Taylor expanded in a around 0 33.3%
b_m = (fabs.f64 b) (FPCore (a b_m angle x-scale y-scale) :precision binary64 (* 180.0 (/ (atan (* -180.0 (/ x-scale (* PI (* y-scale angle))))) PI)))
b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (atan((-180.0 * (x_45_scale / (((double) M_PI) * (y_45_scale * angle))))) / ((double) M_PI));
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (Math.atan((-180.0 * (x_45_scale / (Math.PI * (y_45_scale * angle))))) / Math.PI);
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): return 180.0 * (math.atan((-180.0 * (x_45_scale / (math.pi * (y_45_scale * angle))))) / math.pi)
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) return Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(x_45_scale / Float64(pi * Float64(y_45_scale * angle))))) / pi)) end
b_m = abs(b); function tmp = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 180.0 * (atan((-180.0 * (x_45_scale / (pi * (y_45_scale * angle))))) / pi); end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(x$45$scale / N[(Pi * N[(y$45$scale * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{x-scale}{\pi \cdot \left(y-scale \cdot angle\right)}\right)}{\pi}
\end{array}
Initial program 13.3%
Simplified12.0%
Taylor expanded in angle around 0 11.0%
times-frac10.5%
distribute-lft-out--10.5%
Simplified10.5%
Taylor expanded in a around inf 11.0%
add-cbrt-cube9.1%
pow1/36.3%
pow36.3%
Applied egg-rr6.3%
Taylor expanded in x-scale around 0 11.0%
associate-*r*11.0%
Simplified11.0%
Final simplification11.0%
b_m = (fabs.f64 b) (FPCore (a b_m angle x-scale y-scale) :precision binary64 (* 180.0 (/ (atan (* -180.0 (/ x-scale (* angle (* y-scale PI))))) PI)))
b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (atan((-180.0 * (x_45_scale / (angle * (y_45_scale * ((double) M_PI)))))) / ((double) M_PI));
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (Math.atan((-180.0 * (x_45_scale / (angle * (y_45_scale * Math.PI))))) / Math.PI);
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): return 180.0 * (math.atan((-180.0 * (x_45_scale / (angle * (y_45_scale * math.pi))))) / math.pi)
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) return Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(x_45_scale / Float64(angle * Float64(y_45_scale * pi))))) / pi)) end
b_m = abs(b); function tmp = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 180.0 * (atan((-180.0 * (x_45_scale / (angle * (y_45_scale * pi))))) / pi); end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(x$45$scale / N[(angle * N[(y$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{x-scale}{angle \cdot \left(y-scale \cdot \pi\right)}\right)}{\pi}
\end{array}
Initial program 13.3%
Simplified12.0%
Taylor expanded in angle around 0 11.0%
times-frac10.5%
distribute-lft-out--10.5%
Simplified10.5%
Taylor expanded in a around inf 11.0%
herbie shell --seed 2024177
(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)))