
(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 13 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 9.5e-34)
(* 180.0 (/ (atan (* (/ y-scale x-scale) (/ t_1 t_2))) PI))
(if (<= b_m 2.35e+76)
(*
180.0
(/
(atan
(*
-0.5
(*
y-scale
(*
(/ 2.0 (* x-scale t_2))
(/
(pow (hypot (* t_1 a) (* b_m t_2)) 2.0)
(* t_1 (- (pow b_m 2.0) (pow a 2.0))))))))
PI))
(*
180.0
(/
(atan
(*
-0.5
(*
y-scale
(*
2.0
(/
(cos (* angle (* PI -0.005555555555555556)))
(* 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 <= 9.5e-34) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * (t_1 / t_2))) / ((double) M_PI));
} else if (b_m <= 2.35e+76) {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * ((2.0 / (x_45_scale * t_2)) * (pow(hypot((t_1 * a), (b_m * t_2)), 2.0) / (t_1 * (pow(b_m, 2.0) - pow(a, 2.0)))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * (2.0 * (cos((angle * (((double) M_PI) * -0.005555555555555556))) / (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 <= 9.5e-34) {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * (t_1 / t_2))) / Math.PI);
} else if (b_m <= 2.35e+76) {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * ((2.0 / (x_45_scale * t_2)) * (Math.pow(Math.hypot((t_1 * a), (b_m * t_2)), 2.0) / (t_1 * (Math.pow(b_m, 2.0) - Math.pow(a, 2.0)))))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * (2.0 * (Math.cos((angle * (Math.PI * -0.005555555555555556))) / (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 <= 9.5e-34: tmp = 180.0 * (math.atan(((y_45_scale / x_45_scale) * (t_1 / t_2))) / math.pi) elif b_m <= 2.35e+76: tmp = 180.0 * (math.atan((-0.5 * (y_45_scale * ((2.0 / (x_45_scale * t_2)) * (math.pow(math.hypot((t_1 * a), (b_m * t_2)), 2.0) / (t_1 * (math.pow(b_m, 2.0) - math.pow(a, 2.0)))))))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (y_45_scale * (2.0 * (math.cos((angle * (math.pi * -0.005555555555555556))) / (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(0.005555555555555556 * Float64(angle * pi)) t_1 = sin(t_0) t_2 = cos(t_0) tmp = 0.0 if (b_m <= 9.5e-34) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * Float64(t_1 / t_2))) / pi)); elseif (b_m <= 2.35e+76) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(Float64(2.0 / Float64(x_45_scale * t_2)) * Float64((hypot(Float64(t_1 * a), Float64(b_m * t_2)) ^ 2.0) / Float64(t_1 * Float64((b_m ^ 2.0) - (a ^ 2.0)))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(2.0 * Float64(cos(Float64(angle * Float64(pi * -0.005555555555555556))) / Float64(x_45_scale * 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 <= 9.5e-34) tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * (t_1 / t_2))) / pi); elseif (b_m <= 2.35e+76) tmp = 180.0 * (atan((-0.5 * (y_45_scale * ((2.0 / (x_45_scale * t_2)) * ((hypot((t_1 * a), (b_m * t_2)) ^ 2.0) / (t_1 * ((b_m ^ 2.0) - (a ^ 2.0)))))))) / pi); else tmp = 180.0 * (atan((-0.5 * (y_45_scale * (2.0 * (cos((angle * (pi * -0.005555555555555556))) / (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[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $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, 9.5e-34], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 2.35e+76], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(N[(2.0 / N[(x$45$scale * t$95$2), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sqrt[N[(t$95$1 * a), $MachinePrecision] ^ 2 + N[(b$95$m * t$95$2), $MachinePrecision] ^ 2], $MachinePrecision], 2.0], $MachinePrecision] / N[(t$95$1 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(2.0 * N[(N[Cos[N[(angle * N[(Pi * -0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(x$45$scale * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
t_2 := \cos t\_0\\
\mathbf{if}\;b\_m \leq 9.5 \cdot 10^{-34}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{t\_1}{t\_2}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 2.35 \cdot 10^{+76}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \left(\frac{2}{x-scale \cdot t\_2} \cdot \frac{{\left(\mathsf{hypot}\left(t\_1 \cdot a, b\_m \cdot t\_2\right)\right)}^{2}}{t\_1 \cdot \left({b\_m}^{2} - {a}^{2}\right)}\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \left(2 \cdot \frac{\cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)}{x-scale \cdot t\_1}\right)\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 9.49999999999999985e-34Initial program 17.1%
Simplified13.4%
Taylor expanded in x-scale around 0 28.0%
Simplified34.6%
Taylor expanded in a around inf 45.7%
times-frac48.8%
Simplified48.8%
if 9.49999999999999985e-34 < b < 2.3500000000000002e76Initial program 39.9%
Simplified39.8%
Taylor expanded in x-scale around 0 53.7%
Simplified53.9%
times-frac53.8%
*-commutative53.8%
Applied egg-rr53.8%
if 2.3500000000000002e76 < b Initial program 5.8%
Simplified3.9%
Taylor expanded in x-scale around 0 17.4%
Simplified17.6%
Taylor expanded in a around 0 71.0%
add-sqr-sqrt37.8%
pow237.8%
Applied egg-rr37.8%
Taylor expanded in angle around inf 72.1%
associate-*r*71.0%
unpow271.0%
rem-square-sqrt71.0%
metadata-eval71.0%
rem-square-sqrt0.0%
unpow20.0%
distribute-rgt-neg-in0.0%
associate-*r*0.0%
cos-neg0.0%
unpow20.0%
rem-square-sqrt72.1%
Simplified72.1%
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 (sin t_0)))
(if (<= b_m 7.6e-34)
(* 180.0 (/ (atan (* (/ y-scale x-scale) (/ t_1 (cos t_0)))) PI))
(*
180.0
(/
(atan
(*
-0.5
(*
y-scale
(*
2.0
(/ (cos (* angle (* PI -0.005555555555555556))) (* 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 tmp;
if (b_m <= 7.6e-34) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * (t_1 / cos(t_0)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * (2.0 * (cos((angle * (((double) M_PI) * -0.005555555555555556))) / (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 tmp;
if (b_m <= 7.6e-34) {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * (t_1 / Math.cos(t_0)))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * (2.0 * (Math.cos((angle * (Math.PI * -0.005555555555555556))) / (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) tmp = 0 if b_m <= 7.6e-34: tmp = 180.0 * (math.atan(((y_45_scale / x_45_scale) * (t_1 / math.cos(t_0)))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (y_45_scale * (2.0 * (math.cos((angle * (math.pi * -0.005555555555555556))) / (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(0.005555555555555556 * Float64(angle * pi)) t_1 = sin(t_0) tmp = 0.0 if (b_m <= 7.6e-34) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * Float64(t_1 / cos(t_0)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(2.0 * Float64(cos(Float64(angle * Float64(pi * -0.005555555555555556))) / Float64(x_45_scale * 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); tmp = 0.0; if (b_m <= 7.6e-34) tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * (t_1 / cos(t_0)))) / pi); else tmp = 180.0 * (atan((-0.5 * (y_45_scale * (2.0 * (cos((angle * (pi * -0.005555555555555556))) / (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[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[b$95$m, 7.6e-34], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(t$95$1 / N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(2.0 * N[(N[Cos[N[(angle * N[(Pi * -0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(x$45$scale * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
\mathbf{if}\;b\_m \leq 7.6 \cdot 10^{-34}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{t\_1}{\cos t\_0}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \left(2 \cdot \frac{\cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)}{x-scale \cdot t\_1}\right)\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 7.6000000000000002e-34Initial program 17.1%
Simplified13.4%
Taylor expanded in x-scale around 0 28.0%
Simplified34.6%
Taylor expanded in a around inf 45.7%
times-frac48.8%
Simplified48.8%
if 7.6000000000000002e-34 < b Initial program 16.1%
Simplified14.8%
Taylor expanded in x-scale around 0 28.4%
Simplified28.6%
Taylor expanded in a around 0 64.1%
add-sqr-sqrt35.2%
pow235.2%
Applied egg-rr35.2%
Taylor expanded in angle around inf 63.0%
associate-*r*64.1%
unpow264.1%
rem-square-sqrt64.1%
metadata-eval64.1%
rem-square-sqrt0.0%
unpow20.0%
distribute-rgt-neg-in0.0%
associate-*r*0.0%
cos-neg0.0%
unpow20.0%
rem-square-sqrt63.0%
Simplified63.0%
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)))
(if (<= b_m 1.75e-26)
(* 180.0 (/ (atan (* (/ y-scale x-scale) (/ t_1 (cos t_0)))) PI))
(*
180.0
(/ (atan (* -0.5 (* y-scale (* 2.0 (/ 1.0 (* 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 tmp;
if (b_m <= 1.75e-26) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * (t_1 / cos(t_0)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * (2.0 * (1.0 / (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 tmp;
if (b_m <= 1.75e-26) {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * (t_1 / Math.cos(t_0)))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * (2.0 * (1.0 / (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) tmp = 0 if b_m <= 1.75e-26: tmp = 180.0 * (math.atan(((y_45_scale / x_45_scale) * (t_1 / math.cos(t_0)))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (y_45_scale * (2.0 * (1.0 / (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(0.005555555555555556 * Float64(angle * pi)) t_1 = sin(t_0) tmp = 0.0 if (b_m <= 1.75e-26) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * Float64(t_1 / cos(t_0)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(2.0 * Float64(1.0 / Float64(x_45_scale * 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); tmp = 0.0; if (b_m <= 1.75e-26) tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * (t_1 / cos(t_0)))) / pi); else tmp = 180.0 * (atan((-0.5 * (y_45_scale * (2.0 * (1.0 / (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[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[b$95$m, 1.75e-26], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(t$95$1 / N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(2.0 * N[(1.0 / N[(x$45$scale * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
\mathbf{if}\;b\_m \leq 1.75 \cdot 10^{-26}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{t\_1}{\cos t\_0}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \left(2 \cdot \frac{1}{x-scale \cdot t\_1}\right)\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.74999999999999992e-26Initial program 17.4%
Simplified13.8%
Taylor expanded in x-scale around 0 28.3%
Simplified34.8%
Taylor expanded in a around inf 45.2%
times-frac48.3%
Simplified48.3%
if 1.74999999999999992e-26 < b Initial program 15.2%
Simplified13.8%
Taylor expanded in x-scale around 0 27.6%
Simplified27.8%
Taylor expanded in a around 0 64.3%
Taylor expanded in angle around 0 58.6%
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 0.044)
(* 180.0 (+ (- 1.0 (/ (atan (/ (/ y-scale x-scale) (tan t_0))) PI)) -1.0))
(*
180.0
(/
(atan (* -0.5 (* y-scale (* 2.0 (/ 1.0 (* x-scale (sin t_0)))))))
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 <= 0.044) {
tmp = 180.0 * ((1.0 - (atan(((y_45_scale / x_45_scale) / tan(t_0))) / ((double) M_PI))) + -1.0);
} else {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * (2.0 * (1.0 / (x_45_scale * sin(t_0))))))) / ((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 <= 0.044) {
tmp = 180.0 * ((1.0 - (Math.atan(((y_45_scale / x_45_scale) / Math.tan(t_0))) / Math.PI)) + -1.0);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * (2.0 * (1.0 / (x_45_scale * Math.sin(t_0))))))) / 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 <= 0.044: tmp = 180.0 * ((1.0 - (math.atan(((y_45_scale / x_45_scale) / math.tan(t_0))) / math.pi)) + -1.0) else: tmp = 180.0 * (math.atan((-0.5 * (y_45_scale * (2.0 * (1.0 / (x_45_scale * math.sin(t_0))))))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) tmp = 0.0 if (b_m <= 0.044) tmp = Float64(180.0 * Float64(Float64(1.0 - Float64(atan(Float64(Float64(y_45_scale / x_45_scale) / tan(t_0))) / pi)) + -1.0)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(2.0 * Float64(1.0 / Float64(x_45_scale * sin(t_0))))))) / 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 <= 0.044) tmp = 180.0 * ((1.0 - (atan(((y_45_scale / x_45_scale) / tan(t_0))) / pi)) + -1.0); else tmp = 180.0 * (atan((-0.5 * (y_45_scale * (2.0 * (1.0 / (x_45_scale * sin(t_0))))))) / 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[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 0.044], N[(180.0 * N[(N[(1.0 - N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] / N[Tan[t$95$0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(2.0 * N[(1.0 / N[(x$45$scale * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;b\_m \leq 0.044:\\
\;\;\;\;180 \cdot \left(\left(1 - \frac{\tan^{-1} \left(\frac{\frac{y-scale}{x-scale}}{\tan t\_0}\right)}{\pi}\right) + -1\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \left(2 \cdot \frac{1}{x-scale \cdot \sin t\_0}\right)\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 0.043999999999999997Initial program 17.5%
Simplified14.0%
Taylor expanded in x-scale around 0 28.7%
Simplified35.0%
Taylor expanded in a around 0 41.8%
mul-1-neg41.8%
times-frac42.9%
Simplified42.9%
expm1-log1p-u42.9%
expm1-undefine42.2%
Applied egg-rr42.2%
sub-neg42.2%
log1p-undefine42.2%
rem-exp-log42.2%
distribute-frac-neg42.2%
unsub-neg42.2%
associate-*r/42.2%
*-rgt-identity42.2%
metadata-eval42.2%
Simplified42.2%
if 0.043999999999999997 < b Initial program 14.8%
Simplified13.3%
Taylor expanded in x-scale around 0 26.5%
Simplified26.8%
Taylor expanded in a around 0 65.6%
Taylor expanded in angle around 0 61.2%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (tan (* 0.005555555555555556 (* angle PI)))))
(if (<= b_m 5.5e-41)
(* 180.0 (+ (- 1.0 (/ (atan (/ (/ y-scale x-scale) t_0)) PI)) -1.0))
(* 180.0 (/ (atan (/ (/ y-scale t_0) (- 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 = tan((0.005555555555555556 * (angle * ((double) M_PI))));
double tmp;
if (b_m <= 5.5e-41) {
tmp = 180.0 * ((1.0 - (atan(((y_45_scale / x_45_scale) / t_0)) / ((double) M_PI))) + -1.0);
} else {
tmp = 180.0 * (atan(((y_45_scale / t_0) / -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 = Math.tan((0.005555555555555556 * (angle * Math.PI)));
double tmp;
if (b_m <= 5.5e-41) {
tmp = 180.0 * ((1.0 - (Math.atan(((y_45_scale / x_45_scale) / t_0)) / Math.PI)) + -1.0);
} else {
tmp = 180.0 * (Math.atan(((y_45_scale / t_0) / -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 = math.tan((0.005555555555555556 * (angle * math.pi))) tmp = 0 if b_m <= 5.5e-41: tmp = 180.0 * ((1.0 - (math.atan(((y_45_scale / x_45_scale) / t_0)) / math.pi)) + -1.0) else: tmp = 180.0 * (math.atan(((y_45_scale / t_0) / -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 = tan(Float64(0.005555555555555556 * Float64(angle * pi))) tmp = 0.0 if (b_m <= 5.5e-41) tmp = Float64(180.0 * Float64(Float64(1.0 - Float64(atan(Float64(Float64(y_45_scale / x_45_scale) / t_0)) / pi)) + -1.0)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / t_0) / 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 = tan((0.005555555555555556 * (angle * pi))); tmp = 0.0; if (b_m <= 5.5e-41) tmp = 180.0 * ((1.0 - (atan(((y_45_scale / x_45_scale) / t_0)) / pi)) + -1.0); else tmp = 180.0 * (atan(((y_45_scale / t_0) / -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[Tan[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[b$95$m, 5.5e-41], N[(180.0 * N[(N[(1.0 - N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] / t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / t$95$0), $MachinePrecision] / (-x$45$scale)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \tan \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\\
\mathbf{if}\;b\_m \leq 5.5 \cdot 10^{-41}:\\
\;\;\;\;180 \cdot \left(\left(1 - \frac{\tan^{-1} \left(\frac{\frac{y-scale}{x-scale}}{t\_0}\right)}{\pi}\right) + -1\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\frac{y-scale}{t\_0}}{-x-scale}\right)}{\pi}\\
\end{array}
\end{array}
if b < 5.50000000000000022e-41Initial program 17.3%
Simplified13.6%
Taylor expanded in x-scale around 0 28.0%
Simplified34.7%
Taylor expanded in a around 0 41.8%
mul-1-neg41.8%
times-frac42.4%
Simplified42.4%
expm1-log1p-u42.4%
expm1-undefine42.2%
Applied egg-rr42.2%
sub-neg42.2%
log1p-undefine42.2%
rem-exp-log42.2%
distribute-frac-neg42.2%
unsub-neg42.2%
associate-*r/42.2%
*-rgt-identity42.2%
metadata-eval42.2%
Simplified42.2%
if 5.50000000000000022e-41 < b Initial program 15.7%
Simplified14.4%
Taylor expanded in x-scale around 0 28.3%
Simplified28.5%
Taylor expanded in a around 0 62.6%
mul-1-neg62.6%
times-frac61.5%
Simplified61.5%
neg-sub061.5%
clear-num61.5%
quot-tan61.5%
Applied egg-rr61.5%
sub0-neg61.5%
associate-*l/62.6%
distribute-neg-frac262.6%
associate-*r/62.7%
*-rgt-identity62.7%
Simplified62.7%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI))))
(if (<= x-scale -5.2e+70)
(* 180.0 (/ (atan (* (/ y-scale x-scale) (/ -1.0 (sin t_0)))) PI))
(* 180.0 (/ (atan (/ (/ y-scale x-scale) (tan t_0))) (- 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 (x_45_scale <= -5.2e+70) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * (-1.0 / sin(t_0)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) / tan(t_0))) / -((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 (x_45_scale <= -5.2e+70) {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * (-1.0 / Math.sin(t_0)))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) / Math.tan(t_0))) / -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 x_45_scale <= -5.2e+70: tmp = 180.0 * (math.atan(((y_45_scale / x_45_scale) * (-1.0 / math.sin(t_0)))) / math.pi) else: tmp = 180.0 * (math.atan(((y_45_scale / x_45_scale) / math.tan(t_0))) / -math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) tmp = 0.0 if (x_45_scale <= -5.2e+70) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * Float64(-1.0 / sin(t_0)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) / tan(t_0))) / Float64(-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 (x_45_scale <= -5.2e+70) tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * (-1.0 / sin(t_0)))) / pi); else tmp = 180.0 * (atan(((y_45_scale / x_45_scale) / tan(t_0))) / -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[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$45$scale, -5.2e+70], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(-1.0 / N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] / N[Tan[t$95$0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / (-Pi)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;x-scale \leq -5.2 \cdot 10^{+70}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{-1}{\sin t\_0}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\frac{y-scale}{x-scale}}{\tan t\_0}\right)}{-\pi}\\
\end{array}
\end{array}
if x-scale < -5.2000000000000001e70Initial program 5.9%
Simplified5.8%
Taylor expanded in x-scale around 0 16.7%
Simplified22.5%
Taylor expanded in a around 0 36.2%
mul-1-neg36.2%
times-frac36.2%
Simplified36.2%
Taylor expanded in angle around 0 48.9%
if -5.2000000000000001e70 < x-scale Initial program 19.4%
Simplified15.7%
Taylor expanded in x-scale around 0 30.9%
Simplified35.3%
Taylor expanded in a around 0 51.2%
mul-1-neg51.2%
times-frac51.2%
Simplified51.2%
*-un-lft-identity51.2%
atan-neg51.2%
clear-num51.2%
quot-tan51.2%
Applied egg-rr51.2%
*-lft-identity51.2%
associate-*r/51.2%
*-rgt-identity51.2%
Simplified51.2%
Final simplification50.7%
b_m = (fabs.f64 b) (FPCore (a b_m angle x-scale y-scale) :precision binary64 (* -180.0 (/ (atan (/ (/ y-scale x-scale) (tan (* angle (* 0.005555555555555556 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(((y_45_scale / x_45_scale) / tan((angle * (0.005555555555555556 * ((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(((y_45_scale / x_45_scale) / Math.tan((angle * (0.005555555555555556 * 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(((y_45_scale / x_45_scale) / math.tan((angle * (0.005555555555555556 * 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(Float64(y_45_scale / x_45_scale) / tan(Float64(angle * Float64(0.005555555555555556 * pi))))) / pi)) end
b_m = abs(b); function tmp = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = -180.0 * (atan(((y_45_scale / x_45_scale) / tan((angle * (0.005555555555555556 * 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[(N[(y$45$scale / x$45$scale), $MachinePrecision] / N[Tan[N[(angle * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
-180 \cdot \frac{\tan^{-1} \left(\frac{\frac{y-scale}{x-scale}}{\tan \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)}\right)}{\pi}
\end{array}
Initial program 16.8%
Simplified13.8%
Taylor expanded in x-scale around 0 28.1%
Simplified32.8%
Taylor expanded in a around 0 48.2%
mul-1-neg48.2%
times-frac48.3%
Simplified48.3%
add-exp-log28.6%
atan-neg28.6%
clear-num28.6%
quot-tan28.6%
Applied egg-rr28.6%
Taylor expanded in y-scale around 0 48.2%
associate-/r*48.3%
*-commutative48.3%
associate-*r*48.4%
*-commutative48.4%
*-commutative48.4%
Simplified48.4%
Final simplification48.4%
b_m = (fabs.f64 b) (FPCore (a b_m angle x-scale y-scale) :precision binary64 (* -180.0 (/ (atan (/ y-scale (* x-scale (tan (* 0.005555555555555556 (* angle 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((y_45_scale / (x_45_scale * tan((0.005555555555555556 * (angle * ((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((y_45_scale / (x_45_scale * Math.tan((0.005555555555555556 * (angle * 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((y_45_scale / (x_45_scale * math.tan((0.005555555555555556 * (angle * 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(y_45_scale / Float64(x_45_scale * tan(Float64(0.005555555555555556 * Float64(angle * pi)))))) / pi)) end
b_m = abs(b); function tmp = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = -180.0 * (atan((y_45_scale / (x_45_scale * tan((0.005555555555555556 * (angle * 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[(y$45$scale / N[(x$45$scale * N[Tan[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
-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}
\end{array}
Initial program 16.8%
Simplified13.8%
Taylor expanded in x-scale around 0 28.1%
Simplified32.8%
Taylor expanded in a around 0 48.2%
mul-1-neg48.2%
times-frac48.3%
Simplified48.3%
add-exp-log28.6%
atan-neg28.6%
clear-num28.6%
quot-tan28.6%
Applied egg-rr28.6%
Taylor expanded in y-scale around 0 48.2%
b_m = (fabs.f64 b) (FPCore (a b_m angle x-scale y-scale) :precision binary64 (* (atan (/ (/ (* y-scale -180.0) angle) (* x-scale PI))) (/ 180.0 PI)))
b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
return atan((((y_45_scale * -180.0) / angle) / (x_45_scale * ((double) M_PI)))) * (180.0 / ((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 Math.atan((((y_45_scale * -180.0) / angle) / (x_45_scale * Math.PI))) * (180.0 / Math.PI);
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): return math.atan((((y_45_scale * -180.0) / angle) / (x_45_scale * math.pi))) * (180.0 / math.pi)
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) return Float64(atan(Float64(Float64(Float64(y_45_scale * -180.0) / angle) / Float64(x_45_scale * pi))) * Float64(180.0 / pi)) end
b_m = abs(b); function tmp = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = atan((((y_45_scale * -180.0) / angle) / (x_45_scale * pi))) * (180.0 / pi); end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := N[(N[ArcTan[N[(N[(N[(y$45$scale * -180.0), $MachinePrecision] / angle), $MachinePrecision] / N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
\tan^{-1} \left(\frac{\frac{y-scale \cdot -180}{angle}}{x-scale \cdot \pi}\right) \cdot \frac{180}{\pi}
\end{array}
Initial program 16.8%
Simplified13.8%
Taylor expanded in angle around 0 15.6%
associate-/l*15.6%
distribute-lft-out--15.6%
associate-*r*15.6%
Simplified15.6%
Taylor expanded in a around 0 40.6%
associate-*r/40.6%
*-commutative40.6%
associate-/r*40.6%
*-commutative40.6%
Applied egg-rr40.6%
*-commutative40.6%
associate-/l*40.6%
*-commutative40.6%
associate-*r/40.6%
associate-/l*40.6%
*-commutative40.6%
Simplified40.6%
Final simplification40.6%
b_m = (fabs.f64 b) (FPCore (a b_m angle x-scale y-scale) :precision binary64 (* 180.0 (/ (atan (* (/ -180.0 angle) (/ y-scale (* 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 / angle) * (y_45_scale / (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 / angle) * (y_45_scale / (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 / angle) * (y_45_scale / (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(Float64(-180.0 / angle) * Float64(y_45_scale / 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 / angle) * (y_45_scale / (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[(N[(-180.0 / angle), $MachinePrecision] * N[(y$45$scale / N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
180 \cdot \frac{\tan^{-1} \left(\frac{-180}{angle} \cdot \frac{y-scale}{x-scale \cdot \pi}\right)}{\pi}
\end{array}
Initial program 16.8%
Simplified13.8%
Taylor expanded in x-scale around 0 28.1%
Simplified32.8%
Taylor expanded in a around 0 48.2%
mul-1-neg48.2%
times-frac48.3%
Simplified48.3%
Taylor expanded in angle around 0 40.6%
associate-*r/40.6%
times-frac40.6%
*-commutative40.6%
Simplified40.6%
Final simplification40.6%
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(Float64(y_45_scale / 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[(N[(y$45$scale / angle), $MachinePrecision] / N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{\frac{y-scale}{angle}}{x-scale \cdot \pi}\right)}{\pi}
\end{array}
Initial program 16.8%
Simplified13.8%
Taylor expanded in angle around 0 15.6%
associate-/l*15.6%
distribute-lft-out--15.6%
associate-*r*15.6%
Simplified15.6%
Taylor expanded in a around 0 40.6%
div-inv40.6%
*-commutative40.6%
Applied egg-rr40.6%
associate-*r/40.6%
*-rgt-identity40.6%
*-commutative40.6%
associate-/r*40.6%
Simplified40.6%
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 16.8%
Simplified13.8%
Taylor expanded in angle around 0 15.6%
associate-/l*15.6%
distribute-lft-out--15.6%
associate-*r*15.6%
Simplified15.6%
Taylor expanded in a around 0 40.6%
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 16.8%
Simplified13.8%
Taylor expanded in angle around 0 15.6%
associate-/l*15.6%
distribute-lft-out--15.6%
associate-*r*15.6%
Simplified15.6%
Taylor expanded in a around inf 14.6%
herbie shell --seed 2024121
(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)))