
(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 20 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 (* (* angle PI) 0.011111111111111112))))
(if (<= b_m 9e-98)
(/ (* 180.0 (atan (/ (* y-scale t_1) (* x-scale (cos t_0))))) PI)
(if (<= b_m 1.35e-28)
(/
(*
180.0
(atan
(*
-0.5
(*
(/
(*
2.0
(+
(* b_m (* b_m (/ (+ t_2 1.0) 2.0)))
(* (* a a) (+ 0.5 (* t_2 -0.5)))))
(* x-scale (sin (* angle (/ PI 180.0)))))
(/ y-scale (- (* b_m b_m) (* a a)))))))
PI)
(/
(*
180.0
(atan
(*
(sqrt (+ 1.0 (cos (* angle (* PI 0.011111111111111112)))))
(/ (/ (* y-scale (sqrt 0.5)) (- 0.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 t_2 = cos(((angle * ((double) M_PI)) * 0.011111111111111112));
double tmp;
if (b_m <= 9e-98) {
tmp = (180.0 * atan(((y_45_scale * t_1) / (x_45_scale * cos(t_0))))) / ((double) M_PI);
} else if (b_m <= 1.35e-28) {
tmp = (180.0 * atan((-0.5 * (((2.0 * ((b_m * (b_m * ((t_2 + 1.0) / 2.0))) + ((a * a) * (0.5 + (t_2 * -0.5))))) / (x_45_scale * sin((angle * (((double) M_PI) / 180.0))))) * (y_45_scale / ((b_m * b_m) - (a * a))))))) / ((double) M_PI);
} else {
tmp = (180.0 * atan((sqrt((1.0 + cos((angle * (((double) M_PI) * 0.011111111111111112))))) * (((y_45_scale * sqrt(0.5)) / (0.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 t_2 = Math.cos(((angle * Math.PI) * 0.011111111111111112));
double tmp;
if (b_m <= 9e-98) {
tmp = (180.0 * Math.atan(((y_45_scale * t_1) / (x_45_scale * Math.cos(t_0))))) / Math.PI;
} else if (b_m <= 1.35e-28) {
tmp = (180.0 * Math.atan((-0.5 * (((2.0 * ((b_m * (b_m * ((t_2 + 1.0) / 2.0))) + ((a * a) * (0.5 + (t_2 * -0.5))))) / (x_45_scale * Math.sin((angle * (Math.PI / 180.0))))) * (y_45_scale / ((b_m * b_m) - (a * a))))))) / Math.PI;
} else {
tmp = (180.0 * Math.atan((Math.sqrt((1.0 + Math.cos((angle * (Math.PI * 0.011111111111111112))))) * (((y_45_scale * Math.sqrt(0.5)) / (0.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) t_2 = math.cos(((angle * math.pi) * 0.011111111111111112)) tmp = 0 if b_m <= 9e-98: tmp = (180.0 * math.atan(((y_45_scale * t_1) / (x_45_scale * math.cos(t_0))))) / math.pi elif b_m <= 1.35e-28: tmp = (180.0 * math.atan((-0.5 * (((2.0 * ((b_m * (b_m * ((t_2 + 1.0) / 2.0))) + ((a * a) * (0.5 + (t_2 * -0.5))))) / (x_45_scale * math.sin((angle * (math.pi / 180.0))))) * (y_45_scale / ((b_m * b_m) - (a * a))))))) / math.pi else: tmp = (180.0 * math.atan((math.sqrt((1.0 + math.cos((angle * (math.pi * 0.011111111111111112))))) * (((y_45_scale * math.sqrt(0.5)) / (0.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) t_2 = cos(Float64(Float64(angle * pi) * 0.011111111111111112)) tmp = 0.0 if (b_m <= 9e-98) tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale * t_1) / Float64(x_45_scale * cos(t_0))))) / pi); elseif (b_m <= 1.35e-28) tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(Float64(Float64(2.0 * Float64(Float64(b_m * Float64(b_m * Float64(Float64(t_2 + 1.0) / 2.0))) + Float64(Float64(a * a) * Float64(0.5 + Float64(t_2 * -0.5))))) / Float64(x_45_scale * sin(Float64(angle * Float64(pi / 180.0))))) * Float64(y_45_scale / Float64(Float64(b_m * b_m) - Float64(a * a))))))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(sqrt(Float64(1.0 + cos(Float64(angle * Float64(pi * 0.011111111111111112))))) * Float64(Float64(Float64(y_45_scale * sqrt(0.5)) / Float64(0.0 - 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(((angle * pi) * 0.011111111111111112)); tmp = 0.0; if (b_m <= 9e-98) tmp = (180.0 * atan(((y_45_scale * t_1) / (x_45_scale * cos(t_0))))) / pi; elseif (b_m <= 1.35e-28) tmp = (180.0 * atan((-0.5 * (((2.0 * ((b_m * (b_m * ((t_2 + 1.0) / 2.0))) + ((a * a) * (0.5 + (t_2 * -0.5))))) / (x_45_scale * sin((angle * (pi / 180.0))))) * (y_45_scale / ((b_m * b_m) - (a * a))))))) / pi; else tmp = (180.0 * atan((sqrt((1.0 + cos((angle * (pi * 0.011111111111111112))))) * (((y_45_scale * sqrt(0.5)) / (0.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]}, Block[{t$95$2 = N[Cos[N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[b$95$m, 9e-98], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale * t$95$1), $MachinePrecision] / N[(x$45$scale * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[b$95$m, 1.35e-28], N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(N[(N[(2.0 * N[(N[(b$95$m * N[(b$95$m * N[(N[(t$95$2 + 1.0), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a * a), $MachinePrecision] * N[(0.5 + N[(t$95$2 * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[Sin[N[(angle * N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y$45$scale / N[(N[(b$95$m * b$95$m), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[Sqrt[N[(1.0 + N[Cos[N[(angle * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(y$45$scale * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[(0.0 - x$45$scale), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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 \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\\
\mathbf{if}\;b\_m \leq 9 \cdot 10^{-98}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot t\_1}{x-scale \cdot \cos t\_0}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.35 \cdot 10^{-28}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \left(\frac{2 \cdot \left(b\_m \cdot \left(b\_m \cdot \frac{t\_2 + 1}{2}\right) + \left(a \cdot a\right) \cdot \left(0.5 + t\_2 \cdot -0.5\right)\right)}{x-scale \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)} \cdot \frac{y-scale}{b\_m \cdot b\_m - a \cdot a}\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\sqrt{1 + \cos \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)} \cdot \frac{\frac{y-scale \cdot \sqrt{0.5}}{0 - x-scale}}{t\_1}\right)}{\pi}\\
\end{array}
\end{array}
if b < 8.99999999999999994e-98Initial program 19.4%
Simplified18.6%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified29.9%
Taylor expanded in b around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6445.9%
Simplified45.9%
if 8.99999999999999994e-98 < b < 1.3499999999999999e-28Initial program 22.7%
Simplified29.4%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified39.6%
Taylor expanded in angle around 0
Simplified50.2%
Applied egg-rr48.5%
if 1.3499999999999999e-28 < b Initial program 14.8%
Simplified11.1%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified30.6%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6459.8%
Simplified59.8%
unpow1N/A
metadata-evalN/A
pow-prod-upN/A
pow-prod-downN/A
unpow2N/A
pow-lowering-pow.f64N/A
Applied egg-rr66.1%
Taylor expanded in y-scale around 0
associate-*r/N/A
/-lowering-/.f64N/A
Simplified69.5%
Final simplification51.1%
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 3.1e-65)
(/ (* 180.0 (atan (/ (* y-scale (sin t_0)) (* x-scale (cos t_0))))) PI)
(/
(*
180.0
(atan
(/
(*
y-scale
(pow
(/ (+ (cos (* (* angle PI) 0.011111111111111112)) 1.0) 2.0)
0.5))
(*
(sin (* (sqrt PI) (* (/ angle 180.0) (sqrt PI))))
(- 0.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 = 0.005555555555555556 * (angle * ((double) M_PI));
double tmp;
if (b_m <= 3.1e-65) {
tmp = (180.0 * atan(((y_45_scale * sin(t_0)) / (x_45_scale * cos(t_0))))) / ((double) M_PI);
} else {
tmp = (180.0 * atan(((y_45_scale * pow(((cos(((angle * ((double) M_PI)) * 0.011111111111111112)) + 1.0) / 2.0), 0.5)) / (sin((sqrt(((double) M_PI)) * ((angle / 180.0) * sqrt(((double) M_PI))))) * (0.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 = 0.005555555555555556 * (angle * Math.PI);
double tmp;
if (b_m <= 3.1e-65) {
tmp = (180.0 * Math.atan(((y_45_scale * Math.sin(t_0)) / (x_45_scale * Math.cos(t_0))))) / Math.PI;
} else {
tmp = (180.0 * Math.atan(((y_45_scale * Math.pow(((Math.cos(((angle * Math.PI) * 0.011111111111111112)) + 1.0) / 2.0), 0.5)) / (Math.sin((Math.sqrt(Math.PI) * ((angle / 180.0) * Math.sqrt(Math.PI)))) * (0.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 = 0.005555555555555556 * (angle * math.pi) tmp = 0 if b_m <= 3.1e-65: tmp = (180.0 * math.atan(((y_45_scale * math.sin(t_0)) / (x_45_scale * math.cos(t_0))))) / math.pi else: tmp = (180.0 * math.atan(((y_45_scale * math.pow(((math.cos(((angle * math.pi) * 0.011111111111111112)) + 1.0) / 2.0), 0.5)) / (math.sin((math.sqrt(math.pi) * ((angle / 180.0) * math.sqrt(math.pi)))) * (0.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 = Float64(0.005555555555555556 * Float64(angle * pi)) tmp = 0.0 if (b_m <= 3.1e-65) tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale * sin(t_0)) / Float64(x_45_scale * cos(t_0))))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale * (Float64(Float64(cos(Float64(Float64(angle * pi) * 0.011111111111111112)) + 1.0) / 2.0) ^ 0.5)) / Float64(sin(Float64(sqrt(pi) * Float64(Float64(angle / 180.0) * sqrt(pi)))) * Float64(0.0 - 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); tmp = 0.0; if (b_m <= 3.1e-65) tmp = (180.0 * atan(((y_45_scale * sin(t_0)) / (x_45_scale * cos(t_0))))) / pi; else tmp = (180.0 * atan(((y_45_scale * (((cos(((angle * pi) * 0.011111111111111112)) + 1.0) / 2.0) ^ 0.5)) / (sin((sqrt(pi) * ((angle / 180.0) * sqrt(pi)))) * (0.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[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 3.1e-65], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale * N[Power[N[(N[(N[Cos[N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision] / 2.0), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] / N[(N[Sin[N[(N[Sqrt[Pi], $MachinePrecision] * N[(N[(angle / 180.0), $MachinePrecision] * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(0.0 - x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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 3.1 \cdot 10^{-65}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot \sin t\_0}{x-scale \cdot \cos t\_0}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot {\left(\frac{\cos \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right) + 1}{2}\right)}^{0.5}}{\sin \left(\sqrt{\pi} \cdot \left(\frac{angle}{180} \cdot \sqrt{\pi}\right)\right) \cdot \left(0 - x-scale\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 3.10000000000000016e-65Initial program 19.4%
Simplified18.7%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified30.2%
Taylor expanded in b around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6445.7%
Simplified45.7%
if 3.10000000000000016e-65 < b Initial program 16.1%
Simplified14.6%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified31.8%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6452.9%
Simplified52.9%
unpow1N/A
metadata-evalN/A
pow-prod-upN/A
pow-prod-downN/A
unpow2N/A
pow-lowering-pow.f64N/A
Applied egg-rr57.8%
associate-*r*N/A
add-sqr-sqrtN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
metadata-evalN/A
div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
PI-lowering-PI.f64N/A
sqrt-lowering-sqrt.f64N/A
PI-lowering-PI.f6459.1%
Applied egg-rr59.1%
Final simplification49.1%
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 9e-58)
(/ (* 180.0 (atan (/ (* y-scale (sin t_0)) (* x-scale (cos t_0))))) PI)
(/
(*
180.0
(atan
(/
(/
(sqrt (/ (+ (cos (* (* angle PI) 0.011111111111111112)) 1.0) 2.0))
(/ x-scale y-scale))
(- 0.0 (sin (/ angle (/ 180.0 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 <= 9e-58) {
tmp = (180.0 * atan(((y_45_scale * sin(t_0)) / (x_45_scale * cos(t_0))))) / ((double) M_PI);
} else {
tmp = (180.0 * atan(((sqrt(((cos(((angle * ((double) M_PI)) * 0.011111111111111112)) + 1.0) / 2.0)) / (x_45_scale / y_45_scale)) / (0.0 - sin((angle / (180.0 / ((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 <= 9e-58) {
tmp = (180.0 * Math.atan(((y_45_scale * Math.sin(t_0)) / (x_45_scale * Math.cos(t_0))))) / Math.PI;
} else {
tmp = (180.0 * Math.atan(((Math.sqrt(((Math.cos(((angle * Math.PI) * 0.011111111111111112)) + 1.0) / 2.0)) / (x_45_scale / y_45_scale)) / (0.0 - Math.sin((angle / (180.0 / 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 <= 9e-58: tmp = (180.0 * math.atan(((y_45_scale * math.sin(t_0)) / (x_45_scale * math.cos(t_0))))) / math.pi else: tmp = (180.0 * math.atan(((math.sqrt(((math.cos(((angle * math.pi) * 0.011111111111111112)) + 1.0) / 2.0)) / (x_45_scale / y_45_scale)) / (0.0 - math.sin((angle / (180.0 / 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(0.005555555555555556 * Float64(angle * pi)) tmp = 0.0 if (b_m <= 9e-58) tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale * sin(t_0)) / Float64(x_45_scale * cos(t_0))))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(sqrt(Float64(Float64(cos(Float64(Float64(angle * pi) * 0.011111111111111112)) + 1.0) / 2.0)) / Float64(x_45_scale / y_45_scale)) / Float64(0.0 - sin(Float64(angle / Float64(180.0 / 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 <= 9e-58) tmp = (180.0 * atan(((y_45_scale * sin(t_0)) / (x_45_scale * cos(t_0))))) / pi; else tmp = (180.0 * atan(((sqrt(((cos(((angle * pi) * 0.011111111111111112)) + 1.0) / 2.0)) / (x_45_scale / y_45_scale)) / (0.0 - sin((angle / (180.0 / 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[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 9e-58], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(N[Sqrt[N[(N[(N[Cos[N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] / N[(x$45$scale / y$45$scale), $MachinePrecision]), $MachinePrecision] / N[(0.0 - N[Sin[N[(angle / N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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 9 \cdot 10^{-58}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot \sin t\_0}{x-scale \cdot \cos t\_0}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\frac{\sqrt{\frac{\cos \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right) + 1}{2}}}{\frac{x-scale}{y-scale}}}{0 - \sin \left(\frac{angle}{\frac{180}{\pi}}\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 9.0000000000000006e-58Initial program 19.1%
Simplified18.9%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified30.3%
Taylor expanded in b around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6446.1%
Simplified46.1%
if 9.0000000000000006e-58 < b Initial program 16.9%
Simplified13.5%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified31.4%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6455.1%
Simplified55.1%
unpow1N/A
metadata-evalN/A
pow-prod-upN/A
pow-prod-downN/A
unpow2N/A
pow-lowering-pow.f64N/A
Applied egg-rr60.5%
associate-/r*N/A
/-lowering-/.f64N/A
Applied egg-rr62.6%
Final simplification50.1%
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 1.08e-83)
(/ (* 180.0 (atan (/ (* y-scale (sin t_0)) (* x-scale (cos t_0))))) PI)
(/ (* 180.0 (atan (/ (- 0.0 (/ 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 (b_m <= 1.08e-83) {
tmp = (180.0 * atan(((y_45_scale * sin(t_0)) / (x_45_scale * cos(t_0))))) / ((double) M_PI);
} else {
tmp = (180.0 * atan(((0.0 - (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 (b_m <= 1.08e-83) {
tmp = (180.0 * Math.atan(((y_45_scale * Math.sin(t_0)) / (x_45_scale * Math.cos(t_0))))) / Math.PI;
} else {
tmp = (180.0 * Math.atan(((0.0 - (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 b_m <= 1.08e-83: tmp = (180.0 * math.atan(((y_45_scale * math.sin(t_0)) / (x_45_scale * math.cos(t_0))))) / math.pi else: tmp = (180.0 * math.atan(((0.0 - (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 (b_m <= 1.08e-83) tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale * sin(t_0)) / Float64(x_45_scale * cos(t_0))))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(0.0 - Float64(y_45_scale / x_45_scale)) / tan(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 <= 1.08e-83) tmp = (180.0 * atan(((y_45_scale * sin(t_0)) / (x_45_scale * cos(t_0))))) / pi; else tmp = (180.0 * atan(((0.0 - (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[b$95$m, 1.08e-83], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(0.0 - N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[Tan[t$95$0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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 1.08 \cdot 10^{-83}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot \sin t\_0}{x-scale \cdot \cos t\_0}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0 - \frac{y-scale}{x-scale}}{\tan t\_0}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.08e-83Initial program 19.2%
Simplified18.9%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified30.1%
Taylor expanded in b around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6445.9%
Simplified45.9%
if 1.08e-83 < b Initial program 16.9%
Simplified14.0%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified31.9%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6453.5%
Simplified53.5%
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
clear-numN/A
/-lowering-/.f64N/A
*-commutativeN/A
metadata-evalN/A
div-invN/A
*-commutativeN/A
metadata-evalN/A
div-invN/A
quot-tanN/A
tan-lowering-tan.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6453.2%
Applied egg-rr53.2%
Taylor expanded in y-scale around 0
associate-*r/N/A
/-lowering-/.f64N/A
Simplified56.4%
Final simplification48.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 (<= b_m 1.55e-83)
(* 180.0 (/ (atan (/ (* y-scale (sin t_0)) (* x-scale (cos t_0)))) PI))
(/ (* 180.0 (atan (/ (- 0.0 (/ 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 (b_m <= 1.55e-83) {
tmp = 180.0 * (atan(((y_45_scale * sin(t_0)) / (x_45_scale * cos(t_0)))) / ((double) M_PI));
} else {
tmp = (180.0 * atan(((0.0 - (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 (b_m <= 1.55e-83) {
tmp = 180.0 * (Math.atan(((y_45_scale * Math.sin(t_0)) / (x_45_scale * Math.cos(t_0)))) / Math.PI);
} else {
tmp = (180.0 * Math.atan(((0.0 - (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 b_m <= 1.55e-83: tmp = 180.0 * (math.atan(((y_45_scale * math.sin(t_0)) / (x_45_scale * math.cos(t_0)))) / math.pi) else: tmp = (180.0 * math.atan(((0.0 - (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 (b_m <= 1.55e-83) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * sin(t_0)) / Float64(x_45_scale * cos(t_0)))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(0.0 - Float64(y_45_scale / x_45_scale)) / tan(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 <= 1.55e-83) tmp = 180.0 * (atan(((y_45_scale * sin(t_0)) / (x_45_scale * cos(t_0)))) / pi); else tmp = (180.0 * atan(((0.0 - (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[b$95$m, 1.55e-83], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(0.0 - N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[Tan[t$95$0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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 1.55 \cdot 10^{-83}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot \sin t\_0}{x-scale \cdot \cos t\_0}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0 - \frac{y-scale}{x-scale}}{\tan t\_0}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.54999999999999996e-83Initial program 19.2%
Taylor expanded in x-scale around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
Simplified23.6%
Taylor expanded in b around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6445.9%
Simplified45.9%
if 1.54999999999999996e-83 < b Initial program 16.9%
Simplified14.0%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified31.9%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6453.5%
Simplified53.5%
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
clear-numN/A
/-lowering-/.f64N/A
*-commutativeN/A
metadata-evalN/A
div-invN/A
*-commutativeN/A
metadata-evalN/A
div-invN/A
quot-tanN/A
tan-lowering-tan.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6453.2%
Applied egg-rr53.2%
Taylor expanded in y-scale around 0
associate-*r/N/A
/-lowering-/.f64N/A
Simplified56.4%
Final simplification48.6%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 2.1e-57)
(/
(*
180.0
(atan
(/ (* y-scale (sin (* 0.005555555555555556 (* angle PI)))) x-scale)))
PI)
(/
(*
(atan (/ (/ y-scale x-scale) (tan (/ angle (/ 180.0 PI)))))
(- 0.0 180.0))
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 <= 2.1e-57) {
tmp = (180.0 * atan(((y_45_scale * sin((0.005555555555555556 * (angle * ((double) M_PI))))) / x_45_scale))) / ((double) M_PI);
} else {
tmp = (atan(((y_45_scale / x_45_scale) / tan((angle / (180.0 / ((double) M_PI)))))) * (0.0 - 180.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 tmp;
if (b_m <= 2.1e-57) {
tmp = (180.0 * Math.atan(((y_45_scale * Math.sin((0.005555555555555556 * (angle * Math.PI)))) / x_45_scale))) / Math.PI;
} else {
tmp = (Math.atan(((y_45_scale / x_45_scale) / Math.tan((angle / (180.0 / Math.PI))))) * (0.0 - 180.0)) / 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 <= 2.1e-57: tmp = (180.0 * math.atan(((y_45_scale * math.sin((0.005555555555555556 * (angle * math.pi)))) / x_45_scale))) / math.pi else: tmp = (math.atan(((y_45_scale / x_45_scale) / math.tan((angle / (180.0 / math.pi))))) * (0.0 - 180.0)) / 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 <= 2.1e-57) tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale * sin(Float64(0.005555555555555556 * Float64(angle * pi)))) / x_45_scale))) / pi); else tmp = Float64(Float64(atan(Float64(Float64(y_45_scale / x_45_scale) / tan(Float64(angle / Float64(180.0 / pi))))) * Float64(0.0 - 180.0)) / 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 <= 2.1e-57) tmp = (180.0 * atan(((y_45_scale * sin((0.005555555555555556 * (angle * pi)))) / x_45_scale))) / pi; else tmp = (atan(((y_45_scale / x_45_scale) / tan((angle / (180.0 / pi))))) * (0.0 - 180.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_] := If[LessEqual[b$95$m, 2.1e-57], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale * N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] / N[Tan[N[(angle / N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(0.0 - 180.0), $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 2.1 \cdot 10^{-57}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}{x-scale}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{\frac{y-scale}{x-scale}}{\tan \left(\frac{angle}{\frac{180}{\pi}}\right)}\right) \cdot \left(0 - 180\right)}{\pi}\\
\end{array}
\end{array}
if b < 2.0999999999999999e-57Initial program 19.1%
Simplified18.9%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified30.3%
Taylor expanded in angle around 0
Simplified31.6%
Taylor expanded in b around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6445.2%
Simplified45.2%
if 2.0999999999999999e-57 < b Initial program 16.9%
Simplified13.5%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified31.4%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6455.1%
Simplified55.1%
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
clear-numN/A
/-lowering-/.f64N/A
*-commutativeN/A
metadata-evalN/A
div-invN/A
*-commutativeN/A
metadata-evalN/A
div-invN/A
quot-tanN/A
tan-lowering-tan.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6454.7%
Applied egg-rr54.7%
atan-negN/A
neg-lowering-neg.f64N/A
atan-lowering-atan.f64N/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f64N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6456.3%
Applied egg-rr56.3%
Final simplification47.9%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 3.7e-57)
(/
(*
180.0
(atan
(/ (* y-scale (sin (* 0.005555555555555556 (* angle PI)))) x-scale)))
PI)
(/
(*
180.0
(atan (/ (/ y-scale (tan (/ angle (/ 180.0 PI)))) (- 0.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 tmp;
if (b_m <= 3.7e-57) {
tmp = (180.0 * atan(((y_45_scale * sin((0.005555555555555556 * (angle * ((double) M_PI))))) / x_45_scale))) / ((double) M_PI);
} else {
tmp = (180.0 * atan(((y_45_scale / tan((angle / (180.0 / ((double) M_PI))))) / (0.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 tmp;
if (b_m <= 3.7e-57) {
tmp = (180.0 * Math.atan(((y_45_scale * Math.sin((0.005555555555555556 * (angle * Math.PI)))) / x_45_scale))) / Math.PI;
} else {
tmp = (180.0 * Math.atan(((y_45_scale / Math.tan((angle / (180.0 / Math.PI)))) / (0.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): tmp = 0 if b_m <= 3.7e-57: tmp = (180.0 * math.atan(((y_45_scale * math.sin((0.005555555555555556 * (angle * math.pi)))) / x_45_scale))) / math.pi else: tmp = (180.0 * math.atan(((y_45_scale / math.tan((angle / (180.0 / math.pi)))) / (0.0 - 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 (b_m <= 3.7e-57) tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale * sin(Float64(0.005555555555555556 * Float64(angle * pi)))) / x_45_scale))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale / tan(Float64(angle / Float64(180.0 / pi)))) / Float64(0.0 - 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 (b_m <= 3.7e-57) tmp = (180.0 * atan(((y_45_scale * sin((0.005555555555555556 * (angle * pi)))) / x_45_scale))) / pi; else tmp = (180.0 * atan(((y_45_scale / tan((angle / (180.0 / pi)))) / (0.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_] := If[LessEqual[b$95$m, 3.7e-57], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale * N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale / N[Tan[N[(angle / N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(0.0 - x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 3.7 \cdot 10^{-57}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}{x-scale}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\frac{y-scale}{\tan \left(\frac{angle}{\frac{180}{\pi}}\right)}}{0 - x-scale}\right)}{\pi}\\
\end{array}
\end{array}
if b < 3.7e-57Initial program 19.1%
Simplified18.9%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified30.3%
Taylor expanded in angle around 0
Simplified31.6%
Taylor expanded in b around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6445.2%
Simplified45.2%
if 3.7e-57 < b Initial program 16.9%
Simplified13.5%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified31.4%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6455.1%
Simplified55.1%
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
clear-numN/A
/-lowering-/.f64N/A
*-commutativeN/A
metadata-evalN/A
div-invN/A
*-commutativeN/A
metadata-evalN/A
div-invN/A
quot-tanN/A
tan-lowering-tan.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6454.7%
Applied egg-rr54.7%
associate-*l/N/A
/-lowering-/.f64N/A
un-div-invN/A
/-lowering-/.f64N/A
tan-lowering-tan.f64N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6453.1%
Applied egg-rr53.1%
Final simplification47.1%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 2.45e-57)
(/
(*
180.0
(atan
(/ (* y-scale (sin (* 0.005555555555555556 (* angle PI)))) x-scale)))
PI)
(if (<= b_m 2.1e+128)
(/
(*
180.0
(atan
(*
(/ y-scale x-scale)
(/
(-
(*
(* -32400.0 (* angle angle))
(/ (* PI (* 5.7155921353452215e-8 (- 0.0 (* PI PI)))) (* PI PI)))
(/ 180.0 PI))
angle))))
PI)
(*
180.0
(/
(atan
(/ -1.0 (/ (* 0.005555555555555556 (* angle (* PI x-scale))) y-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 (b_m <= 2.45e-57) {
tmp = (180.0 * atan(((y_45_scale * sin((0.005555555555555556 * (angle * ((double) M_PI))))) / x_45_scale))) / ((double) M_PI);
} else if (b_m <= 2.1e+128) {
tmp = (180.0 * atan(((y_45_scale / x_45_scale) * ((((-32400.0 * (angle * angle)) * ((((double) M_PI) * (5.7155921353452215e-8 * (0.0 - (((double) M_PI) * ((double) M_PI))))) / (((double) M_PI) * ((double) M_PI)))) - (180.0 / ((double) M_PI))) / angle)))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((-1.0 / ((0.005555555555555556 * (angle * (((double) M_PI) * x_45_scale))) / y_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 (b_m <= 2.45e-57) {
tmp = (180.0 * Math.atan(((y_45_scale * Math.sin((0.005555555555555556 * (angle * Math.PI)))) / x_45_scale))) / Math.PI;
} else if (b_m <= 2.1e+128) {
tmp = (180.0 * Math.atan(((y_45_scale / x_45_scale) * ((((-32400.0 * (angle * angle)) * ((Math.PI * (5.7155921353452215e-8 * (0.0 - (Math.PI * Math.PI)))) / (Math.PI * Math.PI))) - (180.0 / Math.PI)) / angle)))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((-1.0 / ((0.005555555555555556 * (angle * (Math.PI * x_45_scale))) / y_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 b_m <= 2.45e-57: tmp = (180.0 * math.atan(((y_45_scale * math.sin((0.005555555555555556 * (angle * math.pi)))) / x_45_scale))) / math.pi elif b_m <= 2.1e+128: tmp = (180.0 * math.atan(((y_45_scale / x_45_scale) * ((((-32400.0 * (angle * angle)) * ((math.pi * (5.7155921353452215e-8 * (0.0 - (math.pi * math.pi)))) / (math.pi * math.pi))) - (180.0 / math.pi)) / angle)))) / math.pi else: tmp = 180.0 * (math.atan((-1.0 / ((0.005555555555555556 * (angle * (math.pi * x_45_scale))) / y_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 (b_m <= 2.45e-57) tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale * sin(Float64(0.005555555555555556 * Float64(angle * pi)))) / x_45_scale))) / pi); elseif (b_m <= 2.1e+128) tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale / x_45_scale) * Float64(Float64(Float64(Float64(-32400.0 * Float64(angle * angle)) * Float64(Float64(pi * Float64(5.7155921353452215e-8 * Float64(0.0 - Float64(pi * pi)))) / Float64(pi * pi))) - Float64(180.0 / pi)) / angle)))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(-1.0 / Float64(Float64(0.005555555555555556 * Float64(angle * Float64(pi * x_45_scale))) / y_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 (b_m <= 2.45e-57) tmp = (180.0 * atan(((y_45_scale * sin((0.005555555555555556 * (angle * pi)))) / x_45_scale))) / pi; elseif (b_m <= 2.1e+128) tmp = (180.0 * atan(((y_45_scale / x_45_scale) * ((((-32400.0 * (angle * angle)) * ((pi * (5.7155921353452215e-8 * (0.0 - (pi * pi)))) / (pi * pi))) - (180.0 / pi)) / angle)))) / pi; else tmp = 180.0 * (atan((-1.0 / ((0.005555555555555556 * (angle * (pi * x_45_scale))) / y_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[b$95$m, 2.45e-57], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale * N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[b$95$m, 2.1e+128], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(N[(N[(N[(-32400.0 * N[(angle * angle), $MachinePrecision]), $MachinePrecision] * N[(N[(Pi * N[(5.7155921353452215e-8 * N[(0.0 - N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision] / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-1.0 / N[(N[(0.005555555555555556 * N[(angle * N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 2.45 \cdot 10^{-57}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}{x-scale}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 2.1 \cdot 10^{+128}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\left(-32400 \cdot \left(angle \cdot angle\right)\right) \cdot \frac{\pi \cdot \left(5.7155921353452215 \cdot 10^{-8} \cdot \left(0 - \pi \cdot \pi\right)\right)}{\pi \cdot \pi} - \frac{180}{\pi}}{angle}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{\frac{0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot x-scale\right)\right)}{y-scale}}\right)}{\pi}\\
\end{array}
\end{array}
if b < 2.44999999999999994e-57Initial program 19.1%
Simplified18.9%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified30.3%
Taylor expanded in angle around 0
Simplified31.6%
Taylor expanded in b around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6445.2%
Simplified45.2%
if 2.44999999999999994e-57 < b < 2.1e128Initial program 24.9%
Simplified22.0%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified45.9%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6442.8%
Simplified42.8%
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
clear-numN/A
/-lowering-/.f64N/A
*-commutativeN/A
metadata-evalN/A
div-invN/A
*-commutativeN/A
metadata-evalN/A
div-invN/A
quot-tanN/A
tan-lowering-tan.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6442.5%
Applied egg-rr42.5%
Taylor expanded in angle around 0
/-lowering-/.f64N/A
Simplified47.6%
if 2.1e128 < b Initial program 4.2%
Simplified0.0%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified8.5%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6474.6%
Simplified74.6%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr74.0%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
PI-lowering-PI.f6478.8%
Simplified78.8%
Final simplification48.7%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0
(/
(*
180.0
(atan
(*
(/ y-scale x-scale)
(/
(-
(*
(* -32400.0 (* angle angle))
(/
(* PI (* 5.7155921353452215e-8 (- 0.0 (* PI PI))))
(* PI PI)))
(/ 180.0 PI))
angle))))
PI)))
(if (<= b_m 4.1e-162)
t_0
(if (<= b_m 1.25e-83)
(*
180.0
(/
(atan
(*
-180.0
(/
(/ (* y-scale (* b_m b_m)) angle)
(* (- (* b_m b_m) (* a a)) (* PI x-scale)))))
PI))
(if (<= b_m 1.35e+128)
t_0
(*
180.0
(/
(atan
(/
-1.0
(/ (* 0.005555555555555556 (* angle (* PI x-scale))) y-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 = (180.0 * atan(((y_45_scale / x_45_scale) * ((((-32400.0 * (angle * angle)) * ((((double) M_PI) * (5.7155921353452215e-8 * (0.0 - (((double) M_PI) * ((double) M_PI))))) / (((double) M_PI) * ((double) M_PI)))) - (180.0 / ((double) M_PI))) / angle)))) / ((double) M_PI);
double tmp;
if (b_m <= 4.1e-162) {
tmp = t_0;
} else if (b_m <= 1.25e-83) {
tmp = 180.0 * (atan((-180.0 * (((y_45_scale * (b_m * b_m)) / angle) / (((b_m * b_m) - (a * a)) * (((double) M_PI) * x_45_scale))))) / ((double) M_PI));
} else if (b_m <= 1.35e+128) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((-1.0 / ((0.005555555555555556 * (angle * (((double) M_PI) * x_45_scale))) / y_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 = (180.0 * Math.atan(((y_45_scale / x_45_scale) * ((((-32400.0 * (angle * angle)) * ((Math.PI * (5.7155921353452215e-8 * (0.0 - (Math.PI * Math.PI)))) / (Math.PI * Math.PI))) - (180.0 / Math.PI)) / angle)))) / Math.PI;
double tmp;
if (b_m <= 4.1e-162) {
tmp = t_0;
} else if (b_m <= 1.25e-83) {
tmp = 180.0 * (Math.atan((-180.0 * (((y_45_scale * (b_m * b_m)) / angle) / (((b_m * b_m) - (a * a)) * (Math.PI * x_45_scale))))) / Math.PI);
} else if (b_m <= 1.35e+128) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((-1.0 / ((0.005555555555555556 * (angle * (Math.PI * x_45_scale))) / y_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 = (180.0 * math.atan(((y_45_scale / x_45_scale) * ((((-32400.0 * (angle * angle)) * ((math.pi * (5.7155921353452215e-8 * (0.0 - (math.pi * math.pi)))) / (math.pi * math.pi))) - (180.0 / math.pi)) / angle)))) / math.pi tmp = 0 if b_m <= 4.1e-162: tmp = t_0 elif b_m <= 1.25e-83: tmp = 180.0 * (math.atan((-180.0 * (((y_45_scale * (b_m * b_m)) / angle) / (((b_m * b_m) - (a * a)) * (math.pi * x_45_scale))))) / math.pi) elif b_m <= 1.35e+128: tmp = t_0 else: tmp = 180.0 * (math.atan((-1.0 / ((0.005555555555555556 * (angle * (math.pi * x_45_scale))) / y_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(180.0 * atan(Float64(Float64(y_45_scale / x_45_scale) * Float64(Float64(Float64(Float64(-32400.0 * Float64(angle * angle)) * Float64(Float64(pi * Float64(5.7155921353452215e-8 * Float64(0.0 - Float64(pi * pi)))) / Float64(pi * pi))) - Float64(180.0 / pi)) / angle)))) / pi) tmp = 0.0 if (b_m <= 4.1e-162) tmp = t_0; elseif (b_m <= 1.25e-83) tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(Float64(Float64(y_45_scale * Float64(b_m * b_m)) / angle) / Float64(Float64(Float64(b_m * b_m) - Float64(a * a)) * Float64(pi * x_45_scale))))) / pi)); elseif (b_m <= 1.35e+128) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(-1.0 / Float64(Float64(0.005555555555555556 * Float64(angle * Float64(pi * x_45_scale))) / y_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 = (180.0 * atan(((y_45_scale / x_45_scale) * ((((-32400.0 * (angle * angle)) * ((pi * (5.7155921353452215e-8 * (0.0 - (pi * pi)))) / (pi * pi))) - (180.0 / pi)) / angle)))) / pi; tmp = 0.0; if (b_m <= 4.1e-162) tmp = t_0; elseif (b_m <= 1.25e-83) tmp = 180.0 * (atan((-180.0 * (((y_45_scale * (b_m * b_m)) / angle) / (((b_m * b_m) - (a * a)) * (pi * x_45_scale))))) / pi); elseif (b_m <= 1.35e+128) tmp = t_0; else tmp = 180.0 * (atan((-1.0 / ((0.005555555555555556 * (angle * (pi * x_45_scale))) / y_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[(180.0 * N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(N[(N[(N[(-32400.0 * N[(angle * angle), $MachinePrecision]), $MachinePrecision] * N[(N[(Pi * N[(5.7155921353452215e-8 * N[(0.0 - N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision] / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[b$95$m, 4.1e-162], t$95$0, If[LessEqual[b$95$m, 1.25e-83], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(N[(N[(y$45$scale * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] / angle), $MachinePrecision] / N[(N[(N[(b$95$m * b$95$m), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.35e+128], t$95$0, N[(180.0 * N[(N[ArcTan[N[(-1.0 / N[(N[(0.005555555555555556 * N[(angle * N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\left(-32400 \cdot \left(angle \cdot angle\right)\right) \cdot \frac{\pi \cdot \left(5.7155921353452215 \cdot 10^{-8} \cdot \left(0 - \pi \cdot \pi\right)\right)}{\pi \cdot \pi} - \frac{180}{\pi}}{angle}\right)}{\pi}\\
\mathbf{if}\;b\_m \leq 4.1 \cdot 10^{-162}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;b\_m \leq 1.25 \cdot 10^{-83}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{\frac{y-scale \cdot \left(b\_m \cdot b\_m\right)}{angle}}{\left(b\_m \cdot b\_m - a \cdot a\right) \cdot \left(\pi \cdot x-scale\right)}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.35 \cdot 10^{+128}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{\frac{0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot x-scale\right)\right)}{y-scale}}\right)}{\pi}\\
\end{array}
\end{array}
if b < 4.10000000000000019e-162 or 1.25e-83 < b < 1.35000000000000001e128Initial program 19.6%
Simplified17.9%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified31.7%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6446.8%
Simplified46.8%
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
clear-numN/A
/-lowering-/.f64N/A
*-commutativeN/A
metadata-evalN/A
div-invN/A
*-commutativeN/A
metadata-evalN/A
div-invN/A
quot-tanN/A
tan-lowering-tan.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6449.1%
Applied egg-rr49.1%
Taylor expanded in angle around 0
/-lowering-/.f64N/A
Simplified46.7%
if 4.10000000000000019e-162 < b < 1.25e-83Initial program 25.8%
Taylor expanded in angle around 0
associate-*r/N/A
/-lowering-/.f64N/A
Simplified29.7%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
--lowering--.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6458.7%
Simplified58.7%
if 1.35000000000000001e128 < b Initial program 4.2%
Simplified0.0%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified8.5%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6474.6%
Simplified74.6%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr74.0%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
PI-lowering-PI.f6478.8%
Simplified78.8%
Final simplification50.5%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0
(/
(*
180.0
(atan
(/
(-
(*
(* angle angle)
(* (/ (* y-scale PI) x-scale) (- 0.0 -0.001851851851851852)))
(* 180.0 (/ (/ y-scale x-scale) PI)))
angle)))
PI)))
(if (<= b_m 3.1e-163)
t_0
(if (<= b_m 1.5e+71)
(*
180.0
(/
(atan
(/
(/ (* -180.0 (* y-scale (* b_m b_m))) x-scale)
(* (* angle PI) (- (* b_m b_m) (* a a)))))
PI))
(if (<= b_m 9.2e+127)
t_0
(*
180.0
(/
(atan
(/
-1.0
(/ (* 0.005555555555555556 (* angle (* PI x-scale))) y-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 = (180.0 * atan(((((angle * angle) * (((y_45_scale * ((double) M_PI)) / x_45_scale) * (0.0 - -0.001851851851851852))) - (180.0 * ((y_45_scale / x_45_scale) / ((double) M_PI)))) / angle))) / ((double) M_PI);
double tmp;
if (b_m <= 3.1e-163) {
tmp = t_0;
} else if (b_m <= 1.5e+71) {
tmp = 180.0 * (atan((((-180.0 * (y_45_scale * (b_m * b_m))) / x_45_scale) / ((angle * ((double) M_PI)) * ((b_m * b_m) - (a * a))))) / ((double) M_PI));
} else if (b_m <= 9.2e+127) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((-1.0 / ((0.005555555555555556 * (angle * (((double) M_PI) * x_45_scale))) / y_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 = (180.0 * Math.atan(((((angle * angle) * (((y_45_scale * Math.PI) / x_45_scale) * (0.0 - -0.001851851851851852))) - (180.0 * ((y_45_scale / x_45_scale) / Math.PI))) / angle))) / Math.PI;
double tmp;
if (b_m <= 3.1e-163) {
tmp = t_0;
} else if (b_m <= 1.5e+71) {
tmp = 180.0 * (Math.atan((((-180.0 * (y_45_scale * (b_m * b_m))) / x_45_scale) / ((angle * Math.PI) * ((b_m * b_m) - (a * a))))) / Math.PI);
} else if (b_m <= 9.2e+127) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((-1.0 / ((0.005555555555555556 * (angle * (Math.PI * x_45_scale))) / y_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 = (180.0 * math.atan(((((angle * angle) * (((y_45_scale * math.pi) / x_45_scale) * (0.0 - -0.001851851851851852))) - (180.0 * ((y_45_scale / x_45_scale) / math.pi))) / angle))) / math.pi tmp = 0 if b_m <= 3.1e-163: tmp = t_0 elif b_m <= 1.5e+71: tmp = 180.0 * (math.atan((((-180.0 * (y_45_scale * (b_m * b_m))) / x_45_scale) / ((angle * math.pi) * ((b_m * b_m) - (a * a))))) / math.pi) elif b_m <= 9.2e+127: tmp = t_0 else: tmp = 180.0 * (math.atan((-1.0 / ((0.005555555555555556 * (angle * (math.pi * x_45_scale))) / y_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(180.0 * atan(Float64(Float64(Float64(Float64(angle * angle) * Float64(Float64(Float64(y_45_scale * pi) / x_45_scale) * Float64(0.0 - -0.001851851851851852))) - Float64(180.0 * Float64(Float64(y_45_scale / x_45_scale) / pi))) / angle))) / pi) tmp = 0.0 if (b_m <= 3.1e-163) tmp = t_0; elseif (b_m <= 1.5e+71) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-180.0 * Float64(y_45_scale * Float64(b_m * b_m))) / x_45_scale) / Float64(Float64(angle * pi) * Float64(Float64(b_m * b_m) - Float64(a * a))))) / pi)); elseif (b_m <= 9.2e+127) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(-1.0 / Float64(Float64(0.005555555555555556 * Float64(angle * Float64(pi * x_45_scale))) / y_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 = (180.0 * atan(((((angle * angle) * (((y_45_scale * pi) / x_45_scale) * (0.0 - -0.001851851851851852))) - (180.0 * ((y_45_scale / x_45_scale) / pi))) / angle))) / pi; tmp = 0.0; if (b_m <= 3.1e-163) tmp = t_0; elseif (b_m <= 1.5e+71) tmp = 180.0 * (atan((((-180.0 * (y_45_scale * (b_m * b_m))) / x_45_scale) / ((angle * pi) * ((b_m * b_m) - (a * a))))) / pi); elseif (b_m <= 9.2e+127) tmp = t_0; else tmp = 180.0 * (atan((-1.0 / ((0.005555555555555556 * (angle * (pi * x_45_scale))) / y_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[(180.0 * N[ArcTan[N[(N[(N[(N[(angle * angle), $MachinePrecision] * N[(N[(N[(y$45$scale * Pi), $MachinePrecision] / x$45$scale), $MachinePrecision] * N[(0.0 - -0.001851851851851852), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(180.0 * N[(N[(y$45$scale / x$45$scale), $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / angle), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[b$95$m, 3.1e-163], t$95$0, If[LessEqual[b$95$m, 1.5e+71], N[(180.0 * N[(N[ArcTan[N[(N[(N[(-180.0 * N[(y$45$scale * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision] / N[(N[(angle * Pi), $MachinePrecision] * N[(N[(b$95$m * b$95$m), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 9.2e+127], t$95$0, N[(180.0 * N[(N[ArcTan[N[(-1.0 / N[(N[(0.005555555555555556 * N[(angle * N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{\left(angle \cdot angle\right) \cdot \left(\frac{y-scale \cdot \pi}{x-scale} \cdot \left(0 - -0.001851851851851852\right)\right) - 180 \cdot \frac{\frac{y-scale}{x-scale}}{\pi}}{angle}\right)}{\pi}\\
\mathbf{if}\;b\_m \leq 3.1 \cdot 10^{-163}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;b\_m \leq 1.5 \cdot 10^{+71}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\frac{-180 \cdot \left(y-scale \cdot \left(b\_m \cdot b\_m\right)\right)}{x-scale}}{\left(angle \cdot \pi\right) \cdot \left(b\_m \cdot b\_m - a \cdot a\right)}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 9.2 \cdot 10^{+127}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{\frac{0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot x-scale\right)\right)}{y-scale}}\right)}{\pi}\\
\end{array}
\end{array}
if b < 3.09999999999999975e-163 or 1.50000000000000006e71 < b < 9.2000000000000007e127Initial program 18.0%
Simplified15.9%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified30.1%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6449.2%
Simplified49.2%
Taylor expanded in angle around 0
/-lowering-/.f64N/A
Simplified43.1%
if 3.09999999999999975e-163 < b < 1.50000000000000006e71Initial program 27.7%
Taylor expanded in angle around 0
associate-*r/N/A
/-lowering-/.f64N/A
Simplified27.7%
Taylor expanded in x-scale around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6436.1%
Simplified36.1%
if 9.2000000000000007e127 < b Initial program 4.2%
Simplified0.0%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified8.5%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6474.6%
Simplified74.6%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr74.0%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
PI-lowering-PI.f6478.8%
Simplified78.8%
Final simplification45.1%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 3.7e-171)
(/
(* 180.0 (atan (* (/ 180.0 (* angle PI)) (- 0.0 (/ y-scale x-scale)))))
PI)
(if (<= b_m 6e+104)
(*
180.0
(/
(atan
(/
(/ (* -180.0 (* y-scale (* b_m b_m))) x-scale)
(* (* angle PI) (- (* b_m b_m) (* a a)))))
PI))
(*
180.0
(/
(atan
(/ -1.0 (/ (* 0.005555555555555556 (* angle (* PI x-scale))) y-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 (b_m <= 3.7e-171) {
tmp = (180.0 * atan(((180.0 / (angle * ((double) M_PI))) * (0.0 - (y_45_scale / x_45_scale))))) / ((double) M_PI);
} else if (b_m <= 6e+104) {
tmp = 180.0 * (atan((((-180.0 * (y_45_scale * (b_m * b_m))) / x_45_scale) / ((angle * ((double) M_PI)) * ((b_m * b_m) - (a * a))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-1.0 / ((0.005555555555555556 * (angle * (((double) M_PI) * x_45_scale))) / y_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 (b_m <= 3.7e-171) {
tmp = (180.0 * Math.atan(((180.0 / (angle * Math.PI)) * (0.0 - (y_45_scale / x_45_scale))))) / Math.PI;
} else if (b_m <= 6e+104) {
tmp = 180.0 * (Math.atan((((-180.0 * (y_45_scale * (b_m * b_m))) / x_45_scale) / ((angle * Math.PI) * ((b_m * b_m) - (a * a))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-1.0 / ((0.005555555555555556 * (angle * (Math.PI * x_45_scale))) / y_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 b_m <= 3.7e-171: tmp = (180.0 * math.atan(((180.0 / (angle * math.pi)) * (0.0 - (y_45_scale / x_45_scale))))) / math.pi elif b_m <= 6e+104: tmp = 180.0 * (math.atan((((-180.0 * (y_45_scale * (b_m * b_m))) / x_45_scale) / ((angle * math.pi) * ((b_m * b_m) - (a * a))))) / math.pi) else: tmp = 180.0 * (math.atan((-1.0 / ((0.005555555555555556 * (angle * (math.pi * x_45_scale))) / y_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 (b_m <= 3.7e-171) tmp = Float64(Float64(180.0 * atan(Float64(Float64(180.0 / Float64(angle * pi)) * Float64(0.0 - Float64(y_45_scale / x_45_scale))))) / pi); elseif (b_m <= 6e+104) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-180.0 * Float64(y_45_scale * Float64(b_m * b_m))) / x_45_scale) / Float64(Float64(angle * pi) * Float64(Float64(b_m * b_m) - Float64(a * a))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-1.0 / Float64(Float64(0.005555555555555556 * Float64(angle * Float64(pi * x_45_scale))) / y_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 (b_m <= 3.7e-171) tmp = (180.0 * atan(((180.0 / (angle * pi)) * (0.0 - (y_45_scale / x_45_scale))))) / pi; elseif (b_m <= 6e+104) tmp = 180.0 * (atan((((-180.0 * (y_45_scale * (b_m * b_m))) / x_45_scale) / ((angle * pi) * ((b_m * b_m) - (a * a))))) / pi); else tmp = 180.0 * (atan((-1.0 / ((0.005555555555555556 * (angle * (pi * x_45_scale))) / y_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[b$95$m, 3.7e-171], N[(N[(180.0 * N[ArcTan[N[(N[(180.0 / N[(angle * Pi), $MachinePrecision]), $MachinePrecision] * N[(0.0 - N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[b$95$m, 6e+104], N[(180.0 * N[(N[ArcTan[N[(N[(N[(-180.0 * N[(y$45$scale * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision] / N[(N[(angle * Pi), $MachinePrecision] * N[(N[(b$95$m * b$95$m), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-1.0 / N[(N[(0.005555555555555556 * N[(angle * N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 3.7 \cdot 10^{-171}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{180}{angle \cdot \pi} \cdot \left(0 - \frac{y-scale}{x-scale}\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 6 \cdot 10^{+104}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\frac{-180 \cdot \left(y-scale \cdot \left(b\_m \cdot b\_m\right)\right)}{x-scale}}{\left(angle \cdot \pi\right) \cdot \left(b\_m \cdot b\_m - a \cdot a\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{\frac{0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot x-scale\right)\right)}{y-scale}}\right)}{\pi}\\
\end{array}
\end{array}
if b < 3.70000000000000012e-171Initial program 18.2%
Simplified16.5%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified28.2%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6448.6%
Simplified48.6%
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
clear-numN/A
/-lowering-/.f64N/A
*-commutativeN/A
metadata-evalN/A
div-invN/A
*-commutativeN/A
metadata-evalN/A
div-invN/A
quot-tanN/A
tan-lowering-tan.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6451.0%
Applied egg-rr51.0%
Taylor expanded in angle around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6443.3%
Simplified43.3%
if 3.70000000000000012e-171 < b < 5.99999999999999937e104Initial program 25.2%
Taylor expanded in angle around 0
associate-*r/N/A
/-lowering-/.f64N/A
Simplified23.6%
Taylor expanded in x-scale around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6437.5%
Simplified37.5%
if 5.99999999999999937e104 < b Initial program 7.1%
Simplified0.0%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified18.9%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6475.6%
Simplified75.6%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr74.3%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
PI-lowering-PI.f6478.4%
Simplified78.4%
Final simplification45.8%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 4.1e-171)
(/
(* 180.0 (atan (* (/ 180.0 (* angle PI)) (- 0.0 (/ y-scale x-scale)))))
PI)
(if (<= b_m 7e+104)
(*
180.0
(/
(atan
(/
(* -180.0 (* y-scale (* b_m b_m)))
(* (* angle x-scale) (* PI (- (* b_m b_m) (* a a))))))
PI))
(*
180.0
(/
(atan
(/ -1.0 (/ (* 0.005555555555555556 (* angle (* PI x-scale))) y-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 (b_m <= 4.1e-171) {
tmp = (180.0 * atan(((180.0 / (angle * ((double) M_PI))) * (0.0 - (y_45_scale / x_45_scale))))) / ((double) M_PI);
} else if (b_m <= 7e+104) {
tmp = 180.0 * (atan(((-180.0 * (y_45_scale * (b_m * b_m))) / ((angle * x_45_scale) * (((double) M_PI) * ((b_m * b_m) - (a * a)))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-1.0 / ((0.005555555555555556 * (angle * (((double) M_PI) * x_45_scale))) / y_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 (b_m <= 4.1e-171) {
tmp = (180.0 * Math.atan(((180.0 / (angle * Math.PI)) * (0.0 - (y_45_scale / x_45_scale))))) / Math.PI;
} else if (b_m <= 7e+104) {
tmp = 180.0 * (Math.atan(((-180.0 * (y_45_scale * (b_m * b_m))) / ((angle * x_45_scale) * (Math.PI * ((b_m * b_m) - (a * a)))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-1.0 / ((0.005555555555555556 * (angle * (Math.PI * x_45_scale))) / y_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 b_m <= 4.1e-171: tmp = (180.0 * math.atan(((180.0 / (angle * math.pi)) * (0.0 - (y_45_scale / x_45_scale))))) / math.pi elif b_m <= 7e+104: tmp = 180.0 * (math.atan(((-180.0 * (y_45_scale * (b_m * b_m))) / ((angle * x_45_scale) * (math.pi * ((b_m * b_m) - (a * a)))))) / math.pi) else: tmp = 180.0 * (math.atan((-1.0 / ((0.005555555555555556 * (angle * (math.pi * x_45_scale))) / y_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 (b_m <= 4.1e-171) tmp = Float64(Float64(180.0 * atan(Float64(Float64(180.0 / Float64(angle * pi)) * Float64(0.0 - Float64(y_45_scale / x_45_scale))))) / pi); elseif (b_m <= 7e+104) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-180.0 * Float64(y_45_scale * Float64(b_m * b_m))) / Float64(Float64(angle * x_45_scale) * Float64(pi * Float64(Float64(b_m * b_m) - Float64(a * a)))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-1.0 / Float64(Float64(0.005555555555555556 * Float64(angle * Float64(pi * x_45_scale))) / y_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 (b_m <= 4.1e-171) tmp = (180.0 * atan(((180.0 / (angle * pi)) * (0.0 - (y_45_scale / x_45_scale))))) / pi; elseif (b_m <= 7e+104) tmp = 180.0 * (atan(((-180.0 * (y_45_scale * (b_m * b_m))) / ((angle * x_45_scale) * (pi * ((b_m * b_m) - (a * a)))))) / pi); else tmp = 180.0 * (atan((-1.0 / ((0.005555555555555556 * (angle * (pi * x_45_scale))) / y_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[b$95$m, 4.1e-171], N[(N[(180.0 * N[ArcTan[N[(N[(180.0 / N[(angle * Pi), $MachinePrecision]), $MachinePrecision] * N[(0.0 - N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[b$95$m, 7e+104], N[(180.0 * N[(N[ArcTan[N[(N[(-180.0 * N[(y$45$scale * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(angle * x$45$scale), $MachinePrecision] * N[(Pi * N[(N[(b$95$m * b$95$m), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-1.0 / N[(N[(0.005555555555555556 * N[(angle * N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 4.1 \cdot 10^{-171}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{180}{angle \cdot \pi} \cdot \left(0 - \frac{y-scale}{x-scale}\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 7 \cdot 10^{+104}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-180 \cdot \left(y-scale \cdot \left(b\_m \cdot b\_m\right)\right)}{\left(angle \cdot x-scale\right) \cdot \left(\pi \cdot \left(b\_m \cdot b\_m - a \cdot a\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{\frac{0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot x-scale\right)\right)}{y-scale}}\right)}{\pi}\\
\end{array}
\end{array}
if b < 4.1e-171Initial program 18.2%
Simplified16.5%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified28.2%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6448.6%
Simplified48.6%
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
clear-numN/A
/-lowering-/.f64N/A
*-commutativeN/A
metadata-evalN/A
div-invN/A
*-commutativeN/A
metadata-evalN/A
div-invN/A
quot-tanN/A
tan-lowering-tan.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6451.0%
Applied egg-rr51.0%
Taylor expanded in angle around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6443.3%
Simplified43.3%
if 4.1e-171 < b < 7.0000000000000003e104Initial program 25.2%
Taylor expanded in x-scale around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
Simplified31.7%
Applied egg-rr31.7%
Taylor expanded in angle around 0
associate-*r/N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
+-commutativeN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r*N/A
+-commutativeN/A
difference-of-squaresN/A
unpow2N/A
unpow2N/A
Simplified39.0%
if 7.0000000000000003e104 < b Initial program 7.1%
Simplified0.0%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified18.9%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6475.6%
Simplified75.6%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr74.3%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
PI-lowering-PI.f6478.4%
Simplified78.4%
Final simplification46.2%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 3.9e-171)
(/
(* 180.0 (atan (* (/ 180.0 (* angle PI)) (- 0.0 (/ y-scale x-scale)))))
PI)
(if (<= b_m 2.3e+56)
(*
180.0
(/
(atan
(*
-180.0
(/
(/ (* y-scale (* b_m b_m)) angle)
(* (- (* b_m b_m) (* a a)) (* PI x-scale)))))
PI))
(/
(* 180.0 (atan (* 180.0 (/ y-scale (* angle (* PI (- 0.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 tmp;
if (b_m <= 3.9e-171) {
tmp = (180.0 * atan(((180.0 / (angle * ((double) M_PI))) * (0.0 - (y_45_scale / x_45_scale))))) / ((double) M_PI);
} else if (b_m <= 2.3e+56) {
tmp = 180.0 * (atan((-180.0 * (((y_45_scale * (b_m * b_m)) / angle) / (((b_m * b_m) - (a * a)) * (((double) M_PI) * x_45_scale))))) / ((double) M_PI));
} else {
tmp = (180.0 * atan((180.0 * (y_45_scale / (angle * (((double) M_PI) * (0.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 tmp;
if (b_m <= 3.9e-171) {
tmp = (180.0 * Math.atan(((180.0 / (angle * Math.PI)) * (0.0 - (y_45_scale / x_45_scale))))) / Math.PI;
} else if (b_m <= 2.3e+56) {
tmp = 180.0 * (Math.atan((-180.0 * (((y_45_scale * (b_m * b_m)) / angle) / (((b_m * b_m) - (a * a)) * (Math.PI * x_45_scale))))) / Math.PI);
} else {
tmp = (180.0 * Math.atan((180.0 * (y_45_scale / (angle * (Math.PI * (0.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): tmp = 0 if b_m <= 3.9e-171: tmp = (180.0 * math.atan(((180.0 / (angle * math.pi)) * (0.0 - (y_45_scale / x_45_scale))))) / math.pi elif b_m <= 2.3e+56: tmp = 180.0 * (math.atan((-180.0 * (((y_45_scale * (b_m * b_m)) / angle) / (((b_m * b_m) - (a * a)) * (math.pi * x_45_scale))))) / math.pi) else: tmp = (180.0 * math.atan((180.0 * (y_45_scale / (angle * (math.pi * (0.0 - 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 (b_m <= 3.9e-171) tmp = Float64(Float64(180.0 * atan(Float64(Float64(180.0 / Float64(angle * pi)) * Float64(0.0 - Float64(y_45_scale / x_45_scale))))) / pi); elseif (b_m <= 2.3e+56) tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(Float64(Float64(y_45_scale * Float64(b_m * b_m)) / angle) / Float64(Float64(Float64(b_m * b_m) - Float64(a * a)) * Float64(pi * x_45_scale))))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(180.0 * Float64(y_45_scale / Float64(angle * Float64(pi * Float64(0.0 - 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 (b_m <= 3.9e-171) tmp = (180.0 * atan(((180.0 / (angle * pi)) * (0.0 - (y_45_scale / x_45_scale))))) / pi; elseif (b_m <= 2.3e+56) tmp = 180.0 * (atan((-180.0 * (((y_45_scale * (b_m * b_m)) / angle) / (((b_m * b_m) - (a * a)) * (pi * x_45_scale))))) / pi); else tmp = (180.0 * atan((180.0 * (y_45_scale / (angle * (pi * (0.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_] := If[LessEqual[b$95$m, 3.9e-171], N[(N[(180.0 * N[ArcTan[N[(N[(180.0 / N[(angle * Pi), $MachinePrecision]), $MachinePrecision] * N[(0.0 - N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[b$95$m, 2.3e+56], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(N[(N[(y$45$scale * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] / angle), $MachinePrecision] / N[(N[(N[(b$95$m * b$95$m), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(180.0 * N[(y$45$scale / N[(angle * N[(Pi * N[(0.0 - x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 3.9 \cdot 10^{-171}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{180}{angle \cdot \pi} \cdot \left(0 - \frac{y-scale}{x-scale}\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 2.3 \cdot 10^{+56}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{\frac{y-scale \cdot \left(b\_m \cdot b\_m\right)}{angle}}{\left(b\_m \cdot b\_m - a \cdot a\right) \cdot \left(\pi \cdot x-scale\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(180 \cdot \frac{y-scale}{angle \cdot \left(\pi \cdot \left(0 - x-scale\right)\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 3.8999999999999998e-171Initial program 18.2%
Simplified16.5%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified28.2%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6448.6%
Simplified48.6%
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
clear-numN/A
/-lowering-/.f64N/A
*-commutativeN/A
metadata-evalN/A
div-invN/A
*-commutativeN/A
metadata-evalN/A
div-invN/A
quot-tanN/A
tan-lowering-tan.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6451.0%
Applied egg-rr51.0%
Taylor expanded in angle around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6443.3%
Simplified43.3%
if 3.8999999999999998e-171 < b < 2.30000000000000015e56Initial program 29.8%
Taylor expanded in angle around 0
associate-*r/N/A
/-lowering-/.f64N/A
Simplified25.7%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
--lowering--.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6436.0%
Simplified36.0%
if 2.30000000000000015e56 < b Initial program 5.5%
Simplified2.8%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified25.3%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6471.1%
Simplified71.1%
Taylor expanded in angle around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
PI-lowering-PI.f6470.6%
Simplified70.6%
Final simplification45.8%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= angle 1.18e+21)
(*
180.0
(/
(atan
(/ -1.0 (* (* 0.005555555555555556 (* angle PI)) (/ x-scale y-scale))))
PI))
(*
180.0
(/
(atan
(/
(/ (* y-scale (* 180.0 (* b_m b_m))) (* angle (* PI x-scale)))
(* a a)))
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 (angle <= 1.18e+21) {
tmp = 180.0 * (atan((-1.0 / ((0.005555555555555556 * (angle * ((double) M_PI))) * (x_45_scale / y_45_scale)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((((y_45_scale * (180.0 * (b_m * b_m))) / (angle * (((double) M_PI) * x_45_scale))) / (a * a))) / ((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 (angle <= 1.18e+21) {
tmp = 180.0 * (Math.atan((-1.0 / ((0.005555555555555556 * (angle * Math.PI)) * (x_45_scale / y_45_scale)))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((((y_45_scale * (180.0 * (b_m * b_m))) / (angle * (Math.PI * x_45_scale))) / (a * a))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if angle <= 1.18e+21: tmp = 180.0 * (math.atan((-1.0 / ((0.005555555555555556 * (angle * math.pi)) * (x_45_scale / y_45_scale)))) / math.pi) else: tmp = 180.0 * (math.atan((((y_45_scale * (180.0 * (b_m * b_m))) / (angle * (math.pi * x_45_scale))) / (a * a))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (angle <= 1.18e+21) tmp = Float64(180.0 * Float64(atan(Float64(-1.0 / Float64(Float64(0.005555555555555556 * Float64(angle * pi)) * Float64(x_45_scale / y_45_scale)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(y_45_scale * Float64(180.0 * Float64(b_m * b_m))) / Float64(angle * Float64(pi * x_45_scale))) / Float64(a * a))) / 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 (angle <= 1.18e+21) tmp = 180.0 * (atan((-1.0 / ((0.005555555555555556 * (angle * pi)) * (x_45_scale / y_45_scale)))) / pi); else tmp = 180.0 * (atan((((y_45_scale * (180.0 * (b_m * b_m))) / (angle * (pi * x_45_scale))) / (a * a))) / 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[angle, 1.18e+21], N[(180.0 * N[(N[ArcTan[N[(-1.0 / N[(N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision] * N[(x$45$scale / y$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(y$45$scale * N[(180.0 * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(angle * N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 1.18 \cdot 10^{+21}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \frac{x-scale}{y-scale}}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\frac{y-scale \cdot \left(180 \cdot \left(b\_m \cdot b\_m\right)\right)}{angle \cdot \left(\pi \cdot x-scale\right)}}{a \cdot a}\right)}{\pi}\\
\end{array}
\end{array}
if angle < 1.18e21Initial program 18.6%
Simplified17.7%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified31.0%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6450.8%
Simplified50.8%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr53.4%
Taylor expanded in angle around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6449.0%
Simplified49.0%
if 1.18e21 < angle Initial program 18.5%
Taylor expanded in x-scale around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
Simplified25.0%
Applied egg-rr23.1%
Taylor expanded in angle around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
--lowering--.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6410.7%
Simplified10.7%
Taylor expanded in b around 0
associate-*r/N/A
*-commutativeN/A
associate-/r*N/A
associate-*r/N/A
/-lowering-/.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
unpow2N/A
*-lowering-*.f6429.5%
Simplified29.5%
Final simplification45.6%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(*
180.0
(/
(atan
(/ -1.0 (* (* 0.005555555555555556 (* angle PI)) (/ x-scale y-scale))))
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((-1.0 / ((0.005555555555555556 * (angle * ((double) M_PI))) * (x_45_scale / y_45_scale)))) / ((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((-1.0 / ((0.005555555555555556 * (angle * Math.PI)) * (x_45_scale / y_45_scale)))) / Math.PI);
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): return 180.0 * (math.atan((-1.0 / ((0.005555555555555556 * (angle * math.pi)) * (x_45_scale / y_45_scale)))) / 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(-1.0 / Float64(Float64(0.005555555555555556 * Float64(angle * pi)) * Float64(x_45_scale / y_45_scale)))) / pi)) end
b_m = abs(b); function tmp = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 180.0 * (atan((-1.0 / ((0.005555555555555556 * (angle * pi)) * (x_45_scale / y_45_scale)))) / 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[(-1.0 / N[(N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision] * N[(x$45$scale / y$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
180 \cdot \frac{\tan^{-1} \left(\frac{-1}{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \frac{x-scale}{y-scale}}\right)}{\pi}
\end{array}
Initial program 18.6%
Simplified17.6%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified30.6%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6448.3%
Simplified48.3%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr50.2%
Taylor expanded in angle around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6443.7%
Simplified43.7%
Final simplification43.7%
b_m = (fabs.f64 b) (FPCore (a b_m angle x-scale y-scale) :precision binary64 (/ (* 180.0 (atan (* (/ 180.0 (* angle PI)) (- 0.0 (/ 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) {
return (180.0 * atan(((180.0 / (angle * ((double) M_PI))) * (0.0 - (y_45_scale / x_45_scale))))) / ((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 * Math.PI)) * (0.0 - (y_45_scale / x_45_scale))))) / 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 * math.pi)) * (0.0 - (y_45_scale / x_45_scale))))) / math.pi
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) return Float64(Float64(180.0 * atan(Float64(Float64(180.0 / Float64(angle * pi)) * Float64(0.0 - Float64(y_45_scale / x_45_scale))))) / 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 * pi)) * (0.0 - (y_45_scale / x_45_scale))))) / pi; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := N[(N[(180.0 * N[ArcTan[N[(N[(180.0 / N[(angle * Pi), $MachinePrecision]), $MachinePrecision] * N[(0.0 - N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
\frac{180 \cdot \tan^{-1} \left(\frac{180}{angle \cdot \pi} \cdot \left(0 - \frac{y-scale}{x-scale}\right)\right)}{\pi}
\end{array}
Initial program 18.6%
Simplified17.6%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified30.6%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6448.3%
Simplified48.3%
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
clear-numN/A
/-lowering-/.f64N/A
*-commutativeN/A
metadata-evalN/A
div-invN/A
*-commutativeN/A
metadata-evalN/A
div-invN/A
quot-tanN/A
tan-lowering-tan.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6450.2%
Applied egg-rr50.2%
Taylor expanded in angle around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6443.6%
Simplified43.6%
Final simplification43.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 (* PI (- 0.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) {
return (180.0 * atan((180.0 * (y_45_scale / (angle * (((double) M_PI) * (0.0 - x_45_scale))))))) / ((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 * (Math.PI * (0.0 - x_45_scale))))))) / 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 * (math.pi * (0.0 - x_45_scale))))))) / math.pi
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) return Float64(Float64(180.0 * atan(Float64(180.0 * Float64(y_45_scale / Float64(angle * Float64(pi * Float64(0.0 - x_45_scale))))))) / 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 * (pi * (0.0 - x_45_scale))))))) / pi; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := N[(N[(180.0 * N[ArcTan[N[(180.0 * N[(y$45$scale / N[(angle * N[(Pi * N[(0.0 - x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
\frac{180 \cdot \tan^{-1} \left(180 \cdot \frac{y-scale}{angle \cdot \left(\pi \cdot \left(0 - x-scale\right)\right)}\right)}{\pi}
\end{array}
Initial program 18.6%
Simplified17.6%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified30.6%
Taylor expanded in b around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6448.3%
Simplified48.3%
Taylor expanded in angle around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
PI-lowering-PI.f6441.9%
Simplified41.9%
Final simplification41.9%
b_m = (fabs.f64 b) (FPCore (a b_m angle x-scale y-scale) :precision binary64 (* 180.0 (/ (atan (/ (* y-scale -180.0) (* angle (* 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) {
return 180.0 * (atan(((y_45_scale * -180.0) / (angle * (((double) M_PI) * x_45_scale)))) / ((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 * -180.0) / (angle * (Math.PI * x_45_scale)))) / 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 * -180.0) / (angle * (math.pi * x_45_scale)))) / 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 * -180.0) / Float64(angle * Float64(pi * x_45_scale)))) / 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 * -180.0) / (angle * (pi * x_45_scale)))) / 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 * -180.0), $MachinePrecision] / N[(angle * N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot -180}{angle \cdot \left(\pi \cdot x-scale\right)}\right)}{\pi}
\end{array}
Initial program 18.6%
Taylor expanded in angle around 0
associate-*r/N/A
/-lowering-/.f64N/A
Simplified15.2%
Taylor expanded in a around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6441.9%
Simplified41.9%
Final simplification41.9%
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(Float64(-180.0 / 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[(N[(-180.0 / N[(y$45$scale * angle), $MachinePrecision]), $MachinePrecision] * N[(x$45$scale / Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
180 \cdot \frac{\tan^{-1} \left(\frac{-180}{y-scale \cdot angle} \cdot \frac{x-scale}{\pi}\right)}{\pi}
\end{array}
Initial program 18.6%
Taylor expanded in angle around 0
associate-*r/N/A
/-lowering-/.f64N/A
Simplified15.2%
Taylor expanded in a around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6414.8%
Simplified14.8%
associate-*r*N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6414.9%
Applied egg-rr14.9%
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(Float64(x_45_scale / 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[(N[(x$45$scale / Pi), $MachinePrecision] / N[(y$45$scale * angle), $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{x-scale}{\pi}}{y-scale \cdot angle}\right)}{\pi}
\end{array}
Initial program 18.6%
Taylor expanded in angle around 0
associate-*r/N/A
/-lowering-/.f64N/A
Simplified15.2%
Taylor expanded in a around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6414.8%
Simplified14.8%
associate-*r*N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6414.9%
Applied egg-rr14.9%
clear-numN/A
frac-timesN/A
metadata-evalN/A
div-invN/A
*-lowering-*.f64N/A
clear-numN/A
un-div-invN/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f6414.8%
Applied egg-rr14.8%
herbie shell --seed 2024191
(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)))