
(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}
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}
Herbie found 17 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}
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}
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (+ (* 0.5 PI) (* (- PI) (* 0.005555555555555556 angle))))
(t_1 (* (* PI angle) 0.005555555555555556))
(t_2 (sin (* (* 0.005555555555555556 angle) PI)))
(t_3
(+
(* (+ 0.5 (* 0.5 (cos (* 2.0 t_1)))) (* (fabs b) (fabs b)))
(pow (* t_2 a) 2.0)))
(t_4 (* 0.005555555555555556 (* angle PI)))
(t_5 (sin t_4))
(t_6 (sin t_0)))
(if (<= (fabs b) 5.4e-151)
(*
180.0
(/
(atan
(*
0.5
(/
(* y-scale (+ (sqrt (pow t_5 4.0)) (pow t_5 2.0)))
(* x-scale (* (cos t_4) t_5)))))
PI))
(if (<= (fabs b) 1.6e+76)
(*
180.0
(/
(atan
(*
-0.5
(*
(/
(+ (fabs t_3) t_3)
(*
(* (* (+ (fabs b) a) (- (fabs b) a)) (sin t_1))
(cos t_1)))
(/ y-scale x-scale))))
PI))
(/
(*
180.0
(atan
(*
(*
y-scale
(/
(+ (- 0.5 (* 0.5 (cos (* 2.0 t_0)))) (sqrt (pow t_6 4.0)))
(* (* t_2 t_6) x-scale)))
-0.5)))
PI)))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (0.5 * ((double) M_PI)) + (-((double) M_PI) * (0.005555555555555556 * angle));
double t_1 = (((double) M_PI) * angle) * 0.005555555555555556;
double t_2 = sin(((0.005555555555555556 * angle) * ((double) M_PI)));
double t_3 = ((0.5 + (0.5 * cos((2.0 * t_1)))) * (fabs(b) * fabs(b))) + pow((t_2 * a), 2.0);
double t_4 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_5 = sin(t_4);
double t_6 = sin(t_0);
double tmp;
if (fabs(b) <= 5.4e-151) {
tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt(pow(t_5, 4.0)) + pow(t_5, 2.0))) / (x_45_scale * (cos(t_4) * t_5))))) / ((double) M_PI));
} else if (fabs(b) <= 1.6e+76) {
tmp = 180.0 * (atan((-0.5 * (((fabs(t_3) + t_3) / ((((fabs(b) + a) * (fabs(b) - a)) * sin(t_1)) * cos(t_1))) * (y_45_scale / x_45_scale)))) / ((double) M_PI));
} else {
tmp = (180.0 * atan(((y_45_scale * (((0.5 - (0.5 * cos((2.0 * t_0)))) + sqrt(pow(t_6, 4.0))) / ((t_2 * t_6) * x_45_scale))) * -0.5))) / ((double) M_PI);
}
return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (0.5 * Math.PI) + (-Math.PI * (0.005555555555555556 * angle));
double t_1 = (Math.PI * angle) * 0.005555555555555556;
double t_2 = Math.sin(((0.005555555555555556 * angle) * Math.PI));
double t_3 = ((0.5 + (0.5 * Math.cos((2.0 * t_1)))) * (Math.abs(b) * Math.abs(b))) + Math.pow((t_2 * a), 2.0);
double t_4 = 0.005555555555555556 * (angle * Math.PI);
double t_5 = Math.sin(t_4);
double t_6 = Math.sin(t_0);
double tmp;
if (Math.abs(b) <= 5.4e-151) {
tmp = 180.0 * (Math.atan((0.5 * ((y_45_scale * (Math.sqrt(Math.pow(t_5, 4.0)) + Math.pow(t_5, 2.0))) / (x_45_scale * (Math.cos(t_4) * t_5))))) / Math.PI);
} else if (Math.abs(b) <= 1.6e+76) {
tmp = 180.0 * (Math.atan((-0.5 * (((Math.abs(t_3) + t_3) / ((((Math.abs(b) + a) * (Math.abs(b) - a)) * Math.sin(t_1)) * Math.cos(t_1))) * (y_45_scale / x_45_scale)))) / Math.PI);
} else {
tmp = (180.0 * Math.atan(((y_45_scale * (((0.5 - (0.5 * Math.cos((2.0 * t_0)))) + Math.sqrt(Math.pow(t_6, 4.0))) / ((t_2 * t_6) * x_45_scale))) * -0.5))) / Math.PI;
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = (0.5 * math.pi) + (-math.pi * (0.005555555555555556 * angle)) t_1 = (math.pi * angle) * 0.005555555555555556 t_2 = math.sin(((0.005555555555555556 * angle) * math.pi)) t_3 = ((0.5 + (0.5 * math.cos((2.0 * t_1)))) * (math.fabs(b) * math.fabs(b))) + math.pow((t_2 * a), 2.0) t_4 = 0.005555555555555556 * (angle * math.pi) t_5 = math.sin(t_4) t_6 = math.sin(t_0) tmp = 0 if math.fabs(b) <= 5.4e-151: tmp = 180.0 * (math.atan((0.5 * ((y_45_scale * (math.sqrt(math.pow(t_5, 4.0)) + math.pow(t_5, 2.0))) / (x_45_scale * (math.cos(t_4) * t_5))))) / math.pi) elif math.fabs(b) <= 1.6e+76: tmp = 180.0 * (math.atan((-0.5 * (((math.fabs(t_3) + t_3) / ((((math.fabs(b) + a) * (math.fabs(b) - a)) * math.sin(t_1)) * math.cos(t_1))) * (y_45_scale / x_45_scale)))) / math.pi) else: tmp = (180.0 * math.atan(((y_45_scale * (((0.5 - (0.5 * math.cos((2.0 * t_0)))) + math.sqrt(math.pow(t_6, 4.0))) / ((t_2 * t_6) * x_45_scale))) * -0.5))) / math.pi return tmp
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(0.5 * pi) + Float64(Float64(-pi) * Float64(0.005555555555555556 * angle))) t_1 = Float64(Float64(pi * angle) * 0.005555555555555556) t_2 = sin(Float64(Float64(0.005555555555555556 * angle) * pi)) t_3 = Float64(Float64(Float64(0.5 + Float64(0.5 * cos(Float64(2.0 * t_1)))) * Float64(abs(b) * abs(b))) + (Float64(t_2 * a) ^ 2.0)) t_4 = Float64(0.005555555555555556 * Float64(angle * pi)) t_5 = sin(t_4) t_6 = sin(t_0) tmp = 0.0 if (abs(b) <= 5.4e-151) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_5 ^ 4.0)) + (t_5 ^ 2.0))) / Float64(x_45_scale * Float64(cos(t_4) * t_5))))) / pi)); elseif (abs(b) <= 1.6e+76) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(Float64(abs(t_3) + t_3) / Float64(Float64(Float64(Float64(abs(b) + a) * Float64(abs(b) - a)) * sin(t_1)) * cos(t_1))) * Float64(y_45_scale / x_45_scale)))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale * Float64(Float64(Float64(0.5 - Float64(0.5 * cos(Float64(2.0 * t_0)))) + sqrt((t_6 ^ 4.0))) / Float64(Float64(t_2 * t_6) * x_45_scale))) * -0.5))) / pi); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) t_0 = (0.5 * pi) + (-pi * (0.005555555555555556 * angle)); t_1 = (pi * angle) * 0.005555555555555556; t_2 = sin(((0.005555555555555556 * angle) * pi)); t_3 = ((0.5 + (0.5 * cos((2.0 * t_1)))) * (abs(b) * abs(b))) + ((t_2 * a) ^ 2.0); t_4 = 0.005555555555555556 * (angle * pi); t_5 = sin(t_4); t_6 = sin(t_0); tmp = 0.0; if (abs(b) <= 5.4e-151) tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt((t_5 ^ 4.0)) + (t_5 ^ 2.0))) / (x_45_scale * (cos(t_4) * t_5))))) / pi); elseif (abs(b) <= 1.6e+76) tmp = 180.0 * (atan((-0.5 * (((abs(t_3) + t_3) / ((((abs(b) + a) * (abs(b) - a)) * sin(t_1)) * cos(t_1))) * (y_45_scale / x_45_scale)))) / pi); else tmp = (180.0 * atan(((y_45_scale * (((0.5 - (0.5 * cos((2.0 * t_0)))) + sqrt((t_6 ^ 4.0))) / ((t_2 * t_6) * x_45_scale))) * -0.5))) / pi; end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(0.5 * Pi), $MachinePrecision] + N[((-Pi) * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(0.5 + N[(0.5 * N[Cos[N[(2.0 * t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Abs[b], $MachinePrecision] * N[Abs[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Power[N[(t$95$2 * a), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[Sin[t$95$4], $MachinePrecision]}, Block[{t$95$6 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[N[Abs[b], $MachinePrecision], 5.4e-151], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$5, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$5, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(N[Cos[t$95$4], $MachinePrecision] * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[b], $MachinePrecision], 1.6e+76], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(N[(N[Abs[t$95$3], $MachinePrecision] + t$95$3), $MachinePrecision] / N[(N[(N[(N[(N[Abs[b], $MachinePrecision] + a), $MachinePrecision] * N[(N[Abs[b], $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale * N[(N[(N[(0.5 - N[(0.5 * N[Cos[N[(2.0 * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Sqrt[N[Power[t$95$6, 4.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(N[(t$95$2 * t$95$6), $MachinePrecision] * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
t_0 := 0.5 \cdot \pi + \left(-\pi\right) \cdot \left(0.005555555555555556 \cdot angle\right)\\
t_1 := \left(\pi \cdot angle\right) \cdot 0.005555555555555556\\
t_2 := \sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right)\\
t_3 := \left(0.5 + 0.5 \cdot \cos \left(2 \cdot t\_1\right)\right) \cdot \left(\left|b\right| \cdot \left|b\right|\right) + {\left(t\_2 \cdot a\right)}^{2}\\
t_4 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_5 := \sin t\_4\\
t_6 := \sin t\_0\\
\mathbf{if}\;\left|b\right| \leq 5.4 \cdot 10^{-151}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_5}^{4}} + {t\_5}^{2}\right)}{x-scale \cdot \left(\cos t\_4 \cdot t\_5\right)}\right)}{\pi}\\
\mathbf{elif}\;\left|b\right| \leq 1.6 \cdot 10^{+76}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{\left|t\_3\right| + t\_3}{\left(\left(\left(\left|b\right| + a\right) \cdot \left(\left|b\right| - a\right)\right) \cdot \sin t\_1\right) \cdot \cos t\_1} \cdot \frac{y-scale}{x-scale}\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\left(y-scale \cdot \frac{\left(0.5 - 0.5 \cdot \cos \left(2 \cdot t\_0\right)\right) + \sqrt{{t\_6}^{4}}}{\left(t\_2 \cdot t\_6\right) \cdot x-scale}\right) \cdot -0.5\right)}{\pi}\\
\end{array}
if b < 5.4000000000000001e-151Initial program 13.7%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in a around inf
lower-*.f64N/A
Applied rewrites37.3%
if 5.4000000000000001e-151 < b < 1.5999999999999999e76Initial program 13.7%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Applied rewrites26.4%
Applied rewrites28.0%
Applied rewrites32.4%
if 1.5999999999999999e76 < b Initial program 13.7%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.4%
lift-cos.f64N/A
cos-neg-revN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
lower-neg.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flip-revN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l/N/A
*-commutativeN/A
lower-*.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f64N/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f6444.4%
Applied rewrites44.4%
lift-cos.f64N/A
cos-neg-revN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
lower-neg.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flip-revN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l/N/A
*-commutativeN/A
lower-*.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f64N/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f6444.3%
Applied rewrites44.3%
lift-cos.f64N/A
cos-neg-revN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
lower-neg.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flip-revN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l/N/A
*-commutativeN/A
lower-*.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f64N/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f6444.5%
Applied rewrites44.5%
Applied rewrites44.7%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (* 0.005555555555555556 angle) PI))
(t_1 (sin (+ t_0 (/ PI 2.0))))
(t_2 (+ (* 0.5 PI) (* (- PI) (* 0.005555555555555556 angle))))
(t_3 (* PI (* angle 0.005555555555555556)))
(t_4 (* 0.005555555555555556 (* angle PI)))
(t_5 (sin t_4))
(t_6 (sin t_2)))
(if (<= (fabs a) 7.8e-212)
(*
180.0
(/
(atan
(*
-0.5
(*
y-scale
(/
(+ (+ 0.5 (* 0.5 (cos (* 2.0 t_3)))) (sqrt (pow t_1 4.0)))
(* (* x-scale t_1) (sin t_3))))))
PI))
(if (<= (fabs a) 1.7e+80)
(/
(*
180.0
(atan
(*
(*
y-scale
(/
(+ (- 0.5 (* 0.5 (cos (* 2.0 t_2)))) (sqrt (pow t_6 4.0)))
(* (* (sin t_0) t_6) x-scale)))
-0.5)))
PI)
(*
180.0
(/
(atan
(*
0.5
(/
(* y-scale (+ (sqrt (pow t_5 4.0)) (pow t_5 2.0)))
(* x-scale (* (cos t_4) t_5)))))
PI))))))double code(double a, double b, 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) M_PI) / 2.0)));
double t_2 = (0.5 * ((double) M_PI)) + (-((double) M_PI) * (0.005555555555555556 * angle));
double t_3 = ((double) M_PI) * (angle * 0.005555555555555556);
double t_4 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_5 = sin(t_4);
double t_6 = sin(t_2);
double tmp;
if (fabs(a) <= 7.8e-212) {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * (((0.5 + (0.5 * cos((2.0 * t_3)))) + sqrt(pow(t_1, 4.0))) / ((x_45_scale * t_1) * sin(t_3)))))) / ((double) M_PI));
} else if (fabs(a) <= 1.7e+80) {
tmp = (180.0 * atan(((y_45_scale * (((0.5 - (0.5 * cos((2.0 * t_2)))) + sqrt(pow(t_6, 4.0))) / ((sin(t_0) * t_6) * x_45_scale))) * -0.5))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt(pow(t_5, 4.0)) + pow(t_5, 2.0))) / (x_45_scale * (cos(t_4) * t_5))))) / ((double) M_PI));
}
return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (0.005555555555555556 * angle) * Math.PI;
double t_1 = Math.sin((t_0 + (Math.PI / 2.0)));
double t_2 = (0.5 * Math.PI) + (-Math.PI * (0.005555555555555556 * angle));
double t_3 = Math.PI * (angle * 0.005555555555555556);
double t_4 = 0.005555555555555556 * (angle * Math.PI);
double t_5 = Math.sin(t_4);
double t_6 = Math.sin(t_2);
double tmp;
if (Math.abs(a) <= 7.8e-212) {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * (((0.5 + (0.5 * Math.cos((2.0 * t_3)))) + Math.sqrt(Math.pow(t_1, 4.0))) / ((x_45_scale * t_1) * Math.sin(t_3)))))) / Math.PI);
} else if (Math.abs(a) <= 1.7e+80) {
tmp = (180.0 * Math.atan(((y_45_scale * (((0.5 - (0.5 * Math.cos((2.0 * t_2)))) + Math.sqrt(Math.pow(t_6, 4.0))) / ((Math.sin(t_0) * t_6) * x_45_scale))) * -0.5))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((0.5 * ((y_45_scale * (Math.sqrt(Math.pow(t_5, 4.0)) + Math.pow(t_5, 2.0))) / (x_45_scale * (Math.cos(t_4) * t_5))))) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = (0.005555555555555556 * angle) * math.pi t_1 = math.sin((t_0 + (math.pi / 2.0))) t_2 = (0.5 * math.pi) + (-math.pi * (0.005555555555555556 * angle)) t_3 = math.pi * (angle * 0.005555555555555556) t_4 = 0.005555555555555556 * (angle * math.pi) t_5 = math.sin(t_4) t_6 = math.sin(t_2) tmp = 0 if math.fabs(a) <= 7.8e-212: tmp = 180.0 * (math.atan((-0.5 * (y_45_scale * (((0.5 + (0.5 * math.cos((2.0 * t_3)))) + math.sqrt(math.pow(t_1, 4.0))) / ((x_45_scale * t_1) * math.sin(t_3)))))) / math.pi) elif math.fabs(a) <= 1.7e+80: tmp = (180.0 * math.atan(((y_45_scale * (((0.5 - (0.5 * math.cos((2.0 * t_2)))) + math.sqrt(math.pow(t_6, 4.0))) / ((math.sin(t_0) * t_6) * x_45_scale))) * -0.5))) / math.pi else: tmp = 180.0 * (math.atan((0.5 * ((y_45_scale * (math.sqrt(math.pow(t_5, 4.0)) + math.pow(t_5, 2.0))) / (x_45_scale * (math.cos(t_4) * t_5))))) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(0.005555555555555556 * angle) * pi) t_1 = sin(Float64(t_0 + Float64(pi / 2.0))) t_2 = Float64(Float64(0.5 * pi) + Float64(Float64(-pi) * Float64(0.005555555555555556 * angle))) t_3 = Float64(pi * Float64(angle * 0.005555555555555556)) t_4 = Float64(0.005555555555555556 * Float64(angle * pi)) t_5 = sin(t_4) t_6 = sin(t_2) tmp = 0.0 if (abs(a) <= 7.8e-212) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(Float64(Float64(0.5 + Float64(0.5 * cos(Float64(2.0 * t_3)))) + sqrt((t_1 ^ 4.0))) / Float64(Float64(x_45_scale * t_1) * sin(t_3)))))) / pi)); elseif (abs(a) <= 1.7e+80) tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale * Float64(Float64(Float64(0.5 - Float64(0.5 * cos(Float64(2.0 * t_2)))) + sqrt((t_6 ^ 4.0))) / Float64(Float64(sin(t_0) * t_6) * x_45_scale))) * -0.5))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_5 ^ 4.0)) + (t_5 ^ 2.0))) / Float64(x_45_scale * Float64(cos(t_4) * t_5))))) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) t_0 = (0.005555555555555556 * angle) * pi; t_1 = sin((t_0 + (pi / 2.0))); t_2 = (0.5 * pi) + (-pi * (0.005555555555555556 * angle)); t_3 = pi * (angle * 0.005555555555555556); t_4 = 0.005555555555555556 * (angle * pi); t_5 = sin(t_4); t_6 = sin(t_2); tmp = 0.0; if (abs(a) <= 7.8e-212) tmp = 180.0 * (atan((-0.5 * (y_45_scale * (((0.5 + (0.5 * cos((2.0 * t_3)))) + sqrt((t_1 ^ 4.0))) / ((x_45_scale * t_1) * sin(t_3)))))) / pi); elseif (abs(a) <= 1.7e+80) tmp = (180.0 * atan(((y_45_scale * (((0.5 - (0.5 * cos((2.0 * t_2)))) + sqrt((t_6 ^ 4.0))) / ((sin(t_0) * t_6) * x_45_scale))) * -0.5))) / pi; else tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt((t_5 ^ 4.0)) + (t_5 ^ 2.0))) / (x_45_scale * (cos(t_4) * t_5))))) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(t$95$0 + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(0.5 * Pi), $MachinePrecision] + N[((-Pi) * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[Sin[t$95$4], $MachinePrecision]}, Block[{t$95$6 = N[Sin[t$95$2], $MachinePrecision]}, If[LessEqual[N[Abs[a], $MachinePrecision], 7.8e-212], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(N[(N[(0.5 + N[(0.5 * N[Cos[N[(2.0 * t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Sqrt[N[Power[t$95$1, 4.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(N[(x$45$scale * t$95$1), $MachinePrecision] * N[Sin[t$95$3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[a], $MachinePrecision], 1.7e+80], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale * N[(N[(N[(0.5 - N[(0.5 * N[Cos[N[(2.0 * t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Sqrt[N[Power[t$95$6, 4.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(N[(N[Sin[t$95$0], $MachinePrecision] * t$95$6), $MachinePrecision] * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$5, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$5, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(N[Cos[t$95$4], $MachinePrecision] * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
t_0 := \left(0.005555555555555556 \cdot angle\right) \cdot \pi\\
t_1 := \sin \left(t\_0 + \frac{\pi}{2}\right)\\
t_2 := 0.5 \cdot \pi + \left(-\pi\right) \cdot \left(0.005555555555555556 \cdot angle\right)\\
t_3 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\
t_4 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_5 := \sin t\_4\\
t_6 := \sin t\_2\\
\mathbf{if}\;\left|a\right| \leq 7.8 \cdot 10^{-212}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \frac{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot t\_3\right)\right) + \sqrt{{t\_1}^{4}}}{\left(x-scale \cdot t\_1\right) \cdot \sin t\_3}\right)\right)}{\pi}\\
\mathbf{elif}\;\left|a\right| \leq 1.7 \cdot 10^{+80}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\left(y-scale \cdot \frac{\left(0.5 - 0.5 \cdot \cos \left(2 \cdot t\_2\right)\right) + \sqrt{{t\_6}^{4}}}{\left(\sin t\_0 \cdot t\_6\right) \cdot x-scale}\right) \cdot -0.5\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_5}^{4}} + {t\_5}^{2}\right)}{x-scale \cdot \left(\cos t\_4 \cdot t\_5\right)}\right)}{\pi}\\
\end{array}
if a < 7.8e-212Initial program 13.7%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6444.4%
Applied rewrites44.5%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-/.f6444.5%
Applied rewrites44.5%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-/.f6443.8%
Applied rewrites43.8%
if 7.8e-212 < a < 1.7e80Initial program 13.7%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.4%
lift-cos.f64N/A
cos-neg-revN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
lower-neg.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flip-revN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l/N/A
*-commutativeN/A
lower-*.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f64N/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f6444.4%
Applied rewrites44.4%
lift-cos.f64N/A
cos-neg-revN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
lower-neg.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flip-revN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l/N/A
*-commutativeN/A
lower-*.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f64N/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f6444.3%
Applied rewrites44.3%
lift-cos.f64N/A
cos-neg-revN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
lower-neg.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flip-revN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l/N/A
*-commutativeN/A
lower-*.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f64N/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f6444.5%
Applied rewrites44.5%
Applied rewrites44.7%
if 1.7e80 < a Initial program 13.7%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in a around inf
lower-*.f64N/A
Applied rewrites37.3%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (+ (* 0.5 PI) (* (- PI) (* 0.005555555555555556 angle))))
(t_1 (* PI (* angle 0.005555555555555556)))
(t_2 (sin t_0))
(t_3 (* (* 0.005555555555555556 angle) PI))
(t_4 (sin (+ t_3 (/ PI 2.0))))
(t_5 (* 0.005555555555555556 (* angle PI))))
(if (<= (fabs a) 7.8e-212)
(*
180.0
(/
(atan
(*
-0.5
(*
y-scale
(/
(+ (+ 0.5 (* 0.5 (cos (* 2.0 t_1)))) (sqrt (pow t_4 4.0)))
(* (* x-scale t_4) (sin t_1))))))
PI))
(if (<= (fabs a) 1.55e+144)
(/
(*
180.0
(atan
(*
(*
y-scale
(/
(+ (- 0.5 (* 0.5 (cos (* 2.0 t_0)))) (sqrt (pow t_2 4.0)))
(* (* (sin t_3) t_2) x-scale)))
-0.5)))
PI)
(*
180.0
(/
(atan
(*
-0.5
(*
(*
-1.0
(/
(-
0.5
(* 0.5 (cos (* 0.011111111111111112 (* angle PI)))))
(* (cos t_5) (sin t_5))))
(/ y-scale x-scale))))
PI))))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (0.5 * ((double) M_PI)) + (-((double) M_PI) * (0.005555555555555556 * angle));
double t_1 = ((double) M_PI) * (angle * 0.005555555555555556);
double t_2 = sin(t_0);
double t_3 = (0.005555555555555556 * angle) * ((double) M_PI);
double t_4 = sin((t_3 + (((double) M_PI) / 2.0)));
double t_5 = 0.005555555555555556 * (angle * ((double) M_PI));
double tmp;
if (fabs(a) <= 7.8e-212) {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * (((0.5 + (0.5 * cos((2.0 * t_1)))) + sqrt(pow(t_4, 4.0))) / ((x_45_scale * t_4) * sin(t_1)))))) / ((double) M_PI));
} else if (fabs(a) <= 1.55e+144) {
tmp = (180.0 * atan(((y_45_scale * (((0.5 - (0.5 * cos((2.0 * t_0)))) + sqrt(pow(t_2, 4.0))) / ((sin(t_3) * t_2) * x_45_scale))) * -0.5))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * cos((0.011111111111111112 * (angle * ((double) M_PI)))))) / (cos(t_5) * sin(t_5)))) * (y_45_scale / x_45_scale)))) / ((double) M_PI));
}
return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (0.5 * Math.PI) + (-Math.PI * (0.005555555555555556 * angle));
double t_1 = Math.PI * (angle * 0.005555555555555556);
double t_2 = Math.sin(t_0);
double t_3 = (0.005555555555555556 * angle) * Math.PI;
double t_4 = Math.sin((t_3 + (Math.PI / 2.0)));
double t_5 = 0.005555555555555556 * (angle * Math.PI);
double tmp;
if (Math.abs(a) <= 7.8e-212) {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * (((0.5 + (0.5 * Math.cos((2.0 * t_1)))) + Math.sqrt(Math.pow(t_4, 4.0))) / ((x_45_scale * t_4) * Math.sin(t_1)))))) / Math.PI);
} else if (Math.abs(a) <= 1.55e+144) {
tmp = (180.0 * Math.atan(((y_45_scale * (((0.5 - (0.5 * Math.cos((2.0 * t_0)))) + Math.sqrt(Math.pow(t_2, 4.0))) / ((Math.sin(t_3) * t_2) * x_45_scale))) * -0.5))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * Math.cos((0.011111111111111112 * (angle * Math.PI))))) / (Math.cos(t_5) * Math.sin(t_5)))) * (y_45_scale / x_45_scale)))) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = (0.5 * math.pi) + (-math.pi * (0.005555555555555556 * angle)) t_1 = math.pi * (angle * 0.005555555555555556) t_2 = math.sin(t_0) t_3 = (0.005555555555555556 * angle) * math.pi t_4 = math.sin((t_3 + (math.pi / 2.0))) t_5 = 0.005555555555555556 * (angle * math.pi) tmp = 0 if math.fabs(a) <= 7.8e-212: tmp = 180.0 * (math.atan((-0.5 * (y_45_scale * (((0.5 + (0.5 * math.cos((2.0 * t_1)))) + math.sqrt(math.pow(t_4, 4.0))) / ((x_45_scale * t_4) * math.sin(t_1)))))) / math.pi) elif math.fabs(a) <= 1.55e+144: tmp = (180.0 * math.atan(((y_45_scale * (((0.5 - (0.5 * math.cos((2.0 * t_0)))) + math.sqrt(math.pow(t_2, 4.0))) / ((math.sin(t_3) * t_2) * x_45_scale))) * -0.5))) / math.pi else: tmp = 180.0 * (math.atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * math.cos((0.011111111111111112 * (angle * math.pi))))) / (math.cos(t_5) * math.sin(t_5)))) * (y_45_scale / x_45_scale)))) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(0.5 * pi) + Float64(Float64(-pi) * Float64(0.005555555555555556 * angle))) t_1 = Float64(pi * Float64(angle * 0.005555555555555556)) t_2 = sin(t_0) t_3 = Float64(Float64(0.005555555555555556 * angle) * pi) t_4 = sin(Float64(t_3 + Float64(pi / 2.0))) t_5 = Float64(0.005555555555555556 * Float64(angle * pi)) tmp = 0.0 if (abs(a) <= 7.8e-212) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(Float64(Float64(0.5 + Float64(0.5 * cos(Float64(2.0 * t_1)))) + sqrt((t_4 ^ 4.0))) / Float64(Float64(x_45_scale * t_4) * sin(t_1)))))) / pi)); elseif (abs(a) <= 1.55e+144) tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale * Float64(Float64(Float64(0.5 - Float64(0.5 * cos(Float64(2.0 * t_0)))) + sqrt((t_2 ^ 4.0))) / Float64(Float64(sin(t_3) * t_2) * x_45_scale))) * -0.5))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(-1.0 * Float64(Float64(0.5 - Float64(0.5 * cos(Float64(0.011111111111111112 * Float64(angle * pi))))) / Float64(cos(t_5) * sin(t_5)))) * Float64(y_45_scale / x_45_scale)))) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) t_0 = (0.5 * pi) + (-pi * (0.005555555555555556 * angle)); t_1 = pi * (angle * 0.005555555555555556); t_2 = sin(t_0); t_3 = (0.005555555555555556 * angle) * pi; t_4 = sin((t_3 + (pi / 2.0))); t_5 = 0.005555555555555556 * (angle * pi); tmp = 0.0; if (abs(a) <= 7.8e-212) tmp = 180.0 * (atan((-0.5 * (y_45_scale * (((0.5 + (0.5 * cos((2.0 * t_1)))) + sqrt((t_4 ^ 4.0))) / ((x_45_scale * t_4) * sin(t_1)))))) / pi); elseif (abs(a) <= 1.55e+144) tmp = (180.0 * atan(((y_45_scale * (((0.5 - (0.5 * cos((2.0 * t_0)))) + sqrt((t_2 ^ 4.0))) / ((sin(t_3) * t_2) * x_45_scale))) * -0.5))) / pi; else tmp = 180.0 * (atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * cos((0.011111111111111112 * (angle * pi))))) / (cos(t_5) * sin(t_5)))) * (y_45_scale / x_45_scale)))) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(0.5 * Pi), $MachinePrecision] + N[((-Pi) * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$4 = N[Sin[N[(t$95$3 + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[a], $MachinePrecision], 7.8e-212], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(N[(N[(0.5 + N[(0.5 * N[Cos[N[(2.0 * t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Sqrt[N[Power[t$95$4, 4.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(N[(x$45$scale * t$95$4), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[a], $MachinePrecision], 1.55e+144], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale * N[(N[(N[(0.5 - N[(0.5 * N[Cos[N[(2.0 * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Sqrt[N[Power[t$95$2, 4.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(N[(N[Sin[t$95$3], $MachinePrecision] * t$95$2), $MachinePrecision] * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(-1.0 * N[(N[(0.5 - N[(0.5 * N[Cos[N[(0.011111111111111112 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Cos[t$95$5], $MachinePrecision] * N[Sin[t$95$5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
t_0 := 0.5 \cdot \pi + \left(-\pi\right) \cdot \left(0.005555555555555556 \cdot angle\right)\\
t_1 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\
t_2 := \sin t\_0\\
t_3 := \left(0.005555555555555556 \cdot angle\right) \cdot \pi\\
t_4 := \sin \left(t\_3 + \frac{\pi}{2}\right)\\
t_5 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;\left|a\right| \leq 7.8 \cdot 10^{-212}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \frac{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot t\_1\right)\right) + \sqrt{{t\_4}^{4}}}{\left(x-scale \cdot t\_4\right) \cdot \sin t\_1}\right)\right)}{\pi}\\
\mathbf{elif}\;\left|a\right| \leq 1.55 \cdot 10^{+144}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\left(y-scale \cdot \frac{\left(0.5 - 0.5 \cdot \cos \left(2 \cdot t\_0\right)\right) + \sqrt{{t\_2}^{4}}}{\left(\sin t\_3 \cdot t\_2\right) \cdot x-scale}\right) \cdot -0.5\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\left(-1 \cdot \frac{0.5 - 0.5 \cdot \cos \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)}{\cos t\_5 \cdot \sin t\_5}\right) \cdot \frac{y-scale}{x-scale}\right)\right)}{\pi}\\
\end{array}
if a < 7.8e-212Initial program 13.7%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6444.4%
Applied rewrites44.5%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-/.f6444.5%
Applied rewrites44.5%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-/.f6443.8%
Applied rewrites43.8%
if 7.8e-212 < a < 1.5500000000000001e144Initial program 13.7%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.4%
lift-cos.f64N/A
cos-neg-revN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
lower-neg.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flip-revN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l/N/A
*-commutativeN/A
lower-*.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f64N/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f6444.4%
Applied rewrites44.4%
lift-cos.f64N/A
cos-neg-revN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
lower-neg.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flip-revN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l/N/A
*-commutativeN/A
lower-*.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f64N/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f6444.3%
Applied rewrites44.3%
lift-cos.f64N/A
cos-neg-revN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
lower-neg.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flip-revN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l/N/A
*-commutativeN/A
lower-*.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f64N/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f6444.5%
Applied rewrites44.5%
Applied rewrites44.7%
if 1.5500000000000001e144 < a Initial program 13.7%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Applied rewrites26.4%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites31.1%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (+ (* 0.5 PI) (* (- PI) (* 0.005555555555555556 angle))))
(t_1 (* PI (* angle 0.005555555555555556)))
(t_2 (sin t_0))
(t_3 (* (* 0.005555555555555556 angle) PI))
(t_4 (sin (+ t_3 (/ PI 2.0))))
(t_5 (* 0.005555555555555556 (* angle PI))))
(if (<= (fabs a) 7.8e-212)
(*
180.0
(/
(atan
(*
-0.5
(*
y-scale
(/
(+ (+ 0.5 (* 0.5 (cos (* 2.0 t_1)))) (sqrt (pow t_4 4.0)))
(* (* x-scale t_4) (sin t_1))))))
PI))
(if (<= (fabs a) 1.55e+144)
(*
180.0
(/
(atan
(*
-0.5
(/
(*
(+ (- 0.5 (* 0.5 (cos (* 2.0 t_0)))) (sqrt (pow t_2 4.0)))
y-scale)
(* (* (sin t_3) t_2) x-scale))))
PI))
(*
180.0
(/
(atan
(*
-0.5
(*
(*
-1.0
(/
(-
0.5
(* 0.5 (cos (* 0.011111111111111112 (* angle PI)))))
(* (cos t_5) (sin t_5))))
(/ y-scale x-scale))))
PI))))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (0.5 * ((double) M_PI)) + (-((double) M_PI) * (0.005555555555555556 * angle));
double t_1 = ((double) M_PI) * (angle * 0.005555555555555556);
double t_2 = sin(t_0);
double t_3 = (0.005555555555555556 * angle) * ((double) M_PI);
double t_4 = sin((t_3 + (((double) M_PI) / 2.0)));
double t_5 = 0.005555555555555556 * (angle * ((double) M_PI));
double tmp;
if (fabs(a) <= 7.8e-212) {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * (((0.5 + (0.5 * cos((2.0 * t_1)))) + sqrt(pow(t_4, 4.0))) / ((x_45_scale * t_4) * sin(t_1)))))) / ((double) M_PI));
} else if (fabs(a) <= 1.55e+144) {
tmp = 180.0 * (atan((-0.5 * ((((0.5 - (0.5 * cos((2.0 * t_0)))) + sqrt(pow(t_2, 4.0))) * y_45_scale) / ((sin(t_3) * t_2) * x_45_scale)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * cos((0.011111111111111112 * (angle * ((double) M_PI)))))) / (cos(t_5) * sin(t_5)))) * (y_45_scale / x_45_scale)))) / ((double) M_PI));
}
return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (0.5 * Math.PI) + (-Math.PI * (0.005555555555555556 * angle));
double t_1 = Math.PI * (angle * 0.005555555555555556);
double t_2 = Math.sin(t_0);
double t_3 = (0.005555555555555556 * angle) * Math.PI;
double t_4 = Math.sin((t_3 + (Math.PI / 2.0)));
double t_5 = 0.005555555555555556 * (angle * Math.PI);
double tmp;
if (Math.abs(a) <= 7.8e-212) {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * (((0.5 + (0.5 * Math.cos((2.0 * t_1)))) + Math.sqrt(Math.pow(t_4, 4.0))) / ((x_45_scale * t_4) * Math.sin(t_1)))))) / Math.PI);
} else if (Math.abs(a) <= 1.55e+144) {
tmp = 180.0 * (Math.atan((-0.5 * ((((0.5 - (0.5 * Math.cos((2.0 * t_0)))) + Math.sqrt(Math.pow(t_2, 4.0))) * y_45_scale) / ((Math.sin(t_3) * t_2) * x_45_scale)))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * Math.cos((0.011111111111111112 * (angle * Math.PI))))) / (Math.cos(t_5) * Math.sin(t_5)))) * (y_45_scale / x_45_scale)))) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = (0.5 * math.pi) + (-math.pi * (0.005555555555555556 * angle)) t_1 = math.pi * (angle * 0.005555555555555556) t_2 = math.sin(t_0) t_3 = (0.005555555555555556 * angle) * math.pi t_4 = math.sin((t_3 + (math.pi / 2.0))) t_5 = 0.005555555555555556 * (angle * math.pi) tmp = 0 if math.fabs(a) <= 7.8e-212: tmp = 180.0 * (math.atan((-0.5 * (y_45_scale * (((0.5 + (0.5 * math.cos((2.0 * t_1)))) + math.sqrt(math.pow(t_4, 4.0))) / ((x_45_scale * t_4) * math.sin(t_1)))))) / math.pi) elif math.fabs(a) <= 1.55e+144: tmp = 180.0 * (math.atan((-0.5 * ((((0.5 - (0.5 * math.cos((2.0 * t_0)))) + math.sqrt(math.pow(t_2, 4.0))) * y_45_scale) / ((math.sin(t_3) * t_2) * x_45_scale)))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * math.cos((0.011111111111111112 * (angle * math.pi))))) / (math.cos(t_5) * math.sin(t_5)))) * (y_45_scale / x_45_scale)))) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(0.5 * pi) + Float64(Float64(-pi) * Float64(0.005555555555555556 * angle))) t_1 = Float64(pi * Float64(angle * 0.005555555555555556)) t_2 = sin(t_0) t_3 = Float64(Float64(0.005555555555555556 * angle) * pi) t_4 = sin(Float64(t_3 + Float64(pi / 2.0))) t_5 = Float64(0.005555555555555556 * Float64(angle * pi)) tmp = 0.0 if (abs(a) <= 7.8e-212) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(Float64(Float64(0.5 + Float64(0.5 * cos(Float64(2.0 * t_1)))) + sqrt((t_4 ^ 4.0))) / Float64(Float64(x_45_scale * t_4) * sin(t_1)))))) / pi)); elseif (abs(a) <= 1.55e+144) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(Float64(Float64(0.5 - Float64(0.5 * cos(Float64(2.0 * t_0)))) + sqrt((t_2 ^ 4.0))) * y_45_scale) / Float64(Float64(sin(t_3) * t_2) * x_45_scale)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(-1.0 * Float64(Float64(0.5 - Float64(0.5 * cos(Float64(0.011111111111111112 * Float64(angle * pi))))) / Float64(cos(t_5) * sin(t_5)))) * Float64(y_45_scale / x_45_scale)))) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) t_0 = (0.5 * pi) + (-pi * (0.005555555555555556 * angle)); t_1 = pi * (angle * 0.005555555555555556); t_2 = sin(t_0); t_3 = (0.005555555555555556 * angle) * pi; t_4 = sin((t_3 + (pi / 2.0))); t_5 = 0.005555555555555556 * (angle * pi); tmp = 0.0; if (abs(a) <= 7.8e-212) tmp = 180.0 * (atan((-0.5 * (y_45_scale * (((0.5 + (0.5 * cos((2.0 * t_1)))) + sqrt((t_4 ^ 4.0))) / ((x_45_scale * t_4) * sin(t_1)))))) / pi); elseif (abs(a) <= 1.55e+144) tmp = 180.0 * (atan((-0.5 * ((((0.5 - (0.5 * cos((2.0 * t_0)))) + sqrt((t_2 ^ 4.0))) * y_45_scale) / ((sin(t_3) * t_2) * x_45_scale)))) / pi); else tmp = 180.0 * (atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * cos((0.011111111111111112 * (angle * pi))))) / (cos(t_5) * sin(t_5)))) * (y_45_scale / x_45_scale)))) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(0.5 * Pi), $MachinePrecision] + N[((-Pi) * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$4 = N[Sin[N[(t$95$3 + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[a], $MachinePrecision], 7.8e-212], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(N[(N[(0.5 + N[(0.5 * N[Cos[N[(2.0 * t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Sqrt[N[Power[t$95$4, 4.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(N[(x$45$scale * t$95$4), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[a], $MachinePrecision], 1.55e+144], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(N[(N[(0.5 - N[(0.5 * N[Cos[N[(2.0 * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Sqrt[N[Power[t$95$2, 4.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * y$45$scale), $MachinePrecision] / N[(N[(N[Sin[t$95$3], $MachinePrecision] * t$95$2), $MachinePrecision] * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(-1.0 * N[(N[(0.5 - N[(0.5 * N[Cos[N[(0.011111111111111112 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Cos[t$95$5], $MachinePrecision] * N[Sin[t$95$5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
t_0 := 0.5 \cdot \pi + \left(-\pi\right) \cdot \left(0.005555555555555556 \cdot angle\right)\\
t_1 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\
t_2 := \sin t\_0\\
t_3 := \left(0.005555555555555556 \cdot angle\right) \cdot \pi\\
t_4 := \sin \left(t\_3 + \frac{\pi}{2}\right)\\
t_5 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;\left|a\right| \leq 7.8 \cdot 10^{-212}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \frac{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot t\_1\right)\right) + \sqrt{{t\_4}^{4}}}{\left(x-scale \cdot t\_4\right) \cdot \sin t\_1}\right)\right)}{\pi}\\
\mathbf{elif}\;\left|a\right| \leq 1.55 \cdot 10^{+144}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{\left(\left(0.5 - 0.5 \cdot \cos \left(2 \cdot t\_0\right)\right) + \sqrt{{t\_2}^{4}}\right) \cdot y-scale}{\left(\sin t\_3 \cdot t\_2\right) \cdot x-scale}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\left(-1 \cdot \frac{0.5 - 0.5 \cdot \cos \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)}{\cos t\_5 \cdot \sin t\_5}\right) \cdot \frac{y-scale}{x-scale}\right)\right)}{\pi}\\
\end{array}
if a < 7.8e-212Initial program 13.7%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6444.4%
Applied rewrites44.5%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-/.f6444.5%
Applied rewrites44.5%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-/.f6443.8%
Applied rewrites43.8%
if 7.8e-212 < a < 1.5500000000000001e144Initial program 13.7%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.4%
lift-cos.f64N/A
cos-neg-revN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
lower-neg.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flip-revN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l/N/A
*-commutativeN/A
lower-*.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f64N/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f6444.4%
Applied rewrites44.4%
lift-cos.f64N/A
cos-neg-revN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
lower-neg.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flip-revN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l/N/A
*-commutativeN/A
lower-*.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f64N/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f6444.3%
Applied rewrites44.3%
lift-cos.f64N/A
cos-neg-revN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
lower-neg.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flip-revN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l/N/A
*-commutativeN/A
lower-*.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f64N/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f6444.5%
Applied rewrites44.5%
Applied rewrites44.7%
if 1.5500000000000001e144 < a Initial program 13.7%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Applied rewrites26.4%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites31.1%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0
(sin (+ (* (* 0.005555555555555556 angle) PI) (/ PI 2.0))))
(t_1 (* 0.005555555555555556 (* angle PI)))
(t_2 (cos t_1))
(t_3 (* PI (* angle 0.005555555555555556)))
(t_4 (+ 0.5 (* 0.5 (cos (* 2.0 t_3)))))
(t_5 (sin t_3)))
(if (<= (fabs a) 2.7e-211)
(*
180.0
(/
(atan
(*
-0.5
(*
y-scale
(/ (+ t_4 (sqrt (pow t_0 4.0))) (* (* x-scale t_0) t_5)))))
PI))
(if (<= (fabs a) 4.5e+105)
(*
180.0
(/
(atan
(*
-0.5
(*
y-scale
(/ (+ t_4 (sqrt (pow t_2 4.0))) (* (* x-scale t_2) t_5)))))
PI))
(*
180.0
(/
(atan
(*
-0.5
(*
(*
-1.0
(/
(-
0.5
(* 0.5 (cos (* 0.011111111111111112 (* angle PI)))))
(* t_2 (sin t_1))))
(/ y-scale x-scale))))
PI))))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = sin((((0.005555555555555556 * angle) * ((double) M_PI)) + (((double) M_PI) / 2.0)));
double t_1 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_2 = cos(t_1);
double t_3 = ((double) M_PI) * (angle * 0.005555555555555556);
double t_4 = 0.5 + (0.5 * cos((2.0 * t_3)));
double t_5 = sin(t_3);
double tmp;
if (fabs(a) <= 2.7e-211) {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * ((t_4 + sqrt(pow(t_0, 4.0))) / ((x_45_scale * t_0) * t_5))))) / ((double) M_PI));
} else if (fabs(a) <= 4.5e+105) {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * ((t_4 + sqrt(pow(t_2, 4.0))) / ((x_45_scale * t_2) * t_5))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * cos((0.011111111111111112 * (angle * ((double) M_PI)))))) / (t_2 * sin(t_1)))) * (y_45_scale / x_45_scale)))) / ((double) M_PI));
}
return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = Math.sin((((0.005555555555555556 * angle) * Math.PI) + (Math.PI / 2.0)));
double t_1 = 0.005555555555555556 * (angle * Math.PI);
double t_2 = Math.cos(t_1);
double t_3 = Math.PI * (angle * 0.005555555555555556);
double t_4 = 0.5 + (0.5 * Math.cos((2.0 * t_3)));
double t_5 = Math.sin(t_3);
double tmp;
if (Math.abs(a) <= 2.7e-211) {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * ((t_4 + Math.sqrt(Math.pow(t_0, 4.0))) / ((x_45_scale * t_0) * t_5))))) / Math.PI);
} else if (Math.abs(a) <= 4.5e+105) {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * ((t_4 + Math.sqrt(Math.pow(t_2, 4.0))) / ((x_45_scale * t_2) * t_5))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * Math.cos((0.011111111111111112 * (angle * Math.PI))))) / (t_2 * Math.sin(t_1)))) * (y_45_scale / x_45_scale)))) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = math.sin((((0.005555555555555556 * angle) * math.pi) + (math.pi / 2.0))) t_1 = 0.005555555555555556 * (angle * math.pi) t_2 = math.cos(t_1) t_3 = math.pi * (angle * 0.005555555555555556) t_4 = 0.5 + (0.5 * math.cos((2.0 * t_3))) t_5 = math.sin(t_3) tmp = 0 if math.fabs(a) <= 2.7e-211: tmp = 180.0 * (math.atan((-0.5 * (y_45_scale * ((t_4 + math.sqrt(math.pow(t_0, 4.0))) / ((x_45_scale * t_0) * t_5))))) / math.pi) elif math.fabs(a) <= 4.5e+105: tmp = 180.0 * (math.atan((-0.5 * (y_45_scale * ((t_4 + math.sqrt(math.pow(t_2, 4.0))) / ((x_45_scale * t_2) * t_5))))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * math.cos((0.011111111111111112 * (angle * math.pi))))) / (t_2 * math.sin(t_1)))) * (y_45_scale / x_45_scale)))) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = sin(Float64(Float64(Float64(0.005555555555555556 * angle) * pi) + Float64(pi / 2.0))) t_1 = Float64(0.005555555555555556 * Float64(angle * pi)) t_2 = cos(t_1) t_3 = Float64(pi * Float64(angle * 0.005555555555555556)) t_4 = Float64(0.5 + Float64(0.5 * cos(Float64(2.0 * t_3)))) t_5 = sin(t_3) tmp = 0.0 if (abs(a) <= 2.7e-211) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(Float64(t_4 + sqrt((t_0 ^ 4.0))) / Float64(Float64(x_45_scale * t_0) * t_5))))) / pi)); elseif (abs(a) <= 4.5e+105) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(Float64(t_4 + sqrt((t_2 ^ 4.0))) / Float64(Float64(x_45_scale * t_2) * t_5))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(-1.0 * Float64(Float64(0.5 - Float64(0.5 * cos(Float64(0.011111111111111112 * Float64(angle * pi))))) / Float64(t_2 * sin(t_1)))) * Float64(y_45_scale / x_45_scale)))) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) t_0 = sin((((0.005555555555555556 * angle) * pi) + (pi / 2.0))); t_1 = 0.005555555555555556 * (angle * pi); t_2 = cos(t_1); t_3 = pi * (angle * 0.005555555555555556); t_4 = 0.5 + (0.5 * cos((2.0 * t_3))); t_5 = sin(t_3); tmp = 0.0; if (abs(a) <= 2.7e-211) tmp = 180.0 * (atan((-0.5 * (y_45_scale * ((t_4 + sqrt((t_0 ^ 4.0))) / ((x_45_scale * t_0) * t_5))))) / pi); elseif (abs(a) <= 4.5e+105) tmp = 180.0 * (atan((-0.5 * (y_45_scale * ((t_4 + sqrt((t_2 ^ 4.0))) / ((x_45_scale * t_2) * t_5))))) / pi); else tmp = 180.0 * (atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * cos((0.011111111111111112 * (angle * pi))))) / (t_2 * sin(t_1)))) * (y_45_scale / x_45_scale)))) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[Sin[N[(N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision] + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Cos[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(0.5 + N[(0.5 * N[Cos[N[(2.0 * t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[Sin[t$95$3], $MachinePrecision]}, If[LessEqual[N[Abs[a], $MachinePrecision], 2.7e-211], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(N[(t$95$4 + N[Sqrt[N[Power[t$95$0, 4.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(N[(x$45$scale * t$95$0), $MachinePrecision] * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[a], $MachinePrecision], 4.5e+105], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(N[(t$95$4 + N[Sqrt[N[Power[t$95$2, 4.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(N[(x$45$scale * t$95$2), $MachinePrecision] * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(-1.0 * N[(N[(0.5 - N[(0.5 * N[Cos[N[(0.011111111111111112 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$2 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
t_0 := \sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi + \frac{\pi}{2}\right)\\
t_1 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_2 := \cos t\_1\\
t_3 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\
t_4 := 0.5 + 0.5 \cdot \cos \left(2 \cdot t\_3\right)\\
t_5 := \sin t\_3\\
\mathbf{if}\;\left|a\right| \leq 2.7 \cdot 10^{-211}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \frac{t\_4 + \sqrt{{t\_0}^{4}}}{\left(x-scale \cdot t\_0\right) \cdot t\_5}\right)\right)}{\pi}\\
\mathbf{elif}\;\left|a\right| \leq 4.5 \cdot 10^{+105}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \frac{t\_4 + \sqrt{{t\_2}^{4}}}{\left(x-scale \cdot t\_2\right) \cdot t\_5}\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\left(-1 \cdot \frac{0.5 - 0.5 \cdot \cos \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)}{t\_2 \cdot \sin t\_1}\right) \cdot \frac{y-scale}{x-scale}\right)\right)}{\pi}\\
\end{array}
if a < 2.6999999999999999e-211Initial program 13.7%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6444.4%
Applied rewrites44.5%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-/.f6444.5%
Applied rewrites44.5%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-/.f6443.8%
Applied rewrites43.8%
if 2.6999999999999999e-211 < a < 4.5000000000000001e105Initial program 13.7%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6444.4%
Applied rewrites44.5%
Taylor expanded in angle around inf
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6444.4%
Applied rewrites44.4%
Taylor expanded in angle around inf
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6444.6%
Applied rewrites44.6%
if 4.5000000000000001e105 < a Initial program 13.7%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Applied rewrites26.4%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites31.1%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (* PI (* angle 0.005555555555555556))))
(if (<= (fabs a) 4.5e+105)
(*
180.0
(/
(atan
(*
-0.5
(*
y-scale
(/
(+
(+ 0.5 (* 0.5 (cos (* 2.0 t_1))))
(sqrt (pow (cos t_1) 4.0)))
(* x-scale (sin t_1))))))
PI))
(*
180.0
(/
(atan
(*
-0.5
(*
(*
-1.0
(/
(- 0.5 (* 0.5 (cos (* 0.011111111111111112 (* angle PI)))))
(* (cos t_0) (sin t_0))))
(/ y-scale x-scale))))
PI)))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = ((double) M_PI) * (angle * 0.005555555555555556);
double tmp;
if (fabs(a) <= 4.5e+105) {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * (((0.5 + (0.5 * cos((2.0 * t_1)))) + sqrt(pow(cos(t_1), 4.0))) / (x_45_scale * sin(t_1)))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * cos((0.011111111111111112 * (angle * ((double) M_PI)))))) / (cos(t_0) * sin(t_0)))) * (y_45_scale / x_45_scale)))) / ((double) M_PI));
}
return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double t_1 = Math.PI * (angle * 0.005555555555555556);
double tmp;
if (Math.abs(a) <= 4.5e+105) {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * (((0.5 + (0.5 * Math.cos((2.0 * t_1)))) + Math.sqrt(Math.pow(Math.cos(t_1), 4.0))) / (x_45_scale * Math.sin(t_1)))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * Math.cos((0.011111111111111112 * (angle * Math.PI))))) / (Math.cos(t_0) * Math.sin(t_0)))) * (y_45_scale / x_45_scale)))) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = 0.005555555555555556 * (angle * math.pi) t_1 = math.pi * (angle * 0.005555555555555556) tmp = 0 if math.fabs(a) <= 4.5e+105: tmp = 180.0 * (math.atan((-0.5 * (y_45_scale * (((0.5 + (0.5 * math.cos((2.0 * t_1)))) + math.sqrt(math.pow(math.cos(t_1), 4.0))) / (x_45_scale * math.sin(t_1)))))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * math.cos((0.011111111111111112 * (angle * math.pi))))) / (math.cos(t_0) * math.sin(t_0)))) * (y_45_scale / x_45_scale)))) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = Float64(pi * Float64(angle * 0.005555555555555556)) tmp = 0.0 if (abs(a) <= 4.5e+105) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(Float64(Float64(0.5 + Float64(0.5 * cos(Float64(2.0 * t_1)))) + sqrt((cos(t_1) ^ 4.0))) / Float64(x_45_scale * sin(t_1)))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(-1.0 * Float64(Float64(0.5 - Float64(0.5 * cos(Float64(0.011111111111111112 * Float64(angle * pi))))) / Float64(cos(t_0) * sin(t_0)))) * Float64(y_45_scale / x_45_scale)))) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) t_0 = 0.005555555555555556 * (angle * pi); t_1 = pi * (angle * 0.005555555555555556); tmp = 0.0; if (abs(a) <= 4.5e+105) tmp = 180.0 * (atan((-0.5 * (y_45_scale * (((0.5 + (0.5 * cos((2.0 * t_1)))) + sqrt((cos(t_1) ^ 4.0))) / (x_45_scale * sin(t_1)))))) / pi); else tmp = 180.0 * (atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * cos((0.011111111111111112 * (angle * pi))))) / (cos(t_0) * sin(t_0)))) * (y_45_scale / x_45_scale)))) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[a], $MachinePrecision], 4.5e+105], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(N[(N[(0.5 + N[(0.5 * N[Cos[N[(2.0 * t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Sqrt[N[Power[N[Cos[t$95$1], $MachinePrecision], 4.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(-1.0 * N[(N[(0.5 - N[(0.5 * N[Cos[N[(0.011111111111111112 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Cos[t$95$0], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\
\mathbf{if}\;\left|a\right| \leq 4.5 \cdot 10^{+105}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \frac{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot t\_1\right)\right) + \sqrt{{\cos t\_1}^{4}}}{x-scale \cdot \sin t\_1}\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\left(-1 \cdot \frac{0.5 - 0.5 \cdot \cos \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)}{\cos t\_0 \cdot \sin t\_0}\right) \cdot \frac{y-scale}{x-scale}\right)\right)}{\pi}\\
\end{array}
if a < 4.5000000000000001e105Initial program 13.7%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6444.4%
Applied rewrites44.5%
Taylor expanded in angle around 0
Applied rewrites43.5%
if 4.5000000000000001e105 < a Initial program 13.7%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Applied rewrites26.4%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites31.1%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (* (cos t_0) (sin t_0))))
(if (<= (fabs a) 1.6e+144)
(*
180.0
(/ (atan (* -0.5 (/ (* y-scale 2.0) (* x-scale t_1)))) PI))
(*
180.0
(/
(atan
(*
-0.5
(*
(*
-1.0
(/
(- 0.5 (* 0.5 (cos (* 0.011111111111111112 (* angle PI)))))
t_1))
(/ y-scale x-scale))))
PI)))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = cos(t_0) * sin(t_0);
double tmp;
if (fabs(a) <= 1.6e+144) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * 2.0) / (x_45_scale * t_1)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * cos((0.011111111111111112 * (angle * ((double) M_PI)))))) / t_1)) * (y_45_scale / x_45_scale)))) / ((double) M_PI));
}
return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double t_1 = Math.cos(t_0) * Math.sin(t_0);
double tmp;
if (Math.abs(a) <= 1.6e+144) {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * 2.0) / (x_45_scale * t_1)))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * Math.cos((0.011111111111111112 * (angle * Math.PI))))) / t_1)) * (y_45_scale / x_45_scale)))) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = 0.005555555555555556 * (angle * math.pi) t_1 = math.cos(t_0) * math.sin(t_0) tmp = 0 if math.fabs(a) <= 1.6e+144: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * 2.0) / (x_45_scale * t_1)))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * math.cos((0.011111111111111112 * (angle * math.pi))))) / t_1)) * (y_45_scale / x_45_scale)))) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = Float64(cos(t_0) * sin(t_0)) tmp = 0.0 if (abs(a) <= 1.6e+144) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * 2.0) / Float64(x_45_scale * t_1)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(-1.0 * Float64(Float64(0.5 - Float64(0.5 * cos(Float64(0.011111111111111112 * Float64(angle * pi))))) / t_1)) * Float64(y_45_scale / x_45_scale)))) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) t_0 = 0.005555555555555556 * (angle * pi); t_1 = cos(t_0) * sin(t_0); tmp = 0.0; if (abs(a) <= 1.6e+144) tmp = 180.0 * (atan((-0.5 * ((y_45_scale * 2.0) / (x_45_scale * t_1)))) / pi); else tmp = 180.0 * (atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * cos((0.011111111111111112 * (angle * pi))))) / t_1)) * (y_45_scale / x_45_scale)))) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Cos[t$95$0], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[a], $MachinePrecision], 1.6e+144], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * 2.0), $MachinePrecision] / N[(x$45$scale * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(-1.0 * N[(N[(0.5 - N[(0.5 * N[Cos[N[(0.011111111111111112 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \cos t\_0 \cdot \sin t\_0\\
\mathbf{if}\;\left|a\right| \leq 1.6 \cdot 10^{+144}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot 2}{x-scale \cdot t\_1}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\left(-1 \cdot \frac{0.5 - 0.5 \cdot \cos \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)}{t\_1}\right) \cdot \frac{y-scale}{x-scale}\right)\right)}{\pi}\\
\end{array}
if a < 1.6e144Initial program 13.7%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.4%
Taylor expanded in angle around 0
Applied rewrites44.0%
if 1.6e144 < a Initial program 13.7%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Applied rewrites26.4%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites31.1%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI))) (t_1 (sin t_0)))
(if (<= (fabs b) 3.2e-83)
(*
180.0
(/
(atan
(*
-90.0
(/
(*
x-scale
(*
y-scale
(+
(sqrt (/ 1.0 (pow x-scale 4.0)))
(/ 1.0 (pow x-scale 2.0)))))
(* angle PI))))
PI))
(if (<= (fabs b) 8e+57)
(*
180.0
(/
(atan
(*
-0.5
(/
(* y-scale (+ (sqrt (pow 1.0 4.0)) (pow 1.0 2.0)))
(* x-scale (* 1.0 t_1)))))
PI))
(*
180.0
(/
(atan
(* -0.5 (/ (* y-scale 2.0) (* x-scale (* (cos t_0) t_1)))))
PI))))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = sin(t_0);
double tmp;
if (fabs(b) <= 3.2e-83) {
tmp = 180.0 * (atan((-90.0 * ((x_45_scale * (y_45_scale * (sqrt((1.0 / pow(x_45_scale, 4.0))) + (1.0 / pow(x_45_scale, 2.0))))) / (angle * ((double) M_PI))))) / ((double) M_PI));
} else if (fabs(b) <= 8e+57) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(1.0, 4.0)) + pow(1.0, 2.0))) / (x_45_scale * (1.0 * t_1))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * 2.0) / (x_45_scale * (cos(t_0) * t_1))))) / ((double) M_PI));
}
return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double t_1 = Math.sin(t_0);
double tmp;
if (Math.abs(b) <= 3.2e-83) {
tmp = 180.0 * (Math.atan((-90.0 * ((x_45_scale * (y_45_scale * (Math.sqrt((1.0 / Math.pow(x_45_scale, 4.0))) + (1.0 / Math.pow(x_45_scale, 2.0))))) / (angle * Math.PI)))) / Math.PI);
} else if (Math.abs(b) <= 8e+57) {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * (Math.sqrt(Math.pow(1.0, 4.0)) + Math.pow(1.0, 2.0))) / (x_45_scale * (1.0 * t_1))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * 2.0) / (x_45_scale * (Math.cos(t_0) * t_1))))) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = 0.005555555555555556 * (angle * math.pi) t_1 = math.sin(t_0) tmp = 0 if math.fabs(b) <= 3.2e-83: tmp = 180.0 * (math.atan((-90.0 * ((x_45_scale * (y_45_scale * (math.sqrt((1.0 / math.pow(x_45_scale, 4.0))) + (1.0 / math.pow(x_45_scale, 2.0))))) / (angle * math.pi)))) / math.pi) elif math.fabs(b) <= 8e+57: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * (math.sqrt(math.pow(1.0, 4.0)) + math.pow(1.0, 2.0))) / (x_45_scale * (1.0 * t_1))))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * 2.0) / (x_45_scale * (math.cos(t_0) * t_1))))) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = sin(t_0) tmp = 0.0 if (abs(b) <= 3.2e-83) tmp = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(Float64(x_45_scale * Float64(y_45_scale * Float64(sqrt(Float64(1.0 / (x_45_scale ^ 4.0))) + Float64(1.0 / (x_45_scale ^ 2.0))))) / Float64(angle * pi)))) / pi)); elseif (abs(b) <= 8e+57) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(sqrt((1.0 ^ 4.0)) + (1.0 ^ 2.0))) / Float64(x_45_scale * Float64(1.0 * t_1))))) / 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) * t_1))))) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) t_0 = 0.005555555555555556 * (angle * pi); t_1 = sin(t_0); tmp = 0.0; if (abs(b) <= 3.2e-83) tmp = 180.0 * (atan((-90.0 * ((x_45_scale * (y_45_scale * (sqrt((1.0 / (x_45_scale ^ 4.0))) + (1.0 / (x_45_scale ^ 2.0))))) / (angle * pi)))) / pi); elseif (abs(b) <= 8e+57) tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt((1.0 ^ 4.0)) + (1.0 ^ 2.0))) / (x_45_scale * (1.0 * t_1))))) / pi); else tmp = 180.0 * (atan((-0.5 * ((y_45_scale * 2.0) / (x_45_scale * (cos(t_0) * t_1))))) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[N[Abs[b], $MachinePrecision], 3.2e-83], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(N[(x$45$scale * N[(y$45$scale * N[(N[Sqrt[N[(1.0 / N[Power[x$45$scale, 4.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(1.0 / N[Power[x$45$scale, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[b], $MachinePrecision], 8e+57], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[1.0, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[1.0, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(1.0 * 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 * 2.0), $MachinePrecision] / N[(x$45$scale * N[(N[Cos[t$95$0], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
\mathbf{if}\;\left|b\right| \leq 3.2 \cdot 10^{-83}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{x-scale \cdot \left(y-scale \cdot \left(\sqrt{\frac{1}{{x-scale}^{4}}} + \frac{1}{{x-scale}^{2}}\right)\right)}{angle \cdot \pi}\right)}{\pi}\\
\mathbf{elif}\;\left|b\right| \leq 8 \cdot 10^{+57}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{1}^{4}} + {1}^{2}\right)}{x-scale \cdot \left(1 \cdot t\_1\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 t\_1\right)}\right)}{\pi}\\
\end{array}
if b < 3.2000000000000001e-83Initial program 13.7%
Taylor expanded in angle around 0
Applied rewrites12.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites40.4%
if 3.2000000000000001e-83 < b < 8.0000000000000004e57Initial program 13.7%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.4%
Taylor expanded in angle around 0
Applied rewrites44.0%
Taylor expanded in angle around 0
Applied rewrites44.0%
Taylor expanded in angle around 0
Applied rewrites43.9%
if 8.0000000000000004e57 < b Initial program 13.7%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.4%
Taylor expanded in angle around 0
Applied rewrites44.0%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (* x-scale (* (cos t_0) (sin t_0)))))
(if (<= (fabs a) 1.6e+144)
(* 180.0 (/ (atan (* -0.5 (/ (* y-scale 2.0) t_1))) PI))
(*
180.0
(/
(atan
(*
0.5
(/
(*
y-scale
(- 0.5 (* 0.5 (cos (* 0.011111111111111112 (* angle PI))))))
t_1)))
PI)))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = x_45_scale * (cos(t_0) * sin(t_0));
double tmp;
if (fabs(a) <= 1.6e+144) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * 2.0) / t_1))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.5 * ((y_45_scale * (0.5 - (0.5 * cos((0.011111111111111112 * (angle * ((double) M_PI))))))) / t_1))) / ((double) M_PI));
}
return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double t_1 = x_45_scale * (Math.cos(t_0) * Math.sin(t_0));
double tmp;
if (Math.abs(a) <= 1.6e+144) {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * 2.0) / t_1))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((0.5 * ((y_45_scale * (0.5 - (0.5 * Math.cos((0.011111111111111112 * (angle * Math.PI)))))) / t_1))) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = 0.005555555555555556 * (angle * math.pi) t_1 = x_45_scale * (math.cos(t_0) * math.sin(t_0)) tmp = 0 if math.fabs(a) <= 1.6e+144: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * 2.0) / t_1))) / math.pi) else: tmp = 180.0 * (math.atan((0.5 * ((y_45_scale * (0.5 - (0.5 * math.cos((0.011111111111111112 * (angle * math.pi)))))) / t_1))) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = Float64(x_45_scale * Float64(cos(t_0) * sin(t_0))) tmp = 0.0 if (abs(a) <= 1.6e+144) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * 2.0) / t_1))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(y_45_scale * Float64(0.5 - Float64(0.5 * cos(Float64(0.011111111111111112 * Float64(angle * pi)))))) / t_1))) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) t_0 = 0.005555555555555556 * (angle * pi); t_1 = x_45_scale * (cos(t_0) * sin(t_0)); tmp = 0.0; if (abs(a) <= 1.6e+144) tmp = 180.0 * (atan((-0.5 * ((y_45_scale * 2.0) / t_1))) / pi); else tmp = 180.0 * (atan((0.5 * ((y_45_scale * (0.5 - (0.5 * cos((0.011111111111111112 * (angle * pi)))))) / t_1))) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x$45$scale * N[(N[Cos[t$95$0], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[a], $MachinePrecision], 1.6e+144], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * 2.0), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(y$45$scale * N[(0.5 - N[(0.5 * N[Cos[N[(0.011111111111111112 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := x-scale \cdot \left(\cos t\_0 \cdot \sin t\_0\right)\\
\mathbf{if}\;\left|a\right| \leq 1.6 \cdot 10^{+144}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot 2}{t\_1}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{y-scale \cdot \left(0.5 - 0.5 \cdot \cos \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\right)}{t\_1}\right)}{\pi}\\
\end{array}
if a < 1.6e144Initial program 13.7%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.4%
Taylor expanded in angle around 0
Applied rewrites44.0%
if 1.6e144 < a Initial program 13.7%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Applied rewrites26.4%
Taylor expanded in a around inf
lower-*.f64N/A
Applied rewrites30.5%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI))))
(if (<= (fabs b) 3.9e-87)
(*
180.0
(/
(atan
(*
-90.0
(/
(*
x-scale
(*
y-scale
(+
(sqrt (/ 1.0 (pow x-scale 4.0)))
(/ 1.0 (pow x-scale 2.0)))))
(* angle PI))))
PI))
(*
180.0
(/
(atan
(*
-0.5
(/ (* y-scale 2.0) (* x-scale (* (cos t_0) (sin t_0))))))
PI)))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double tmp;
if (fabs(b) <= 3.9e-87) {
tmp = 180.0 * (atan((-90.0 * ((x_45_scale * (y_45_scale * (sqrt((1.0 / pow(x_45_scale, 4.0))) + (1.0 / pow(x_45_scale, 2.0))))) / (angle * ((double) M_PI))))) / ((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;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double tmp;
if (Math.abs(b) <= 3.9e-87) {
tmp = 180.0 * (Math.atan((-90.0 * ((x_45_scale * (y_45_scale * (Math.sqrt((1.0 / Math.pow(x_45_scale, 4.0))) + (1.0 / Math.pow(x_45_scale, 2.0))))) / (angle * Math.PI)))) / 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;
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = 0.005555555555555556 * (angle * math.pi) tmp = 0 if math.fabs(b) <= 3.9e-87: tmp = 180.0 * (math.atan((-90.0 * ((x_45_scale * (y_45_scale * (math.sqrt((1.0 / math.pow(x_45_scale, 4.0))) + (1.0 / math.pow(x_45_scale, 2.0))))) / (angle * math.pi)))) / 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
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) tmp = 0.0 if (abs(b) <= 3.9e-87) tmp = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(Float64(x_45_scale * Float64(y_45_scale * Float64(sqrt(Float64(1.0 / (x_45_scale ^ 4.0))) + Float64(1.0 / (x_45_scale ^ 2.0))))) / Float64(angle * pi)))) / 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
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) t_0 = 0.005555555555555556 * (angle * pi); tmp = 0.0; if (abs(b) <= 3.9e-87) tmp = 180.0 * (atan((-90.0 * ((x_45_scale * (y_45_scale * (sqrt((1.0 / (x_45_scale ^ 4.0))) + (1.0 / (x_45_scale ^ 2.0))))) / (angle * pi)))) / 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
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[b], $MachinePrecision], 3.9e-87], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(N[(x$45$scale * N[(y$45$scale * N[(N[Sqrt[N[(1.0 / N[Power[x$45$scale, 4.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(1.0 / N[Power[x$45$scale, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(angle * Pi), $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}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;\left|b\right| \leq 3.9 \cdot 10^{-87}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{x-scale \cdot \left(y-scale \cdot \left(\sqrt{\frac{1}{{x-scale}^{4}}} + \frac{1}{{x-scale}^{2}}\right)\right)}{angle \cdot \pi}\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}
if b < 3.8999999999999998e-87Initial program 13.7%
Taylor expanded in angle around 0
Applied rewrites12.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites40.4%
if 3.8999999999999998e-87 < b Initial program 13.7%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.4%
Taylor expanded in angle around 0
Applied rewrites44.0%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI))))
(if (<= (fabs b) 1.55e-81)
(*
180.0
(/
(atan
(*
90.0
(*
x-scale
(* -1.0 (/ y-scale (* angle (* (pow x-scale 2.0) PI)))))))
PI))
(*
180.0
(/
(atan
(*
-0.5
(/ (* y-scale 2.0) (* x-scale (* (cos t_0) (sin t_0))))))
PI)))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double tmp;
if (fabs(b) <= 1.55e-81) {
tmp = 180.0 * (atan((90.0 * (x_45_scale * (-1.0 * (y_45_scale / (angle * (pow(x_45_scale, 2.0) * ((double) M_PI)))))))) / ((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;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double tmp;
if (Math.abs(b) <= 1.55e-81) {
tmp = 180.0 * (Math.atan((90.0 * (x_45_scale * (-1.0 * (y_45_scale / (angle * (Math.pow(x_45_scale, 2.0) * Math.PI))))))) / 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;
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = 0.005555555555555556 * (angle * math.pi) tmp = 0 if math.fabs(b) <= 1.55e-81: tmp = 180.0 * (math.atan((90.0 * (x_45_scale * (-1.0 * (y_45_scale / (angle * (math.pow(x_45_scale, 2.0) * math.pi))))))) / 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
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) tmp = 0.0 if (abs(b) <= 1.55e-81) tmp = Float64(180.0 * Float64(atan(Float64(90.0 * Float64(x_45_scale * Float64(-1.0 * Float64(y_45_scale / Float64(angle * Float64((x_45_scale ^ 2.0) * pi))))))) / 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
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) t_0 = 0.005555555555555556 * (angle * pi); tmp = 0.0; if (abs(b) <= 1.55e-81) tmp = 180.0 * (atan((90.0 * (x_45_scale * (-1.0 * (y_45_scale / (angle * ((x_45_scale ^ 2.0) * pi))))))) / 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
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[b], $MachinePrecision], 1.55e-81], N[(180.0 * N[(N[ArcTan[N[(90.0 * N[(x$45$scale * N[(-1.0 * N[(y$45$scale / N[(angle * N[(N[Power[x$45$scale, 2.0], $MachinePrecision] * Pi), $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}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;\left|b\right| \leq 1.55 \cdot 10^{-81}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(90 \cdot \left(x-scale \cdot \left(-1 \cdot \frac{y-scale}{angle \cdot \left({x-scale}^{2} \cdot \pi\right)}\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}
if b < 1.5499999999999999e-81Initial program 13.7%
Taylor expanded in angle around 0
Applied rewrites12.0%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
Applied rewrites12.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-PI.f6438.0%
Applied rewrites38.0%
if 1.5499999999999999e-81 < b Initial program 13.7%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.4%
Taylor expanded in angle around 0
Applied rewrites44.0%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* PI (* angle 0.005555555555555556))))
(if (<= (fabs b) 1.55e-81)
(*
180.0
(/
(atan
(*
90.0
(*
x-scale
(* -1.0 (/ y-scale (* angle (* (pow x-scale 2.0) PI)))))))
PI))
(*
180.0
(/
(atan
(*
-0.5
(* y-scale (/ 2.0 (* (* x-scale (cos t_0)) (sin t_0))))))
PI)))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = ((double) M_PI) * (angle * 0.005555555555555556);
double tmp;
if (fabs(b) <= 1.55e-81) {
tmp = 180.0 * (atan((90.0 * (x_45_scale * (-1.0 * (y_45_scale / (angle * (pow(x_45_scale, 2.0) * ((double) M_PI)))))))) / ((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;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = Math.PI * (angle * 0.005555555555555556);
double tmp;
if (Math.abs(b) <= 1.55e-81) {
tmp = 180.0 * (Math.atan((90.0 * (x_45_scale * (-1.0 * (y_45_scale / (angle * (Math.pow(x_45_scale, 2.0) * Math.PI))))))) / 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;
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = math.pi * (angle * 0.005555555555555556) tmp = 0 if math.fabs(b) <= 1.55e-81: tmp = 180.0 * (math.atan((90.0 * (x_45_scale * (-1.0 * (y_45_scale / (angle * (math.pow(x_45_scale, 2.0) * math.pi))))))) / 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
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(pi * Float64(angle * 0.005555555555555556)) tmp = 0.0 if (abs(b) <= 1.55e-81) tmp = Float64(180.0 * Float64(atan(Float64(90.0 * Float64(x_45_scale * Float64(-1.0 * Float64(y_45_scale / Float64(angle * Float64((x_45_scale ^ 2.0) * pi))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(2.0 / Float64(Float64(x_45_scale * cos(t_0)) * sin(t_0)))))) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) t_0 = pi * (angle * 0.005555555555555556); tmp = 0.0; if (abs(b) <= 1.55e-81) tmp = 180.0 * (atan((90.0 * (x_45_scale * (-1.0 * (y_45_scale / (angle * ((x_45_scale ^ 2.0) * pi))))))) / 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
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[b], $MachinePrecision], 1.55e-81], N[(180.0 * N[(N[ArcTan[N[(90.0 * N[(x$45$scale * N[(-1.0 * N[(y$45$scale / N[(angle * N[(N[Power[x$45$scale, 2.0], $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(2.0 / N[(N[(x$45$scale * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
t_0 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\
\mathbf{if}\;\left|b\right| \leq 1.55 \cdot 10^{-81}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(90 \cdot \left(x-scale \cdot \left(-1 \cdot \frac{y-scale}{angle \cdot \left({x-scale}^{2} \cdot \pi\right)}\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \frac{2}{\left(x-scale \cdot \cos t\_0\right) \cdot \sin t\_0}\right)\right)}{\pi}\\
\end{array}
if b < 1.5499999999999999e-81Initial program 13.7%
Taylor expanded in angle around 0
Applied rewrites12.0%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
Applied rewrites12.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-PI.f6438.0%
Applied rewrites38.0%
if 1.5499999999999999e-81 < b Initial program 13.7%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6444.4%
Applied rewrites44.5%
Taylor expanded in angle around 0
Applied rewrites44.1%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(if (<= (fabs b) 4.5e-56)
(*
180.0
(/
(atan
(*
90.0
(*
x-scale
(* -1.0 (/ y-scale (* angle (* (pow x-scale 2.0) PI)))))))
PI))
(*
180.0
(/
(atan (* -0.5 (* y-scale (/ 360.0 (* angle (* x-scale PI))))))
PI))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (fabs(b) <= 4.5e-56) {
tmp = 180.0 * (atan((90.0 * (x_45_scale * (-1.0 * (y_45_scale / (angle * (pow(x_45_scale, 2.0) * ((double) M_PI)))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * (360.0 / (angle * (x_45_scale * ((double) M_PI))))))) / ((double) M_PI));
}
return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (Math.abs(b) <= 4.5e-56) {
tmp = 180.0 * (Math.atan((90.0 * (x_45_scale * (-1.0 * (y_45_scale / (angle * (Math.pow(x_45_scale, 2.0) * Math.PI))))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * (360.0 / (angle * (x_45_scale * Math.PI)))))) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): tmp = 0 if math.fabs(b) <= 4.5e-56: tmp = 180.0 * (math.atan((90.0 * (x_45_scale * (-1.0 * (y_45_scale / (angle * (math.pow(x_45_scale, 2.0) * math.pi))))))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (y_45_scale * (360.0 / (angle * (x_45_scale * math.pi)))))) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0 if (abs(b) <= 4.5e-56) tmp = Float64(180.0 * Float64(atan(Float64(90.0 * Float64(x_45_scale * Float64(-1.0 * Float64(y_45_scale / Float64(angle * Float64((x_45_scale ^ 2.0) * pi))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(360.0 / Float64(angle * Float64(x_45_scale * pi)))))) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0; if (abs(b) <= 4.5e-56) tmp = 180.0 * (atan((90.0 * (x_45_scale * (-1.0 * (y_45_scale / (angle * ((x_45_scale ^ 2.0) * pi))))))) / pi); else tmp = 180.0 * (atan((-0.5 * (y_45_scale * (360.0 / (angle * (x_45_scale * pi)))))) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[N[Abs[b], $MachinePrecision], 4.5e-56], N[(180.0 * N[(N[ArcTan[N[(90.0 * N[(x$45$scale * N[(-1.0 * N[(y$45$scale / N[(angle * N[(N[Power[x$45$scale, 2.0], $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(360.0 / N[(angle * N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\left|b\right| \leq 4.5 \cdot 10^{-56}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(90 \cdot \left(x-scale \cdot \left(-1 \cdot \frac{y-scale}{angle \cdot \left({x-scale}^{2} \cdot \pi\right)}\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \frac{360}{angle \cdot \left(x-scale \cdot \pi\right)}\right)\right)}{\pi}\\
\end{array}
if b < 4.5000000000000001e-56Initial program 13.7%
Taylor expanded in angle around 0
Applied rewrites12.0%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
Applied rewrites12.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-PI.f6438.0%
Applied rewrites38.0%
if 4.5000000000000001e-56 < b Initial program 13.7%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6444.4%
Applied rewrites44.5%
Taylor expanded in angle around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6438.1%
Applied rewrites38.1%
(FPCore (a b angle x-scale y-scale) :precision binary64 (* 180.0 (/ (atan (* -0.5 (* y-scale (/ 360.0 (* angle (* x-scale PI)))))) PI)))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (atan((-0.5 * (y_45_scale * (360.0 / (angle * (x_45_scale * ((double) M_PI))))))) / ((double) M_PI));
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (Math.atan((-0.5 * (y_45_scale * (360.0 / (angle * (x_45_scale * Math.PI)))))) / Math.PI);
}
def code(a, b, angle, x_45_scale, y_45_scale): return 180.0 * (math.atan((-0.5 * (y_45_scale * (360.0 / (angle * (x_45_scale * math.pi)))))) / math.pi)
function code(a, b, angle, x_45_scale, y_45_scale) return Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(360.0 / Float64(angle * Float64(x_45_scale * pi)))))) / pi)) end
function tmp = code(a, b, angle, x_45_scale, y_45_scale) tmp = 180.0 * (atan((-0.5 * (y_45_scale * (360.0 / (angle * (x_45_scale * pi)))))) / pi); end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(360.0 / N[(angle * N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \frac{360}{angle \cdot \left(x-scale \cdot \pi\right)}\right)\right)}{\pi}
Initial program 13.7%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6444.4%
Applied rewrites44.5%
Taylor expanded in angle around 0
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6438.1%
Applied rewrites38.1%
(FPCore (a b angle x-scale y-scale) :precision binary64 (* 180.0 (/ (atan (* -0.5 (* 360.0 (/ y-scale (* angle (* x-scale PI)))))) PI)))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * ((double) M_PI))))))) / ((double) M_PI));
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (Math.atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * Math.PI)))))) / Math.PI);
}
def code(a, b, angle, x_45_scale, y_45_scale): return 180.0 * (math.atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * math.pi)))))) / math.pi)
function code(a, b, angle, x_45_scale, y_45_scale) return Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(360.0 * Float64(y_45_scale / Float64(angle * Float64(x_45_scale * pi)))))) / pi)) end
function tmp = code(a, b, angle, x_45_scale, y_45_scale) tmp = 180.0 * (atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * pi)))))) / pi); end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(360.0 * N[(y$45$scale / N[(angle * N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(360 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)\right)}{\pi}
Initial program 13.7%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.4%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6438.1%
Applied rewrites38.1%
(FPCore (a b angle x-scale y-scale) :precision binary64 (* 180.0 (/ (atan (* -90.0 (/ y-scale (* angle (* x-scale PI))))) PI)))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (atan((-90.0 * (y_45_scale / (angle * (x_45_scale * ((double) M_PI)))))) / ((double) M_PI));
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (Math.atan((-90.0 * (y_45_scale / (angle * (x_45_scale * Math.PI))))) / Math.PI);
}
def code(a, b, angle, x_45_scale, y_45_scale): return 180.0 * (math.atan((-90.0 * (y_45_scale / (angle * (x_45_scale * math.pi))))) / math.pi)
function code(a, b, angle, x_45_scale, y_45_scale) return Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(y_45_scale / Float64(angle * Float64(x_45_scale * pi))))) / pi)) end
function tmp = code(a, b, angle, x_45_scale, y_45_scale) tmp = 180.0 * (atan((-90.0 * (y_45_scale / (angle * (x_45_scale * pi))))) / pi); end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(y$45$scale / N[(angle * N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)}{\pi}
Initial program 13.7%
Taylor expanded in angle around 0
Applied rewrites12.0%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
Applied rewrites12.7%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6412.2%
Applied rewrites12.2%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6434.5%
Applied rewrites34.5%
(FPCore (a b angle x-scale y-scale) :precision binary64 (* 180.0 (/ (atan (* -90.0 (/ x-scale (* angle (* y-scale PI))))) PI)))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (atan((-90.0 * (x_45_scale / (angle * (y_45_scale * ((double) M_PI)))))) / ((double) M_PI));
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (Math.atan((-90.0 * (x_45_scale / (angle * (y_45_scale * Math.PI))))) / Math.PI);
}
def code(a, b, angle, x_45_scale, y_45_scale): return 180.0 * (math.atan((-90.0 * (x_45_scale / (angle * (y_45_scale * math.pi))))) / math.pi)
function code(a, b, angle, x_45_scale, y_45_scale) return Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(x_45_scale / Float64(angle * Float64(y_45_scale * pi))))) / pi)) end
function tmp = code(a, b, angle, x_45_scale, y_45_scale) tmp = 180.0 * (atan((-90.0 * (x_45_scale / (angle * (y_45_scale * pi))))) / pi); end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(x$45$scale / N[(angle * N[(y$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{x-scale}{angle \cdot \left(y-scale \cdot \pi\right)}\right)}{\pi}
Initial program 13.7%
Taylor expanded in angle around 0
Applied rewrites12.0%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
Applied rewrites12.7%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6412.2%
Applied rewrites12.2%
herbie shell --seed 2025258
(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)))