
(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 12 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.005555555555555556 (* angle PI)))
(t_1 (cos t_0))
(t_2 (sin t_0))
(t_3 (* (* PI angle) 0.005555555555555556))
(t_4 (* (sin t_3) (fabs a)))
(t_5 (* x-scale (* t_1 t_2)))
(t_6 (fma t_4 t_4 (* (* (fma (cos (* t_3 2.0)) 0.5 0.5) b) b))))
(if (<= (fabs a) 2.5e-51)
(*
180.0
(/
(atan
(* -0.5 (/ (* y-scale (+ (sqrt (pow t_1 4.0)) (pow t_1 2.0))) t_5)))
PI))
(if (<= (fabs a) 1.02e+152)
(*
180.0
(/
(atan
(*
-0.5
(/
(* y-scale (+ (sqrt (pow t_6 2.0)) t_6))
(* x-scale (* t_1 (* t_2 (- (pow b 2.0) (pow (fabs a) 2.0))))))))
PI))
(*
180.0
(/
(atan
(* 0.5 (/ (* y-scale (+ (sqrt (pow t_2 4.0)) (pow t_2 2.0))) 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 = cos(t_0);
double t_2 = sin(t_0);
double t_3 = (((double) M_PI) * angle) * 0.005555555555555556;
double t_4 = sin(t_3) * fabs(a);
double t_5 = x_45_scale * (t_1 * t_2);
double t_6 = fma(t_4, t_4, ((fma(cos((t_3 * 2.0)), 0.5, 0.5) * b) * b));
double tmp;
if (fabs(a) <= 2.5e-51) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(t_1, 4.0)) + pow(t_1, 2.0))) / t_5))) / ((double) M_PI));
} else if (fabs(a) <= 1.02e+152) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(t_6, 2.0)) + t_6)) / (x_45_scale * (t_1 * (t_2 * (pow(b, 2.0) - pow(fabs(a), 2.0)))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt(pow(t_2, 4.0)) + pow(t_2, 2.0))) / t_5))) / ((double) M_PI));
}
return tmp;
}
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = cos(t_0) t_2 = sin(t_0) t_3 = Float64(Float64(pi * angle) * 0.005555555555555556) t_4 = Float64(sin(t_3) * abs(a)) t_5 = Float64(x_45_scale * Float64(t_1 * t_2)) t_6 = fma(t_4, t_4, Float64(Float64(fma(cos(Float64(t_3 * 2.0)), 0.5, 0.5) * b) * b)) tmp = 0.0 if (abs(a) <= 2.5e-51) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_1 ^ 4.0)) + (t_1 ^ 2.0))) / t_5))) / pi)); elseif (abs(a) <= 1.02e+152) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_6 ^ 2.0)) + t_6)) / Float64(x_45_scale * Float64(t_1 * Float64(t_2 * Float64((b ^ 2.0) - (abs(a) ^ 2.0)))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_2 ^ 4.0)) + (t_2 ^ 2.0))) / t_5))) / pi)); end return 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[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$4 = N[(N[Sin[t$95$3], $MachinePrecision] * N[Abs[a], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(x$45$scale * N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$4 * t$95$4 + N[(N[(N[(N[Cos[N[(t$95$3 * 2.0), $MachinePrecision]], $MachinePrecision] * 0.5 + 0.5), $MachinePrecision] * b), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[a], $MachinePrecision], 2.5e-51], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$1, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[a], $MachinePrecision], 1.02e+152], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$6, 2.0], $MachinePrecision]], $MachinePrecision] + t$95$6), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$1 * N[(t$95$2 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[N[Abs[a], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$2, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$2, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \cos t\_0\\
t_2 := \sin t\_0\\
t_3 := \left(\pi \cdot angle\right) \cdot 0.005555555555555556\\
t_4 := \sin t\_3 \cdot \left|a\right|\\
t_5 := x-scale \cdot \left(t\_1 \cdot t\_2\right)\\
t_6 := \mathsf{fma}\left(t\_4, t\_4, \left(\mathsf{fma}\left(\cos \left(t\_3 \cdot 2\right), 0.5, 0.5\right) \cdot b\right) \cdot b\right)\\
\mathbf{if}\;\left|a\right| \leq 2.5 \cdot 10^{-51}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_1}^{4}} + {t\_1}^{2}\right)}{t\_5}\right)}{\pi}\\
\mathbf{elif}\;\left|a\right| \leq 1.02 \cdot 10^{+152}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_6}^{2}} + t\_6\right)}{x-scale \cdot \left(t\_1 \cdot \left(t\_2 \cdot \left({b}^{2} - {\left(\left|a\right|\right)}^{2}\right)\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_2}^{4}} + {t\_2}^{2}\right)}{t\_5}\right)}{\pi}\\
\end{array}
if a < 2.50000000000000002e-51Initial program 13.4%
Taylor expanded in x-scale around 0
Applied rewrites24.1%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.9%
if 2.50000000000000002e-51 < a < 1.01999999999999999e152Initial program 13.4%
Taylor expanded in x-scale around 0
Applied rewrites24.1%
Applied rewrites24.1%
Applied rewrites25.8%
if 1.01999999999999999e152 < a Initial program 13.4%
Taylor expanded in x-scale around 0
Applied rewrites24.1%
Taylor expanded in a around inf
lower-*.f64N/A
Applied rewrites37.0%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (cos t_0))
(t_2 (sin t_0))
(t_3 (pow (fabs b) 2.0)))
(if (<= (fabs b) 5.2e-81)
(*
180.0
(/
(atan
(*
0.5
(/
(* y-scale (+ (sqrt (pow t_2 4.0)) (pow t_2 2.0)))
(* x-scale (* t_1 t_2)))))
PI))
(if (<= (fabs b) 1.12e+150)
(*
180.0
(/
(atan
(*
-0.5
(/
(* y-scale (* t_3 2.0))
(* x-scale (* t_1 (* t_2 (- t_3 (pow a 2.0))))))))
PI))
(*
180.0
(/
(atan (* -90.0 (/ (* 2.0 (/ y-scale x-scale)) (* angle PI))))
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);
double t_2 = sin(t_0);
double t_3 = pow(fabs(b), 2.0);
double tmp;
if (fabs(b) <= 5.2e-81) {
tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt(pow(t_2, 4.0)) + pow(t_2, 2.0))) / (x_45_scale * (t_1 * t_2))))) / ((double) M_PI));
} else if (fabs(b) <= 1.12e+150) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (t_3 * 2.0)) / (x_45_scale * (t_1 * (t_2 * (t_3 - pow(a, 2.0)))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-90.0 * ((2.0 * (y_45_scale / x_45_scale)) / (angle * ((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 t_0 = 0.005555555555555556 * (angle * Math.PI);
double t_1 = Math.cos(t_0);
double t_2 = Math.sin(t_0);
double t_3 = Math.pow(Math.abs(b), 2.0);
double tmp;
if (Math.abs(b) <= 5.2e-81) {
tmp = 180.0 * (Math.atan((0.5 * ((y_45_scale * (Math.sqrt(Math.pow(t_2, 4.0)) + Math.pow(t_2, 2.0))) / (x_45_scale * (t_1 * t_2))))) / Math.PI);
} else if (Math.abs(b) <= 1.12e+150) {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * (t_3 * 2.0)) / (x_45_scale * (t_1 * (t_2 * (t_3 - Math.pow(a, 2.0)))))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-90.0 * ((2.0 * (y_45_scale / x_45_scale)) / (angle * Math.PI)))) / 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) t_2 = math.sin(t_0) t_3 = math.pow(math.fabs(b), 2.0) tmp = 0 if math.fabs(b) <= 5.2e-81: tmp = 180.0 * (math.atan((0.5 * ((y_45_scale * (math.sqrt(math.pow(t_2, 4.0)) + math.pow(t_2, 2.0))) / (x_45_scale * (t_1 * t_2))))) / math.pi) elif math.fabs(b) <= 1.12e+150: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * (t_3 * 2.0)) / (x_45_scale * (t_1 * (t_2 * (t_3 - math.pow(a, 2.0)))))))) / math.pi) else: tmp = 180.0 * (math.atan((-90.0 * ((2.0 * (y_45_scale / x_45_scale)) / (angle * math.pi)))) / 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 = cos(t_0) t_2 = sin(t_0) t_3 = abs(b) ^ 2.0 tmp = 0.0 if (abs(b) <= 5.2e-81) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_2 ^ 4.0)) + (t_2 ^ 2.0))) / Float64(x_45_scale * Float64(t_1 * t_2))))) / pi)); elseif (abs(b) <= 1.12e+150) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(t_3 * 2.0)) / Float64(x_45_scale * Float64(t_1 * Float64(t_2 * Float64(t_3 - (a ^ 2.0)))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(Float64(2.0 * Float64(y_45_scale / x_45_scale)) / Float64(angle * pi)))) / 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); t_2 = sin(t_0); t_3 = abs(b) ^ 2.0; tmp = 0.0; if (abs(b) <= 5.2e-81) tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt((t_2 ^ 4.0)) + (t_2 ^ 2.0))) / (x_45_scale * (t_1 * t_2))))) / pi); elseif (abs(b) <= 1.12e+150) tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (t_3 * 2.0)) / (x_45_scale * (t_1 * (t_2 * (t_3 - (a ^ 2.0)))))))) / pi); else tmp = 180.0 * (atan((-90.0 * ((2.0 * (y_45_scale / x_45_scale)) / (angle * pi)))) / 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[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$3 = N[Power[N[Abs[b], $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[N[Abs[b], $MachinePrecision], 5.2e-81], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$2, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$2, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[b], $MachinePrecision], 1.12e+150], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(t$95$3 * 2.0), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$1 * N[(t$95$2 * N[(t$95$3 - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(N[(2.0 * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(angle * Pi), $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\\
t_2 := \sin t\_0\\
t_3 := {\left(\left|b\right|\right)}^{2}\\
\mathbf{if}\;\left|b\right| \leq 5.2 \cdot 10^{-81}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_2}^{4}} + {t\_2}^{2}\right)}{x-scale \cdot \left(t\_1 \cdot t\_2\right)}\right)}{\pi}\\
\mathbf{elif}\;\left|b\right| \leq 1.12 \cdot 10^{+150}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(t\_3 \cdot 2\right)}{x-scale \cdot \left(t\_1 \cdot \left(t\_2 \cdot \left(t\_3 - {a}^{2}\right)\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{2 \cdot \frac{y-scale}{x-scale}}{angle \cdot \pi}\right)}{\pi}\\
\end{array}
if b < 5.1999999999999998e-81Initial program 13.4%
Taylor expanded in x-scale around 0
Applied rewrites24.1%
Taylor expanded in a around inf
lower-*.f64N/A
Applied rewrites37.0%
if 5.1999999999999998e-81 < b < 1.12e150Initial program 13.4%
Taylor expanded in x-scale around 0
Applied rewrites24.1%
Taylor expanded in b around inf
lower-*.f64N/A
lower-pow.f64N/A
lower-+.f64N/A
Applied rewrites25.9%
Taylor expanded in angle around 0
Applied rewrites25.8%
if 1.12e150 < b Initial program 13.4%
Taylor expanded in angle around 0
Applied rewrites11.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites39.0%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f6438.3%
Applied rewrites38.3%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (sin t_0))
(t_2 (cos t_0))
(t_3 (* x-scale (* t_2 t_1))))
(if (<= (fabs a) 7.5e+136)
(*
180.0
(/
(atan
(* -0.5 (/ (* y-scale (+ (sqrt (pow t_2 4.0)) (pow t_2 2.0))) t_3)))
PI))
(*
180.0
(/
(atan
(* 0.5 (/ (* y-scale (+ (sqrt (pow t_1 4.0)) (pow t_1 2.0))) t_3)))
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 t_2 = cos(t_0);
double t_3 = x_45_scale * (t_2 * t_1);
double tmp;
if (fabs(a) <= 7.5e+136) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(t_2, 4.0)) + pow(t_2, 2.0))) / t_3))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt(pow(t_1, 4.0)) + pow(t_1, 2.0))) / t_3))) / ((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 t_2 = Math.cos(t_0);
double t_3 = x_45_scale * (t_2 * t_1);
double tmp;
if (Math.abs(a) <= 7.5e+136) {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * (Math.sqrt(Math.pow(t_2, 4.0)) + Math.pow(t_2, 2.0))) / t_3))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((0.5 * ((y_45_scale * (Math.sqrt(Math.pow(t_1, 4.0)) + Math.pow(t_1, 2.0))) / t_3))) / 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) t_2 = math.cos(t_0) t_3 = x_45_scale * (t_2 * t_1) tmp = 0 if math.fabs(a) <= 7.5e+136: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * (math.sqrt(math.pow(t_2, 4.0)) + math.pow(t_2, 2.0))) / t_3))) / math.pi) else: tmp = 180.0 * (math.atan((0.5 * ((y_45_scale * (math.sqrt(math.pow(t_1, 4.0)) + math.pow(t_1, 2.0))) / t_3))) / 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) t_2 = cos(t_0) t_3 = Float64(x_45_scale * Float64(t_2 * t_1)) tmp = 0.0 if (abs(a) <= 7.5e+136) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_2 ^ 4.0)) + (t_2 ^ 2.0))) / t_3))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_1 ^ 4.0)) + (t_1 ^ 2.0))) / t_3))) / 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); t_2 = cos(t_0); t_3 = x_45_scale * (t_2 * t_1); tmp = 0.0; if (abs(a) <= 7.5e+136) tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt((t_2 ^ 4.0)) + (t_2 ^ 2.0))) / t_3))) / pi); else tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt((t_1 ^ 4.0)) + (t_1 ^ 2.0))) / t_3))) / 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]}, Block[{t$95$2 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$3 = N[(x$45$scale * N[(t$95$2 * t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[a], $MachinePrecision], 7.5e+136], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$2, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$2, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$1, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
t_2 := \cos t\_0\\
t_3 := x-scale \cdot \left(t\_2 \cdot t\_1\right)\\
\mathbf{if}\;\left|a\right| \leq 7.5 \cdot 10^{+136}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_2}^{4}} + {t\_2}^{2}\right)}{t\_3}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_1}^{4}} + {t\_1}^{2}\right)}{t\_3}\right)}{\pi}\\
\end{array}
if a < 7.5000000000000002e136Initial program 13.4%
Taylor expanded in x-scale around 0
Applied rewrites24.1%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.9%
if 7.5000000000000002e136 < a Initial program 13.4%
Taylor expanded in x-scale around 0
Applied rewrites24.1%
Taylor expanded in a around inf
lower-*.f64N/A
Applied rewrites37.0%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (pow (fabs b) 2.0)) (t_1 (* 0.005555555555555556 (* angle PI))))
(if (<= (fabs b) 3.9e-150)
(*
180.0
(/
(atan
(*
-28.64788975654116
(/
(*
(*
(+
(/ 1.0 (* x-scale x-scale))
(sqrt (/ 1.0 (* (* x-scale x-scale) (* x-scale x-scale)))))
y-scale)
x-scale)
angle)))
PI))
(if (<= (fabs b) 1.12e+150)
(*
180.0
(/
(atan
(*
-0.5
(/
(* y-scale (* t_0 2.0))
(* x-scale (* (cos t_1) (* (sin t_1) (- t_0 (pow a 2.0))))))))
PI))
(*
180.0
(/
(atan (* -90.0 (/ (* 2.0 (/ y-scale x-scale)) (* angle PI))))
PI))))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = pow(fabs(b), 2.0);
double t_1 = 0.005555555555555556 * (angle * ((double) M_PI));
double tmp;
if (fabs(b) <= 3.9e-150) {
tmp = 180.0 * (atan((-28.64788975654116 * (((((1.0 / (x_45_scale * x_45_scale)) + sqrt((1.0 / ((x_45_scale * x_45_scale) * (x_45_scale * x_45_scale))))) * y_45_scale) * x_45_scale) / angle))) / ((double) M_PI));
} else if (fabs(b) <= 1.12e+150) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (t_0 * 2.0)) / (x_45_scale * (cos(t_1) * (sin(t_1) * (t_0 - pow(a, 2.0)))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-90.0 * ((2.0 * (y_45_scale / x_45_scale)) / (angle * ((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 t_0 = Math.pow(Math.abs(b), 2.0);
double t_1 = 0.005555555555555556 * (angle * Math.PI);
double tmp;
if (Math.abs(b) <= 3.9e-150) {
tmp = 180.0 * (Math.atan((-28.64788975654116 * (((((1.0 / (x_45_scale * x_45_scale)) + Math.sqrt((1.0 / ((x_45_scale * x_45_scale) * (x_45_scale * x_45_scale))))) * y_45_scale) * x_45_scale) / angle))) / Math.PI);
} else if (Math.abs(b) <= 1.12e+150) {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * (t_0 * 2.0)) / (x_45_scale * (Math.cos(t_1) * (Math.sin(t_1) * (t_0 - Math.pow(a, 2.0)))))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-90.0 * ((2.0 * (y_45_scale / x_45_scale)) / (angle * Math.PI)))) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = math.pow(math.fabs(b), 2.0) t_1 = 0.005555555555555556 * (angle * math.pi) tmp = 0 if math.fabs(b) <= 3.9e-150: tmp = 180.0 * (math.atan((-28.64788975654116 * (((((1.0 / (x_45_scale * x_45_scale)) + math.sqrt((1.0 / ((x_45_scale * x_45_scale) * (x_45_scale * x_45_scale))))) * y_45_scale) * x_45_scale) / angle))) / math.pi) elif math.fabs(b) <= 1.12e+150: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * (t_0 * 2.0)) / (x_45_scale * (math.cos(t_1) * (math.sin(t_1) * (t_0 - math.pow(a, 2.0)))))))) / math.pi) else: tmp = 180.0 * (math.atan((-90.0 * ((2.0 * (y_45_scale / x_45_scale)) / (angle * math.pi)))) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = abs(b) ^ 2.0 t_1 = Float64(0.005555555555555556 * Float64(angle * pi)) tmp = 0.0 if (abs(b) <= 3.9e-150) tmp = Float64(180.0 * Float64(atan(Float64(-28.64788975654116 * Float64(Float64(Float64(Float64(Float64(1.0 / Float64(x_45_scale * x_45_scale)) + sqrt(Float64(1.0 / Float64(Float64(x_45_scale * x_45_scale) * Float64(x_45_scale * x_45_scale))))) * y_45_scale) * x_45_scale) / angle))) / pi)); elseif (abs(b) <= 1.12e+150) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(t_0 * 2.0)) / Float64(x_45_scale * Float64(cos(t_1) * Float64(sin(t_1) * Float64(t_0 - (a ^ 2.0)))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(Float64(2.0 * Float64(y_45_scale / x_45_scale)) / Float64(angle * pi)))) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) t_0 = abs(b) ^ 2.0; t_1 = 0.005555555555555556 * (angle * pi); tmp = 0.0; if (abs(b) <= 3.9e-150) tmp = 180.0 * (atan((-28.64788975654116 * (((((1.0 / (x_45_scale * x_45_scale)) + sqrt((1.0 / ((x_45_scale * x_45_scale) * (x_45_scale * x_45_scale))))) * y_45_scale) * x_45_scale) / angle))) / pi); elseif (abs(b) <= 1.12e+150) tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (t_0 * 2.0)) / (x_45_scale * (cos(t_1) * (sin(t_1) * (t_0 - (a ^ 2.0)))))))) / pi); else tmp = 180.0 * (atan((-90.0 * ((2.0 * (y_45_scale / x_45_scale)) / (angle * pi)))) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[Power[N[Abs[b], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$1 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[b], $MachinePrecision], 3.9e-150], N[(180.0 * N[(N[ArcTan[N[(-28.64788975654116 * N[(N[(N[(N[(N[(1.0 / N[(x$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision] + N[Sqrt[N[(1.0 / N[(N[(x$45$scale * x$45$scale), $MachinePrecision] * N[(x$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * y$45$scale), $MachinePrecision] * x$45$scale), $MachinePrecision] / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[b], $MachinePrecision], 1.12e+150], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(t$95$0 * 2.0), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(N[Cos[t$95$1], $MachinePrecision] * N[(N[Sin[t$95$1], $MachinePrecision] * N[(t$95$0 - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(N[(2.0 * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
t_0 := {\left(\left|b\right|\right)}^{2}\\
t_1 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;\left|b\right| \leq 3.9 \cdot 10^{-150}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-28.64788975654116 \cdot \frac{\left(\left(\frac{1}{x-scale \cdot x-scale} + \sqrt{\frac{1}{\left(x-scale \cdot x-scale\right) \cdot \left(x-scale \cdot x-scale\right)}}\right) \cdot y-scale\right) \cdot x-scale}{angle}\right)}{\pi}\\
\mathbf{elif}\;\left|b\right| \leq 1.12 \cdot 10^{+150}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(t\_0 \cdot 2\right)}{x-scale \cdot \left(\cos t\_1 \cdot \left(\sin t\_1 \cdot \left(t\_0 - {a}^{2}\right)\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{2 \cdot \frac{y-scale}{x-scale}}{angle \cdot \pi}\right)}{\pi}\\
\end{array}
if b < 3.9000000000000002e-150Initial program 13.4%
Taylor expanded in angle around 0
Applied rewrites11.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites39.0%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lift-*.f64N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6439.0%
Applied rewrites39.0%
Evaluated real constant39.0%
if 3.9000000000000002e-150 < b < 1.12e150Initial program 13.4%
Taylor expanded in x-scale around 0
Applied rewrites24.1%
Taylor expanded in b around inf
lower-*.f64N/A
lower-pow.f64N/A
lower-+.f64N/A
Applied rewrites25.9%
Taylor expanded in angle around 0
Applied rewrites25.8%
if 1.12e150 < b Initial program 13.4%
Taylor expanded in angle around 0
Applied rewrites11.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites39.0%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f6438.3%
Applied rewrites38.3%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(if (<= (fabs a) 7.6e-134)
(*
180.0
(/ (atan (* -90.0 (/ (* 2.0 (/ y-scale x-scale)) (* angle PI)))) PI))
(*
180.0
(/
(atan
(*
-28.64788975654116
(/
(*
(*
(+
(/ 1.0 (* x-scale x-scale))
(sqrt (/ 1.0 (* (* x-scale x-scale) (* x-scale x-scale)))))
y-scale)
x-scale)
angle)))
PI))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (fabs(a) <= 7.6e-134) {
tmp = 180.0 * (atan((-90.0 * ((2.0 * (y_45_scale / x_45_scale)) / (angle * ((double) M_PI))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-28.64788975654116 * (((((1.0 / (x_45_scale * x_45_scale)) + sqrt((1.0 / ((x_45_scale * x_45_scale) * (x_45_scale * x_45_scale))))) * y_45_scale) * x_45_scale) / angle))) / ((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(a) <= 7.6e-134) {
tmp = 180.0 * (Math.atan((-90.0 * ((2.0 * (y_45_scale / x_45_scale)) / (angle * Math.PI)))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-28.64788975654116 * (((((1.0 / (x_45_scale * x_45_scale)) + Math.sqrt((1.0 / ((x_45_scale * x_45_scale) * (x_45_scale * x_45_scale))))) * y_45_scale) * x_45_scale) / angle))) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): tmp = 0 if math.fabs(a) <= 7.6e-134: tmp = 180.0 * (math.atan((-90.0 * ((2.0 * (y_45_scale / x_45_scale)) / (angle * math.pi)))) / math.pi) else: tmp = 180.0 * (math.atan((-28.64788975654116 * (((((1.0 / (x_45_scale * x_45_scale)) + math.sqrt((1.0 / ((x_45_scale * x_45_scale) * (x_45_scale * x_45_scale))))) * y_45_scale) * x_45_scale) / angle))) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0 if (abs(a) <= 7.6e-134) tmp = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(Float64(2.0 * Float64(y_45_scale / x_45_scale)) / Float64(angle * pi)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-28.64788975654116 * Float64(Float64(Float64(Float64(Float64(1.0 / Float64(x_45_scale * x_45_scale)) + sqrt(Float64(1.0 / Float64(Float64(x_45_scale * x_45_scale) * Float64(x_45_scale * x_45_scale))))) * y_45_scale) * x_45_scale) / angle))) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0; if (abs(a) <= 7.6e-134) tmp = 180.0 * (atan((-90.0 * ((2.0 * (y_45_scale / x_45_scale)) / (angle * pi)))) / pi); else tmp = 180.0 * (atan((-28.64788975654116 * (((((1.0 / (x_45_scale * x_45_scale)) + sqrt((1.0 / ((x_45_scale * x_45_scale) * (x_45_scale * x_45_scale))))) * y_45_scale) * x_45_scale) / angle))) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[N[Abs[a], $MachinePrecision], 7.6e-134], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(N[(2.0 * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-28.64788975654116 * N[(N[(N[(N[(N[(1.0 / N[(x$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision] + N[Sqrt[N[(1.0 / N[(N[(x$45$scale * x$45$scale), $MachinePrecision] * N[(x$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * y$45$scale), $MachinePrecision] * x$45$scale), $MachinePrecision] / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\left|a\right| \leq 7.6 \cdot 10^{-134}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{2 \cdot \frac{y-scale}{x-scale}}{angle \cdot \pi}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-28.64788975654116 \cdot \frac{\left(\left(\frac{1}{x-scale \cdot x-scale} + \sqrt{\frac{1}{\left(x-scale \cdot x-scale\right) \cdot \left(x-scale \cdot x-scale\right)}}\right) \cdot y-scale\right) \cdot x-scale}{angle}\right)}{\pi}\\
\end{array}
if a < 7.60000000000000006e-134Initial program 13.4%
Taylor expanded in angle around 0
Applied rewrites11.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites39.0%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f6438.3%
Applied rewrites38.3%
if 7.60000000000000006e-134 < a Initial program 13.4%
Taylor expanded in angle around 0
Applied rewrites11.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites39.0%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lift-*.f64N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6439.0%
Applied rewrites39.0%
Evaluated real constant39.0%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(if (<= (fabs a) 7.6e-134)
(*
180.0
(/ (atan (* -90.0 (/ (* 2.0 (/ y-scale x-scale)) (* angle PI)))) PI))
(*
180.0
(/
(atan
(/
(*
(/ -90.0 PI)
(*
(*
(+ (/ (sqrt 1.0) (* x-scale x-scale)) (/ 1.0 (* x-scale x-scale)))
y-scale)
x-scale))
angle))
PI))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (fabs(a) <= 7.6e-134) {
tmp = 180.0 * (atan((-90.0 * ((2.0 * (y_45_scale / x_45_scale)) / (angle * ((double) M_PI))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((((-90.0 / ((double) M_PI)) * ((((sqrt(1.0) / (x_45_scale * x_45_scale)) + (1.0 / (x_45_scale * x_45_scale))) * y_45_scale) * x_45_scale)) / angle)) / ((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(a) <= 7.6e-134) {
tmp = 180.0 * (Math.atan((-90.0 * ((2.0 * (y_45_scale / x_45_scale)) / (angle * Math.PI)))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((((-90.0 / Math.PI) * ((((Math.sqrt(1.0) / (x_45_scale * x_45_scale)) + (1.0 / (x_45_scale * x_45_scale))) * y_45_scale) * x_45_scale)) / angle)) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): tmp = 0 if math.fabs(a) <= 7.6e-134: tmp = 180.0 * (math.atan((-90.0 * ((2.0 * (y_45_scale / x_45_scale)) / (angle * math.pi)))) / math.pi) else: tmp = 180.0 * (math.atan((((-90.0 / math.pi) * ((((math.sqrt(1.0) / (x_45_scale * x_45_scale)) + (1.0 / (x_45_scale * x_45_scale))) * y_45_scale) * x_45_scale)) / angle)) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0 if (abs(a) <= 7.6e-134) tmp = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(Float64(2.0 * Float64(y_45_scale / x_45_scale)) / Float64(angle * pi)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-90.0 / pi) * Float64(Float64(Float64(Float64(sqrt(1.0) / Float64(x_45_scale * x_45_scale)) + Float64(1.0 / Float64(x_45_scale * x_45_scale))) * y_45_scale) * x_45_scale)) / angle)) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0; if (abs(a) <= 7.6e-134) tmp = 180.0 * (atan((-90.0 * ((2.0 * (y_45_scale / x_45_scale)) / (angle * pi)))) / pi); else tmp = 180.0 * (atan((((-90.0 / pi) * ((((sqrt(1.0) / (x_45_scale * x_45_scale)) + (1.0 / (x_45_scale * x_45_scale))) * y_45_scale) * x_45_scale)) / angle)) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[N[Abs[a], $MachinePrecision], 7.6e-134], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(N[(2.0 * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(-90.0 / Pi), $MachinePrecision] * N[(N[(N[(N[(N[Sqrt[1.0], $MachinePrecision] / N[(x$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(x$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y$45$scale), $MachinePrecision] * x$45$scale), $MachinePrecision]), $MachinePrecision] / angle), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\left|a\right| \leq 7.6 \cdot 10^{-134}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{2 \cdot \frac{y-scale}{x-scale}}{angle \cdot \pi}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\frac{-90}{\pi} \cdot \left(\left(\left(\frac{\sqrt{1}}{x-scale \cdot x-scale} + \frac{1}{x-scale \cdot x-scale}\right) \cdot y-scale\right) \cdot x-scale\right)}{angle}\right)}{\pi}\\
\end{array}
if a < 7.60000000000000006e-134Initial program 13.4%
Taylor expanded in angle around 0
Applied rewrites11.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites39.0%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f6438.3%
Applied rewrites38.3%
if 7.60000000000000006e-134 < a Initial program 13.4%
Taylor expanded in angle around 0
Applied rewrites11.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites39.0%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lift-*.f64N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6439.0%
Applied rewrites39.0%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites38.8%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(if (<= (fabs a) 7.6e-134)
(*
180.0
(/ (atan (* -90.0 (/ (* 2.0 (/ y-scale x-scale)) (* angle PI)))) PI))
(/
(*
180.0
(atan
(/
(*
(*
(*
(+ (/ (sqrt 1.0) (* x-scale x-scale)) (/ 1.0 (* x-scale x-scale)))
y-scale)
x-scale)
-90.0)
(* PI angle))))
PI)))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (fabs(a) <= 7.6e-134) {
tmp = 180.0 * (atan((-90.0 * ((2.0 * (y_45_scale / x_45_scale)) / (angle * ((double) M_PI))))) / ((double) M_PI));
} else {
tmp = (180.0 * atan(((((((sqrt(1.0) / (x_45_scale * x_45_scale)) + (1.0 / (x_45_scale * x_45_scale))) * y_45_scale) * x_45_scale) * -90.0) / (((double) M_PI) * angle)))) / ((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(a) <= 7.6e-134) {
tmp = 180.0 * (Math.atan((-90.0 * ((2.0 * (y_45_scale / x_45_scale)) / (angle * Math.PI)))) / Math.PI);
} else {
tmp = (180.0 * Math.atan(((((((Math.sqrt(1.0) / (x_45_scale * x_45_scale)) + (1.0 / (x_45_scale * x_45_scale))) * y_45_scale) * x_45_scale) * -90.0) / (Math.PI * angle)))) / Math.PI;
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): tmp = 0 if math.fabs(a) <= 7.6e-134: tmp = 180.0 * (math.atan((-90.0 * ((2.0 * (y_45_scale / x_45_scale)) / (angle * math.pi)))) / math.pi) else: tmp = (180.0 * math.atan(((((((math.sqrt(1.0) / (x_45_scale * x_45_scale)) + (1.0 / (x_45_scale * x_45_scale))) * y_45_scale) * x_45_scale) * -90.0) / (math.pi * angle)))) / math.pi return tmp
function code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0 if (abs(a) <= 7.6e-134) tmp = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(Float64(2.0 * Float64(y_45_scale / x_45_scale)) / Float64(angle * pi)))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(Float64(Float64(Float64(sqrt(1.0) / Float64(x_45_scale * x_45_scale)) + Float64(1.0 / Float64(x_45_scale * x_45_scale))) * y_45_scale) * x_45_scale) * -90.0) / Float64(pi * angle)))) / pi); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0; if (abs(a) <= 7.6e-134) tmp = 180.0 * (atan((-90.0 * ((2.0 * (y_45_scale / x_45_scale)) / (angle * pi)))) / pi); else tmp = (180.0 * atan(((((((sqrt(1.0) / (x_45_scale * x_45_scale)) + (1.0 / (x_45_scale * x_45_scale))) * y_45_scale) * x_45_scale) * -90.0) / (pi * angle)))) / pi; end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[N[Abs[a], $MachinePrecision], 7.6e-134], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(N[(2.0 * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(N[(N[(N[(N[(N[Sqrt[1.0], $MachinePrecision] / N[(x$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(x$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y$45$scale), $MachinePrecision] * x$45$scale), $MachinePrecision] * -90.0), $MachinePrecision] / N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\left|a\right| \leq 7.6 \cdot 10^{-134}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{2 \cdot \frac{y-scale}{x-scale}}{angle \cdot \pi}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(\left(\left(\frac{\sqrt{1}}{x-scale \cdot x-scale} + \frac{1}{x-scale \cdot x-scale}\right) \cdot y-scale\right) \cdot x-scale\right) \cdot -90}{\pi \cdot angle}\right)}{\pi}\\
\end{array}
if a < 7.60000000000000006e-134Initial program 13.4%
Taylor expanded in angle around 0
Applied rewrites11.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites39.0%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f6438.3%
Applied rewrites38.3%
if 7.60000000000000006e-134 < a Initial program 13.4%
Taylor expanded in angle around 0
Applied rewrites11.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites39.0%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lift-*.f64N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6439.0%
Applied rewrites39.0%
Applied rewrites38.8%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(if (<= (fabs a) 7.6e-134)
(*
180.0
(/ (atan (* -90.0 (/ (* 2.0 (/ y-scale x-scale)) (* angle PI)))) PI))
(*
(/
(atan
(/
(*
(*
(*
(+ (/ (sqrt 1.0) (* x-scale x-scale)) (/ 1.0 (* x-scale x-scale)))
y-scale)
x-scale)
-90.0)
(* PI angle)))
PI)
180.0)))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (fabs(a) <= 7.6e-134) {
tmp = 180.0 * (atan((-90.0 * ((2.0 * (y_45_scale / x_45_scale)) / (angle * ((double) M_PI))))) / ((double) M_PI));
} else {
tmp = (atan(((((((sqrt(1.0) / (x_45_scale * x_45_scale)) + (1.0 / (x_45_scale * x_45_scale))) * y_45_scale) * x_45_scale) * -90.0) / (((double) M_PI) * angle))) / ((double) M_PI)) * 180.0;
}
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(a) <= 7.6e-134) {
tmp = 180.0 * (Math.atan((-90.0 * ((2.0 * (y_45_scale / x_45_scale)) / (angle * Math.PI)))) / Math.PI);
} else {
tmp = (Math.atan(((((((Math.sqrt(1.0) / (x_45_scale * x_45_scale)) + (1.0 / (x_45_scale * x_45_scale))) * y_45_scale) * x_45_scale) * -90.0) / (Math.PI * angle))) / Math.PI) * 180.0;
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): tmp = 0 if math.fabs(a) <= 7.6e-134: tmp = 180.0 * (math.atan((-90.0 * ((2.0 * (y_45_scale / x_45_scale)) / (angle * math.pi)))) / math.pi) else: tmp = (math.atan(((((((math.sqrt(1.0) / (x_45_scale * x_45_scale)) + (1.0 / (x_45_scale * x_45_scale))) * y_45_scale) * x_45_scale) * -90.0) / (math.pi * angle))) / math.pi) * 180.0 return tmp
function code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0 if (abs(a) <= 7.6e-134) tmp = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(Float64(2.0 * Float64(y_45_scale / x_45_scale)) / Float64(angle * pi)))) / pi)); else tmp = Float64(Float64(atan(Float64(Float64(Float64(Float64(Float64(Float64(sqrt(1.0) / Float64(x_45_scale * x_45_scale)) + Float64(1.0 / Float64(x_45_scale * x_45_scale))) * y_45_scale) * x_45_scale) * -90.0) / Float64(pi * angle))) / pi) * 180.0); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0; if (abs(a) <= 7.6e-134) tmp = 180.0 * (atan((-90.0 * ((2.0 * (y_45_scale / x_45_scale)) / (angle * pi)))) / pi); else tmp = (atan(((((((sqrt(1.0) / (x_45_scale * x_45_scale)) + (1.0 / (x_45_scale * x_45_scale))) * y_45_scale) * x_45_scale) * -90.0) / (pi * angle))) / pi) * 180.0; end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[N[Abs[a], $MachinePrecision], 7.6e-134], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(N[(2.0 * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(N[ArcTan[N[(N[(N[(N[(N[(N[(N[Sqrt[1.0], $MachinePrecision] / N[(x$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(x$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y$45$scale), $MachinePrecision] * x$45$scale), $MachinePrecision] * -90.0), $MachinePrecision] / N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\left|a\right| \leq 7.6 \cdot 10^{-134}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{2 \cdot \frac{y-scale}{x-scale}}{angle \cdot \pi}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{\left(\left(\left(\frac{\sqrt{1}}{x-scale \cdot x-scale} + \frac{1}{x-scale \cdot x-scale}\right) \cdot y-scale\right) \cdot x-scale\right) \cdot -90}{\pi \cdot angle}\right)}{\pi} \cdot 180\\
\end{array}
if a < 7.60000000000000006e-134Initial program 13.4%
Taylor expanded in angle around 0
Applied rewrites11.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites39.0%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f6438.3%
Applied rewrites38.3%
if 7.60000000000000006e-134 < a Initial program 13.4%
Taylor expanded in angle around 0
Applied rewrites11.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites39.0%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lift-*.f64N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6439.0%
Applied rewrites39.0%
Applied rewrites38.8%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(if (<= (fabs b) 4.7e-197)
(* 180.0 (/ (atan 0.0) PI))
(*
180.0
(/ (atan (* -90.0 (/ (* 2.0 (/ y-scale x-scale)) (* angle PI)))) PI))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (fabs(b) <= 4.7e-197) {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-90.0 * ((2.0 * (y_45_scale / x_45_scale)) / (angle * ((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.7e-197) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-90.0 * ((2.0 * (y_45_scale / x_45_scale)) / (angle * Math.PI)))) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): tmp = 0 if math.fabs(b) <= 4.7e-197: tmp = 180.0 * (math.atan(0.0) / math.pi) else: tmp = 180.0 * (math.atan((-90.0 * ((2.0 * (y_45_scale / x_45_scale)) / (angle * math.pi)))) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0 if (abs(b) <= 4.7e-197) tmp = Float64(180.0 * Float64(atan(0.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(Float64(2.0 * Float64(y_45_scale / x_45_scale)) / Float64(angle * 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.7e-197) tmp = 180.0 * (atan(0.0) / pi); else tmp = 180.0 * (atan((-90.0 * ((2.0 * (y_45_scale / x_45_scale)) / (angle * pi)))) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[N[Abs[b], $MachinePrecision], 4.7e-197], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(N[(2.0 * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\left|b\right| \leq 4.7 \cdot 10^{-197}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{2 \cdot \frac{y-scale}{x-scale}}{angle \cdot \pi}\right)}{\pi}\\
\end{array}
if b < 4.7000000000000001e-197Initial program 13.4%
Taylor expanded in angle around 0
Applied rewrites11.7%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites7.6%
Taylor expanded in y-scale around 0
Applied rewrites18.5%
if 4.7000000000000001e-197 < b Initial program 13.4%
Taylor expanded in angle around 0
Applied rewrites11.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites39.0%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f6438.3%
Applied rewrites38.3%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(if (<= (fabs b) 4.7e-197)
(* 180.0 (/ (atan 0.0) PI))
(*
180.0
(/ (atan (* (/ -90.0 PI) (/ (* 2.0 (/ y-scale x-scale)) angle))) PI))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (fabs(b) <= 4.7e-197) {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((-90.0 / ((double) M_PI)) * ((2.0 * (y_45_scale / x_45_scale)) / angle))) / ((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.7e-197) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((-90.0 / Math.PI) * ((2.0 * (y_45_scale / x_45_scale)) / angle))) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): tmp = 0 if math.fabs(b) <= 4.7e-197: tmp = 180.0 * (math.atan(0.0) / math.pi) else: tmp = 180.0 * (math.atan(((-90.0 / math.pi) * ((2.0 * (y_45_scale / x_45_scale)) / angle))) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0 if (abs(b) <= 4.7e-197) tmp = Float64(180.0 * Float64(atan(0.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(-90.0 / pi) * Float64(Float64(2.0 * Float64(y_45_scale / x_45_scale)) / angle))) / 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.7e-197) tmp = 180.0 * (atan(0.0) / pi); else tmp = 180.0 * (atan(((-90.0 / pi) * ((2.0 * (y_45_scale / x_45_scale)) / angle))) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[N[Abs[b], $MachinePrecision], 4.7e-197], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(-90.0 / Pi), $MachinePrecision] * N[(N[(2.0 * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision] / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\left|b\right| \leq 4.7 \cdot 10^{-197}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-90}{\pi} \cdot \frac{2 \cdot \frac{y-scale}{x-scale}}{angle}\right)}{\pi}\\
\end{array}
if b < 4.7000000000000001e-197Initial program 13.4%
Taylor expanded in angle around 0
Applied rewrites11.7%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites7.6%
Taylor expanded in y-scale around 0
Applied rewrites18.5%
if 4.7000000000000001e-197 < b Initial program 13.4%
Taylor expanded in angle around 0
Applied rewrites11.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites39.0%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lift-*.f64N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6439.0%
Applied rewrites39.0%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f6438.3%
Applied rewrites38.3%
(FPCore (a b angle x-scale y-scale) :precision binary64 (if (<= (fabs b) 4.7e-197) (* 180.0 (/ (atan 0.0) PI)) (* 180.0 (/ (atan (* -180.0 (/ y-scale (* 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.7e-197) {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-180.0 * (y_45_scale / (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.7e-197) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-180.0 * (y_45_scale / (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.7e-197: tmp = 180.0 * (math.atan(0.0) / math.pi) else: tmp = 180.0 * (math.atan((-180.0 * (y_45_scale / (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.7e-197) tmp = Float64(180.0 * Float64(atan(0.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(y_45_scale / 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.7e-197) tmp = 180.0 * (atan(0.0) / pi); else tmp = 180.0 * (atan((-180.0 * (y_45_scale / (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.7e-197], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(y$45$scale / N[(angle * N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\left|b\right| \leq 4.7 \cdot 10^{-197}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)}{\pi}\\
\end{array}
if b < 4.7000000000000001e-197Initial program 13.4%
Taylor expanded in angle around 0
Applied rewrites11.7%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites7.6%
Taylor expanded in y-scale around 0
Applied rewrites18.5%
if 4.7000000000000001e-197 < b Initial program 13.4%
Taylor expanded in angle around 0
Applied rewrites11.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites39.0%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6437.1%
Applied rewrites37.1%
(FPCore (a b angle x-scale y-scale) :precision binary64 (* 180.0 (/ (atan 0.0) PI)))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (atan(0.0) / ((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.0) / Math.PI);
}
def code(a, b, angle, x_45_scale, y_45_scale): return 180.0 * (math.atan(0.0) / math.pi)
function code(a, b, angle, x_45_scale, y_45_scale) return Float64(180.0 * Float64(atan(0.0) / pi)) end
function tmp = code(a, b, angle, x_45_scale, y_45_scale) tmp = 180.0 * (atan(0.0) / pi); end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
180 \cdot \frac{\tan^{-1} 0}{\pi}
Initial program 13.4%
Taylor expanded in angle around 0
Applied rewrites11.7%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites7.6%
Taylor expanded in y-scale around 0
Applied rewrites18.5%
herbie shell --seed 2025181
(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)))