
(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 15 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 (/ PI (/ 180.0 angle)))
(t_1 (* 0.005555555555555556 (* angle PI)))
(t_2 (sin t_1))
(t_3 (cos t_1)))
(if (<= b_m 5.5e-100)
(*
180.0
(/
(atan
(*
-0.5
(*
y-scale
(/ (* -2.0 t_2) (* x-scale (cos (* PI (/ angle 180.0))))))))
PI))
(if (<= b_m 1.86e-51)
(*
180.0
(/
(atan
(*
-0.5
(*
y-scale
(/
(*
2.0
(+ (* (pow t_3 2.0) (* b_m b_m)) (pow (* (sin t_0) a) 2.0)))
(* x-scale (* t_3 (* t_2 (- (* b_m b_m) (* a a)))))))))
PI))
(if (<= b_m 1.05e+71)
(*
180.0
(/
(atan
(*
-0.5
(* (* y-scale (/ -2.0 x-scale)) (tan (* angle (/ PI 180.0))))))
PI))
(*
180.0
(/ (atan (/ (* y-scale (/ -1.0 (tan t_0))) x-scale)) PI)))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = ((double) M_PI) / (180.0 / angle);
double t_1 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_2 = sin(t_1);
double t_3 = cos(t_1);
double tmp;
if (b_m <= 5.5e-100) {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * ((-2.0 * t_2) / (x_45_scale * cos((((double) M_PI) * (angle / 180.0)))))))) / ((double) M_PI));
} else if (b_m <= 1.86e-51) {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * ((2.0 * ((pow(t_3, 2.0) * (b_m * b_m)) + pow((sin(t_0) * a), 2.0))) / (x_45_scale * (t_3 * (t_2 * ((b_m * b_m) - (a * a))))))))) / ((double) M_PI));
} else if (b_m <= 1.05e+71) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (-2.0 / x_45_scale)) * tan((angle * (((double) M_PI) / 180.0)))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((y_45_scale * (-1.0 / tan(t_0))) / x_45_scale)) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = Math.PI / (180.0 / angle);
double t_1 = 0.005555555555555556 * (angle * Math.PI);
double t_2 = Math.sin(t_1);
double t_3 = Math.cos(t_1);
double tmp;
if (b_m <= 5.5e-100) {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * ((-2.0 * t_2) / (x_45_scale * Math.cos((Math.PI * (angle / 180.0)))))))) / Math.PI);
} else if (b_m <= 1.86e-51) {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * ((2.0 * ((Math.pow(t_3, 2.0) * (b_m * b_m)) + Math.pow((Math.sin(t_0) * a), 2.0))) / (x_45_scale * (t_3 * (t_2 * ((b_m * b_m) - (a * a))))))))) / Math.PI);
} else if (b_m <= 1.05e+71) {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * (-2.0 / x_45_scale)) * Math.tan((angle * (Math.PI / 180.0)))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((y_45_scale * (-1.0 / Math.tan(t_0))) / x_45_scale)) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): t_0 = math.pi / (180.0 / angle) t_1 = 0.005555555555555556 * (angle * math.pi) t_2 = math.sin(t_1) t_3 = math.cos(t_1) tmp = 0 if b_m <= 5.5e-100: tmp = 180.0 * (math.atan((-0.5 * (y_45_scale * ((-2.0 * t_2) / (x_45_scale * math.cos((math.pi * (angle / 180.0)))))))) / math.pi) elif b_m <= 1.86e-51: tmp = 180.0 * (math.atan((-0.5 * (y_45_scale * ((2.0 * ((math.pow(t_3, 2.0) * (b_m * b_m)) + math.pow((math.sin(t_0) * a), 2.0))) / (x_45_scale * (t_3 * (t_2 * ((b_m * b_m) - (a * a))))))))) / math.pi) elif b_m <= 1.05e+71: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * (-2.0 / x_45_scale)) * math.tan((angle * (math.pi / 180.0)))))) / math.pi) else: tmp = 180.0 * (math.atan(((y_45_scale * (-1.0 / math.tan(t_0))) / x_45_scale)) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(pi / Float64(180.0 / angle)) t_1 = Float64(0.005555555555555556 * Float64(angle * pi)) t_2 = sin(t_1) t_3 = cos(t_1) tmp = 0.0 if (b_m <= 5.5e-100) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(Float64(-2.0 * t_2) / Float64(x_45_scale * cos(Float64(pi * Float64(angle / 180.0)))))))) / pi)); elseif (b_m <= 1.86e-51) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(Float64(2.0 * Float64(Float64((t_3 ^ 2.0) * Float64(b_m * b_m)) + (Float64(sin(t_0) * a) ^ 2.0))) / Float64(x_45_scale * Float64(t_3 * Float64(t_2 * Float64(Float64(b_m * b_m) - Float64(a * a))))))))) / pi)); elseif (b_m <= 1.05e+71) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(-2.0 / x_45_scale)) * tan(Float64(angle * Float64(pi / 180.0)))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * Float64(-1.0 / tan(t_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 = pi / (180.0 / angle); t_1 = 0.005555555555555556 * (angle * pi); t_2 = sin(t_1); t_3 = cos(t_1); tmp = 0.0; if (b_m <= 5.5e-100) tmp = 180.0 * (atan((-0.5 * (y_45_scale * ((-2.0 * t_2) / (x_45_scale * cos((pi * (angle / 180.0)))))))) / pi); elseif (b_m <= 1.86e-51) tmp = 180.0 * (atan((-0.5 * (y_45_scale * ((2.0 * (((t_3 ^ 2.0) * (b_m * b_m)) + ((sin(t_0) * a) ^ 2.0))) / (x_45_scale * (t_3 * (t_2 * ((b_m * b_m) - (a * a))))))))) / pi); elseif (b_m <= 1.05e+71) tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (-2.0 / x_45_scale)) * tan((angle * (pi / 180.0)))))) / pi); else tmp = 180.0 * (atan(((y_45_scale * (-1.0 / tan(t_0))) / x_45_scale)) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(Pi / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Cos[t$95$1], $MachinePrecision]}, If[LessEqual[b$95$m, 5.5e-100], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(N[(-2.0 * t$95$2), $MachinePrecision] / N[(x$45$scale * N[Cos[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.86e-51], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(N[(2.0 * N[(N[(N[Power[t$95$3, 2.0], $MachinePrecision] * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] + N[Power[N[(N[Sin[t$95$0], $MachinePrecision] * a), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$3 * N[(t$95$2 * N[(N[(b$95$m * b$95$m), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.05e+71], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(-2.0 / x$45$scale), $MachinePrecision]), $MachinePrecision] * N[Tan[N[(angle * N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * N[(-1.0 / N[Tan[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \frac{\pi}{\frac{180}{angle}}\\
t_1 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_2 := \sin t\_1\\
t_3 := \cos t\_1\\
\mathbf{if}\;b\_m \leq 5.5 \cdot 10^{-100}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \frac{-2 \cdot t\_2}{x-scale \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)}\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.86 \cdot 10^{-51}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \frac{2 \cdot \left({t\_3}^{2} \cdot \left(b\_m \cdot b\_m\right) + {\left(\sin t\_0 \cdot a\right)}^{2}\right)}{x-scale \cdot \left(t\_3 \cdot \left(t\_2 \cdot \left(b\_m \cdot b\_m - a \cdot a\right)\right)\right)}\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.05 \cdot 10^{+71}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\left(y-scale \cdot \frac{-2}{x-scale}\right) \cdot \tan \left(angle \cdot \frac{\pi}{180}\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot \frac{-1}{\tan t\_0}}{x-scale}\right)}{\pi}\\
\end{array}
\end{array}
if b < 5.50000000000000011e-100Initial program 16.3%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified29.6%
Taylor expanded in b around 0
associate-*r/N/A
/-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.f6448.3%
Simplified48.3%
*-commutativeN/A
metadata-evalN/A
div-invN/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
/-lowering-/.f6447.6%
Applied egg-rr47.6%
if 5.50000000000000011e-100 < b < 1.8600000000000001e-51Initial program 33.3%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified61.6%
*-commutativeN/A
pow2N/A
*-commutativeN/A
metadata-evalN/A
div-invN/A
associate-*l/N/A
unpow-prod-downN/A
pow-lowering-pow.f64N/A
Applied egg-rr69.9%
if 1.8600000000000001e-51 < b < 1.04999999999999995e71Initial program 23.9%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified37.8%
Taylor expanded in b around 0
associate-*r/N/A
/-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.f6466.9%
Simplified66.9%
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr69.3%
if 1.04999999999999995e71 < b Initial program 14.2%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified18.9%
add-cbrt-cubeN/A
cbrt-lowering-cbrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f6418.3%
Applied egg-rr18.3%
Taylor expanded in b around inf
mul-1-negN/A
times-fracN/A
distribute-lft-neg-inN/A
*-lowering-*.f64N/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
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6471.2%
Simplified71.2%
*-commutativeN/A
distribute-neg-fracN/A
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr69.0%
Final simplification55.4%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (/ PI (/ 180.0 angle))))
(if (<= b_m 1.48e-95)
(*
180.0
(/
(atan
(*
-0.5
(*
y-scale
(/
(* -2.0 (sin (* 0.005555555555555556 (* angle PI))))
(* x-scale (cos (* PI (/ angle 180.0))))))))
PI))
(if (<= b_m 1.7e-51)
(/
(*
180.0
(atan
(*
y-scale
(*
(/ (* b_m b_m) (* (sin (* 2.0 t_0)) (- (* a a) (* b_m b_m))))
(/ 1.0 x-scale)))))
PI)
(if (<= b_m 8.8e+71)
(*
180.0
(/
(atan
(*
-0.5
(* (* y-scale (/ -2.0 x-scale)) (tan (* angle (/ PI 180.0))))))
PI))
(*
180.0
(/ (atan (/ (* y-scale (/ -1.0 (tan t_0))) x-scale)) PI)))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = ((double) M_PI) / (180.0 / angle);
double tmp;
if (b_m <= 1.48e-95) {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * ((-2.0 * sin((0.005555555555555556 * (angle * ((double) M_PI))))) / (x_45_scale * cos((((double) M_PI) * (angle / 180.0)))))))) / ((double) M_PI));
} else if (b_m <= 1.7e-51) {
tmp = (180.0 * atan((y_45_scale * (((b_m * b_m) / (sin((2.0 * t_0)) * ((a * a) - (b_m * b_m)))) * (1.0 / x_45_scale))))) / ((double) M_PI);
} else if (b_m <= 8.8e+71) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (-2.0 / x_45_scale)) * tan((angle * (((double) M_PI) / 180.0)))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((y_45_scale * (-1.0 / tan(t_0))) / x_45_scale)) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = Math.PI / (180.0 / angle);
double tmp;
if (b_m <= 1.48e-95) {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * ((-2.0 * Math.sin((0.005555555555555556 * (angle * Math.PI)))) / (x_45_scale * Math.cos((Math.PI * (angle / 180.0)))))))) / Math.PI);
} else if (b_m <= 1.7e-51) {
tmp = (180.0 * Math.atan((y_45_scale * (((b_m * b_m) / (Math.sin((2.0 * t_0)) * ((a * a) - (b_m * b_m)))) * (1.0 / x_45_scale))))) / Math.PI;
} else if (b_m <= 8.8e+71) {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * (-2.0 / x_45_scale)) * Math.tan((angle * (Math.PI / 180.0)))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((y_45_scale * (-1.0 / Math.tan(t_0))) / x_45_scale)) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): t_0 = math.pi / (180.0 / angle) tmp = 0 if b_m <= 1.48e-95: tmp = 180.0 * (math.atan((-0.5 * (y_45_scale * ((-2.0 * math.sin((0.005555555555555556 * (angle * math.pi)))) / (x_45_scale * math.cos((math.pi * (angle / 180.0)))))))) / math.pi) elif b_m <= 1.7e-51: tmp = (180.0 * math.atan((y_45_scale * (((b_m * b_m) / (math.sin((2.0 * t_0)) * ((a * a) - (b_m * b_m)))) * (1.0 / x_45_scale))))) / math.pi elif b_m <= 8.8e+71: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * (-2.0 / x_45_scale)) * math.tan((angle * (math.pi / 180.0)))))) / math.pi) else: tmp = 180.0 * (math.atan(((y_45_scale * (-1.0 / math.tan(t_0))) / x_45_scale)) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(pi / Float64(180.0 / angle)) tmp = 0.0 if (b_m <= 1.48e-95) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(Float64(-2.0 * sin(Float64(0.005555555555555556 * Float64(angle * pi)))) / Float64(x_45_scale * cos(Float64(pi * Float64(angle / 180.0)))))))) / pi)); elseif (b_m <= 1.7e-51) tmp = Float64(Float64(180.0 * atan(Float64(y_45_scale * Float64(Float64(Float64(b_m * b_m) / Float64(sin(Float64(2.0 * t_0)) * Float64(Float64(a * a) - Float64(b_m * b_m)))) * Float64(1.0 / x_45_scale))))) / pi); elseif (b_m <= 8.8e+71) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(-2.0 / x_45_scale)) * tan(Float64(angle * Float64(pi / 180.0)))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * Float64(-1.0 / tan(t_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 = pi / (180.0 / angle); tmp = 0.0; if (b_m <= 1.48e-95) tmp = 180.0 * (atan((-0.5 * (y_45_scale * ((-2.0 * sin((0.005555555555555556 * (angle * pi)))) / (x_45_scale * cos((pi * (angle / 180.0)))))))) / pi); elseif (b_m <= 1.7e-51) tmp = (180.0 * atan((y_45_scale * (((b_m * b_m) / (sin((2.0 * t_0)) * ((a * a) - (b_m * b_m)))) * (1.0 / x_45_scale))))) / pi; elseif (b_m <= 8.8e+71) tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (-2.0 / x_45_scale)) * tan((angle * (pi / 180.0)))))) / pi); else tmp = 180.0 * (atan(((y_45_scale * (-1.0 / tan(t_0))) / x_45_scale)) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(Pi / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 1.48e-95], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(N[(-2.0 * N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[Cos[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.7e-51], N[(N[(180.0 * N[ArcTan[N[(y$45$scale * N[(N[(N[(b$95$m * b$95$m), $MachinePrecision] / N[(N[Sin[N[(2.0 * t$95$0), $MachinePrecision]], $MachinePrecision] * N[(N[(a * a), $MachinePrecision] - N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[b$95$m, 8.8e+71], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(-2.0 / x$45$scale), $MachinePrecision]), $MachinePrecision] * N[Tan[N[(angle * N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * N[(-1.0 / N[Tan[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \frac{\pi}{\frac{180}{angle}}\\
\mathbf{if}\;b\_m \leq 1.48 \cdot 10^{-95}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \frac{-2 \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}{x-scale \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)}\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.7 \cdot 10^{-51}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(y-scale \cdot \left(\frac{b\_m \cdot b\_m}{\sin \left(2 \cdot t\_0\right) \cdot \left(a \cdot a - b\_m \cdot b\_m\right)} \cdot \frac{1}{x-scale}\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 8.8 \cdot 10^{+71}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\left(y-scale \cdot \frac{-2}{x-scale}\right) \cdot \tan \left(angle \cdot \frac{\pi}{180}\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot \frac{-1}{\tan t\_0}}{x-scale}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.47999999999999994e-95Initial program 16.2%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified30.0%
Taylor expanded in b around 0
associate-*r/N/A
/-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.f6448.0%
Simplified48.0%
*-commutativeN/A
metadata-evalN/A
div-invN/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
/-lowering-/.f6447.3%
Applied egg-rr47.3%
if 1.47999999999999994e-95 < b < 1.70000000000000001e-51Initial program 36.4%
Taylor expanded in y-scale around 0
/-lowering-/.f64N/A
Simplified36.4%
Taylor expanded in angle around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.7%
Simplified45.7%
Applied egg-rr65.1%
if 1.70000000000000001e-51 < b < 8.79999999999999978e71Initial program 23.9%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified37.8%
Taylor expanded in b around 0
associate-*r/N/A
/-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.f6466.9%
Simplified66.9%
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr69.3%
if 8.79999999999999978e71 < b Initial program 14.2%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified18.9%
add-cbrt-cubeN/A
cbrt-lowering-cbrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f6418.3%
Applied egg-rr18.3%
Taylor expanded in b around inf
mul-1-negN/A
times-fracN/A
distribute-lft-neg-inN/A
*-lowering-*.f64N/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
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6471.2%
Simplified71.2%
*-commutativeN/A
distribute-neg-fracN/A
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr69.0%
Final simplification54.9%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (/ PI (/ 180.0 angle))))
(if (<= b_m 1.42e-95)
(*
180.0
(/
(atan
(*
-0.5
(* angle (* (/ (* y-scale PI) x-scale) -0.011111111111111112))))
PI))
(if (<= b_m 2.5e-51)
(/
(*
180.0
(atan
(*
y-scale
(*
(/ (* b_m b_m) (* (sin (* 2.0 t_0)) (- (* a a) (* b_m b_m))))
(/ 1.0 x-scale)))))
PI)
(if (<= b_m 9e+69)
(*
180.0
(/
(atan
(*
-0.5
(* (* y-scale (/ -2.0 x-scale)) (tan (* angle (/ PI 180.0))))))
PI))
(*
180.0
(/ (atan (/ (* y-scale (/ -1.0 (tan t_0))) x-scale)) PI)))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = ((double) M_PI) / (180.0 / angle);
double tmp;
if (b_m <= 1.42e-95) {
tmp = 180.0 * (atan((-0.5 * (angle * (((y_45_scale * ((double) M_PI)) / x_45_scale) * -0.011111111111111112)))) / ((double) M_PI));
} else if (b_m <= 2.5e-51) {
tmp = (180.0 * atan((y_45_scale * (((b_m * b_m) / (sin((2.0 * t_0)) * ((a * a) - (b_m * b_m)))) * (1.0 / x_45_scale))))) / ((double) M_PI);
} else if (b_m <= 9e+69) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (-2.0 / x_45_scale)) * tan((angle * (((double) M_PI) / 180.0)))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((y_45_scale * (-1.0 / tan(t_0))) / x_45_scale)) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = Math.PI / (180.0 / angle);
double tmp;
if (b_m <= 1.42e-95) {
tmp = 180.0 * (Math.atan((-0.5 * (angle * (((y_45_scale * Math.PI) / x_45_scale) * -0.011111111111111112)))) / Math.PI);
} else if (b_m <= 2.5e-51) {
tmp = (180.0 * Math.atan((y_45_scale * (((b_m * b_m) / (Math.sin((2.0 * t_0)) * ((a * a) - (b_m * b_m)))) * (1.0 / x_45_scale))))) / Math.PI;
} else if (b_m <= 9e+69) {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * (-2.0 / x_45_scale)) * Math.tan((angle * (Math.PI / 180.0)))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((y_45_scale * (-1.0 / Math.tan(t_0))) / x_45_scale)) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): t_0 = math.pi / (180.0 / angle) tmp = 0 if b_m <= 1.42e-95: tmp = 180.0 * (math.atan((-0.5 * (angle * (((y_45_scale * math.pi) / x_45_scale) * -0.011111111111111112)))) / math.pi) elif b_m <= 2.5e-51: tmp = (180.0 * math.atan((y_45_scale * (((b_m * b_m) / (math.sin((2.0 * t_0)) * ((a * a) - (b_m * b_m)))) * (1.0 / x_45_scale))))) / math.pi elif b_m <= 9e+69: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * (-2.0 / x_45_scale)) * math.tan((angle * (math.pi / 180.0)))))) / math.pi) else: tmp = 180.0 * (math.atan(((y_45_scale * (-1.0 / math.tan(t_0))) / x_45_scale)) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(pi / Float64(180.0 / angle)) tmp = 0.0 if (b_m <= 1.42e-95) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(angle * Float64(Float64(Float64(y_45_scale * pi) / x_45_scale) * -0.011111111111111112)))) / pi)); elseif (b_m <= 2.5e-51) tmp = Float64(Float64(180.0 * atan(Float64(y_45_scale * Float64(Float64(Float64(b_m * b_m) / Float64(sin(Float64(2.0 * t_0)) * Float64(Float64(a * a) - Float64(b_m * b_m)))) * Float64(1.0 / x_45_scale))))) / pi); elseif (b_m <= 9e+69) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(-2.0 / x_45_scale)) * tan(Float64(angle * Float64(pi / 180.0)))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * Float64(-1.0 / tan(t_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 = pi / (180.0 / angle); tmp = 0.0; if (b_m <= 1.42e-95) tmp = 180.0 * (atan((-0.5 * (angle * (((y_45_scale * pi) / x_45_scale) * -0.011111111111111112)))) / pi); elseif (b_m <= 2.5e-51) tmp = (180.0 * atan((y_45_scale * (((b_m * b_m) / (sin((2.0 * t_0)) * ((a * a) - (b_m * b_m)))) * (1.0 / x_45_scale))))) / pi; elseif (b_m <= 9e+69) tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (-2.0 / x_45_scale)) * tan((angle * (pi / 180.0)))))) / pi); else tmp = 180.0 * (atan(((y_45_scale * (-1.0 / tan(t_0))) / x_45_scale)) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(Pi / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 1.42e-95], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(angle * N[(N[(N[(y$45$scale * Pi), $MachinePrecision] / x$45$scale), $MachinePrecision] * -0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 2.5e-51], N[(N[(180.0 * N[ArcTan[N[(y$45$scale * N[(N[(N[(b$95$m * b$95$m), $MachinePrecision] / N[(N[Sin[N[(2.0 * t$95$0), $MachinePrecision]], $MachinePrecision] * N[(N[(a * a), $MachinePrecision] - N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[b$95$m, 9e+69], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(-2.0 / x$45$scale), $MachinePrecision]), $MachinePrecision] * N[Tan[N[(angle * N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * N[(-1.0 / N[Tan[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \frac{\pi}{\frac{180}{angle}}\\
\mathbf{if}\;b\_m \leq 1.42 \cdot 10^{-95}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(angle \cdot \left(\frac{y-scale \cdot \pi}{x-scale} \cdot -0.011111111111111112\right)\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 2.5 \cdot 10^{-51}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(y-scale \cdot \left(\frac{b\_m \cdot b\_m}{\sin \left(2 \cdot t\_0\right) \cdot \left(a \cdot a - b\_m \cdot b\_m\right)} \cdot \frac{1}{x-scale}\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 9 \cdot 10^{+69}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\left(y-scale \cdot \frac{-2}{x-scale}\right) \cdot \tan \left(angle \cdot \frac{\pi}{180}\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot \frac{-1}{\tan t\_0}}{x-scale}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.42000000000000007e-95Initial program 16.2%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified30.0%
Taylor expanded in b around 0
associate-*r/N/A
/-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.f6448.0%
Simplified48.0%
*-commutativeN/A
metadata-evalN/A
div-invN/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
/-lowering-/.f6447.3%
Applied egg-rr47.3%
Taylor expanded in angle around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6450.6%
Simplified50.6%
if 1.42000000000000007e-95 < b < 2.50000000000000002e-51Initial program 36.4%
Taylor expanded in y-scale around 0
/-lowering-/.f64N/A
Simplified36.4%
Taylor expanded in angle around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.7%
Simplified45.7%
Applied egg-rr65.1%
if 2.50000000000000002e-51 < b < 8.9999999999999999e69Initial program 23.9%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified37.8%
Taylor expanded in b around 0
associate-*r/N/A
/-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.f6466.9%
Simplified66.9%
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr69.3%
if 8.9999999999999999e69 < b Initial program 14.2%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified18.9%
add-cbrt-cubeN/A
cbrt-lowering-cbrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f6418.3%
Applied egg-rr18.3%
Taylor expanded in b around inf
mul-1-negN/A
times-fracN/A
distribute-lft-neg-inN/A
*-lowering-*.f64N/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
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6471.2%
Simplified71.2%
*-commutativeN/A
distribute-neg-fracN/A
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr69.0%
Final simplification57.0%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 1.8e-95)
(*
180.0
(/
(atan
(* -0.5 (* angle (* (/ (* y-scale PI) x-scale) -0.011111111111111112))))
PI))
(if (<= b_m 1.75e-51)
(*
180.0
(/
(atan
(*
-0.5
(*
y-scale
(*
(/ 360.0 angle)
(/ (* b_m b_m) (* (- (* b_m b_m) (* a a)) (* PI x-scale)))))))
PI))
(if (<= b_m 9e+69)
(*
180.0
(/
(atan
(*
-0.5
(* (* y-scale (/ -2.0 x-scale)) (tan (* angle (/ PI 180.0))))))
PI))
(*
180.0
(/
(atan (/ (* y-scale (/ -1.0 (tan (/ PI (/ 180.0 angle))))) 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 <= 1.8e-95) {
tmp = 180.0 * (atan((-0.5 * (angle * (((y_45_scale * ((double) M_PI)) / x_45_scale) * -0.011111111111111112)))) / ((double) M_PI));
} else if (b_m <= 1.75e-51) {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * ((360.0 / angle) * ((b_m * b_m) / (((b_m * b_m) - (a * a)) * (((double) M_PI) * x_45_scale))))))) / ((double) M_PI));
} else if (b_m <= 9e+69) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (-2.0 / x_45_scale)) * tan((angle * (((double) M_PI) / 180.0)))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((y_45_scale * (-1.0 / tan((((double) M_PI) / (180.0 / angle))))) / 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 <= 1.8e-95) {
tmp = 180.0 * (Math.atan((-0.5 * (angle * (((y_45_scale * Math.PI) / x_45_scale) * -0.011111111111111112)))) / Math.PI);
} else if (b_m <= 1.75e-51) {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * ((360.0 / angle) * ((b_m * b_m) / (((b_m * b_m) - (a * a)) * (Math.PI * x_45_scale))))))) / Math.PI);
} else if (b_m <= 9e+69) {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * (-2.0 / x_45_scale)) * Math.tan((angle * (Math.PI / 180.0)))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((y_45_scale * (-1.0 / Math.tan((Math.PI / (180.0 / angle))))) / 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 <= 1.8e-95: tmp = 180.0 * (math.atan((-0.5 * (angle * (((y_45_scale * math.pi) / x_45_scale) * -0.011111111111111112)))) / math.pi) elif b_m <= 1.75e-51: tmp = 180.0 * (math.atan((-0.5 * (y_45_scale * ((360.0 / angle) * ((b_m * b_m) / (((b_m * b_m) - (a * a)) * (math.pi * x_45_scale))))))) / math.pi) elif b_m <= 9e+69: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * (-2.0 / x_45_scale)) * math.tan((angle * (math.pi / 180.0)))))) / math.pi) else: tmp = 180.0 * (math.atan(((y_45_scale * (-1.0 / math.tan((math.pi / (180.0 / angle))))) / 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 <= 1.8e-95) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(angle * Float64(Float64(Float64(y_45_scale * pi) / x_45_scale) * -0.011111111111111112)))) / pi)); elseif (b_m <= 1.75e-51) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(Float64(360.0 / angle) * Float64(Float64(b_m * b_m) / Float64(Float64(Float64(b_m * b_m) - Float64(a * a)) * Float64(pi * x_45_scale))))))) / pi)); elseif (b_m <= 9e+69) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(-2.0 / x_45_scale)) * tan(Float64(angle * Float64(pi / 180.0)))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * Float64(-1.0 / tan(Float64(pi / Float64(180.0 / angle))))) / 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 <= 1.8e-95) tmp = 180.0 * (atan((-0.5 * (angle * (((y_45_scale * pi) / x_45_scale) * -0.011111111111111112)))) / pi); elseif (b_m <= 1.75e-51) tmp = 180.0 * (atan((-0.5 * (y_45_scale * ((360.0 / angle) * ((b_m * b_m) / (((b_m * b_m) - (a * a)) * (pi * x_45_scale))))))) / pi); elseif (b_m <= 9e+69) tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (-2.0 / x_45_scale)) * tan((angle * (pi / 180.0)))))) / pi); else tmp = 180.0 * (atan(((y_45_scale * (-1.0 / tan((pi / (180.0 / angle))))) / 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, 1.8e-95], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(angle * N[(N[(N[(y$45$scale * Pi), $MachinePrecision] / x$45$scale), $MachinePrecision] * -0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.75e-51], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(N[(360.0 / angle), $MachinePrecision] * N[(N[(b$95$m * b$95$m), $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]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 9e+69], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(-2.0 / x$45$scale), $MachinePrecision]), $MachinePrecision] * N[Tan[N[(angle * N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * N[(-1.0 / N[Tan[N[(Pi / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 1.8 \cdot 10^{-95}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(angle \cdot \left(\frac{y-scale \cdot \pi}{x-scale} \cdot -0.011111111111111112\right)\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.75 \cdot 10^{-51}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \left(\frac{360}{angle} \cdot \frac{b\_m \cdot b\_m}{\left(b\_m \cdot b\_m - a \cdot a\right) \cdot \left(\pi \cdot x-scale\right)}\right)\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 9 \cdot 10^{+69}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\left(y-scale \cdot \frac{-2}{x-scale}\right) \cdot \tan \left(angle \cdot \frac{\pi}{180}\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot \frac{-1}{\tan \left(\frac{\pi}{\frac{180}{angle}}\right)}}{x-scale}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.8e-95Initial program 16.2%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified30.0%
Taylor expanded in b around 0
associate-*r/N/A
/-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.f6448.0%
Simplified48.0%
*-commutativeN/A
metadata-evalN/A
div-invN/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
/-lowering-/.f6447.3%
Applied egg-rr47.3%
Taylor expanded in angle around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6450.6%
Simplified50.6%
if 1.8e-95 < b < 1.7499999999999999e-51Initial program 36.4%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified58.1%
add-cbrt-cubeN/A
cbrt-lowering-cbrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f6458.1%
Applied egg-rr58.1%
Taylor expanded in angle around 0
associate-*r/N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
--lowering--.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6465.7%
Simplified65.7%
if 1.7499999999999999e-51 < b < 8.9999999999999999e69Initial program 23.9%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified37.8%
Taylor expanded in b around 0
associate-*r/N/A
/-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.f6466.9%
Simplified66.9%
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr69.3%
if 8.9999999999999999e69 < b Initial program 14.2%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified18.9%
add-cbrt-cubeN/A
cbrt-lowering-cbrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f6418.3%
Applied egg-rr18.3%
Taylor expanded in b around inf
mul-1-negN/A
times-fracN/A
distribute-lft-neg-inN/A
*-lowering-*.f64N/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
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6471.2%
Simplified71.2%
*-commutativeN/A
distribute-neg-fracN/A
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr69.0%
Final simplification57.0%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 1.5e-95)
(*
180.0
(/
(atan
(* -0.5 (* angle (* (/ (* y-scale PI) x-scale) -0.011111111111111112))))
PI))
(if (<= b_m 1.86e-51)
(*
180.0
(/
(atan
(*
-0.5
(*
y-scale
(*
(/ 360.0 angle)
(/ (* b_m b_m) (* (- (* b_m b_m) (* a a)) (* PI x-scale)))))))
PI))
(if (<= b_m 7.5e+69)
(*
180.0
(/
(atan
(*
-0.5
(* (* y-scale (/ -2.0 x-scale)) (tan (* angle (/ PI 180.0))))))
PI))
(/
(*
180.0
(atan (- 0.0 (/ (/ y-scale x-scale) (tan (/ PI (/ 180.0 angle)))))))
PI)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 1.5e-95) {
tmp = 180.0 * (atan((-0.5 * (angle * (((y_45_scale * ((double) M_PI)) / x_45_scale) * -0.011111111111111112)))) / ((double) M_PI));
} else if (b_m <= 1.86e-51) {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * ((360.0 / angle) * ((b_m * b_m) / (((b_m * b_m) - (a * a)) * (((double) M_PI) * x_45_scale))))))) / ((double) M_PI));
} else if (b_m <= 7.5e+69) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (-2.0 / x_45_scale)) * tan((angle * (((double) M_PI) / 180.0)))))) / ((double) M_PI));
} else {
tmp = (180.0 * atan((0.0 - ((y_45_scale / x_45_scale) / tan((((double) M_PI) / (180.0 / angle))))))) / ((double) M_PI);
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 1.5e-95) {
tmp = 180.0 * (Math.atan((-0.5 * (angle * (((y_45_scale * Math.PI) / x_45_scale) * -0.011111111111111112)))) / Math.PI);
} else if (b_m <= 1.86e-51) {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * ((360.0 / angle) * ((b_m * b_m) / (((b_m * b_m) - (a * a)) * (Math.PI * x_45_scale))))))) / Math.PI);
} else if (b_m <= 7.5e+69) {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * (-2.0 / x_45_scale)) * Math.tan((angle * (Math.PI / 180.0)))))) / Math.PI);
} else {
tmp = (180.0 * Math.atan((0.0 - ((y_45_scale / x_45_scale) / Math.tan((Math.PI / (180.0 / angle))))))) / Math.PI;
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if b_m <= 1.5e-95: tmp = 180.0 * (math.atan((-0.5 * (angle * (((y_45_scale * math.pi) / x_45_scale) * -0.011111111111111112)))) / math.pi) elif b_m <= 1.86e-51: tmp = 180.0 * (math.atan((-0.5 * (y_45_scale * ((360.0 / angle) * ((b_m * b_m) / (((b_m * b_m) - (a * a)) * (math.pi * x_45_scale))))))) / math.pi) elif b_m <= 7.5e+69: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * (-2.0 / x_45_scale)) * math.tan((angle * (math.pi / 180.0)))))) / math.pi) else: tmp = (180.0 * math.atan((0.0 - ((y_45_scale / x_45_scale) / math.tan((math.pi / (180.0 / angle))))))) / math.pi return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 1.5e-95) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(angle * Float64(Float64(Float64(y_45_scale * pi) / x_45_scale) * -0.011111111111111112)))) / pi)); elseif (b_m <= 1.86e-51) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(Float64(360.0 / angle) * Float64(Float64(b_m * b_m) / Float64(Float64(Float64(b_m * b_m) - Float64(a * a)) * Float64(pi * x_45_scale))))))) / pi)); elseif (b_m <= 7.5e+69) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(-2.0 / x_45_scale)) * tan(Float64(angle * Float64(pi / 180.0)))))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(0.0 - Float64(Float64(y_45_scale / x_45_scale) / tan(Float64(pi / Float64(180.0 / angle))))))) / pi); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 1.5e-95) tmp = 180.0 * (atan((-0.5 * (angle * (((y_45_scale * pi) / x_45_scale) * -0.011111111111111112)))) / pi); elseif (b_m <= 1.86e-51) tmp = 180.0 * (atan((-0.5 * (y_45_scale * ((360.0 / angle) * ((b_m * b_m) / (((b_m * b_m) - (a * a)) * (pi * x_45_scale))))))) / pi); elseif (b_m <= 7.5e+69) tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (-2.0 / x_45_scale)) * tan((angle * (pi / 180.0)))))) / pi); else tmp = (180.0 * atan((0.0 - ((y_45_scale / x_45_scale) / tan((pi / (180.0 / angle))))))) / pi; end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 1.5e-95], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(angle * N[(N[(N[(y$45$scale * Pi), $MachinePrecision] / x$45$scale), $MachinePrecision] * -0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.86e-51], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(N[(360.0 / angle), $MachinePrecision] * N[(N[(b$95$m * b$95$m), $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]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 7.5e+69], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(-2.0 / x$45$scale), $MachinePrecision]), $MachinePrecision] * N[Tan[N[(angle * N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(0.0 - N[(N[(y$45$scale / x$45$scale), $MachinePrecision] / N[Tan[N[(Pi / N[(180.0 / angle), $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 1.5 \cdot 10^{-95}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(angle \cdot \left(\frac{y-scale \cdot \pi}{x-scale} \cdot -0.011111111111111112\right)\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.86 \cdot 10^{-51}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \left(\frac{360}{angle} \cdot \frac{b\_m \cdot b\_m}{\left(b\_m \cdot b\_m - a \cdot a\right) \cdot \left(\pi \cdot x-scale\right)}\right)\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 7.5 \cdot 10^{+69}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\left(y-scale \cdot \frac{-2}{x-scale}\right) \cdot \tan \left(angle \cdot \frac{\pi}{180}\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0 - \frac{\frac{y-scale}{x-scale}}{\tan \left(\frac{\pi}{\frac{180}{angle}}\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.5e-95Initial program 16.2%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified30.0%
Taylor expanded in b around 0
associate-*r/N/A
/-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.f6448.0%
Simplified48.0%
*-commutativeN/A
metadata-evalN/A
div-invN/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
/-lowering-/.f6447.3%
Applied egg-rr47.3%
Taylor expanded in angle around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6450.6%
Simplified50.6%
if 1.5e-95 < b < 1.8600000000000001e-51Initial program 36.4%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified58.1%
add-cbrt-cubeN/A
cbrt-lowering-cbrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f6458.1%
Applied egg-rr58.1%
Taylor expanded in angle around 0
associate-*r/N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
--lowering--.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6465.7%
Simplified65.7%
if 1.8600000000000001e-51 < b < 7.49999999999999939e69Initial program 23.9%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified37.8%
Taylor expanded in b around 0
associate-*r/N/A
/-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.f6466.9%
Simplified66.9%
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr69.3%
if 7.49999999999999939e69 < b Initial program 14.2%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified18.9%
add-cbrt-cubeN/A
cbrt-lowering-cbrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f6418.3%
Applied egg-rr18.3%
Taylor expanded in b around inf
mul-1-negN/A
times-fracN/A
distribute-lft-neg-inN/A
*-lowering-*.f64N/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
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6471.2%
Simplified71.2%
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr69.1%
Final simplification57.0%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 1.8e-95)
(*
180.0
(/
(atan
(* -0.5 (* angle (* (/ (* y-scale PI) x-scale) -0.011111111111111112))))
PI))
(if (<= b_m 1.9e-51)
(*
180.0
(/
(atan
(*
-0.5
(*
y-scale
(*
(/ 360.0 angle)
(/ (* b_m b_m) (* (- (* b_m b_m) (* a a)) (* PI x-scale)))))))
PI))
(if (<= b_m 5.5e+71)
(*
180.0
(/
(atan
(*
(* -2.0 (* -0.5 y-scale))
(/ (tan (* angle (/ PI 180.0))) x-scale)))
PI))
(/
(*
180.0
(atan (- 0.0 (/ (/ y-scale x-scale) (tan (/ PI (/ 180.0 angle)))))))
PI)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 1.8e-95) {
tmp = 180.0 * (atan((-0.5 * (angle * (((y_45_scale * ((double) M_PI)) / x_45_scale) * -0.011111111111111112)))) / ((double) M_PI));
} else if (b_m <= 1.9e-51) {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * ((360.0 / angle) * ((b_m * b_m) / (((b_m * b_m) - (a * a)) * (((double) M_PI) * x_45_scale))))))) / ((double) M_PI));
} else if (b_m <= 5.5e+71) {
tmp = 180.0 * (atan(((-2.0 * (-0.5 * y_45_scale)) * (tan((angle * (((double) M_PI) / 180.0))) / x_45_scale))) / ((double) M_PI));
} else {
tmp = (180.0 * atan((0.0 - ((y_45_scale / x_45_scale) / tan((((double) M_PI) / (180.0 / angle))))))) / ((double) M_PI);
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 1.8e-95) {
tmp = 180.0 * (Math.atan((-0.5 * (angle * (((y_45_scale * Math.PI) / x_45_scale) * -0.011111111111111112)))) / Math.PI);
} else if (b_m <= 1.9e-51) {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * ((360.0 / angle) * ((b_m * b_m) / (((b_m * b_m) - (a * a)) * (Math.PI * x_45_scale))))))) / Math.PI);
} else if (b_m <= 5.5e+71) {
tmp = 180.0 * (Math.atan(((-2.0 * (-0.5 * y_45_scale)) * (Math.tan((angle * (Math.PI / 180.0))) / x_45_scale))) / Math.PI);
} else {
tmp = (180.0 * Math.atan((0.0 - ((y_45_scale / x_45_scale) / Math.tan((Math.PI / (180.0 / angle))))))) / Math.PI;
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if b_m <= 1.8e-95: tmp = 180.0 * (math.atan((-0.5 * (angle * (((y_45_scale * math.pi) / x_45_scale) * -0.011111111111111112)))) / math.pi) elif b_m <= 1.9e-51: tmp = 180.0 * (math.atan((-0.5 * (y_45_scale * ((360.0 / angle) * ((b_m * b_m) / (((b_m * b_m) - (a * a)) * (math.pi * x_45_scale))))))) / math.pi) elif b_m <= 5.5e+71: tmp = 180.0 * (math.atan(((-2.0 * (-0.5 * y_45_scale)) * (math.tan((angle * (math.pi / 180.0))) / x_45_scale))) / math.pi) else: tmp = (180.0 * math.atan((0.0 - ((y_45_scale / x_45_scale) / math.tan((math.pi / (180.0 / angle))))))) / math.pi return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 1.8e-95) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(angle * Float64(Float64(Float64(y_45_scale * pi) / x_45_scale) * -0.011111111111111112)))) / pi)); elseif (b_m <= 1.9e-51) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(Float64(360.0 / angle) * Float64(Float64(b_m * b_m) / Float64(Float64(Float64(b_m * b_m) - Float64(a * a)) * Float64(pi * x_45_scale))))))) / pi)); elseif (b_m <= 5.5e+71) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-2.0 * Float64(-0.5 * y_45_scale)) * Float64(tan(Float64(angle * Float64(pi / 180.0))) / x_45_scale))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(0.0 - Float64(Float64(y_45_scale / x_45_scale) / tan(Float64(pi / Float64(180.0 / angle))))))) / pi); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 1.8e-95) tmp = 180.0 * (atan((-0.5 * (angle * (((y_45_scale * pi) / x_45_scale) * -0.011111111111111112)))) / pi); elseif (b_m <= 1.9e-51) tmp = 180.0 * (atan((-0.5 * (y_45_scale * ((360.0 / angle) * ((b_m * b_m) / (((b_m * b_m) - (a * a)) * (pi * x_45_scale))))))) / pi); elseif (b_m <= 5.5e+71) tmp = 180.0 * (atan(((-2.0 * (-0.5 * y_45_scale)) * (tan((angle * (pi / 180.0))) / x_45_scale))) / pi); else tmp = (180.0 * atan((0.0 - ((y_45_scale / x_45_scale) / tan((pi / (180.0 / angle))))))) / pi; end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 1.8e-95], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(angle * N[(N[(N[(y$45$scale * Pi), $MachinePrecision] / x$45$scale), $MachinePrecision] * -0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.9e-51], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(N[(360.0 / angle), $MachinePrecision] * N[(N[(b$95$m * b$95$m), $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]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 5.5e+71], N[(180.0 * N[(N[ArcTan[N[(N[(-2.0 * N[(-0.5 * y$45$scale), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[N[(angle * N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(0.0 - N[(N[(y$45$scale / x$45$scale), $MachinePrecision] / N[Tan[N[(Pi / N[(180.0 / angle), $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 1.8 \cdot 10^{-95}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(angle \cdot \left(\frac{y-scale \cdot \pi}{x-scale} \cdot -0.011111111111111112\right)\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.9 \cdot 10^{-51}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \left(\frac{360}{angle} \cdot \frac{b\_m \cdot b\_m}{\left(b\_m \cdot b\_m - a \cdot a\right) \cdot \left(\pi \cdot x-scale\right)}\right)\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 5.5 \cdot 10^{+71}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(-2 \cdot \left(-0.5 \cdot y-scale\right)\right) \cdot \frac{\tan \left(angle \cdot \frac{\pi}{180}\right)}{x-scale}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0 - \frac{\frac{y-scale}{x-scale}}{\tan \left(\frac{\pi}{\frac{180}{angle}}\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.8e-95Initial program 16.2%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified30.0%
Taylor expanded in b around 0
associate-*r/N/A
/-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.f6448.0%
Simplified48.0%
*-commutativeN/A
metadata-evalN/A
div-invN/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
/-lowering-/.f6447.3%
Applied egg-rr47.3%
Taylor expanded in angle around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6450.6%
Simplified50.6%
if 1.8e-95 < b < 1.90000000000000001e-51Initial program 36.4%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified58.1%
add-cbrt-cubeN/A
cbrt-lowering-cbrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f6458.1%
Applied egg-rr58.1%
Taylor expanded in angle around 0
associate-*r/N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
--lowering--.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6465.7%
Simplified65.7%
if 1.90000000000000001e-51 < b < 5.5e71Initial program 23.9%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified37.8%
Taylor expanded in b around 0
associate-*r/N/A
/-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.f6466.9%
Simplified66.9%
associate-*r*N/A
associate-/l*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
Applied egg-rr67.1%
if 5.5e71 < b Initial program 14.2%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified18.9%
add-cbrt-cubeN/A
cbrt-lowering-cbrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f6418.3%
Applied egg-rr18.3%
Taylor expanded in b around inf
mul-1-negN/A
times-fracN/A
distribute-lft-neg-inN/A
*-lowering-*.f64N/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
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6471.2%
Simplified71.2%
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr69.1%
Final simplification56.7%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 1.8e-95)
(*
180.0
(/
(atan
(* -0.5 (* angle (* (/ (* y-scale PI) x-scale) -0.011111111111111112))))
PI))
(if (<= b_m 3.7e-51)
(*
180.0
(/
(atan
(*
-0.5
(*
y-scale
(*
(/ 360.0 angle)
(/ (* b_m b_m) (* (- (* b_m b_m) (* a a)) (* PI x-scale)))))))
PI))
(if (<= b_m 4.6e+72)
(*
180.0
(/
(atan
(*
-0.5
(* (/ -2.0 x-scale) (* y-scale (tan (* angle (/ PI 180.0)))))))
PI))
(/
(*
180.0
(atan (- 0.0 (/ (/ y-scale x-scale) (tan (/ PI (/ 180.0 angle)))))))
PI)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 1.8e-95) {
tmp = 180.0 * (atan((-0.5 * (angle * (((y_45_scale * ((double) M_PI)) / x_45_scale) * -0.011111111111111112)))) / ((double) M_PI));
} else if (b_m <= 3.7e-51) {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * ((360.0 / angle) * ((b_m * b_m) / (((b_m * b_m) - (a * a)) * (((double) M_PI) * x_45_scale))))))) / ((double) M_PI));
} else if (b_m <= 4.6e+72) {
tmp = 180.0 * (atan((-0.5 * ((-2.0 / x_45_scale) * (y_45_scale * tan((angle * (((double) M_PI) / 180.0))))))) / ((double) M_PI));
} else {
tmp = (180.0 * atan((0.0 - ((y_45_scale / x_45_scale) / tan((((double) M_PI) / (180.0 / angle))))))) / ((double) M_PI);
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 1.8e-95) {
tmp = 180.0 * (Math.atan((-0.5 * (angle * (((y_45_scale * Math.PI) / x_45_scale) * -0.011111111111111112)))) / Math.PI);
} else if (b_m <= 3.7e-51) {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * ((360.0 / angle) * ((b_m * b_m) / (((b_m * b_m) - (a * a)) * (Math.PI * x_45_scale))))))) / Math.PI);
} else if (b_m <= 4.6e+72) {
tmp = 180.0 * (Math.atan((-0.5 * ((-2.0 / x_45_scale) * (y_45_scale * Math.tan((angle * (Math.PI / 180.0))))))) / Math.PI);
} else {
tmp = (180.0 * Math.atan((0.0 - ((y_45_scale / x_45_scale) / Math.tan((Math.PI / (180.0 / angle))))))) / Math.PI;
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if b_m <= 1.8e-95: tmp = 180.0 * (math.atan((-0.5 * (angle * (((y_45_scale * math.pi) / x_45_scale) * -0.011111111111111112)))) / math.pi) elif b_m <= 3.7e-51: tmp = 180.0 * (math.atan((-0.5 * (y_45_scale * ((360.0 / angle) * ((b_m * b_m) / (((b_m * b_m) - (a * a)) * (math.pi * x_45_scale))))))) / math.pi) elif b_m <= 4.6e+72: tmp = 180.0 * (math.atan((-0.5 * ((-2.0 / x_45_scale) * (y_45_scale * math.tan((angle * (math.pi / 180.0))))))) / math.pi) else: tmp = (180.0 * math.atan((0.0 - ((y_45_scale / x_45_scale) / math.tan((math.pi / (180.0 / angle))))))) / math.pi return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 1.8e-95) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(angle * Float64(Float64(Float64(y_45_scale * pi) / x_45_scale) * -0.011111111111111112)))) / pi)); elseif (b_m <= 3.7e-51) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(Float64(360.0 / angle) * Float64(Float64(b_m * b_m) / Float64(Float64(Float64(b_m * b_m) - Float64(a * a)) * Float64(pi * x_45_scale))))))) / pi)); elseif (b_m <= 4.6e+72) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(-2.0 / x_45_scale) * Float64(y_45_scale * tan(Float64(angle * Float64(pi / 180.0))))))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(0.0 - Float64(Float64(y_45_scale / x_45_scale) / tan(Float64(pi / Float64(180.0 / angle))))))) / pi); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 1.8e-95) tmp = 180.0 * (atan((-0.5 * (angle * (((y_45_scale * pi) / x_45_scale) * -0.011111111111111112)))) / pi); elseif (b_m <= 3.7e-51) tmp = 180.0 * (atan((-0.5 * (y_45_scale * ((360.0 / angle) * ((b_m * b_m) / (((b_m * b_m) - (a * a)) * (pi * x_45_scale))))))) / pi); elseif (b_m <= 4.6e+72) tmp = 180.0 * (atan((-0.5 * ((-2.0 / x_45_scale) * (y_45_scale * tan((angle * (pi / 180.0))))))) / pi); else tmp = (180.0 * atan((0.0 - ((y_45_scale / x_45_scale) / tan((pi / (180.0 / angle))))))) / pi; end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 1.8e-95], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(angle * N[(N[(N[(y$45$scale * Pi), $MachinePrecision] / x$45$scale), $MachinePrecision] * -0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 3.7e-51], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(N[(360.0 / angle), $MachinePrecision] * N[(N[(b$95$m * b$95$m), $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]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 4.6e+72], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(-2.0 / x$45$scale), $MachinePrecision] * N[(y$45$scale * N[Tan[N[(angle * N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(0.0 - N[(N[(y$45$scale / x$45$scale), $MachinePrecision] / N[Tan[N[(Pi / N[(180.0 / angle), $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 1.8 \cdot 10^{-95}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(angle \cdot \left(\frac{y-scale \cdot \pi}{x-scale} \cdot -0.011111111111111112\right)\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 3.7 \cdot 10^{-51}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \left(\frac{360}{angle} \cdot \frac{b\_m \cdot b\_m}{\left(b\_m \cdot b\_m - a \cdot a\right) \cdot \left(\pi \cdot x-scale\right)}\right)\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 4.6 \cdot 10^{+72}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{-2}{x-scale} \cdot \left(y-scale \cdot \tan \left(angle \cdot \frac{\pi}{180}\right)\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0 - \frac{\frac{y-scale}{x-scale}}{\tan \left(\frac{\pi}{\frac{180}{angle}}\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.8e-95Initial program 16.2%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified30.0%
Taylor expanded in b around 0
associate-*r/N/A
/-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.f6448.0%
Simplified48.0%
*-commutativeN/A
metadata-evalN/A
div-invN/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
/-lowering-/.f6447.3%
Applied egg-rr47.3%
Taylor expanded in angle around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6450.6%
Simplified50.6%
if 1.8e-95 < b < 3.69999999999999973e-51Initial program 36.4%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified58.1%
add-cbrt-cubeN/A
cbrt-lowering-cbrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f6458.1%
Applied egg-rr58.1%
Taylor expanded in angle around 0
associate-*r/N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
--lowering--.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6465.7%
Simplified65.7%
if 3.69999999999999973e-51 < b < 4.6e72Initial program 23.9%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified37.8%
Taylor expanded in b around 0
associate-*r/N/A
/-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.f6466.9%
Simplified66.9%
*-commutativeN/A
times-fracN/A
associate-*l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
Applied egg-rr66.7%
if 4.6e72 < b Initial program 14.2%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified18.9%
add-cbrt-cubeN/A
cbrt-lowering-cbrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f6418.3%
Applied egg-rr18.3%
Taylor expanded in b around inf
mul-1-negN/A
times-fracN/A
distribute-lft-neg-inN/A
*-lowering-*.f64N/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
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6471.2%
Simplified71.2%
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr69.1%
Final simplification56.7%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 4.6e+30)
(*
180.0
(/
(atan
(* -0.5 (* angle (* (/ (* y-scale PI) x-scale) -0.011111111111111112))))
PI))
(/
(*
180.0
(atan (- 0.0 (/ (/ y-scale x-scale) (tan (/ PI (/ 180.0 angle)))))))
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.6e+30) {
tmp = 180.0 * (atan((-0.5 * (angle * (((y_45_scale * ((double) M_PI)) / x_45_scale) * -0.011111111111111112)))) / ((double) M_PI));
} else {
tmp = (180.0 * atan((0.0 - ((y_45_scale / x_45_scale) / tan((((double) M_PI) / (180.0 / angle))))))) / ((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.6e+30) {
tmp = 180.0 * (Math.atan((-0.5 * (angle * (((y_45_scale * Math.PI) / x_45_scale) * -0.011111111111111112)))) / Math.PI);
} else {
tmp = (180.0 * Math.atan((0.0 - ((y_45_scale / x_45_scale) / Math.tan((Math.PI / (180.0 / angle))))))) / 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.6e+30: tmp = 180.0 * (math.atan((-0.5 * (angle * (((y_45_scale * math.pi) / x_45_scale) * -0.011111111111111112)))) / math.pi) else: tmp = (180.0 * math.atan((0.0 - ((y_45_scale / x_45_scale) / math.tan((math.pi / (180.0 / angle))))))) / 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.6e+30) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(angle * Float64(Float64(Float64(y_45_scale * pi) / x_45_scale) * -0.011111111111111112)))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(0.0 - Float64(Float64(y_45_scale / x_45_scale) / tan(Float64(pi / Float64(180.0 / angle))))))) / 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.6e+30) tmp = 180.0 * (atan((-0.5 * (angle * (((y_45_scale * pi) / x_45_scale) * -0.011111111111111112)))) / pi); else tmp = (180.0 * atan((0.0 - ((y_45_scale / x_45_scale) / tan((pi / (180.0 / angle))))))) / 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.6e+30], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(angle * N[(N[(N[(y$45$scale * Pi), $MachinePrecision] / x$45$scale), $MachinePrecision] * -0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(0.0 - N[(N[(y$45$scale / x$45$scale), $MachinePrecision] / N[Tan[N[(Pi / N[(180.0 / angle), $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 4.6 \cdot 10^{+30}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(angle \cdot \left(\frac{y-scale \cdot \pi}{x-scale} \cdot -0.011111111111111112\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0 - \frac{\frac{y-scale}{x-scale}}{\tan \left(\frac{\pi}{\frac{180}{angle}}\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 4.6e30Initial program 18.3%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified32.5%
Taylor expanded in b around 0
associate-*r/N/A
/-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.f6450.4%
Simplified50.4%
*-commutativeN/A
metadata-evalN/A
div-invN/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
/-lowering-/.f6449.3%
Applied egg-rr49.3%
Taylor expanded in angle around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6452.1%
Simplified52.1%
if 4.6e30 < b Initial program 16.0%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified22.3%
add-cbrt-cubeN/A
cbrt-lowering-cbrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f6423.2%
Applied egg-rr23.2%
Taylor expanded in b around inf
mul-1-negN/A
times-fracN/A
distribute-lft-neg-inN/A
*-lowering-*.f64N/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
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6466.6%
Simplified66.6%
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr64.8%
Final simplification54.8%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 4.3e+30)
(*
180.0
(/
(atan
(* -0.5 (* angle (* (/ (* y-scale PI) x-scale) -0.011111111111111112))))
PI))
(/
180.0
(/
PI
(atan (- 0.0 (/ (/ y-scale x-scale) (tan (/ PI (/ 180.0 angle))))))))))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.3e+30) {
tmp = 180.0 * (atan((-0.5 * (angle * (((y_45_scale * ((double) M_PI)) / x_45_scale) * -0.011111111111111112)))) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((0.0 - ((y_45_scale / x_45_scale) / tan((((double) M_PI) / (180.0 / angle)))))));
}
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.3e+30) {
tmp = 180.0 * (Math.atan((-0.5 * (angle * (((y_45_scale * Math.PI) / x_45_scale) * -0.011111111111111112)))) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((0.0 - ((y_45_scale / x_45_scale) / Math.tan((Math.PI / (180.0 / angle)))))));
}
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.3e+30: tmp = 180.0 * (math.atan((-0.5 * (angle * (((y_45_scale * math.pi) / x_45_scale) * -0.011111111111111112)))) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((0.0 - ((y_45_scale / x_45_scale) / math.tan((math.pi / (180.0 / angle))))))) 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.3e+30) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(angle * Float64(Float64(Float64(y_45_scale * pi) / x_45_scale) * -0.011111111111111112)))) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(0.0 - Float64(Float64(y_45_scale / x_45_scale) / tan(Float64(pi / Float64(180.0 / angle)))))))); 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.3e+30) tmp = 180.0 * (atan((-0.5 * (angle * (((y_45_scale * pi) / x_45_scale) * -0.011111111111111112)))) / pi); else tmp = 180.0 / (pi / atan((0.0 - ((y_45_scale / x_45_scale) / tan((pi / (180.0 / angle))))))); 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.3e+30], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(angle * N[(N[(N[(y$45$scale * Pi), $MachinePrecision] / x$45$scale), $MachinePrecision] * -0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(0.0 - N[(N[(y$45$scale / x$45$scale), $MachinePrecision] / N[Tan[N[(Pi / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 4.3 \cdot 10^{+30}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(angle \cdot \left(\frac{y-scale \cdot \pi}{x-scale} \cdot -0.011111111111111112\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(0 - \frac{\frac{y-scale}{x-scale}}{\tan \left(\frac{\pi}{\frac{180}{angle}}\right)}\right)}}\\
\end{array}
\end{array}
if b < 4.3e30Initial program 18.3%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified32.5%
Taylor expanded in b around 0
associate-*r/N/A
/-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.f6450.4%
Simplified50.4%
*-commutativeN/A
metadata-evalN/A
div-invN/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
/-lowering-/.f6449.3%
Applied egg-rr49.3%
Taylor expanded in angle around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6452.1%
Simplified52.1%
if 4.3e30 < b Initial program 16.0%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified22.3%
add-cbrt-cubeN/A
cbrt-lowering-cbrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f6423.2%
Applied egg-rr23.2%
Taylor expanded in b around inf
mul-1-negN/A
times-fracN/A
distribute-lft-neg-inN/A
*-lowering-*.f64N/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
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6466.6%
Simplified66.6%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f64N/A
atan-lowering-atan.f64N/A
clear-numN/A
un-div-invN/A
Applied egg-rr64.8%
Final simplification54.8%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 6.2e+34)
(*
180.0
(/
(atan
(* -0.5 (* angle (* (/ (* y-scale PI) x-scale) -0.011111111111111112))))
PI))
(*
180.0
(/
(atan (/ (/ y-scale x-scale) (tan (/ PI (/ 180.0 angle)))))
(- 0.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 <= 6.2e+34) {
tmp = 180.0 * (atan((-0.5 * (angle * (((y_45_scale * ((double) M_PI)) / x_45_scale) * -0.011111111111111112)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) / tan((((double) M_PI) / (180.0 / angle))))) / (0.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 <= 6.2e+34) {
tmp = 180.0 * (Math.atan((-0.5 * (angle * (((y_45_scale * Math.PI) / x_45_scale) * -0.011111111111111112)))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) / Math.tan((Math.PI / (180.0 / angle))))) / (0.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 <= 6.2e+34: tmp = 180.0 * (math.atan((-0.5 * (angle * (((y_45_scale * math.pi) / x_45_scale) * -0.011111111111111112)))) / math.pi) else: tmp = 180.0 * (math.atan(((y_45_scale / x_45_scale) / math.tan((math.pi / (180.0 / angle))))) / (0.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 <= 6.2e+34) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(angle * Float64(Float64(Float64(y_45_scale * pi) / x_45_scale) * -0.011111111111111112)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) / tan(Float64(pi / Float64(180.0 / angle))))) / Float64(0.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 <= 6.2e+34) tmp = 180.0 * (atan((-0.5 * (angle * (((y_45_scale * pi) / x_45_scale) * -0.011111111111111112)))) / pi); else tmp = 180.0 * (atan(((y_45_scale / x_45_scale) / tan((pi / (180.0 / angle))))) / (0.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, 6.2e+34], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(angle * N[(N[(N[(y$45$scale * Pi), $MachinePrecision] / x$45$scale), $MachinePrecision] * -0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] / N[Tan[N[(Pi / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(0.0 - Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 6.2 \cdot 10^{+34}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(angle \cdot \left(\frac{y-scale \cdot \pi}{x-scale} \cdot -0.011111111111111112\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\frac{y-scale}{x-scale}}{\tan \left(\frac{\pi}{\frac{180}{angle}}\right)}\right)}{0 - \pi}\\
\end{array}
\end{array}
if b < 6.19999999999999955e34Initial program 18.3%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified32.5%
Taylor expanded in b around 0
associate-*r/N/A
/-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.f6450.4%
Simplified50.4%
*-commutativeN/A
metadata-evalN/A
div-invN/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
/-lowering-/.f6449.3%
Applied egg-rr49.3%
Taylor expanded in angle around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6452.1%
Simplified52.1%
if 6.19999999999999955e34 < b Initial program 16.0%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified22.3%
add-cbrt-cubeN/A
cbrt-lowering-cbrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f6423.2%
Applied egg-rr23.2%
Taylor expanded in b around inf
mul-1-negN/A
times-fracN/A
distribute-lft-neg-inN/A
*-lowering-*.f64N/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
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6466.6%
Simplified66.6%
distribute-lft-neg-outN/A
atan-negN/A
neg-lowering-neg.f64N/A
atan-lowering-atan.f64N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
quot-tanN/A
*-commutativeN/A
metadata-evalN/A
div-invN/A
associate-*l/N/A
Applied egg-rr64.8%
Final simplification54.7%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 2.2e+52)
(*
180.0
(/
(atan
(* -0.5 (* angle (* (/ (* y-scale PI) x-scale) -0.011111111111111112))))
PI))
(*
180.0
(/
(atan
(*
(/ y-scale x-scale)
(/
(-
(* (* angle (* PI -0.001851851851851852)) (- 0.0 angle))
(/ 180.0 PI))
angle)))
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.2e+52) {
tmp = 180.0 * (atan((-0.5 * (angle * (((y_45_scale * ((double) M_PI)) / x_45_scale) * -0.011111111111111112)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * ((((angle * (((double) M_PI) * -0.001851851851851852)) * (0.0 - angle)) - (180.0 / ((double) M_PI))) / angle))) / ((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.2e+52) {
tmp = 180.0 * (Math.atan((-0.5 * (angle * (((y_45_scale * Math.PI) / x_45_scale) * -0.011111111111111112)))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * ((((angle * (Math.PI * -0.001851851851851852)) * (0.0 - angle)) - (180.0 / Math.PI)) / angle))) / 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.2e+52: tmp = 180.0 * (math.atan((-0.5 * (angle * (((y_45_scale * math.pi) / x_45_scale) * -0.011111111111111112)))) / math.pi) else: tmp = 180.0 * (math.atan(((y_45_scale / x_45_scale) * ((((angle * (math.pi * -0.001851851851851852)) * (0.0 - angle)) - (180.0 / math.pi)) / angle))) / 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.2e+52) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(angle * Float64(Float64(Float64(y_45_scale * pi) / x_45_scale) * -0.011111111111111112)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * Float64(Float64(Float64(Float64(angle * Float64(pi * -0.001851851851851852)) * Float64(0.0 - angle)) - Float64(180.0 / pi)) / angle))) / 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.2e+52) tmp = 180.0 * (atan((-0.5 * (angle * (((y_45_scale * pi) / x_45_scale) * -0.011111111111111112)))) / pi); else tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * ((((angle * (pi * -0.001851851851851852)) * (0.0 - angle)) - (180.0 / pi)) / angle))) / 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.2e+52], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(angle * N[(N[(N[(y$45$scale * Pi), $MachinePrecision] / x$45$scale), $MachinePrecision] * -0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(N[(N[(N[(angle * N[(Pi * -0.001851851851851852), $MachinePrecision]), $MachinePrecision] * N[(0.0 - angle), $MachinePrecision]), $MachinePrecision] - N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision] / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 2.2 \cdot 10^{+52}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(angle \cdot \left(\frac{y-scale \cdot \pi}{x-scale} \cdot -0.011111111111111112\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\left(angle \cdot \left(\pi \cdot -0.001851851851851852\right)\right) \cdot \left(0 - angle\right) - \frac{180}{\pi}}{angle}\right)}{\pi}\\
\end{array}
\end{array}
if b < 2.2e52Initial program 19.0%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified33.0%
Taylor expanded in b around 0
associate-*r/N/A
/-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.f6450.2%
Simplified50.2%
*-commutativeN/A
metadata-evalN/A
div-invN/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
/-lowering-/.f6449.1%
Applied egg-rr49.1%
Taylor expanded in angle around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6451.9%
Simplified51.9%
if 2.2e52 < b Initial program 12.9%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified19.6%
add-cbrt-cubeN/A
cbrt-lowering-cbrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f6420.6%
Applied egg-rr20.6%
Taylor expanded in b around inf
mul-1-negN/A
times-fracN/A
distribute-lft-neg-inN/A
*-lowering-*.f64N/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
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6466.6%
Simplified66.6%
Taylor expanded in angle around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
metadata-evalN/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
PI-lowering-PI.f6461.2%
Simplified61.2%
Final simplification53.7%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 5.6e+69)
(*
180.0
(/
(atan
(* -0.5 (* angle (* (/ (* y-scale PI) x-scale) -0.011111111111111112))))
PI))
(* 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) {
double tmp;
if (b_m <= 5.6e+69) {
tmp = 180.0 * (atan((-0.5 * (angle * (((y_45_scale * ((double) M_PI)) / x_45_scale) * -0.011111111111111112)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((y_45_scale * -180.0) / (angle * (((double) M_PI) * x_45_scale)))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 5.6e+69) {
tmp = 180.0 * (Math.atan((-0.5 * (angle * (((y_45_scale * Math.PI) / x_45_scale) * -0.011111111111111112)))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((y_45_scale * -180.0) / (angle * (Math.PI * x_45_scale)))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if b_m <= 5.6e+69: tmp = 180.0 * (math.atan((-0.5 * (angle * (((y_45_scale * math.pi) / x_45_scale) * -0.011111111111111112)))) / math.pi) else: tmp = 180.0 * (math.atan(((y_45_scale * -180.0) / (angle * (math.pi * x_45_scale)))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 5.6e+69) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(angle * Float64(Float64(Float64(y_45_scale * pi) / x_45_scale) * -0.011111111111111112)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * -180.0) / Float64(angle * Float64(pi * x_45_scale)))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 5.6e+69) tmp = 180.0 * (atan((-0.5 * (angle * (((y_45_scale * pi) / x_45_scale) * -0.011111111111111112)))) / pi); else tmp = 180.0 * (atan(((y_45_scale * -180.0) / (angle * (pi * x_45_scale)))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 5.6e+69], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(angle * N[(N[(N[(y$45$scale * Pi), $MachinePrecision] / x$45$scale), $MachinePrecision] * -0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], 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|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 5.6 \cdot 10^{+69}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(angle \cdot \left(\frac{y-scale \cdot \pi}{x-scale} \cdot -0.011111111111111112\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot -180}{angle \cdot \left(\pi \cdot x-scale\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 5.59999999999999964e69Initial program 18.6%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified32.5%
Taylor expanded in b around 0
associate-*r/N/A
/-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.f6450.5%
Simplified50.5%
*-commutativeN/A
metadata-evalN/A
div-invN/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
/-lowering-/.f6449.5%
Applied egg-rr49.5%
Taylor expanded in angle around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6452.3%
Simplified52.3%
if 5.59999999999999964e69 < b Initial program 13.9%
Taylor expanded in angle around 0
associate-*r/N/A
/-lowering-/.f64N/A
Simplified11.5%
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.f6466.4%
Simplified66.4%
Final simplification54.8%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 3.4e+69)
(*
180.0
(/
(atan (* 0.005555555555555556 (* angle (/ (* y-scale PI) x-scale))))
PI))
(* 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) {
double tmp;
if (b_m <= 3.4e+69) {
tmp = 180.0 * (atan((0.005555555555555556 * (angle * ((y_45_scale * ((double) M_PI)) / x_45_scale)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((y_45_scale * -180.0) / (angle * (((double) M_PI) * x_45_scale)))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 3.4e+69) {
tmp = 180.0 * (Math.atan((0.005555555555555556 * (angle * ((y_45_scale * Math.PI) / x_45_scale)))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((y_45_scale * -180.0) / (angle * (Math.PI * x_45_scale)))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if b_m <= 3.4e+69: tmp = 180.0 * (math.atan((0.005555555555555556 * (angle * ((y_45_scale * math.pi) / x_45_scale)))) / math.pi) else: tmp = 180.0 * (math.atan(((y_45_scale * -180.0) / (angle * (math.pi * x_45_scale)))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 3.4e+69) tmp = Float64(180.0 * Float64(atan(Float64(0.005555555555555556 * Float64(angle * Float64(Float64(y_45_scale * pi) / x_45_scale)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * -180.0) / Float64(angle * Float64(pi * x_45_scale)))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 3.4e+69) tmp = 180.0 * (atan((0.005555555555555556 * (angle * ((y_45_scale * pi) / x_45_scale)))) / pi); else tmp = 180.0 * (atan(((y_45_scale * -180.0) / (angle * (pi * x_45_scale)))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 3.4e+69], N[(180.0 * N[(N[ArcTan[N[(0.005555555555555556 * N[(angle * N[(N[(y$45$scale * Pi), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], 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|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 3.4 \cdot 10^{+69}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.005555555555555556 \cdot \left(angle \cdot \frac{y-scale \cdot \pi}{x-scale}\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot -180}{angle \cdot \left(\pi \cdot x-scale\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 3.39999999999999986e69Initial program 18.6%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified32.5%
Taylor expanded in b around 0
associate-*r/N/A
/-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.f6450.5%
Simplified50.5%
*-commutativeN/A
metadata-evalN/A
div-invN/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
/-lowering-/.f6449.5%
Applied egg-rr49.5%
Taylor expanded in angle around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6452.3%
Simplified52.3%
if 3.39999999999999986e69 < b Initial program 13.9%
Taylor expanded in angle around 0
associate-*r/N/A
/-lowering-/.f64N/A
Simplified11.5%
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.f6466.4%
Simplified66.4%
Final simplification54.8%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 1.3e+151)
(*
180.0
(/
(atan (* 0.005555555555555556 (* angle (/ (* y-scale PI) x-scale))))
PI))
(* 180.0 (/ (atan (* -180.0 (/ (/ x-scale angle) (* y-scale PI)))) PI))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 1.3e+151) {
tmp = 180.0 * (atan((0.005555555555555556 * (angle * ((y_45_scale * ((double) M_PI)) / x_45_scale)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-180.0 * ((x_45_scale / angle) / (y_45_scale * ((double) M_PI))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 1.3e+151) {
tmp = 180.0 * (Math.atan((0.005555555555555556 * (angle * ((y_45_scale * Math.PI) / x_45_scale)))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-180.0 * ((x_45_scale / angle) / (y_45_scale * Math.PI)))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if b_m <= 1.3e+151: tmp = 180.0 * (math.atan((0.005555555555555556 * (angle * ((y_45_scale * math.pi) / x_45_scale)))) / math.pi) else: tmp = 180.0 * (math.atan((-180.0 * ((x_45_scale / angle) / (y_45_scale * math.pi)))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 1.3e+151) tmp = Float64(180.0 * Float64(atan(Float64(0.005555555555555556 * Float64(angle * Float64(Float64(y_45_scale * pi) / x_45_scale)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(Float64(x_45_scale / angle) / Float64(y_45_scale * pi)))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 1.3e+151) tmp = 180.0 * (atan((0.005555555555555556 * (angle * ((y_45_scale * pi) / x_45_scale)))) / pi); else tmp = 180.0 * (atan((-180.0 * ((x_45_scale / angle) / (y_45_scale * pi)))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 1.3e+151], N[(180.0 * N[(N[ArcTan[N[(0.005555555555555556 * N[(angle * N[(N[(y$45$scale * Pi), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(N[(x$45$scale / angle), $MachinePrecision] / N[(y$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 1.3 \cdot 10^{+151}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.005555555555555556 \cdot \left(angle \cdot \frac{y-scale \cdot \pi}{x-scale}\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{\frac{x-scale}{angle}}{y-scale \cdot \pi}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.30000000000000007e151Initial program 19.6%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified34.2%
Taylor expanded in b around 0
associate-*r/N/A
/-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.f6449.5%
Simplified49.5%
*-commutativeN/A
metadata-evalN/A
div-invN/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
/-lowering-/.f6448.6%
Applied egg-rr48.6%
Taylor expanded in angle around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6451.1%
Simplified51.1%
if 1.30000000000000007e151 < b Initial program 3.4%
Taylor expanded in angle around 0
associate-*r/N/A
/-lowering-/.f64N/A
Simplified0.1%
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.f6429.3%
Simplified29.3%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6429.3%
Applied egg-rr29.3%
Final simplification48.7%
b_m = (fabs.f64 b) (FPCore (a b_m angle x-scale y-scale) :precision binary64 (* 180.0 (/ (atan (* 0.005555555555555556 (* angle (/ (* y-scale PI) x-scale)))) PI)))
b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (atan((0.005555555555555556 * (angle * ((y_45_scale * ((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((0.005555555555555556 * (angle * ((y_45_scale * 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((0.005555555555555556 * (angle * ((y_45_scale * 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(0.005555555555555556 * Float64(angle * Float64(Float64(y_45_scale * 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((0.005555555555555556 * (angle * ((y_45_scale * 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[(0.005555555555555556 * N[(angle * N[(N[(y$45$scale * Pi), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
180 \cdot \frac{\tan^{-1} \left(0.005555555555555556 \cdot \left(angle \cdot \frac{y-scale \cdot \pi}{x-scale}\right)\right)}{\pi}
\end{array}
Initial program 17.8%
Taylor expanded in x-scale around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified30.4%
Taylor expanded in b around 0
associate-*r/N/A
/-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.4%
Simplified45.4%
*-commutativeN/A
metadata-evalN/A
div-invN/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
/-lowering-/.f6444.5%
Applied egg-rr44.5%
Taylor expanded in angle around 0
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6446.8%
Simplified46.8%
herbie shell --seed 2024192
(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)))