
(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}
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 angle) -0.005555555555555556))
(t_1 (sin (fabs t_0)))
(t_2 (- 1.0 (* t_1 t_1)))
(t_3 (* (* 0.005555555555555556 angle) PI))
(t_4 (sin t_3))
(t_5 (* 0.005555555555555556 (* angle PI)))
(t_6 (sin t_5))
(t_7 (cos t_3))
(t_8 (fma (pow a 2.0) (pow t_4 2.0) (* (pow b_m 2.0) (pow t_7 2.0))))
(t_9 (* (* PI angle) 0.005555555555555556))
(t_10
(/
(+
(cos (fma (* 0.005555555555555556 angle) PI t_0))
(cos (- t_9 t_0)))
2.0))
(t_11 (sin t_9))
(t_12 (/ y-scale (* x-scale (cos t_9)))))
(if (<= b_m 2.2e-126)
(*
180.0
(/
(atan
(*
0.5
(/
(* y-scale (+ (sqrt (pow t_6 4.0)) (pow t_6 2.0)))
(* x-scale (* (cos t_5) t_6)))))
PI))
(if (<= b_m 1.95e-82)
(*
180.0
(/
(atan
(*
-0.5
(/
(* y-scale (+ (sqrt (pow t_8 2.0)) t_8))
(* x-scale (* t_7 (* t_4 (- (pow b_m 2.0) (pow a 2.0))))))))
PI))
(if (<= b_m 1.9e+63)
(* 180.0 (/ (atan (* -0.5 (* t_12 (/ (+ t_2 t_2) t_11)))) PI))
(* 180.0 (/ (atan (* -0.5 (* t_12 (/ (+ t_10 t_10) t_11)))) 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) * angle) * -0.005555555555555556;
double t_1 = sin(fabs(t_0));
double t_2 = 1.0 - (t_1 * t_1);
double t_3 = (0.005555555555555556 * angle) * ((double) M_PI);
double t_4 = sin(t_3);
double t_5 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_6 = sin(t_5);
double t_7 = cos(t_3);
double t_8 = fma(pow(a, 2.0), pow(t_4, 2.0), (pow(b_m, 2.0) * pow(t_7, 2.0)));
double t_9 = (((double) M_PI) * angle) * 0.005555555555555556;
double t_10 = (cos(fma((0.005555555555555556 * angle), ((double) M_PI), t_0)) + cos((t_9 - t_0))) / 2.0;
double t_11 = sin(t_9);
double t_12 = y_45_scale / (x_45_scale * cos(t_9));
double tmp;
if (b_m <= 2.2e-126) {
tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt(pow(t_6, 4.0)) + pow(t_6, 2.0))) / (x_45_scale * (cos(t_5) * t_6))))) / ((double) M_PI));
} else if (b_m <= 1.95e-82) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(t_8, 2.0)) + t_8)) / (x_45_scale * (t_7 * (t_4 * (pow(b_m, 2.0) - pow(a, 2.0)))))))) / ((double) M_PI));
} else if (b_m <= 1.9e+63) {
tmp = 180.0 * (atan((-0.5 * (t_12 * ((t_2 + t_2) / t_11)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (t_12 * ((t_10 + t_10) / t_11)))) / ((double) M_PI));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(pi * angle) * -0.005555555555555556) t_1 = sin(abs(t_0)) t_2 = Float64(1.0 - Float64(t_1 * t_1)) t_3 = Float64(Float64(0.005555555555555556 * angle) * pi) t_4 = sin(t_3) t_5 = Float64(0.005555555555555556 * Float64(angle * pi)) t_6 = sin(t_5) t_7 = cos(t_3) t_8 = fma((a ^ 2.0), (t_4 ^ 2.0), Float64((b_m ^ 2.0) * (t_7 ^ 2.0))) t_9 = Float64(Float64(pi * angle) * 0.005555555555555556) t_10 = Float64(Float64(cos(fma(Float64(0.005555555555555556 * angle), pi, t_0)) + cos(Float64(t_9 - t_0))) / 2.0) t_11 = sin(t_9) t_12 = Float64(y_45_scale / Float64(x_45_scale * cos(t_9))) tmp = 0.0 if (b_m <= 2.2e-126) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_6 ^ 4.0)) + (t_6 ^ 2.0))) / Float64(x_45_scale * Float64(cos(t_5) * t_6))))) / pi)); elseif (b_m <= 1.95e-82) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_8 ^ 2.0)) + t_8)) / Float64(x_45_scale * Float64(t_7 * Float64(t_4 * Float64((b_m ^ 2.0) - (a ^ 2.0)))))))) / pi)); elseif (b_m <= 1.9e+63) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(t_12 * Float64(Float64(t_2 + t_2) / t_11)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(t_12 * Float64(Float64(t_10 + t_10) / t_11)))) / pi)); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(Pi * angle), $MachinePrecision] * -0.005555555555555556), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[Abs[t$95$0], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(1.0 - N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$4 = N[Sin[t$95$3], $MachinePrecision]}, Block[{t$95$5 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[Sin[t$95$5], $MachinePrecision]}, Block[{t$95$7 = N[Cos[t$95$3], $MachinePrecision]}, Block[{t$95$8 = N[(N[Power[a, 2.0], $MachinePrecision] * N[Power[t$95$4, 2.0], $MachinePrecision] + N[(N[Power[b$95$m, 2.0], $MachinePrecision] * N[Power[t$95$7, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$9 = N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$10 = N[(N[(N[Cos[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi + t$95$0), $MachinePrecision]], $MachinePrecision] + N[Cos[N[(t$95$9 - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]}, Block[{t$95$11 = N[Sin[t$95$9], $MachinePrecision]}, Block[{t$95$12 = N[(y$45$scale / N[(x$45$scale * N[Cos[t$95$9], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 2.2e-126], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$6, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$6, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(N[Cos[t$95$5], $MachinePrecision] * t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.95e-82], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$8, 2.0], $MachinePrecision]], $MachinePrecision] + t$95$8), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$7 * N[(t$95$4 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.9e+63], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(t$95$12 * N[(N[(t$95$2 + t$95$2), $MachinePrecision] / t$95$11), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(t$95$12 * N[(N[(t$95$10 + t$95$10), $MachinePrecision] / t$95$11), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \left(\pi \cdot angle\right) \cdot -0.005555555555555556\\
t_1 := \sin \left(\left|t\_0\right|\right)\\
t_2 := 1 - t\_1 \cdot t\_1\\
t_3 := \left(0.005555555555555556 \cdot angle\right) \cdot \pi\\
t_4 := \sin t\_3\\
t_5 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_6 := \sin t\_5\\
t_7 := \cos t\_3\\
t_8 := \mathsf{fma}\left({a}^{2}, {t\_4}^{2}, {b\_m}^{2} \cdot {t\_7}^{2}\right)\\
t_9 := \left(\pi \cdot angle\right) \cdot 0.005555555555555556\\
t_10 := \frac{\cos \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, t\_0\right)\right) + \cos \left(t\_9 - t\_0\right)}{2}\\
t_11 := \sin t\_9\\
t_12 := \frac{y-scale}{x-scale \cdot \cos t\_9}\\
\mathbf{if}\;b\_m \leq 2.2 \cdot 10^{-126}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_6}^{4}} + {t\_6}^{2}\right)}{x-scale \cdot \left(\cos t\_5 \cdot t\_6\right)}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.95 \cdot 10^{-82}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_8}^{2}} + t\_8\right)}{x-scale \cdot \left(t\_7 \cdot \left(t\_4 \cdot \left({b\_m}^{2} - {a}^{2}\right)\right)\right)}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.9 \cdot 10^{+63}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(t\_12 \cdot \frac{t\_2 + t\_2}{t\_11}\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(t\_12 \cdot \frac{t\_10 + t\_10}{t\_11}\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 2.20000000000000014e-126Initial program 14.2%
Taylor expanded in x-scale around 0
Applied rewrites24.9%
Taylor expanded in a around inf
lower-*.f64N/A
Applied rewrites38.0%
if 2.20000000000000014e-126 < b < 1.94999999999999987e-82Initial program 14.2%
Taylor expanded in x-scale around 0
Applied rewrites24.9%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6424.9
Applied rewrites24.9%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6424.9
Applied rewrites24.9%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6424.9
Applied rewrites24.9%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6424.9
Applied rewrites24.9%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6424.8
Applied rewrites24.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6424.7
Applied rewrites24.7%
if 1.94999999999999987e-82 < b < 1.9000000000000001e63Initial program 14.2%
Taylor expanded in x-scale around 0
Applied rewrites24.9%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.9%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
Applied rewrites45.7%
lift-+.f64N/A
lift-*.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
sqr-cos-a-revN/A
cos-fabs-revN/A
cos-fabs-revN/A
1-sub-sin-revN/A
lower--.f64N/A
lower-*.f64N/A
Applied rewrites45.7%
lift-+.f64N/A
lift-*.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
sqr-cos-a-revN/A
cos-fabs-revN/A
cos-fabs-revN/A
1-sub-sin-revN/A
lower--.f64N/A
lower-*.f64N/A
Applied rewrites45.7%
if 1.9000000000000001e63 < b Initial program 14.2%
Taylor expanded in x-scale around 0
Applied rewrites24.9%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.9%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
Applied rewrites45.7%
lift-+.f64N/A
lift-*.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
sqr-cos-a-revN/A
cos-neg-revN/A
lift-neg.f64N/A
cos-multN/A
lower-/.f64N/A
Applied rewrites45.5%
lift-+.f64N/A
lift-*.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
sqr-cos-a-revN/A
cos-neg-revN/A
lift-neg.f64N/A
cos-multN/A
lower-/.f64N/A
Applied rewrites45.5%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (* PI angle) -0.005555555555555556))
(t_1 (* 0.005555555555555556 (* angle PI)))
(t_2 (sin t_1))
(t_3 (* (* PI angle) 0.005555555555555556))
(t_4 (+ 0.5 (* 0.5 (sin (fma t_3 2.0 (* PI 0.5))))))
(t_5 (sin t_3))
(t_6 (/ y-scale (* x-scale (cos t_3))))
(t_7
(/
(+
(cos (fma (* 0.005555555555555556 angle) PI t_0))
(cos (- t_3 t_0)))
2.0)))
(if (<= b_m 9e-107)
(*
180.0
(/
(atan
(*
0.5
(/
(* y-scale (+ (sqrt (pow t_2 4.0)) (pow t_2 2.0)))
(* x-scale (* (cos t_1) t_2)))))
PI))
(if (<= b_m 1.9e+63)
(* 180.0 (/ (atan (* -0.5 (* t_6 (/ (+ t_4 t_4) t_5)))) PI))
(* 180.0 (/ (atan (* -0.5 (* t_6 (/ (+ t_7 t_7) t_5)))) 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) * angle) * -0.005555555555555556;
double t_1 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_2 = sin(t_1);
double t_3 = (((double) M_PI) * angle) * 0.005555555555555556;
double t_4 = 0.5 + (0.5 * sin(fma(t_3, 2.0, (((double) M_PI) * 0.5))));
double t_5 = sin(t_3);
double t_6 = y_45_scale / (x_45_scale * cos(t_3));
double t_7 = (cos(fma((0.005555555555555556 * angle), ((double) M_PI), t_0)) + cos((t_3 - t_0))) / 2.0;
double tmp;
if (b_m <= 9e-107) {
tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt(pow(t_2, 4.0)) + pow(t_2, 2.0))) / (x_45_scale * (cos(t_1) * t_2))))) / ((double) M_PI));
} else if (b_m <= 1.9e+63) {
tmp = 180.0 * (atan((-0.5 * (t_6 * ((t_4 + t_4) / t_5)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (t_6 * ((t_7 + t_7) / t_5)))) / ((double) M_PI));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(pi * angle) * -0.005555555555555556) t_1 = Float64(0.005555555555555556 * Float64(angle * pi)) t_2 = sin(t_1) t_3 = Float64(Float64(pi * angle) * 0.005555555555555556) t_4 = Float64(0.5 + Float64(0.5 * sin(fma(t_3, 2.0, Float64(pi * 0.5))))) t_5 = sin(t_3) t_6 = Float64(y_45_scale / Float64(x_45_scale * cos(t_3))) t_7 = Float64(Float64(cos(fma(Float64(0.005555555555555556 * angle), pi, t_0)) + cos(Float64(t_3 - t_0))) / 2.0) tmp = 0.0 if (b_m <= 9e-107) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_2 ^ 4.0)) + (t_2 ^ 2.0))) / Float64(x_45_scale * Float64(cos(t_1) * t_2))))) / pi)); elseif (b_m <= 1.9e+63) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(t_6 * Float64(Float64(t_4 + t_4) / t_5)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(t_6 * Float64(Float64(t_7 + t_7) / t_5)))) / pi)); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(Pi * angle), $MachinePrecision] * -0.005555555555555556), $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[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$4 = N[(0.5 + N[(0.5 * N[Sin[N[(t$95$3 * 2.0 + N[(Pi * 0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[Sin[t$95$3], $MachinePrecision]}, Block[{t$95$6 = N[(y$45$scale / N[(x$45$scale * N[Cos[t$95$3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(N[(N[Cos[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi + t$95$0), $MachinePrecision]], $MachinePrecision] + N[Cos[N[(t$95$3 - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]}, If[LessEqual[b$95$m, 9e-107], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$2, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$2, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(N[Cos[t$95$1], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.9e+63], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(t$95$6 * N[(N[(t$95$4 + t$95$4), $MachinePrecision] / t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(t$95$6 * N[(N[(t$95$7 + t$95$7), $MachinePrecision] / t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \left(\pi \cdot angle\right) \cdot -0.005555555555555556\\
t_1 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_2 := \sin t\_1\\
t_3 := \left(\pi \cdot angle\right) \cdot 0.005555555555555556\\
t_4 := 0.5 + 0.5 \cdot \sin \left(\mathsf{fma}\left(t\_3, 2, \pi \cdot 0.5\right)\right)\\
t_5 := \sin t\_3\\
t_6 := \frac{y-scale}{x-scale \cdot \cos t\_3}\\
t_7 := \frac{\cos \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, t\_0\right)\right) + \cos \left(t\_3 - t\_0\right)}{2}\\
\mathbf{if}\;b\_m \leq 9 \cdot 10^{-107}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_2}^{4}} + {t\_2}^{2}\right)}{x-scale \cdot \left(\cos t\_1 \cdot t\_2\right)}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.9 \cdot 10^{+63}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(t\_6 \cdot \frac{t\_4 + t\_4}{t\_5}\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(t\_6 \cdot \frac{t\_7 + t\_7}{t\_5}\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 9.00000000000000032e-107Initial program 14.2%
Taylor expanded in x-scale around 0
Applied rewrites24.9%
Taylor expanded in a around inf
lower-*.f64N/A
Applied rewrites38.0%
if 9.00000000000000032e-107 < b < 1.9000000000000001e63Initial program 14.2%
Taylor expanded in x-scale around 0
Applied rewrites24.9%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.9%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
Applied rewrites45.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-PI.f64N/A
lift-/.f64N/A
lower-fma.f6445.7
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f6445.7
Applied rewrites45.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-PI.f64N/A
lift-/.f64N/A
lower-fma.f6445.6
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f6445.6
Applied rewrites45.6%
if 1.9000000000000001e63 < b Initial program 14.2%
Taylor expanded in x-scale around 0
Applied rewrites24.9%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.9%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
Applied rewrites45.7%
lift-+.f64N/A
lift-*.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
sqr-cos-a-revN/A
cos-neg-revN/A
lift-neg.f64N/A
cos-multN/A
lower-/.f64N/A
Applied rewrites45.5%
lift-+.f64N/A
lift-*.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
sqr-cos-a-revN/A
cos-neg-revN/A
lift-neg.f64N/A
cos-multN/A
lower-/.f64N/A
Applied rewrites45.5%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (* PI angle) 0.005555555555555556))
(t_1 (+ 0.5 (* 0.5 (cos (* 2.0 t_0)))))
(t_2 (/ (+ t_1 t_1) (sin t_0)))
(t_3 (fma (* PI angle) -0.005555555555555556 (* PI 0.5))))
(if (<= angle -1.8e-117)
(*
180.0
(/
(atan
(*
-0.5
(*
(/
y-scale
(*
x-scale
(sin (fma (* PI angle) 0.005555555555555556 (* PI 0.5)))))
t_2)))
PI))
(if (<= angle 6.7e-248)
(*
180.0
(/
(atan
(*
-0.5
(* 360.0 (/ y-scale (* angle (log (pow (exp PI) x-scale)))))))
PI))
(if (<= angle 5.2e+186)
(*
180.0
(/ (atan (* -0.5 (* (/ y-scale (* x-scale (sin t_3))) t_2))) PI))
(*
180.0
(/
(atan
(*
-0.5
(/
(*
y-scale
(+ 1.0 (pow (cos (* 0.005555555555555556 (* angle PI))) 2.0)))
(*
x-scale
(/
(-
(cos (- t_0 t_3))
(cos (fma (* 0.005555555555555556 angle) PI t_3)))
2.0)))))
PI)))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (((double) M_PI) * angle) * 0.005555555555555556;
double t_1 = 0.5 + (0.5 * cos((2.0 * t_0)));
double t_2 = (t_1 + t_1) / sin(t_0);
double t_3 = fma((((double) M_PI) * angle), -0.005555555555555556, (((double) M_PI) * 0.5));
double tmp;
if (angle <= -1.8e-117) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale / (x_45_scale * sin(fma((((double) M_PI) * angle), 0.005555555555555556, (((double) M_PI) * 0.5))))) * t_2))) / ((double) M_PI));
} else if (angle <= 6.7e-248) {
tmp = 180.0 * (atan((-0.5 * (360.0 * (y_45_scale / (angle * log(pow(exp(((double) M_PI)), x_45_scale))))))) / ((double) M_PI));
} else if (angle <= 5.2e+186) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale / (x_45_scale * sin(t_3))) * t_2))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (1.0 + pow(cos((0.005555555555555556 * (angle * ((double) M_PI)))), 2.0))) / (x_45_scale * ((cos((t_0 - t_3)) - cos(fma((0.005555555555555556 * angle), ((double) M_PI), t_3))) / 2.0))))) / ((double) M_PI));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(pi * angle) * 0.005555555555555556) t_1 = Float64(0.5 + Float64(0.5 * cos(Float64(2.0 * t_0)))) t_2 = Float64(Float64(t_1 + t_1) / sin(t_0)) t_3 = fma(Float64(pi * angle), -0.005555555555555556, Float64(pi * 0.5)) tmp = 0.0 if (angle <= -1.8e-117) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale / Float64(x_45_scale * sin(fma(Float64(pi * angle), 0.005555555555555556, Float64(pi * 0.5))))) * t_2))) / pi)); elseif (angle <= 6.7e-248) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(360.0 * Float64(y_45_scale / Float64(angle * log((exp(pi) ^ x_45_scale))))))) / pi)); elseif (angle <= 5.2e+186) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale / Float64(x_45_scale * sin(t_3))) * t_2))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(1.0 + (cos(Float64(0.005555555555555556 * Float64(angle * pi))) ^ 2.0))) / Float64(x_45_scale * Float64(Float64(cos(Float64(t_0 - t_3)) - cos(fma(Float64(0.005555555555555556 * angle), pi, t_3))) / 2.0))))) / pi)); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$1 = N[(0.5 + N[(0.5 * N[Cos[N[(2.0 * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 + t$95$1), $MachinePrecision] / N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(Pi * angle), $MachinePrecision] * -0.005555555555555556 + N[(Pi * 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[angle, -1.8e-117], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale / N[(x$45$scale * N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556 + N[(Pi * 0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[angle, 6.7e-248], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(360.0 * N[(y$45$scale / N[(angle * N[Log[N[Power[N[Exp[Pi], $MachinePrecision], x$45$scale], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[angle, 5.2e+186], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale / N[(x$45$scale * N[Sin[t$95$3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(1.0 + N[Power[N[Cos[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(N[(N[Cos[N[(t$95$0 - t$95$3), $MachinePrecision]], $MachinePrecision] - N[Cos[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi + t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \left(\pi \cdot angle\right) \cdot 0.005555555555555556\\
t_1 := 0.5 + 0.5 \cdot \cos \left(2 \cdot t\_0\right)\\
t_2 := \frac{t\_1 + t\_1}{\sin t\_0}\\
t_3 := \mathsf{fma}\left(\pi \cdot angle, -0.005555555555555556, \pi \cdot 0.5\right)\\
\mathbf{if}\;angle \leq -1.8 \cdot 10^{-117}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{y-scale}{x-scale \cdot \sin \left(\mathsf{fma}\left(\pi \cdot angle, 0.005555555555555556, \pi \cdot 0.5\right)\right)} \cdot t\_2\right)\right)}{\pi}\\
\mathbf{elif}\;angle \leq 6.7 \cdot 10^{-248}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(360 \cdot \frac{y-scale}{angle \cdot \log \left({\left(e^{\pi}\right)}^{x-scale}\right)}\right)\right)}{\pi}\\
\mathbf{elif}\;angle \leq 5.2 \cdot 10^{+186}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{y-scale}{x-scale \cdot \sin t\_3} \cdot t\_2\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(1 + {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}{x-scale \cdot \frac{\cos \left(t\_0 - t\_3\right) - \cos \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, t\_3\right)\right)}{2}}\right)}{\pi}\\
\end{array}
\end{array}
if angle < -1.8e-117Initial program 14.2%
Taylor expanded in x-scale around 0
Applied rewrites24.9%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.9%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
Applied rewrites45.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
lower-fma.f6445.9
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f6445.9
Applied rewrites45.9%
if -1.8e-117 < angle < 6.7e-248Initial program 14.2%
Taylor expanded in x-scale around 0
Applied rewrites24.9%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6438.4
Applied rewrites38.4%
lift-*.f64N/A
lift-PI.f64N/A
add-log-expN/A
log-pow-revN/A
lower-log.f64N/A
lower-pow.f64N/A
lift-PI.f64N/A
lower-exp.f6435.0
Applied rewrites35.0%
if 6.7e-248 < angle < 5.2000000000000001e186Initial program 14.2%
Taylor expanded in x-scale around 0
Applied rewrites24.9%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.9%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
Applied rewrites45.7%
lift-cos.f64N/A
cos-neg-revN/A
lift-neg.f64N/A
sin-+PI/2N/A
lift-PI.f64N/A
lift-/.f64N/A
lift-+.f64N/A
lift-sin.f6445.9
lift-+.f64N/A
lift-neg.f64N/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
metadata-eval45.9
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f6445.9
Applied rewrites45.9%
if 5.2000000000000001e186 < angle Initial program 14.2%
Taylor expanded in x-scale around 0
Applied rewrites24.9%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.9%
Taylor expanded in angle around 0
Applied rewrites43.7%
lift-*.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
cos-neg-revN/A
lift-neg.f64N/A
sin-+PI/2N/A
Applied rewrites34.7%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (sin t_0))
(t_2 (* (* PI angle) 0.005555555555555556))
(t_3
(-
0.5
(*
0.5
(cos (* 2.0 (fma (* PI angle) 0.005555555555555556 (* PI 0.5))))))))
(if (<= b_m 9e-107)
(*
180.0
(/
(atan
(*
0.5
(/
(* y-scale (+ (sqrt (pow t_1 4.0)) (pow t_1 2.0)))
(* x-scale (* (cos t_0) t_1)))))
PI))
(*
180.0
(/
(atan
(*
-0.5
(* (/ y-scale (* x-scale (cos t_2))) (/ (+ t_3 t_3) (sin t_2)))))
PI)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = sin(t_0);
double t_2 = (((double) M_PI) * angle) * 0.005555555555555556;
double t_3 = 0.5 - (0.5 * cos((2.0 * fma((((double) M_PI) * angle), 0.005555555555555556, (((double) M_PI) * 0.5)))));
double tmp;
if (b_m <= 9e-107) {
tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt(pow(t_1, 4.0)) + pow(t_1, 2.0))) / (x_45_scale * (cos(t_0) * t_1))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale / (x_45_scale * cos(t_2))) * ((t_3 + t_3) / sin(t_2))))) / ((double) M_PI));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = sin(t_0) t_2 = Float64(Float64(pi * angle) * 0.005555555555555556) t_3 = Float64(0.5 - Float64(0.5 * cos(Float64(2.0 * fma(Float64(pi * angle), 0.005555555555555556, Float64(pi * 0.5)))))) tmp = 0.0 if (b_m <= 9e-107) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_1 ^ 4.0)) + (t_1 ^ 2.0))) / Float64(x_45_scale * Float64(cos(t_0) * t_1))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale / Float64(x_45_scale * cos(t_2))) * Float64(Float64(t_3 + t_3) / sin(t_2))))) / pi)); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$3 = N[(0.5 - N[(0.5 * N[Cos[N[(2.0 * N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556 + N[(Pi * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 9e-107], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$1, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(N[Cos[t$95$0], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale / N[(x$45$scale * N[Cos[t$95$2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$3 + t$95$3), $MachinePrecision] / N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
t_2 := \left(\pi \cdot angle\right) \cdot 0.005555555555555556\\
t_3 := 0.5 - 0.5 \cdot \cos \left(2 \cdot \mathsf{fma}\left(\pi \cdot angle, 0.005555555555555556, \pi \cdot 0.5\right)\right)\\
\mathbf{if}\;b\_m \leq 9 \cdot 10^{-107}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_1}^{4}} + {t\_1}^{2}\right)}{x-scale \cdot \left(\cos t\_0 \cdot t\_1\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{y-scale}{x-scale \cdot \cos t\_2} \cdot \frac{t\_3 + t\_3}{\sin t\_2}\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 9.00000000000000032e-107Initial program 14.2%
Taylor expanded in x-scale around 0
Applied rewrites24.9%
Taylor expanded in a around inf
lower-*.f64N/A
Applied rewrites38.0%
if 9.00000000000000032e-107 < b Initial program 14.2%
Taylor expanded in x-scale around 0
Applied rewrites24.9%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.9%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
Applied rewrites45.7%
lift-+.f64N/A
lift-*.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
sqr-cos-a-revN/A
sin-+PI/2-revN/A
sin-+PI/2-revN/A
sqr-sin-aN/A
lower--.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lift-*.f64N/A
Applied rewrites45.7%
lift-+.f64N/A
lift-*.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
sqr-cos-a-revN/A
sin-+PI/2-revN/A
sin-+PI/2-revN/A
sqr-sin-aN/A
lower--.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lift-*.f64N/A
Applied rewrites45.6%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (* PI angle) 0.005555555555555556)) (t_1 (cos (* t_0 2.0))))
(if (<= b_m 1.45e-108)
(*
180.0
(/
(atan
(* -0.5 (* 360.0 (/ y-scale (* angle (log (pow (exp PI) x-scale)))))))
PI))
(*
180.0
(/
(atan
(*
-0.5
(*
(/ y-scale (* x-scale (cos t_0)))
(/ (+ (+ (fma t_1 0.5 0.5) 0.5) (* t_1 0.5)) (sin t_0)))))
PI)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (((double) M_PI) * angle) * 0.005555555555555556;
double t_1 = cos((t_0 * 2.0));
double tmp;
if (b_m <= 1.45e-108) {
tmp = 180.0 * (atan((-0.5 * (360.0 * (y_45_scale / (angle * log(pow(exp(((double) M_PI)), x_45_scale))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale / (x_45_scale * cos(t_0))) * (((fma(t_1, 0.5, 0.5) + 0.5) + (t_1 * 0.5)) / sin(t_0))))) / ((double) M_PI));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(pi * angle) * 0.005555555555555556) t_1 = cos(Float64(t_0 * 2.0)) tmp = 0.0 if (b_m <= 1.45e-108) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(360.0 * Float64(y_45_scale / Float64(angle * log((exp(pi) ^ x_45_scale))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale / Float64(x_45_scale * cos(t_0))) * Float64(Float64(Float64(fma(t_1, 0.5, 0.5) + 0.5) + Float64(t_1 * 0.5)) / sin(t_0))))) / pi)); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$1 = N[Cos[N[(t$95$0 * 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[b$95$m, 1.45e-108], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(360.0 * N[(y$45$scale / N[(angle * N[Log[N[Power[N[Exp[Pi], $MachinePrecision], x$45$scale], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale / N[(x$45$scale * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(t$95$1 * 0.5 + 0.5), $MachinePrecision] + 0.5), $MachinePrecision] + N[(t$95$1 * 0.5), $MachinePrecision]), $MachinePrecision] / N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \left(\pi \cdot angle\right) \cdot 0.005555555555555556\\
t_1 := \cos \left(t\_0 \cdot 2\right)\\
\mathbf{if}\;b\_m \leq 1.45 \cdot 10^{-108}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(360 \cdot \frac{y-scale}{angle \cdot \log \left({\left(e^{\pi}\right)}^{x-scale}\right)}\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{y-scale}{x-scale \cdot \cos t\_0} \cdot \frac{\left(\mathsf{fma}\left(t\_1, 0.5, 0.5\right) + 0.5\right) + t\_1 \cdot 0.5}{\sin t\_0}\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.45e-108Initial program 14.2%
Taylor expanded in x-scale around 0
Applied rewrites24.9%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6438.4
Applied rewrites38.4%
lift-*.f64N/A
lift-PI.f64N/A
add-log-expN/A
log-pow-revN/A
lower-log.f64N/A
lower-pow.f64N/A
lift-PI.f64N/A
lower-exp.f6435.0
Applied rewrites35.0%
if 1.45e-108 < b Initial program 14.2%
Taylor expanded in x-scale around 0
Applied rewrites24.9%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.9%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
Applied rewrites45.7%
Applied rewrites45.7%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (* PI angle) 0.005555555555555556)))
(if (<= b_m 1.45e-108)
(*
180.0
(/
(atan
(* -0.5 (* 360.0 (/ y-scale (* angle (log (pow (exp PI) x-scale)))))))
PI))
(*
180.0
(/
(atan
(*
-0.5
(*
(/ y-scale (* x-scale (cos t_0)))
(/ (+ 1.0 (cos (* 0.011111111111111112 (* angle PI)))) (sin t_0)))))
PI)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (((double) M_PI) * angle) * 0.005555555555555556;
double tmp;
if (b_m <= 1.45e-108) {
tmp = 180.0 * (atan((-0.5 * (360.0 * (y_45_scale / (angle * log(pow(exp(((double) M_PI)), x_45_scale))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale / (x_45_scale * cos(t_0))) * ((1.0 + cos((0.011111111111111112 * (angle * ((double) M_PI))))) / sin(t_0))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (Math.PI * angle) * 0.005555555555555556;
double tmp;
if (b_m <= 1.45e-108) {
tmp = 180.0 * (Math.atan((-0.5 * (360.0 * (y_45_scale / (angle * Math.log(Math.pow(Math.exp(Math.PI), x_45_scale))))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale / (x_45_scale * Math.cos(t_0))) * ((1.0 + Math.cos((0.011111111111111112 * (angle * Math.PI)))) / Math.sin(t_0))))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): t_0 = (math.pi * angle) * 0.005555555555555556 tmp = 0 if b_m <= 1.45e-108: tmp = 180.0 * (math.atan((-0.5 * (360.0 * (y_45_scale / (angle * math.log(math.pow(math.exp(math.pi), x_45_scale))))))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale / (x_45_scale * math.cos(t_0))) * ((1.0 + math.cos((0.011111111111111112 * (angle * math.pi)))) / math.sin(t_0))))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(pi * angle) * 0.005555555555555556) tmp = 0.0 if (b_m <= 1.45e-108) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(360.0 * Float64(y_45_scale / Float64(angle * log((exp(pi) ^ x_45_scale))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale / Float64(x_45_scale * cos(t_0))) * Float64(Float64(1.0 + cos(Float64(0.011111111111111112 * Float64(angle * pi)))) / sin(t_0))))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = (pi * angle) * 0.005555555555555556; tmp = 0.0; if (b_m <= 1.45e-108) tmp = 180.0 * (atan((-0.5 * (360.0 * (y_45_scale / (angle * log((exp(pi) ^ x_45_scale))))))) / pi); else tmp = 180.0 * (atan((-0.5 * ((y_45_scale / (x_45_scale * cos(t_0))) * ((1.0 + cos((0.011111111111111112 * (angle * pi)))) / sin(t_0))))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, If[LessEqual[b$95$m, 1.45e-108], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(360.0 * N[(y$45$scale / N[(angle * N[Log[N[Power[N[Exp[Pi], $MachinePrecision], x$45$scale], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale / N[(x$45$scale * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Cos[N[(0.011111111111111112 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \left(\pi \cdot angle\right) \cdot 0.005555555555555556\\
\mathbf{if}\;b\_m \leq 1.45 \cdot 10^{-108}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(360 \cdot \frac{y-scale}{angle \cdot \log \left({\left(e^{\pi}\right)}^{x-scale}\right)}\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{y-scale}{x-scale \cdot \cos t\_0} \cdot \frac{1 + \cos \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)}{\sin t\_0}\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.45e-108Initial program 14.2%
Taylor expanded in x-scale around 0
Applied rewrites24.9%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6438.4
Applied rewrites38.4%
lift-*.f64N/A
lift-PI.f64N/A
add-log-expN/A
log-pow-revN/A
lower-log.f64N/A
lower-pow.f64N/A
lift-PI.f64N/A
lower-exp.f6435.0
Applied rewrites35.0%
if 1.45e-108 < b Initial program 14.2%
Taylor expanded in x-scale around 0
Applied rewrites24.9%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.9%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
Applied rewrites45.7%
Taylor expanded in angle around inf
lower-+.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6445.7
Applied rewrites45.7%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (* PI angle) 0.005555555555555556)))
(if (<= b_m 1.45e-108)
(*
180.0
(/
(atan
(* -0.5 (* 360.0 (/ y-scale (* angle (log (pow (exp PI) x-scale)))))))
PI))
(*
180.0
(/
(atan (* -0.5 (* (/ y-scale (* x-scale (cos t_0))) (/ 2.0 (sin t_0)))))
PI)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (((double) M_PI) * angle) * 0.005555555555555556;
double tmp;
if (b_m <= 1.45e-108) {
tmp = 180.0 * (atan((-0.5 * (360.0 * (y_45_scale / (angle * log(pow(exp(((double) M_PI)), x_45_scale))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale / (x_45_scale * cos(t_0))) * (2.0 / sin(t_0))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (Math.PI * angle) * 0.005555555555555556;
double tmp;
if (b_m <= 1.45e-108) {
tmp = 180.0 * (Math.atan((-0.5 * (360.0 * (y_45_scale / (angle * Math.log(Math.pow(Math.exp(Math.PI), x_45_scale))))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale / (x_45_scale * Math.cos(t_0))) * (2.0 / Math.sin(t_0))))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): t_0 = (math.pi * angle) * 0.005555555555555556 tmp = 0 if b_m <= 1.45e-108: tmp = 180.0 * (math.atan((-0.5 * (360.0 * (y_45_scale / (angle * math.log(math.pow(math.exp(math.pi), x_45_scale))))))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale / (x_45_scale * math.cos(t_0))) * (2.0 / math.sin(t_0))))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(pi * angle) * 0.005555555555555556) tmp = 0.0 if (b_m <= 1.45e-108) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(360.0 * Float64(y_45_scale / Float64(angle * log((exp(pi) ^ x_45_scale))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale / Float64(x_45_scale * cos(t_0))) * Float64(2.0 / sin(t_0))))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = (pi * angle) * 0.005555555555555556; tmp = 0.0; if (b_m <= 1.45e-108) tmp = 180.0 * (atan((-0.5 * (360.0 * (y_45_scale / (angle * log((exp(pi) ^ x_45_scale))))))) / pi); else tmp = 180.0 * (atan((-0.5 * ((y_45_scale / (x_45_scale * cos(t_0))) * (2.0 / sin(t_0))))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, If[LessEqual[b$95$m, 1.45e-108], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(360.0 * N[(y$45$scale / N[(angle * N[Log[N[Power[N[Exp[Pi], $MachinePrecision], x$45$scale], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale / N[(x$45$scale * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 / N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \left(\pi \cdot angle\right) \cdot 0.005555555555555556\\
\mathbf{if}\;b\_m \leq 1.45 \cdot 10^{-108}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(360 \cdot \frac{y-scale}{angle \cdot \log \left({\left(e^{\pi}\right)}^{x-scale}\right)}\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{y-scale}{x-scale \cdot \cos t\_0} \cdot \frac{2}{\sin t\_0}\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.45e-108Initial program 14.2%
Taylor expanded in x-scale around 0
Applied rewrites24.9%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6438.4
Applied rewrites38.4%
lift-*.f64N/A
lift-PI.f64N/A
add-log-expN/A
log-pow-revN/A
lower-log.f64N/A
lower-pow.f64N/A
lift-PI.f64N/A
lower-exp.f6435.0
Applied rewrites35.0%
if 1.45e-108 < b Initial program 14.2%
Taylor expanded in x-scale around 0
Applied rewrites24.9%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.9%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
Applied rewrites45.7%
Taylor expanded in angle around 0
Applied rewrites45.3%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 1.35e-133)
(*
180.0
(/
(atan
(* -0.5 (* 360.0 (/ y-scale (* angle (log (pow (exp PI) x-scale)))))))
PI))
(if (<= b_m 1.2e+70)
(*
180.0
(/
(atan
(*
-90.0
(/
(* y-scale (+ (sqrt (pow b_m 4.0)) (pow b_m 2.0)))
(* angle (* x-scale (* PI (- (pow b_m 2.0) (pow a 2.0))))))))
PI))
(*
180.0
(/
(atan
(*
-0.5
(*
(/ y-scale (* x-scale (cos (* (* PI angle) 0.005555555555555556))))
(/
(fma
(pow angle 2.0)
(- (* -0.011111111111111112 PI) (* -0.001851851851851852 PI))
(* 360.0 (/ 1.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 <= 1.35e-133) {
tmp = 180.0 * (atan((-0.5 * (360.0 * (y_45_scale / (angle * log(pow(exp(((double) M_PI)), x_45_scale))))))) / ((double) M_PI));
} else if (b_m <= 1.2e+70) {
tmp = 180.0 * (atan((-90.0 * ((y_45_scale * (sqrt(pow(b_m, 4.0)) + pow(b_m, 2.0))) / (angle * (x_45_scale * (((double) M_PI) * (pow(b_m, 2.0) - pow(a, 2.0)))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale / (x_45_scale * cos(((((double) M_PI) * angle) * 0.005555555555555556)))) * (fma(pow(angle, 2.0), ((-0.011111111111111112 * ((double) M_PI)) - (-0.001851851851851852 * ((double) M_PI))), (360.0 * (1.0 / ((double) M_PI)))) / angle)))) / ((double) M_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.35e-133) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(360.0 * Float64(y_45_scale / Float64(angle * log((exp(pi) ^ x_45_scale))))))) / pi)); elseif (b_m <= 1.2e+70) tmp = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(Float64(y_45_scale * Float64(sqrt((b_m ^ 4.0)) + (b_m ^ 2.0))) / Float64(angle * Float64(x_45_scale * Float64(pi * Float64((b_m ^ 2.0) - (a ^ 2.0)))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale / Float64(x_45_scale * cos(Float64(Float64(pi * angle) * 0.005555555555555556)))) * Float64(fma((angle ^ 2.0), Float64(Float64(-0.011111111111111112 * pi) - Float64(-0.001851851851851852 * pi)), Float64(360.0 * Float64(1.0 / pi))) / angle)))) / pi)); end return 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.35e-133], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(360.0 * N[(y$45$scale / N[(angle * N[Log[N[Power[N[Exp[Pi], $MachinePrecision], x$45$scale], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.2e+70], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[b$95$m, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[b$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(angle * N[(x$45$scale * N[(Pi * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale / N[(x$45$scale * N[Cos[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[angle, 2.0], $MachinePrecision] * N[(N[(-0.011111111111111112 * Pi), $MachinePrecision] - N[(-0.001851851851851852 * Pi), $MachinePrecision]), $MachinePrecision] + N[(360.0 * N[(1.0 / Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 1.35 \cdot 10^{-133}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(360 \cdot \frac{y-scale}{angle \cdot \log \left({\left(e^{\pi}\right)}^{x-scale}\right)}\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.2 \cdot 10^{+70}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{y-scale \cdot \left(\sqrt{{b\_m}^{4}} + {b\_m}^{2}\right)}{angle \cdot \left(x-scale \cdot \left(\pi \cdot \left({b\_m}^{2} - {a}^{2}\right)\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{y-scale}{x-scale \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)} \cdot \frac{\mathsf{fma}\left({angle}^{2}, -0.011111111111111112 \cdot \pi - -0.001851851851851852 \cdot \pi, 360 \cdot \frac{1}{\pi}\right)}{angle}\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.3499999999999999e-133Initial program 14.2%
Taylor expanded in x-scale around 0
Applied rewrites24.9%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6438.4
Applied rewrites38.4%
lift-*.f64N/A
lift-PI.f64N/A
add-log-expN/A
log-pow-revN/A
lower-log.f64N/A
lower-pow.f64N/A
lift-PI.f64N/A
lower-exp.f6435.0
Applied rewrites35.0%
if 1.3499999999999999e-133 < b < 1.19999999999999993e70Initial program 14.2%
Taylor expanded in x-scale around 0
Applied rewrites24.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites22.7%
if 1.19999999999999993e70 < b Initial program 14.2%
Taylor expanded in x-scale around 0
Applied rewrites24.9%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.9%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
Applied rewrites45.7%
Taylor expanded in angle around 0
lower-/.f64N/A
lower-fma.f64N/A
lower-pow.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-PI.f6441.7
Applied rewrites41.7%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 1.35e-133)
(*
180.0
(/
(atan
(* -0.5 (* 360.0 (/ y-scale (* angle (log (pow (exp PI) x-scale)))))))
PI))
(if (<= b_m 5e+57)
(*
180.0
(/
(atan
(*
-90.0
(/
(* y-scale (+ (sqrt (pow b_m 4.0)) (pow b_m 2.0)))
(* angle (* x-scale (* PI (- (pow b_m 2.0) (pow a 2.0))))))))
PI))
(*
180.0
(/ (atan (* -0.5 (* (/ 360.0 angle) (/ y-scale (* PI x-scale))))) PI)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 1.35e-133) {
tmp = 180.0 * (atan((-0.5 * (360.0 * (y_45_scale / (angle * log(pow(exp(((double) M_PI)), x_45_scale))))))) / ((double) M_PI));
} else if (b_m <= 5e+57) {
tmp = 180.0 * (atan((-90.0 * ((y_45_scale * (sqrt(pow(b_m, 4.0)) + pow(b_m, 2.0))) / (angle * (x_45_scale * (((double) M_PI) * (pow(b_m, 2.0) - pow(a, 2.0)))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((360.0 / angle) * (y_45_scale / (((double) M_PI) * x_45_scale))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 1.35e-133) {
tmp = 180.0 * (Math.atan((-0.5 * (360.0 * (y_45_scale / (angle * Math.log(Math.pow(Math.exp(Math.PI), x_45_scale))))))) / Math.PI);
} else if (b_m <= 5e+57) {
tmp = 180.0 * (Math.atan((-90.0 * ((y_45_scale * (Math.sqrt(Math.pow(b_m, 4.0)) + Math.pow(b_m, 2.0))) / (angle * (x_45_scale * (Math.PI * (Math.pow(b_m, 2.0) - Math.pow(a, 2.0)))))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((360.0 / angle) * (y_45_scale / (Math.PI * x_45_scale))))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if b_m <= 1.35e-133: tmp = 180.0 * (math.atan((-0.5 * (360.0 * (y_45_scale / (angle * math.log(math.pow(math.exp(math.pi), x_45_scale))))))) / math.pi) elif b_m <= 5e+57: tmp = 180.0 * (math.atan((-90.0 * ((y_45_scale * (math.sqrt(math.pow(b_m, 4.0)) + math.pow(b_m, 2.0))) / (angle * (x_45_scale * (math.pi * (math.pow(b_m, 2.0) - math.pow(a, 2.0)))))))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * ((360.0 / angle) * (y_45_scale / (math.pi * x_45_scale))))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 1.35e-133) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(360.0 * Float64(y_45_scale / Float64(angle * log((exp(pi) ^ x_45_scale))))))) / pi)); elseif (b_m <= 5e+57) tmp = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(Float64(y_45_scale * Float64(sqrt((b_m ^ 4.0)) + (b_m ^ 2.0))) / Float64(angle * Float64(x_45_scale * Float64(pi * Float64((b_m ^ 2.0) - (a ^ 2.0)))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(360.0 / angle) * Float64(y_45_scale / Float64(pi * x_45_scale))))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 1.35e-133) tmp = 180.0 * (atan((-0.5 * (360.0 * (y_45_scale / (angle * log((exp(pi) ^ x_45_scale))))))) / pi); elseif (b_m <= 5e+57) tmp = 180.0 * (atan((-90.0 * ((y_45_scale * (sqrt((b_m ^ 4.0)) + (b_m ^ 2.0))) / (angle * (x_45_scale * (pi * ((b_m ^ 2.0) - (a ^ 2.0)))))))) / pi); else tmp = 180.0 * (atan((-0.5 * ((360.0 / angle) * (y_45_scale / (pi * x_45_scale))))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 1.35e-133], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(360.0 * N[(y$45$scale / N[(angle * N[Log[N[Power[N[Exp[Pi], $MachinePrecision], x$45$scale], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 5e+57], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[b$95$m, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[b$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(angle * N[(x$45$scale * N[(Pi * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(360.0 / angle), $MachinePrecision] * N[(y$45$scale / N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 1.35 \cdot 10^{-133}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(360 \cdot \frac{y-scale}{angle \cdot \log \left({\left(e^{\pi}\right)}^{x-scale}\right)}\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 5 \cdot 10^{+57}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{y-scale \cdot \left(\sqrt{{b\_m}^{4}} + {b\_m}^{2}\right)}{angle \cdot \left(x-scale \cdot \left(\pi \cdot \left({b\_m}^{2} - {a}^{2}\right)\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{360}{angle} \cdot \frac{y-scale}{\pi \cdot x-scale}\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.3499999999999999e-133Initial program 14.2%
Taylor expanded in x-scale around 0
Applied rewrites24.9%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6438.4
Applied rewrites38.4%
lift-*.f64N/A
lift-PI.f64N/A
add-log-expN/A
log-pow-revN/A
lower-log.f64N/A
lower-pow.f64N/A
lift-PI.f64N/A
lower-exp.f6435.0
Applied rewrites35.0%
if 1.3499999999999999e-133 < b < 4.99999999999999972e57Initial program 14.2%
Taylor expanded in x-scale around 0
Applied rewrites24.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites22.7%
if 4.99999999999999972e57 < b Initial program 14.2%
Taylor expanded in x-scale around 0
Applied rewrites24.9%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6438.4
Applied rewrites38.4%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6440.1
lift-*.f64N/A
*-commutativeN/A
lower-*.f6440.1
Applied rewrites40.1%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI))))
(if (<= b_m 1.45e-108)
(*
180.0
(/
(atan
(* -0.5 (* 360.0 (/ y-scale (* angle (log (pow (exp PI) x-scale)))))))
PI))
(*
180.0
(/
(atan (* -0.5 (/ (* y-scale 2.0) (* x-scale (* (cos t_0) (sin t_0))))))
PI)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double tmp;
if (b_m <= 1.45e-108) {
tmp = 180.0 * (atan((-0.5 * (360.0 * (y_45_scale / (angle * log(pow(exp(((double) M_PI)), x_45_scale))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * 2.0) / (x_45_scale * (cos(t_0) * sin(t_0)))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double tmp;
if (b_m <= 1.45e-108) {
tmp = 180.0 * (Math.atan((-0.5 * (360.0 * (y_45_scale / (angle * Math.log(Math.pow(Math.exp(Math.PI), x_45_scale))))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * 2.0) / (x_45_scale * (Math.cos(t_0) * Math.sin(t_0)))))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): t_0 = 0.005555555555555556 * (angle * math.pi) tmp = 0 if b_m <= 1.45e-108: tmp = 180.0 * (math.atan((-0.5 * (360.0 * (y_45_scale / (angle * math.log(math.pow(math.exp(math.pi), x_45_scale))))))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * 2.0) / (x_45_scale * (math.cos(t_0) * math.sin(t_0)))))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) tmp = 0.0 if (b_m <= 1.45e-108) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(360.0 * Float64(y_45_scale / Float64(angle * log((exp(pi) ^ x_45_scale))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * 2.0) / Float64(x_45_scale * Float64(cos(t_0) * sin(t_0)))))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = 0.005555555555555556 * (angle * pi); tmp = 0.0; if (b_m <= 1.45e-108) tmp = 180.0 * (atan((-0.5 * (360.0 * (y_45_scale / (angle * log((exp(pi) ^ x_45_scale))))))) / pi); else tmp = 180.0 * (atan((-0.5 * ((y_45_scale * 2.0) / (x_45_scale * (cos(t_0) * sin(t_0)))))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 1.45e-108], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(360.0 * N[(y$45$scale / N[(angle * N[Log[N[Power[N[Exp[Pi], $MachinePrecision], x$45$scale], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * 2.0), $MachinePrecision] / N[(x$45$scale * N[(N[Cos[t$95$0], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;b\_m \leq 1.45 \cdot 10^{-108}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(360 \cdot \frac{y-scale}{angle \cdot \log \left({\left(e^{\pi}\right)}^{x-scale}\right)}\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot 2}{x-scale \cdot \left(\cos t\_0 \cdot \sin t\_0\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.45e-108Initial program 14.2%
Taylor expanded in x-scale around 0
Applied rewrites24.9%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6438.4
Applied rewrites38.4%
lift-*.f64N/A
lift-PI.f64N/A
add-log-expN/A
log-pow-revN/A
lower-log.f64N/A
lower-pow.f64N/A
lift-PI.f64N/A
lower-exp.f6435.0
Applied rewrites35.0%
if 1.45e-108 < b Initial program 14.2%
Taylor expanded in x-scale around 0
Applied rewrites24.9%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.9%
Taylor expanded in angle around 0
Applied rewrites43.6%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 1.05e+78)
(*
180.0
(/
(atan
(* -0.5 (* 360.0 (/ y-scale (* angle (log (pow (exp PI) x-scale)))))))
PI))
(*
180.0
(/ (atan (* -0.5 (* (/ 360.0 angle) (/ y-scale (* PI x-scale))))) PI))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 1.05e+78) {
tmp = 180.0 * (atan((-0.5 * (360.0 * (y_45_scale / (angle * log(pow(exp(((double) M_PI)), x_45_scale))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((360.0 / angle) * (y_45_scale / (((double) M_PI) * x_45_scale))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 1.05e+78) {
tmp = 180.0 * (Math.atan((-0.5 * (360.0 * (y_45_scale / (angle * Math.log(Math.pow(Math.exp(Math.PI), x_45_scale))))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((360.0 / angle) * (y_45_scale / (Math.PI * x_45_scale))))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if b_m <= 1.05e+78: tmp = 180.0 * (math.atan((-0.5 * (360.0 * (y_45_scale / (angle * math.log(math.pow(math.exp(math.pi), x_45_scale))))))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * ((360.0 / angle) * (y_45_scale / (math.pi * x_45_scale))))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 1.05e+78) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(360.0 * Float64(y_45_scale / Float64(angle * log((exp(pi) ^ x_45_scale))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(360.0 / angle) * Float64(y_45_scale / Float64(pi * x_45_scale))))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 1.05e+78) tmp = 180.0 * (atan((-0.5 * (360.0 * (y_45_scale / (angle * log((exp(pi) ^ x_45_scale))))))) / pi); else tmp = 180.0 * (atan((-0.5 * ((360.0 / angle) * (y_45_scale / (pi * x_45_scale))))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 1.05e+78], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(360.0 * N[(y$45$scale / N[(angle * N[Log[N[Power[N[Exp[Pi], $MachinePrecision], x$45$scale], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(360.0 / angle), $MachinePrecision] * N[(y$45$scale / N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 1.05 \cdot 10^{+78}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(360 \cdot \frac{y-scale}{angle \cdot \log \left({\left(e^{\pi}\right)}^{x-scale}\right)}\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{360}{angle} \cdot \frac{y-scale}{\pi \cdot x-scale}\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.05e78Initial program 14.2%
Taylor expanded in x-scale around 0
Applied rewrites24.9%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6438.4
Applied rewrites38.4%
lift-*.f64N/A
lift-PI.f64N/A
add-log-expN/A
log-pow-revN/A
lower-log.f64N/A
lower-pow.f64N/A
lift-PI.f64N/A
lower-exp.f6435.0
Applied rewrites35.0%
if 1.05e78 < b Initial program 14.2%
Taylor expanded in x-scale around 0
Applied rewrites24.9%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6438.4
Applied rewrites38.4%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6440.1
lift-*.f64N/A
*-commutativeN/A
lower-*.f6440.1
Applied rewrites40.1%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 1.55e-123)
(*
180.0
(/
(atan
(* -0.5 (* 360.0 (/ y-scale (log (pow (exp PI) (* angle x-scale)))))))
PI))
(*
180.0
(/ (atan (* -0.5 (* (/ 360.0 angle) (/ y-scale (* PI x-scale))))) PI))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 1.55e-123) {
tmp = 180.0 * (atan((-0.5 * (360.0 * (y_45_scale / log(pow(exp(((double) M_PI)), (angle * x_45_scale))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((360.0 / angle) * (y_45_scale / (((double) M_PI) * x_45_scale))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 1.55e-123) {
tmp = 180.0 * (Math.atan((-0.5 * (360.0 * (y_45_scale / Math.log(Math.pow(Math.exp(Math.PI), (angle * x_45_scale))))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((360.0 / angle) * (y_45_scale / (Math.PI * x_45_scale))))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if b_m <= 1.55e-123: tmp = 180.0 * (math.atan((-0.5 * (360.0 * (y_45_scale / math.log(math.pow(math.exp(math.pi), (angle * x_45_scale))))))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * ((360.0 / angle) * (y_45_scale / (math.pi * x_45_scale))))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 1.55e-123) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(360.0 * Float64(y_45_scale / log((exp(pi) ^ Float64(angle * x_45_scale))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(360.0 / angle) * Float64(y_45_scale / Float64(pi * x_45_scale))))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 1.55e-123) tmp = 180.0 * (atan((-0.5 * (360.0 * (y_45_scale / log((exp(pi) ^ (angle * x_45_scale))))))) / pi); else tmp = 180.0 * (atan((-0.5 * ((360.0 / angle) * (y_45_scale / (pi * x_45_scale))))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 1.55e-123], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(360.0 * N[(y$45$scale / N[Log[N[Power[N[Exp[Pi], $MachinePrecision], N[(angle * x$45$scale), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(360.0 / angle), $MachinePrecision] * N[(y$45$scale / N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 1.55 \cdot 10^{-123}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(360 \cdot \frac{y-scale}{\log \left({\left(e^{\pi}\right)}^{\left(angle \cdot x-scale\right)}\right)}\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{360}{angle} \cdot \frac{y-scale}{\pi \cdot x-scale}\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.54999999999999999e-123Initial program 14.2%
Taylor expanded in x-scale around 0
Applied rewrites24.9%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6438.4
Applied rewrites38.4%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-PI.f64N/A
add-log-expN/A
log-pow-revN/A
lower-log.f64N/A
lower-pow.f64N/A
lift-PI.f64N/A
lower-exp.f64N/A
lower-*.f6429.3
Applied rewrites29.3%
if 1.54999999999999999e-123 < b Initial program 14.2%
Taylor expanded in x-scale around 0
Applied rewrites24.9%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6438.4
Applied rewrites38.4%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6440.1
lift-*.f64N/A
*-commutativeN/A
lower-*.f6440.1
Applied rewrites40.1%
b_m = (fabs.f64 b) (FPCore (a b_m angle x-scale y-scale) :precision binary64 (* 180.0 (/ (atan (* -0.5 (* (/ 360.0 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.5 * ((360.0 / 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.5 * ((360.0 / 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.5 * ((360.0 / 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.5 * Float64(Float64(360.0 / angle) * Float64(y_45_scale / Float64(pi * x_45_scale))))) / pi)) end
b_m = abs(b); function tmp = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 180.0 * (atan((-0.5 * ((360.0 / 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.5 * N[(N[(360.0 / angle), $MachinePrecision] * N[(y$45$scale / N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{360}{angle} \cdot \frac{y-scale}{\pi \cdot x-scale}\right)\right)}{\pi}
\end{array}
Initial program 14.2%
Taylor expanded in x-scale around 0
Applied rewrites24.9%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6438.4
Applied rewrites38.4%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6440.1
lift-*.f64N/A
*-commutativeN/A
lower-*.f6440.1
Applied rewrites40.1%
b_m = (fabs.f64 b) (FPCore (a b_m angle x-scale y-scale) :precision binary64 (* 180.0 (/ (atan (* -0.5 (/ (* 360.0 y-scale) (* (* PI x-scale) angle)))) PI)))
b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (atan((-0.5 * ((360.0 * y_45_scale) / ((((double) M_PI) * x_45_scale) * angle)))) / ((double) M_PI));
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (Math.atan((-0.5 * ((360.0 * y_45_scale) / ((Math.PI * x_45_scale) * angle)))) / Math.PI);
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): return 180.0 * (math.atan((-0.5 * ((360.0 * y_45_scale) / ((math.pi * x_45_scale) * angle)))) / math.pi)
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) return Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(360.0 * y_45_scale) / Float64(Float64(pi * x_45_scale) * angle)))) / pi)) end
b_m = abs(b); function tmp = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 180.0 * (atan((-0.5 * ((360.0 * y_45_scale) / ((pi * x_45_scale) * angle)))) / pi); end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(360.0 * y$45$scale), $MachinePrecision] / N[(N[(Pi * x$45$scale), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{360 \cdot y-scale}{\left(\pi \cdot x-scale\right) \cdot angle}\right)}{\pi}
\end{array}
Initial program 14.2%
Taylor expanded in x-scale around 0
Applied rewrites24.9%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6438.4
Applied rewrites38.4%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f6438.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6438.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6438.4
Applied rewrites38.4%
b_m = (fabs.f64 b) (FPCore (a b_m angle x-scale y-scale) :precision binary64 (* (/ (atan (* (* (/ y-scale (* (* PI x-scale) angle)) 360.0) -0.5)) PI) 180.0))
b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
return (atan((((y_45_scale / ((((double) M_PI) * x_45_scale) * angle)) * 360.0) * -0.5)) / ((double) M_PI)) * 180.0;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
return (Math.atan((((y_45_scale / ((Math.PI * x_45_scale) * angle)) * 360.0) * -0.5)) / Math.PI) * 180.0;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): return (math.atan((((y_45_scale / ((math.pi * x_45_scale) * angle)) * 360.0) * -0.5)) / math.pi) * 180.0
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) return Float64(Float64(atan(Float64(Float64(Float64(y_45_scale / Float64(Float64(pi * x_45_scale) * angle)) * 360.0) * -0.5)) / pi) * 180.0) end
b_m = abs(b); function tmp = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = (atan((((y_45_scale / ((pi * x_45_scale) * angle)) * 360.0) * -0.5)) / pi) * 180.0; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := N[(N[(N[ArcTan[N[(N[(N[(y$45$scale / N[(N[(Pi * x$45$scale), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision] * 360.0), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
\frac{\tan^{-1} \left(\left(\frac{y-scale}{\left(\pi \cdot x-scale\right) \cdot angle} \cdot 360\right) \cdot -0.5\right)}{\pi} \cdot 180
\end{array}
Initial program 14.2%
Taylor expanded in x-scale around 0
Applied rewrites24.9%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6438.4
Applied rewrites38.4%
Applied rewrites38.4%
herbie shell --seed 2025144
(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)))