
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (/ angle 180.0) PI))
(t_1 (sin t_0))
(t_2 (cos t_0))
(t_3
(/ (/ (+ (pow (* a t_2) 2.0) (pow (* b t_1) 2.0)) y-scale) y-scale))
(t_4
(/ (/ (+ (pow (* a t_1) 2.0) (pow (* b t_2) 2.0)) x-scale) x-scale))
(t_5 (* (* b a) (* b (- a))))
(t_6 (/ (* 4.0 t_5) (pow (* x-scale y-scale) 2.0))))
(/
(-
(sqrt
(*
(* (* 2.0 t_6) t_5)
(+
(+ t_4 t_3)
(sqrt
(+
(pow (- t_4 t_3) 2.0)
(pow
(/
(/ (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) t_1) t_2) x-scale)
y-scale)
2.0)))))))
t_6)))
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 = sin(t_0);
double t_2 = cos(t_0);
double t_3 = ((pow((a * t_2), 2.0) + pow((b * t_1), 2.0)) / y_45_scale) / y_45_scale;
double t_4 = ((pow((a * t_1), 2.0) + pow((b * t_2), 2.0)) / x_45_scale) / x_45_scale;
double t_5 = (b * a) * (b * -a);
double t_6 = (4.0 * t_5) / pow((x_45_scale * y_45_scale), 2.0);
return -sqrt((((2.0 * t_6) * t_5) * ((t_4 + t_3) + sqrt((pow((t_4 - t_3), 2.0) + pow((((((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * t_1) * t_2) / x_45_scale) / y_45_scale), 2.0)))))) / t_6;
}
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.sin(t_0);
double t_2 = Math.cos(t_0);
double t_3 = ((Math.pow((a * t_2), 2.0) + Math.pow((b * t_1), 2.0)) / y_45_scale) / y_45_scale;
double t_4 = ((Math.pow((a * t_1), 2.0) + Math.pow((b * t_2), 2.0)) / x_45_scale) / x_45_scale;
double t_5 = (b * a) * (b * -a);
double t_6 = (4.0 * t_5) / Math.pow((x_45_scale * y_45_scale), 2.0);
return -Math.sqrt((((2.0 * t_6) * t_5) * ((t_4 + t_3) + Math.sqrt((Math.pow((t_4 - t_3), 2.0) + Math.pow((((((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * t_1) * t_2) / x_45_scale) / y_45_scale), 2.0)))))) / t_6;
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = (angle / 180.0) * math.pi t_1 = math.sin(t_0) t_2 = math.cos(t_0) t_3 = ((math.pow((a * t_2), 2.0) + math.pow((b * t_1), 2.0)) / y_45_scale) / y_45_scale t_4 = ((math.pow((a * t_1), 2.0) + math.pow((b * t_2), 2.0)) / x_45_scale) / x_45_scale t_5 = (b * a) * (b * -a) t_6 = (4.0 * t_5) / math.pow((x_45_scale * y_45_scale), 2.0) return -math.sqrt((((2.0 * t_6) * t_5) * ((t_4 + t_3) + math.sqrt((math.pow((t_4 - t_3), 2.0) + math.pow((((((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * t_1) * t_2) / x_45_scale) / y_45_scale), 2.0)))))) / t_6
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(angle / 180.0) * pi) t_1 = sin(t_0) t_2 = cos(t_0) t_3 = Float64(Float64(Float64((Float64(a * t_2) ^ 2.0) + (Float64(b * t_1) ^ 2.0)) / y_45_scale) / y_45_scale) t_4 = Float64(Float64(Float64((Float64(a * t_1) ^ 2.0) + (Float64(b * t_2) ^ 2.0)) / x_45_scale) / x_45_scale) t_5 = Float64(Float64(b * a) * Float64(b * Float64(-a))) t_6 = Float64(Float64(4.0 * t_5) / (Float64(x_45_scale * y_45_scale) ^ 2.0)) return Float64(Float64(-sqrt(Float64(Float64(Float64(2.0 * t_6) * t_5) * Float64(Float64(t_4 + t_3) + sqrt(Float64((Float64(t_4 - t_3) ^ 2.0) + (Float64(Float64(Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * t_1) * t_2) / x_45_scale) / y_45_scale) ^ 2.0))))))) / t_6) end
function tmp = code(a, b, angle, x_45_scale, y_45_scale) t_0 = (angle / 180.0) * pi; t_1 = sin(t_0); t_2 = cos(t_0); t_3 = ((((a * t_2) ^ 2.0) + ((b * t_1) ^ 2.0)) / y_45_scale) / y_45_scale; t_4 = ((((a * t_1) ^ 2.0) + ((b * t_2) ^ 2.0)) / x_45_scale) / x_45_scale; t_5 = (b * a) * (b * -a); t_6 = (4.0 * t_5) / ((x_45_scale * y_45_scale) ^ 2.0); tmp = -sqrt((((2.0 * t_6) * t_5) * ((t_4 + t_3) + sqrt((((t_4 - t_3) ^ 2.0) + ((((((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * t_1) * t_2) / x_45_scale) / y_45_scale) ^ 2.0)))))) / t_6; 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[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$3 = 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] / y$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] / x$45$scale), $MachinePrecision] / x$45$scale), $MachinePrecision]}, Block[{t$95$5 = N[(N[(b * a), $MachinePrecision] * N[(b * (-a)), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(4.0 * t$95$5), $MachinePrecision] / N[Power[N[(x$45$scale * y$45$scale), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, N[((-N[Sqrt[N[(N[(N[(2.0 * t$95$6), $MachinePrecision] * t$95$5), $MachinePrecision] * N[(N[(t$95$4 + t$95$3), $MachinePrecision] + N[Sqrt[N[(N[Power[N[(t$95$4 - t$95$3), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(N[(N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] * t$95$2), $MachinePrecision] / x$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$6), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{angle}{180} \cdot \pi\\
t_1 := \sin t\_0\\
t_2 := \cos t\_0\\
t_3 := \frac{\frac{{\left(a \cdot t\_2\right)}^{2} + {\left(b \cdot t\_1\right)}^{2}}{y-scale}}{y-scale}\\
t_4 := \frac{\frac{{\left(a \cdot t\_1\right)}^{2} + {\left(b \cdot t\_2\right)}^{2}}{x-scale}}{x-scale}\\
t_5 := \left(b \cdot a\right) \cdot \left(b \cdot \left(-a\right)\right)\\
t_6 := \frac{4 \cdot t\_5}{{\left(x-scale \cdot y-scale\right)}^{2}}\\
\frac{-\sqrt{\left(\left(2 \cdot t\_6\right) \cdot t\_5\right) \cdot \left(\left(t\_4 + t\_3\right) + \sqrt{{\left(t\_4 - t\_3\right)}^{2} + {\left(\frac{\frac{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot t\_1\right) \cdot t\_2}{x-scale}}{y-scale}\right)}^{2}}\right)}}{t\_6}
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 23 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (/ angle 180.0) PI))
(t_1 (sin t_0))
(t_2 (cos t_0))
(t_3
(/ (/ (+ (pow (* a t_2) 2.0) (pow (* b t_1) 2.0)) y-scale) y-scale))
(t_4
(/ (/ (+ (pow (* a t_1) 2.0) (pow (* b t_2) 2.0)) x-scale) x-scale))
(t_5 (* (* b a) (* b (- a))))
(t_6 (/ (* 4.0 t_5) (pow (* x-scale y-scale) 2.0))))
(/
(-
(sqrt
(*
(* (* 2.0 t_6) t_5)
(+
(+ t_4 t_3)
(sqrt
(+
(pow (- t_4 t_3) 2.0)
(pow
(/
(/ (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) t_1) t_2) x-scale)
y-scale)
2.0)))))))
t_6)))
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 = sin(t_0);
double t_2 = cos(t_0);
double t_3 = ((pow((a * t_2), 2.0) + pow((b * t_1), 2.0)) / y_45_scale) / y_45_scale;
double t_4 = ((pow((a * t_1), 2.0) + pow((b * t_2), 2.0)) / x_45_scale) / x_45_scale;
double t_5 = (b * a) * (b * -a);
double t_6 = (4.0 * t_5) / pow((x_45_scale * y_45_scale), 2.0);
return -sqrt((((2.0 * t_6) * t_5) * ((t_4 + t_3) + sqrt((pow((t_4 - t_3), 2.0) + pow((((((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * t_1) * t_2) / x_45_scale) / y_45_scale), 2.0)))))) / t_6;
}
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.sin(t_0);
double t_2 = Math.cos(t_0);
double t_3 = ((Math.pow((a * t_2), 2.0) + Math.pow((b * t_1), 2.0)) / y_45_scale) / y_45_scale;
double t_4 = ((Math.pow((a * t_1), 2.0) + Math.pow((b * t_2), 2.0)) / x_45_scale) / x_45_scale;
double t_5 = (b * a) * (b * -a);
double t_6 = (4.0 * t_5) / Math.pow((x_45_scale * y_45_scale), 2.0);
return -Math.sqrt((((2.0 * t_6) * t_5) * ((t_4 + t_3) + Math.sqrt((Math.pow((t_4 - t_3), 2.0) + Math.pow((((((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * t_1) * t_2) / x_45_scale) / y_45_scale), 2.0)))))) / t_6;
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = (angle / 180.0) * math.pi t_1 = math.sin(t_0) t_2 = math.cos(t_0) t_3 = ((math.pow((a * t_2), 2.0) + math.pow((b * t_1), 2.0)) / y_45_scale) / y_45_scale t_4 = ((math.pow((a * t_1), 2.0) + math.pow((b * t_2), 2.0)) / x_45_scale) / x_45_scale t_5 = (b * a) * (b * -a) t_6 = (4.0 * t_5) / math.pow((x_45_scale * y_45_scale), 2.0) return -math.sqrt((((2.0 * t_6) * t_5) * ((t_4 + t_3) + math.sqrt((math.pow((t_4 - t_3), 2.0) + math.pow((((((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * t_1) * t_2) / x_45_scale) / y_45_scale), 2.0)))))) / t_6
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(angle / 180.0) * pi) t_1 = sin(t_0) t_2 = cos(t_0) t_3 = Float64(Float64(Float64((Float64(a * t_2) ^ 2.0) + (Float64(b * t_1) ^ 2.0)) / y_45_scale) / y_45_scale) t_4 = Float64(Float64(Float64((Float64(a * t_1) ^ 2.0) + (Float64(b * t_2) ^ 2.0)) / x_45_scale) / x_45_scale) t_5 = Float64(Float64(b * a) * Float64(b * Float64(-a))) t_6 = Float64(Float64(4.0 * t_5) / (Float64(x_45_scale * y_45_scale) ^ 2.0)) return Float64(Float64(-sqrt(Float64(Float64(Float64(2.0 * t_6) * t_5) * Float64(Float64(t_4 + t_3) + sqrt(Float64((Float64(t_4 - t_3) ^ 2.0) + (Float64(Float64(Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * t_1) * t_2) / x_45_scale) / y_45_scale) ^ 2.0))))))) / t_6) end
function tmp = code(a, b, angle, x_45_scale, y_45_scale) t_0 = (angle / 180.0) * pi; t_1 = sin(t_0); t_2 = cos(t_0); t_3 = ((((a * t_2) ^ 2.0) + ((b * t_1) ^ 2.0)) / y_45_scale) / y_45_scale; t_4 = ((((a * t_1) ^ 2.0) + ((b * t_2) ^ 2.0)) / x_45_scale) / x_45_scale; t_5 = (b * a) * (b * -a); t_6 = (4.0 * t_5) / ((x_45_scale * y_45_scale) ^ 2.0); tmp = -sqrt((((2.0 * t_6) * t_5) * ((t_4 + t_3) + sqrt((((t_4 - t_3) ^ 2.0) + ((((((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * t_1) * t_2) / x_45_scale) / y_45_scale) ^ 2.0)))))) / t_6; 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[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$3 = 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] / y$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] / x$45$scale), $MachinePrecision] / x$45$scale), $MachinePrecision]}, Block[{t$95$5 = N[(N[(b * a), $MachinePrecision] * N[(b * (-a)), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(4.0 * t$95$5), $MachinePrecision] / N[Power[N[(x$45$scale * y$45$scale), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, N[((-N[Sqrt[N[(N[(N[(2.0 * t$95$6), $MachinePrecision] * t$95$5), $MachinePrecision] * N[(N[(t$95$4 + t$95$3), $MachinePrecision] + N[Sqrt[N[(N[Power[N[(t$95$4 - t$95$3), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(N[(N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] * t$95$2), $MachinePrecision] / x$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$6), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{angle}{180} \cdot \pi\\
t_1 := \sin t\_0\\
t_2 := \cos t\_0\\
t_3 := \frac{\frac{{\left(a \cdot t\_2\right)}^{2} + {\left(b \cdot t\_1\right)}^{2}}{y-scale}}{y-scale}\\
t_4 := \frac{\frac{{\left(a \cdot t\_1\right)}^{2} + {\left(b \cdot t\_2\right)}^{2}}{x-scale}}{x-scale}\\
t_5 := \left(b \cdot a\right) \cdot \left(b \cdot \left(-a\right)\right)\\
t_6 := \frac{4 \cdot t\_5}{{\left(x-scale \cdot y-scale\right)}^{2}}\\
\frac{-\sqrt{\left(\left(2 \cdot t\_6\right) \cdot t\_5\right) \cdot \left(\left(t\_4 + t\_3\right) + \sqrt{{\left(t\_4 - t\_3\right)}^{2} + {\left(\frac{\frac{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot t\_1\right) \cdot t\_2}{x-scale}}{y-scale}\right)}^{2}}\right)}}{t\_6}
\end{array}
\end{array}
b_m = (fabs.f64 b)
x-scale_m = (fabs.f64 x-scale)
y-scale_m = (fabs.f64 y-scale)
(FPCore (a b_m angle x-scale_m y-scale_m)
:precision binary64
(let* ((t_0 (* (cos (* 0.005555555555555556 (* angle PI))) a))
(t_1 (* 0.25 (* y-scale_m (sqrt 8.0))))
(t_2 (* (* x-scale_m (sqrt 2.0)) (sqrt 8.0)))
(t_3 (* PI (* 0.005555555555555556 angle))))
(if (<= y-scale_m 3.5e-95)
(*
0.25
(*
t_2
(hypot
t_0
(*
b_m
(sin
(*
0.005555555555555556
(* angle (* (cbrt PI) (pow (cbrt PI) 2.0)))))))))
(if (<= y-scale_m 2e-53)
(*
t_1
(*
(sqrt 2.0)
(hypot
(*
a
(sin
(* (* 0.005555555555555556 angle) (pow (cbrt (pow PI 1.5)) 2.0))))
b_m)))
(if (<= y-scale_m 9.8e+17)
(*
0.25
(*
t_2
(hypot
t_0
(*
b_m
(sin (* 0.005555555555555556 (* angle (pow (sqrt PI) 2.0))))))))
(if (<= y-scale_m 3.3e+84)
(*
(sqrt (* (* 8.0 (pow y-scale_m 2.0)) 0.0625))
(* (sqrt 2.0) (hypot (* a t_3) b_m)))
(if (<= y-scale_m 1.52e+140)
(*
-0.25
(*
(* x-scale_m (* y-scale_m (- (sqrt 8.0))))
(/ (* (sqrt 2.0) b_m) x-scale_m)))
(* t_1 (* (sqrt 2.0) (hypot (* a (sin t_3)) b_m))))))))))b_m = fabs(b);
x-scale_m = fabs(x_45_scale);
y-scale_m = fabs(y_45_scale);
double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double t_0 = cos((0.005555555555555556 * (angle * ((double) M_PI)))) * a;
double t_1 = 0.25 * (y_45_scale_m * sqrt(8.0));
double t_2 = (x_45_scale_m * sqrt(2.0)) * sqrt(8.0);
double t_3 = ((double) M_PI) * (0.005555555555555556 * angle);
double tmp;
if (y_45_scale_m <= 3.5e-95) {
tmp = 0.25 * (t_2 * hypot(t_0, (b_m * sin((0.005555555555555556 * (angle * (cbrt(((double) M_PI)) * pow(cbrt(((double) M_PI)), 2.0))))))));
} else if (y_45_scale_m <= 2e-53) {
tmp = t_1 * (sqrt(2.0) * hypot((a * sin(((0.005555555555555556 * angle) * pow(cbrt(pow(((double) M_PI), 1.5)), 2.0)))), b_m));
} else if (y_45_scale_m <= 9.8e+17) {
tmp = 0.25 * (t_2 * hypot(t_0, (b_m * sin((0.005555555555555556 * (angle * pow(sqrt(((double) M_PI)), 2.0)))))));
} else if (y_45_scale_m <= 3.3e+84) {
tmp = sqrt(((8.0 * pow(y_45_scale_m, 2.0)) * 0.0625)) * (sqrt(2.0) * hypot((a * t_3), b_m));
} else if (y_45_scale_m <= 1.52e+140) {
tmp = -0.25 * ((x_45_scale_m * (y_45_scale_m * -sqrt(8.0))) * ((sqrt(2.0) * b_m) / x_45_scale_m));
} else {
tmp = t_1 * (sqrt(2.0) * hypot((a * sin(t_3)), b_m));
}
return tmp;
}
b_m = Math.abs(b);
x-scale_m = Math.abs(x_45_scale);
y-scale_m = Math.abs(y_45_scale);
public static double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double t_0 = Math.cos((0.005555555555555556 * (angle * Math.PI))) * a;
double t_1 = 0.25 * (y_45_scale_m * Math.sqrt(8.0));
double t_2 = (x_45_scale_m * Math.sqrt(2.0)) * Math.sqrt(8.0);
double t_3 = Math.PI * (0.005555555555555556 * angle);
double tmp;
if (y_45_scale_m <= 3.5e-95) {
tmp = 0.25 * (t_2 * Math.hypot(t_0, (b_m * Math.sin((0.005555555555555556 * (angle * (Math.cbrt(Math.PI) * Math.pow(Math.cbrt(Math.PI), 2.0))))))));
} else if (y_45_scale_m <= 2e-53) {
tmp = t_1 * (Math.sqrt(2.0) * Math.hypot((a * Math.sin(((0.005555555555555556 * angle) * Math.pow(Math.cbrt(Math.pow(Math.PI, 1.5)), 2.0)))), b_m));
} else if (y_45_scale_m <= 9.8e+17) {
tmp = 0.25 * (t_2 * Math.hypot(t_0, (b_m * Math.sin((0.005555555555555556 * (angle * Math.pow(Math.sqrt(Math.PI), 2.0)))))));
} else if (y_45_scale_m <= 3.3e+84) {
tmp = Math.sqrt(((8.0 * Math.pow(y_45_scale_m, 2.0)) * 0.0625)) * (Math.sqrt(2.0) * Math.hypot((a * t_3), b_m));
} else if (y_45_scale_m <= 1.52e+140) {
tmp = -0.25 * ((x_45_scale_m * (y_45_scale_m * -Math.sqrt(8.0))) * ((Math.sqrt(2.0) * b_m) / x_45_scale_m));
} else {
tmp = t_1 * (Math.sqrt(2.0) * Math.hypot((a * Math.sin(t_3)), b_m));
}
return tmp;
}
b_m = abs(b) x-scale_m = abs(x_45_scale) y-scale_m = abs(y_45_scale) function code(a, b_m, angle, x_45_scale_m, y_45_scale_m) t_0 = Float64(cos(Float64(0.005555555555555556 * Float64(angle * pi))) * a) t_1 = Float64(0.25 * Float64(y_45_scale_m * sqrt(8.0))) t_2 = Float64(Float64(x_45_scale_m * sqrt(2.0)) * sqrt(8.0)) t_3 = Float64(pi * Float64(0.005555555555555556 * angle)) tmp = 0.0 if (y_45_scale_m <= 3.5e-95) tmp = Float64(0.25 * Float64(t_2 * hypot(t_0, Float64(b_m * sin(Float64(0.005555555555555556 * Float64(angle * Float64(cbrt(pi) * (cbrt(pi) ^ 2.0))))))))); elseif (y_45_scale_m <= 2e-53) tmp = Float64(t_1 * Float64(sqrt(2.0) * hypot(Float64(a * sin(Float64(Float64(0.005555555555555556 * angle) * (cbrt((pi ^ 1.5)) ^ 2.0)))), b_m))); elseif (y_45_scale_m <= 9.8e+17) tmp = Float64(0.25 * Float64(t_2 * hypot(t_0, Float64(b_m * sin(Float64(0.005555555555555556 * Float64(angle * (sqrt(pi) ^ 2.0)))))))); elseif (y_45_scale_m <= 3.3e+84) tmp = Float64(sqrt(Float64(Float64(8.0 * (y_45_scale_m ^ 2.0)) * 0.0625)) * Float64(sqrt(2.0) * hypot(Float64(a * t_3), b_m))); elseif (y_45_scale_m <= 1.52e+140) tmp = Float64(-0.25 * Float64(Float64(x_45_scale_m * Float64(y_45_scale_m * Float64(-sqrt(8.0)))) * Float64(Float64(sqrt(2.0) * b_m) / x_45_scale_m))); else tmp = Float64(t_1 * Float64(sqrt(2.0) * hypot(Float64(a * sin(t_3)), b_m))); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
y-scale_m = N[Abs[y$45$scale], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := Block[{t$95$0 = N[(N[Cos[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * a), $MachinePrecision]}, Block[{t$95$1 = N[(0.25 * N[(y$45$scale$95$m * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x$45$scale$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$45$scale$95$m, 3.5e-95], N[(0.25 * N[(t$95$2 * N[Sqrt[t$95$0 ^ 2 + N[(b$95$m * N[Sin[N[(0.005555555555555556 * N[(angle * N[(N[Power[Pi, 1/3], $MachinePrecision] * N[Power[N[Power[Pi, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 2e-53], N[(t$95$1 * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a * N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * N[Power[N[Power[N[Power[Pi, 1.5], $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] ^ 2 + b$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 9.8e+17], N[(0.25 * N[(t$95$2 * N[Sqrt[t$95$0 ^ 2 + N[(b$95$m * N[Sin[N[(0.005555555555555556 * N[(angle * N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 3.3e+84], N[(N[Sqrt[N[(N[(8.0 * N[Power[y$45$scale$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * 0.0625), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a * t$95$3), $MachinePrecision] ^ 2 + b$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 1.52e+140], N[(-0.25 * N[(N[(x$45$scale$95$m * N[(y$45$scale$95$m * (-N[Sqrt[8.0], $MachinePrecision])), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sqrt[2.0], $MachinePrecision] * b$95$m), $MachinePrecision] / x$45$scale$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a * N[Sin[t$95$3], $MachinePrecision]), $MachinePrecision] ^ 2 + b$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
x-scale_m = \left|x-scale\right|
\\
y-scale_m = \left|y-scale\right|
\\
\begin{array}{l}
t_0 := \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot a\\
t_1 := 0.25 \cdot \left(y-scale\_m \cdot \sqrt{8}\right)\\
t_2 := \left(x-scale\_m \cdot \sqrt{2}\right) \cdot \sqrt{8}\\
t_3 := \pi \cdot \left(0.005555555555555556 \cdot angle\right)\\
\mathbf{if}\;y-scale\_m \leq 3.5 \cdot 10^{-95}:\\
\;\;\;\;0.25 \cdot \left(t\_2 \cdot \mathsf{hypot}\left(t\_0, b\_m \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \left(\sqrt[3]{\pi} \cdot {\left(\sqrt[3]{\pi}\right)}^{2}\right)\right)\right)\right)\right)\\
\mathbf{elif}\;y-scale\_m \leq 2 \cdot 10^{-53}:\\
\;\;\;\;t\_1 \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot \sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot {\left(\sqrt[3]{{\pi}^{1.5}}\right)}^{2}\right), b\_m\right)\right)\\
\mathbf{elif}\;y-scale\_m \leq 9.8 \cdot 10^{+17}:\\
\;\;\;\;0.25 \cdot \left(t\_2 \cdot \mathsf{hypot}\left(t\_0, b\_m \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot {\left(\sqrt{\pi}\right)}^{2}\right)\right)\right)\right)\\
\mathbf{elif}\;y-scale\_m \leq 3.3 \cdot 10^{+84}:\\
\;\;\;\;\sqrt{\left(8 \cdot {y-scale\_m}^{2}\right) \cdot 0.0625} \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot t\_3, b\_m\right)\right)\\
\mathbf{elif}\;y-scale\_m \leq 1.52 \cdot 10^{+140}:\\
\;\;\;\;-0.25 \cdot \left(\left(x-scale\_m \cdot \left(y-scale\_m \cdot \left(-\sqrt{8}\right)\right)\right) \cdot \frac{\sqrt{2} \cdot b\_m}{x-scale\_m}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot \sin t\_3, b\_m\right)\right)\\
\end{array}
\end{array}
if y-scale < 3.4999999999999997e-95Initial program 2.1%
Simplified2.1%
Taylor expanded in y-scale around 0 9.0%
associate-*r*9.0%
distribute-lft-out9.0%
Simplified9.6%
Taylor expanded in x-scale around 0 25.1%
Simplified26.1%
add-cube-cbrt26.0%
pow226.0%
Applied egg-rr26.0%
if 3.4999999999999997e-95 < y-scale < 2.00000000000000006e-53Initial program 0.5%
Simplified0.5%
Taylor expanded in x-scale around 0 32.1%
associate-*r*32.1%
distribute-lft-out32.1%
Simplified35.6%
Taylor expanded in angle around 0 35.6%
pow1/235.6%
*-commutative35.6%
unpow-prod-down35.6%
Applied egg-rr48.9%
add-sqr-sqrt49.1%
pow249.1%
Applied egg-rr49.1%
add-cbrt-cube49.1%
pow1/349.1%
add-sqr-sqrt49.1%
pow149.1%
pow1/249.1%
pow-prod-up49.1%
metadata-eval49.1%
Applied egg-rr49.1%
unpow1/350.0%
Simplified50.0%
if 2.00000000000000006e-53 < y-scale < 9.8e17Initial program 0.0%
Simplified0.2%
Taylor expanded in y-scale around 0 11.5%
associate-*r*11.5%
distribute-lft-out11.5%
Simplified11.6%
Taylor expanded in x-scale around 0 11.9%
Simplified12.9%
add-sqr-sqrt27.6%
pow227.6%
Applied egg-rr12.9%
if 9.8e17 < y-scale < 3.30000000000000017e84Initial program 0.5%
Simplified0.8%
Taylor expanded in x-scale around 0 45.8%
associate-*r*45.8%
distribute-lft-out45.8%
Simplified45.8%
Taylor expanded in angle around 0 45.8%
pow1/245.8%
*-commutative45.8%
unpow-prod-down45.6%
Applied egg-rr54.5%
Taylor expanded in angle around 0 53.5%
associate-*r*53.5%
Simplified53.5%
add-sqr-sqrt53.3%
sqrt-unprod53.5%
swap-sqr53.5%
metadata-eval53.5%
metadata-eval53.5%
swap-sqr53.5%
*-commutative53.5%
*-commutative53.5%
swap-sqr53.5%
*-commutative53.5%
*-commutative53.5%
swap-sqr53.2%
rem-square-sqrt54.0%
pow254.0%
metadata-eval54.0%
Applied egg-rr54.0%
if 3.30000000000000017e84 < y-scale < 1.52e140Initial program 8.3%
Simplified0.0%
Taylor expanded in a around 0 0.2%
Simplified0.2%
Taylor expanded in angle around 0 34.7%
if 1.52e140 < y-scale Initial program 6.9%
Simplified6.9%
Taylor expanded in x-scale around 0 76.6%
associate-*r*76.6%
distribute-lft-out76.6%
Simplified82.7%
Taylor expanded in angle around 0 85.5%
pow1/285.5%
*-commutative85.5%
unpow-prod-down85.4%
Applied egg-rr89.2%
Final simplification35.0%
b_m = (fabs.f64 b)
x-scale_m = (fabs.f64 x-scale)
y-scale_m = (fabs.f64 y-scale)
(FPCore (a b_m angle x-scale_m y-scale_m)
:precision binary64
(let* ((t_0 (* (cos (* 0.005555555555555556 (* angle PI))) a))
(t_1 (* 0.25 (* y-scale_m (sqrt 8.0))))
(t_2 (* x-scale_m (sqrt 2.0))))
(if (<= y-scale_m 3.5e-95)
(*
0.25
(*
(* t_2 (sqrt 8.0))
(hypot
t_0
(*
b_m
(sin
(*
0.005555555555555556
(* angle (* (cbrt PI) (pow (cbrt PI) 2.0)))))))))
(if (<= y-scale_m 1.5e-53)
(*
t_1
(*
(sqrt 2.0)
(hypot
(*
a
(sin
(* (* 0.005555555555555556 angle) (pow (cbrt (pow PI 1.5)) 2.0))))
b_m)))
(if (<= y-scale_m 2.2e+18)
(*
0.25
(*
(* (sqrt 8.0) (pow (sqrt t_2) 2.0))
(hypot
t_0
(*
b_m
(sin (* 0.005555555555555556 (* angle (pow (sqrt PI) 2.0))))))))
(*
t_1
(*
(sqrt 2.0)
(hypot
(* a (sin (* (* 0.005555555555555556 angle) (cbrt (pow PI 3.0)))))
b_m))))))))b_m = fabs(b);
x-scale_m = fabs(x_45_scale);
y-scale_m = fabs(y_45_scale);
double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double t_0 = cos((0.005555555555555556 * (angle * ((double) M_PI)))) * a;
double t_1 = 0.25 * (y_45_scale_m * sqrt(8.0));
double t_2 = x_45_scale_m * sqrt(2.0);
double tmp;
if (y_45_scale_m <= 3.5e-95) {
tmp = 0.25 * ((t_2 * sqrt(8.0)) * hypot(t_0, (b_m * sin((0.005555555555555556 * (angle * (cbrt(((double) M_PI)) * pow(cbrt(((double) M_PI)), 2.0))))))));
} else if (y_45_scale_m <= 1.5e-53) {
tmp = t_1 * (sqrt(2.0) * hypot((a * sin(((0.005555555555555556 * angle) * pow(cbrt(pow(((double) M_PI), 1.5)), 2.0)))), b_m));
} else if (y_45_scale_m <= 2.2e+18) {
tmp = 0.25 * ((sqrt(8.0) * pow(sqrt(t_2), 2.0)) * hypot(t_0, (b_m * sin((0.005555555555555556 * (angle * pow(sqrt(((double) M_PI)), 2.0)))))));
} else {
tmp = t_1 * (sqrt(2.0) * hypot((a * sin(((0.005555555555555556 * angle) * cbrt(pow(((double) M_PI), 3.0))))), b_m));
}
return tmp;
}
b_m = Math.abs(b);
x-scale_m = Math.abs(x_45_scale);
y-scale_m = Math.abs(y_45_scale);
public static double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double t_0 = Math.cos((0.005555555555555556 * (angle * Math.PI))) * a;
double t_1 = 0.25 * (y_45_scale_m * Math.sqrt(8.0));
double t_2 = x_45_scale_m * Math.sqrt(2.0);
double tmp;
if (y_45_scale_m <= 3.5e-95) {
tmp = 0.25 * ((t_2 * Math.sqrt(8.0)) * Math.hypot(t_0, (b_m * Math.sin((0.005555555555555556 * (angle * (Math.cbrt(Math.PI) * Math.pow(Math.cbrt(Math.PI), 2.0))))))));
} else if (y_45_scale_m <= 1.5e-53) {
tmp = t_1 * (Math.sqrt(2.0) * Math.hypot((a * Math.sin(((0.005555555555555556 * angle) * Math.pow(Math.cbrt(Math.pow(Math.PI, 1.5)), 2.0)))), b_m));
} else if (y_45_scale_m <= 2.2e+18) {
tmp = 0.25 * ((Math.sqrt(8.0) * Math.pow(Math.sqrt(t_2), 2.0)) * Math.hypot(t_0, (b_m * Math.sin((0.005555555555555556 * (angle * Math.pow(Math.sqrt(Math.PI), 2.0)))))));
} else {
tmp = t_1 * (Math.sqrt(2.0) * Math.hypot((a * Math.sin(((0.005555555555555556 * angle) * Math.cbrt(Math.pow(Math.PI, 3.0))))), b_m));
}
return tmp;
}
b_m = abs(b) x-scale_m = abs(x_45_scale) y-scale_m = abs(y_45_scale) function code(a, b_m, angle, x_45_scale_m, y_45_scale_m) t_0 = Float64(cos(Float64(0.005555555555555556 * Float64(angle * pi))) * a) t_1 = Float64(0.25 * Float64(y_45_scale_m * sqrt(8.0))) t_2 = Float64(x_45_scale_m * sqrt(2.0)) tmp = 0.0 if (y_45_scale_m <= 3.5e-95) tmp = Float64(0.25 * Float64(Float64(t_2 * sqrt(8.0)) * hypot(t_0, Float64(b_m * sin(Float64(0.005555555555555556 * Float64(angle * Float64(cbrt(pi) * (cbrt(pi) ^ 2.0))))))))); elseif (y_45_scale_m <= 1.5e-53) tmp = Float64(t_1 * Float64(sqrt(2.0) * hypot(Float64(a * sin(Float64(Float64(0.005555555555555556 * angle) * (cbrt((pi ^ 1.5)) ^ 2.0)))), b_m))); elseif (y_45_scale_m <= 2.2e+18) tmp = Float64(0.25 * Float64(Float64(sqrt(8.0) * (sqrt(t_2) ^ 2.0)) * hypot(t_0, Float64(b_m * sin(Float64(0.005555555555555556 * Float64(angle * (sqrt(pi) ^ 2.0)))))))); else tmp = Float64(t_1 * Float64(sqrt(2.0) * hypot(Float64(a * sin(Float64(Float64(0.005555555555555556 * angle) * cbrt((pi ^ 3.0))))), b_m))); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
y-scale_m = N[Abs[y$45$scale], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := Block[{t$95$0 = N[(N[Cos[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * a), $MachinePrecision]}, Block[{t$95$1 = N[(0.25 * N[(y$45$scale$95$m * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x$45$scale$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$45$scale$95$m, 3.5e-95], N[(0.25 * N[(N[(t$95$2 * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[t$95$0 ^ 2 + N[(b$95$m * N[Sin[N[(0.005555555555555556 * N[(angle * N[(N[Power[Pi, 1/3], $MachinePrecision] * N[Power[N[Power[Pi, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 1.5e-53], N[(t$95$1 * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a * N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * N[Power[N[Power[N[Power[Pi, 1.5], $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] ^ 2 + b$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 2.2e+18], N[(0.25 * N[(N[(N[Sqrt[8.0], $MachinePrecision] * N[Power[N[Sqrt[t$95$2], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[t$95$0 ^ 2 + N[(b$95$m * N[Sin[N[(0.005555555555555556 * N[(angle * N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a * N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] ^ 2 + b$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
x-scale_m = \left|x-scale\right|
\\
y-scale_m = \left|y-scale\right|
\\
\begin{array}{l}
t_0 := \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot a\\
t_1 := 0.25 \cdot \left(y-scale\_m \cdot \sqrt{8}\right)\\
t_2 := x-scale\_m \cdot \sqrt{2}\\
\mathbf{if}\;y-scale\_m \leq 3.5 \cdot 10^{-95}:\\
\;\;\;\;0.25 \cdot \left(\left(t\_2 \cdot \sqrt{8}\right) \cdot \mathsf{hypot}\left(t\_0, b\_m \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \left(\sqrt[3]{\pi} \cdot {\left(\sqrt[3]{\pi}\right)}^{2}\right)\right)\right)\right)\right)\\
\mathbf{elif}\;y-scale\_m \leq 1.5 \cdot 10^{-53}:\\
\;\;\;\;t\_1 \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot \sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot {\left(\sqrt[3]{{\pi}^{1.5}}\right)}^{2}\right), b\_m\right)\right)\\
\mathbf{elif}\;y-scale\_m \leq 2.2 \cdot 10^{+18}:\\
\;\;\;\;0.25 \cdot \left(\left(\sqrt{8} \cdot {\left(\sqrt{t\_2}\right)}^{2}\right) \cdot \mathsf{hypot}\left(t\_0, b\_m \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot {\left(\sqrt{\pi}\right)}^{2}\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot \sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \sqrt[3]{{\pi}^{3}}\right), b\_m\right)\right)\\
\end{array}
\end{array}
if y-scale < 3.4999999999999997e-95Initial program 2.1%
Simplified2.1%
Taylor expanded in y-scale around 0 9.0%
associate-*r*9.0%
distribute-lft-out9.0%
Simplified9.6%
Taylor expanded in x-scale around 0 25.1%
Simplified26.1%
add-cube-cbrt26.0%
pow226.0%
Applied egg-rr26.0%
if 3.4999999999999997e-95 < y-scale < 1.5000000000000001e-53Initial program 0.5%
Simplified0.5%
Taylor expanded in x-scale around 0 32.1%
associate-*r*32.1%
distribute-lft-out32.1%
Simplified35.6%
Taylor expanded in angle around 0 35.6%
pow1/235.6%
*-commutative35.6%
unpow-prod-down35.6%
Applied egg-rr48.9%
add-sqr-sqrt49.1%
pow249.1%
Applied egg-rr49.1%
add-cbrt-cube49.1%
pow1/349.1%
add-sqr-sqrt49.1%
pow149.1%
pow1/249.1%
pow-prod-up49.1%
metadata-eval49.1%
Applied egg-rr49.1%
unpow1/350.0%
Simplified50.0%
if 1.5000000000000001e-53 < y-scale < 2.2e18Initial program 0.0%
Simplified0.2%
Taylor expanded in y-scale around 0 11.5%
associate-*r*11.5%
distribute-lft-out11.5%
Simplified11.6%
Taylor expanded in x-scale around 0 11.9%
Simplified12.9%
add-sqr-sqrt12.4%
pow212.4%
*-commutative12.4%
Applied egg-rr12.4%
add-sqr-sqrt27.6%
pow227.6%
Applied egg-rr12.4%
if 2.2e18 < y-scale Initial program 6.0%
Simplified4.2%
Taylor expanded in x-scale around 0 67.5%
associate-*r*67.5%
distribute-lft-out67.5%
Simplified71.1%
Taylor expanded in angle around 0 72.7%
pow1/272.7%
*-commutative72.7%
unpow-prod-down72.7%
Applied egg-rr78.2%
add-cbrt-cube78.3%
pow378.3%
Applied egg-rr78.3%
Final simplification36.6%
b_m = (fabs.f64 b)
x-scale_m = (fabs.f64 x-scale)
y-scale_m = (fabs.f64 y-scale)
(FPCore (a b_m angle x-scale_m y-scale_m)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (* 0.25 (* y-scale_m (sqrt 8.0))))
(t_2 (* (* x-scale_m (sqrt 2.0)) (sqrt 8.0))))
(if (<= y-scale_m 3.5e-95)
(*
0.25
(*
t_2
(hypot
(* (cos t_0) a)
(*
b_m
(sin
(*
0.005555555555555556
(* angle (* (cbrt PI) (pow (cbrt PI) 2.0)))))))))
(if (<= y-scale_m 1.55e-53)
(*
t_1
(*
(sqrt 2.0)
(hypot
(*
a
(sin
(* (* 0.005555555555555556 angle) (pow (cbrt (pow PI 1.5)) 2.0))))
b_m)))
(if (<= y-scale_m 2.4e+18)
(*
0.25
(*
t_2
(hypot
(*
a
(cos
(*
0.005555555555555556
(* angle (pow (pow (cbrt (sqrt PI)) 3.0) 2.0)))))
(* b_m (sin t_0)))))
(*
t_1
(*
(sqrt 2.0)
(hypot
(* a (sin (* (* 0.005555555555555556 angle) (cbrt (pow PI 3.0)))))
b_m))))))))b_m = fabs(b);
x-scale_m = fabs(x_45_scale);
y-scale_m = fabs(y_45_scale);
double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = 0.25 * (y_45_scale_m * sqrt(8.0));
double t_2 = (x_45_scale_m * sqrt(2.0)) * sqrt(8.0);
double tmp;
if (y_45_scale_m <= 3.5e-95) {
tmp = 0.25 * (t_2 * hypot((cos(t_0) * a), (b_m * sin((0.005555555555555556 * (angle * (cbrt(((double) M_PI)) * pow(cbrt(((double) M_PI)), 2.0))))))));
} else if (y_45_scale_m <= 1.55e-53) {
tmp = t_1 * (sqrt(2.0) * hypot((a * sin(((0.005555555555555556 * angle) * pow(cbrt(pow(((double) M_PI), 1.5)), 2.0)))), b_m));
} else if (y_45_scale_m <= 2.4e+18) {
tmp = 0.25 * (t_2 * hypot((a * cos((0.005555555555555556 * (angle * pow(pow(cbrt(sqrt(((double) M_PI))), 3.0), 2.0))))), (b_m * sin(t_0))));
} else {
tmp = t_1 * (sqrt(2.0) * hypot((a * sin(((0.005555555555555556 * angle) * cbrt(pow(((double) M_PI), 3.0))))), b_m));
}
return tmp;
}
b_m = Math.abs(b);
x-scale_m = Math.abs(x_45_scale);
y-scale_m = Math.abs(y_45_scale);
public static double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double t_1 = 0.25 * (y_45_scale_m * Math.sqrt(8.0));
double t_2 = (x_45_scale_m * Math.sqrt(2.0)) * Math.sqrt(8.0);
double tmp;
if (y_45_scale_m <= 3.5e-95) {
tmp = 0.25 * (t_2 * Math.hypot((Math.cos(t_0) * a), (b_m * Math.sin((0.005555555555555556 * (angle * (Math.cbrt(Math.PI) * Math.pow(Math.cbrt(Math.PI), 2.0))))))));
} else if (y_45_scale_m <= 1.55e-53) {
tmp = t_1 * (Math.sqrt(2.0) * Math.hypot((a * Math.sin(((0.005555555555555556 * angle) * Math.pow(Math.cbrt(Math.pow(Math.PI, 1.5)), 2.0)))), b_m));
} else if (y_45_scale_m <= 2.4e+18) {
tmp = 0.25 * (t_2 * Math.hypot((a * Math.cos((0.005555555555555556 * (angle * Math.pow(Math.pow(Math.cbrt(Math.sqrt(Math.PI)), 3.0), 2.0))))), (b_m * Math.sin(t_0))));
} else {
tmp = t_1 * (Math.sqrt(2.0) * Math.hypot((a * Math.sin(((0.005555555555555556 * angle) * Math.cbrt(Math.pow(Math.PI, 3.0))))), b_m));
}
return tmp;
}
b_m = abs(b) x-scale_m = abs(x_45_scale) y-scale_m = abs(y_45_scale) function code(a, b_m, angle, x_45_scale_m, y_45_scale_m) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = Float64(0.25 * Float64(y_45_scale_m * sqrt(8.0))) t_2 = Float64(Float64(x_45_scale_m * sqrt(2.0)) * sqrt(8.0)) tmp = 0.0 if (y_45_scale_m <= 3.5e-95) tmp = Float64(0.25 * Float64(t_2 * hypot(Float64(cos(t_0) * a), Float64(b_m * sin(Float64(0.005555555555555556 * Float64(angle * Float64(cbrt(pi) * (cbrt(pi) ^ 2.0))))))))); elseif (y_45_scale_m <= 1.55e-53) tmp = Float64(t_1 * Float64(sqrt(2.0) * hypot(Float64(a * sin(Float64(Float64(0.005555555555555556 * angle) * (cbrt((pi ^ 1.5)) ^ 2.0)))), b_m))); elseif (y_45_scale_m <= 2.4e+18) tmp = Float64(0.25 * Float64(t_2 * hypot(Float64(a * cos(Float64(0.005555555555555556 * Float64(angle * ((cbrt(sqrt(pi)) ^ 3.0) ^ 2.0))))), Float64(b_m * sin(t_0))))); else tmp = Float64(t_1 * Float64(sqrt(2.0) * hypot(Float64(a * sin(Float64(Float64(0.005555555555555556 * angle) * cbrt((pi ^ 3.0))))), b_m))); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
y-scale_m = N[Abs[y$45$scale], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.25 * N[(y$45$scale$95$m * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x$45$scale$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$45$scale$95$m, 3.5e-95], N[(0.25 * N[(t$95$2 * N[Sqrt[N[(N[Cos[t$95$0], $MachinePrecision] * a), $MachinePrecision] ^ 2 + N[(b$95$m * N[Sin[N[(0.005555555555555556 * N[(angle * N[(N[Power[Pi, 1/3], $MachinePrecision] * N[Power[N[Power[Pi, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 1.55e-53], N[(t$95$1 * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a * N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * N[Power[N[Power[N[Power[Pi, 1.5], $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] ^ 2 + b$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 2.4e+18], N[(0.25 * N[(t$95$2 * N[Sqrt[N[(a * N[Cos[N[(0.005555555555555556 * N[(angle * N[Power[N[Power[N[Power[N[Sqrt[Pi], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] ^ 2 + N[(b$95$m * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a * N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] ^ 2 + b$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
x-scale_m = \left|x-scale\right|
\\
y-scale_m = \left|y-scale\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := 0.25 \cdot \left(y-scale\_m \cdot \sqrt{8}\right)\\
t_2 := \left(x-scale\_m \cdot \sqrt{2}\right) \cdot \sqrt{8}\\
\mathbf{if}\;y-scale\_m \leq 3.5 \cdot 10^{-95}:\\
\;\;\;\;0.25 \cdot \left(t\_2 \cdot \mathsf{hypot}\left(\cos t\_0 \cdot a, b\_m \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \left(\sqrt[3]{\pi} \cdot {\left(\sqrt[3]{\pi}\right)}^{2}\right)\right)\right)\right)\right)\\
\mathbf{elif}\;y-scale\_m \leq 1.55 \cdot 10^{-53}:\\
\;\;\;\;t\_1 \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot \sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot {\left(\sqrt[3]{{\pi}^{1.5}}\right)}^{2}\right), b\_m\right)\right)\\
\mathbf{elif}\;y-scale\_m \leq 2.4 \cdot 10^{+18}:\\
\;\;\;\;0.25 \cdot \left(t\_2 \cdot \mathsf{hypot}\left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot {\left({\left(\sqrt[3]{\sqrt{\pi}}\right)}^{3}\right)}^{2}\right)\right), b\_m \cdot \sin t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot \sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \sqrt[3]{{\pi}^{3}}\right), b\_m\right)\right)\\
\end{array}
\end{array}
if y-scale < 3.4999999999999997e-95Initial program 2.1%
Simplified2.1%
Taylor expanded in y-scale around 0 9.0%
associate-*r*9.0%
distribute-lft-out9.0%
Simplified9.6%
Taylor expanded in x-scale around 0 25.1%
Simplified26.1%
add-cube-cbrt26.0%
pow226.0%
Applied egg-rr26.0%
if 3.4999999999999997e-95 < y-scale < 1.55000000000000008e-53Initial program 0.5%
Simplified0.5%
Taylor expanded in x-scale around 0 32.1%
associate-*r*32.1%
distribute-lft-out32.1%
Simplified35.6%
Taylor expanded in angle around 0 35.6%
pow1/235.6%
*-commutative35.6%
unpow-prod-down35.6%
Applied egg-rr48.9%
add-sqr-sqrt49.1%
pow249.1%
Applied egg-rr49.1%
add-cbrt-cube49.1%
pow1/349.1%
add-sqr-sqrt49.1%
pow149.1%
pow1/249.1%
pow-prod-up49.1%
metadata-eval49.1%
Applied egg-rr49.1%
unpow1/350.0%
Simplified50.0%
if 1.55000000000000008e-53 < y-scale < 2.4e18Initial program 0.0%
Simplified0.2%
Taylor expanded in y-scale around 0 11.5%
associate-*r*11.5%
distribute-lft-out11.5%
Simplified11.6%
Taylor expanded in x-scale around 0 11.9%
Simplified12.9%
add-sqr-sqrt27.6%
pow227.6%
Applied egg-rr12.9%
add-cube-cbrt12.9%
pow312.9%
Applied egg-rr12.9%
if 2.4e18 < y-scale Initial program 6.0%
Simplified4.2%
Taylor expanded in x-scale around 0 67.5%
associate-*r*67.5%
distribute-lft-out67.5%
Simplified71.1%
Taylor expanded in angle around 0 72.7%
pow1/272.7%
*-commutative72.7%
unpow-prod-down72.7%
Applied egg-rr78.2%
add-cbrt-cube78.3%
pow378.3%
Applied egg-rr78.3%
Final simplification36.6%
b_m = (fabs.f64 b)
x-scale_m = (fabs.f64 x-scale)
y-scale_m = (fabs.f64 y-scale)
(FPCore (a b_m angle x-scale_m y-scale_m)
:precision binary64
(let* ((t_0 (* 0.25 (* y-scale_m (sqrt 8.0))))
(t_1 (* 0.005555555555555556 (* angle PI)))
(t_2 (* (cos t_1) a))
(t_3 (* PI (* 0.005555555555555556 angle))))
(if (<= y-scale_m 2.9e-95)
(*
0.25
(*
(* (sqrt 8.0) (* (pow 2.0 0.25) (* x-scale_m (pow 2.0 0.25))))
(hypot t_2 (* b_m (sin t_1)))))
(if (<= y-scale_m 1.9e-53)
(*
t_0
(*
(sqrt 2.0)
(hypot
(*
a
(sin
(* (* 0.005555555555555556 angle) (pow (cbrt (pow PI 1.5)) 2.0))))
b_m)))
(if (<= y-scale_m 6.5e+18)
(*
0.25
(*
(* (* x-scale_m (sqrt 2.0)) (sqrt 8.0))
(hypot
t_2
(*
b_m
(sin (* 0.005555555555555556 (* angle (pow (sqrt PI) 2.0))))))))
(if (<= y-scale_m 4.2e+84)
(*
(sqrt (* (* 8.0 (pow y-scale_m 2.0)) 0.0625))
(* (sqrt 2.0) (hypot (* a t_3) b_m)))
(if (<= y-scale_m 1.52e+140)
(*
-0.25
(*
(* x-scale_m (* y-scale_m (- (sqrt 8.0))))
(/ (* (sqrt 2.0) b_m) x-scale_m)))
(* t_0 (* (sqrt 2.0) (hypot (* a (sin t_3)) b_m))))))))))b_m = fabs(b);
x-scale_m = fabs(x_45_scale);
y-scale_m = fabs(y_45_scale);
double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double t_0 = 0.25 * (y_45_scale_m * sqrt(8.0));
double t_1 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_2 = cos(t_1) * a;
double t_3 = ((double) M_PI) * (0.005555555555555556 * angle);
double tmp;
if (y_45_scale_m <= 2.9e-95) {
tmp = 0.25 * ((sqrt(8.0) * (pow(2.0, 0.25) * (x_45_scale_m * pow(2.0, 0.25)))) * hypot(t_2, (b_m * sin(t_1))));
} else if (y_45_scale_m <= 1.9e-53) {
tmp = t_0 * (sqrt(2.0) * hypot((a * sin(((0.005555555555555556 * angle) * pow(cbrt(pow(((double) M_PI), 1.5)), 2.0)))), b_m));
} else if (y_45_scale_m <= 6.5e+18) {
tmp = 0.25 * (((x_45_scale_m * sqrt(2.0)) * sqrt(8.0)) * hypot(t_2, (b_m * sin((0.005555555555555556 * (angle * pow(sqrt(((double) M_PI)), 2.0)))))));
} else if (y_45_scale_m <= 4.2e+84) {
tmp = sqrt(((8.0 * pow(y_45_scale_m, 2.0)) * 0.0625)) * (sqrt(2.0) * hypot((a * t_3), b_m));
} else if (y_45_scale_m <= 1.52e+140) {
tmp = -0.25 * ((x_45_scale_m * (y_45_scale_m * -sqrt(8.0))) * ((sqrt(2.0) * b_m) / x_45_scale_m));
} else {
tmp = t_0 * (sqrt(2.0) * hypot((a * sin(t_3)), b_m));
}
return tmp;
}
b_m = Math.abs(b);
x-scale_m = Math.abs(x_45_scale);
y-scale_m = Math.abs(y_45_scale);
public static double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double t_0 = 0.25 * (y_45_scale_m * Math.sqrt(8.0));
double t_1 = 0.005555555555555556 * (angle * Math.PI);
double t_2 = Math.cos(t_1) * a;
double t_3 = Math.PI * (0.005555555555555556 * angle);
double tmp;
if (y_45_scale_m <= 2.9e-95) {
tmp = 0.25 * ((Math.sqrt(8.0) * (Math.pow(2.0, 0.25) * (x_45_scale_m * Math.pow(2.0, 0.25)))) * Math.hypot(t_2, (b_m * Math.sin(t_1))));
} else if (y_45_scale_m <= 1.9e-53) {
tmp = t_0 * (Math.sqrt(2.0) * Math.hypot((a * Math.sin(((0.005555555555555556 * angle) * Math.pow(Math.cbrt(Math.pow(Math.PI, 1.5)), 2.0)))), b_m));
} else if (y_45_scale_m <= 6.5e+18) {
tmp = 0.25 * (((x_45_scale_m * Math.sqrt(2.0)) * Math.sqrt(8.0)) * Math.hypot(t_2, (b_m * Math.sin((0.005555555555555556 * (angle * Math.pow(Math.sqrt(Math.PI), 2.0)))))));
} else if (y_45_scale_m <= 4.2e+84) {
tmp = Math.sqrt(((8.0 * Math.pow(y_45_scale_m, 2.0)) * 0.0625)) * (Math.sqrt(2.0) * Math.hypot((a * t_3), b_m));
} else if (y_45_scale_m <= 1.52e+140) {
tmp = -0.25 * ((x_45_scale_m * (y_45_scale_m * -Math.sqrt(8.0))) * ((Math.sqrt(2.0) * b_m) / x_45_scale_m));
} else {
tmp = t_0 * (Math.sqrt(2.0) * Math.hypot((a * Math.sin(t_3)), b_m));
}
return tmp;
}
b_m = abs(b) x-scale_m = abs(x_45_scale) y-scale_m = abs(y_45_scale) function code(a, b_m, angle, x_45_scale_m, y_45_scale_m) t_0 = Float64(0.25 * Float64(y_45_scale_m * sqrt(8.0))) t_1 = Float64(0.005555555555555556 * Float64(angle * pi)) t_2 = Float64(cos(t_1) * a) t_3 = Float64(pi * Float64(0.005555555555555556 * angle)) tmp = 0.0 if (y_45_scale_m <= 2.9e-95) tmp = Float64(0.25 * Float64(Float64(sqrt(8.0) * Float64((2.0 ^ 0.25) * Float64(x_45_scale_m * (2.0 ^ 0.25)))) * hypot(t_2, Float64(b_m * sin(t_1))))); elseif (y_45_scale_m <= 1.9e-53) tmp = Float64(t_0 * Float64(sqrt(2.0) * hypot(Float64(a * sin(Float64(Float64(0.005555555555555556 * angle) * (cbrt((pi ^ 1.5)) ^ 2.0)))), b_m))); elseif (y_45_scale_m <= 6.5e+18) tmp = Float64(0.25 * Float64(Float64(Float64(x_45_scale_m * sqrt(2.0)) * sqrt(8.0)) * hypot(t_2, Float64(b_m * sin(Float64(0.005555555555555556 * Float64(angle * (sqrt(pi) ^ 2.0)))))))); elseif (y_45_scale_m <= 4.2e+84) tmp = Float64(sqrt(Float64(Float64(8.0 * (y_45_scale_m ^ 2.0)) * 0.0625)) * Float64(sqrt(2.0) * hypot(Float64(a * t_3), b_m))); elseif (y_45_scale_m <= 1.52e+140) tmp = Float64(-0.25 * Float64(Float64(x_45_scale_m * Float64(y_45_scale_m * Float64(-sqrt(8.0)))) * Float64(Float64(sqrt(2.0) * b_m) / x_45_scale_m))); else tmp = Float64(t_0 * Float64(sqrt(2.0) * hypot(Float64(a * sin(t_3)), b_m))); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
y-scale_m = N[Abs[y$45$scale], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := Block[{t$95$0 = N[(0.25 * N[(y$45$scale$95$m * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Cos[t$95$1], $MachinePrecision] * a), $MachinePrecision]}, Block[{t$95$3 = N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$45$scale$95$m, 2.9e-95], N[(0.25 * N[(N[(N[Sqrt[8.0], $MachinePrecision] * N[(N[Power[2.0, 0.25], $MachinePrecision] * N[(x$45$scale$95$m * N[Power[2.0, 0.25], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[t$95$2 ^ 2 + N[(b$95$m * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 1.9e-53], N[(t$95$0 * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a * N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * N[Power[N[Power[N[Power[Pi, 1.5], $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] ^ 2 + b$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 6.5e+18], N[(0.25 * N[(N[(N[(x$45$scale$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[t$95$2 ^ 2 + N[(b$95$m * N[Sin[N[(0.005555555555555556 * N[(angle * N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 4.2e+84], N[(N[Sqrt[N[(N[(8.0 * N[Power[y$45$scale$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * 0.0625), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a * t$95$3), $MachinePrecision] ^ 2 + b$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 1.52e+140], N[(-0.25 * N[(N[(x$45$scale$95$m * N[(y$45$scale$95$m * (-N[Sqrt[8.0], $MachinePrecision])), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sqrt[2.0], $MachinePrecision] * b$95$m), $MachinePrecision] / x$45$scale$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a * N[Sin[t$95$3], $MachinePrecision]), $MachinePrecision] ^ 2 + b$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
x-scale_m = \left|x-scale\right|
\\
y-scale_m = \left|y-scale\right|
\\
\begin{array}{l}
t_0 := 0.25 \cdot \left(y-scale\_m \cdot \sqrt{8}\right)\\
t_1 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_2 := \cos t\_1 \cdot a\\
t_3 := \pi \cdot \left(0.005555555555555556 \cdot angle\right)\\
\mathbf{if}\;y-scale\_m \leq 2.9 \cdot 10^{-95}:\\
\;\;\;\;0.25 \cdot \left(\left(\sqrt{8} \cdot \left({2}^{0.25} \cdot \left(x-scale\_m \cdot {2}^{0.25}\right)\right)\right) \cdot \mathsf{hypot}\left(t\_2, b\_m \cdot \sin t\_1\right)\right)\\
\mathbf{elif}\;y-scale\_m \leq 1.9 \cdot 10^{-53}:\\
\;\;\;\;t\_0 \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot \sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot {\left(\sqrt[3]{{\pi}^{1.5}}\right)}^{2}\right), b\_m\right)\right)\\
\mathbf{elif}\;y-scale\_m \leq 6.5 \cdot 10^{+18}:\\
\;\;\;\;0.25 \cdot \left(\left(\left(x-scale\_m \cdot \sqrt{2}\right) \cdot \sqrt{8}\right) \cdot \mathsf{hypot}\left(t\_2, b\_m \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot {\left(\sqrt{\pi}\right)}^{2}\right)\right)\right)\right)\\
\mathbf{elif}\;y-scale\_m \leq 4.2 \cdot 10^{+84}:\\
\;\;\;\;\sqrt{\left(8 \cdot {y-scale\_m}^{2}\right) \cdot 0.0625} \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot t\_3, b\_m\right)\right)\\
\mathbf{elif}\;y-scale\_m \leq 1.52 \cdot 10^{+140}:\\
\;\;\;\;-0.25 \cdot \left(\left(x-scale\_m \cdot \left(y-scale\_m \cdot \left(-\sqrt{8}\right)\right)\right) \cdot \frac{\sqrt{2} \cdot b\_m}{x-scale\_m}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot \sin t\_3, b\_m\right)\right)\\
\end{array}
\end{array}
if y-scale < 2.90000000000000002e-95Initial program 2.1%
Simplified2.1%
Taylor expanded in y-scale around 0 9.0%
associate-*r*9.0%
distribute-lft-out9.0%
Simplified9.6%
Taylor expanded in x-scale around 0 25.1%
Simplified26.1%
add-sqr-sqrt25.0%
pow225.0%
*-commutative25.0%
Applied egg-rr25.0%
unpow225.0%
add-sqr-sqrt26.1%
add-sqr-sqrt26.2%
associate-*l*26.1%
pow1/226.1%
sqrt-pow126.1%
metadata-eval26.1%
pow1/226.1%
sqrt-pow126.1%
metadata-eval26.1%
Applied egg-rr26.1%
if 2.90000000000000002e-95 < y-scale < 1.8999999999999999e-53Initial program 0.5%
Simplified0.5%
Taylor expanded in x-scale around 0 32.1%
associate-*r*32.1%
distribute-lft-out32.1%
Simplified35.6%
Taylor expanded in angle around 0 35.6%
pow1/235.6%
*-commutative35.6%
unpow-prod-down35.6%
Applied egg-rr48.9%
add-sqr-sqrt49.1%
pow249.1%
Applied egg-rr49.1%
add-cbrt-cube49.1%
pow1/349.1%
add-sqr-sqrt49.1%
pow149.1%
pow1/249.1%
pow-prod-up49.1%
metadata-eval49.1%
Applied egg-rr49.1%
unpow1/350.0%
Simplified50.0%
if 1.8999999999999999e-53 < y-scale < 6.5e18Initial program 0.0%
Simplified0.2%
Taylor expanded in y-scale around 0 11.5%
associate-*r*11.5%
distribute-lft-out11.5%
Simplified11.6%
Taylor expanded in x-scale around 0 11.9%
Simplified12.9%
add-sqr-sqrt27.6%
pow227.6%
Applied egg-rr12.9%
if 6.5e18 < y-scale < 4.20000000000000037e84Initial program 0.5%
Simplified0.8%
Taylor expanded in x-scale around 0 45.8%
associate-*r*45.8%
distribute-lft-out45.8%
Simplified45.8%
Taylor expanded in angle around 0 45.8%
pow1/245.8%
*-commutative45.8%
unpow-prod-down45.6%
Applied egg-rr54.5%
Taylor expanded in angle around 0 53.5%
associate-*r*53.5%
Simplified53.5%
add-sqr-sqrt53.3%
sqrt-unprod53.5%
swap-sqr53.5%
metadata-eval53.5%
metadata-eval53.5%
swap-sqr53.5%
*-commutative53.5%
*-commutative53.5%
swap-sqr53.5%
*-commutative53.5%
*-commutative53.5%
swap-sqr53.2%
rem-square-sqrt54.0%
pow254.0%
metadata-eval54.0%
Applied egg-rr54.0%
if 4.20000000000000037e84 < y-scale < 1.52e140Initial program 8.3%
Simplified0.0%
Taylor expanded in a around 0 0.2%
Simplified0.2%
Taylor expanded in angle around 0 34.7%
if 1.52e140 < y-scale Initial program 6.9%
Simplified6.9%
Taylor expanded in x-scale around 0 76.6%
associate-*r*76.6%
distribute-lft-out76.6%
Simplified82.7%
Taylor expanded in angle around 0 85.5%
pow1/285.5%
*-commutative85.5%
unpow-prod-down85.4%
Applied egg-rr89.2%
Final simplification35.0%
b_m = (fabs.f64 b)
x-scale_m = (fabs.f64 x-scale)
y-scale_m = (fabs.f64 y-scale)
(FPCore (a b_m angle x-scale_m y-scale_m)
:precision binary64
(let* ((t_0 (* 0.25 (* y-scale_m (sqrt 8.0))))
(t_1 (* 0.005555555555555556 (* angle PI)))
(t_2 (* b_m (sin t_1)))
(t_3 (* PI (* 0.005555555555555556 angle))))
(if (<= y-scale_m 3.5e-95)
(*
0.25
(*
(* (sqrt 8.0) (* (pow 2.0 0.25) (* x-scale_m (pow 2.0 0.25))))
(hypot (* (cos t_1) a) t_2)))
(if (<= y-scale_m 1.9e-53)
(*
t_0
(*
(sqrt 2.0)
(hypot
(*
a
(sin
(* (* 0.005555555555555556 angle) (pow (cbrt (pow PI 1.5)) 2.0))))
b_m)))
(if (<= y-scale_m 4.4e+18)
(*
0.25
(*
(* (sqrt 8.0) (pow (sqrt (* x-scale_m (sqrt 2.0))) 2.0))
(hypot a t_2)))
(if (<= y-scale_m 4.2e+84)
(*
(sqrt (* (* 8.0 (pow y-scale_m 2.0)) 0.0625))
(* (sqrt 2.0) (hypot (* a t_3) b_m)))
(if (<= y-scale_m 1.52e+140)
(*
-0.25
(*
(* x-scale_m (* y-scale_m (- (sqrt 8.0))))
(/ (* (sqrt 2.0) b_m) x-scale_m)))
(* t_0 (* (sqrt 2.0) (hypot (* a (sin t_3)) b_m))))))))))b_m = fabs(b);
x-scale_m = fabs(x_45_scale);
y-scale_m = fabs(y_45_scale);
double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double t_0 = 0.25 * (y_45_scale_m * sqrt(8.0));
double t_1 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_2 = b_m * sin(t_1);
double t_3 = ((double) M_PI) * (0.005555555555555556 * angle);
double tmp;
if (y_45_scale_m <= 3.5e-95) {
tmp = 0.25 * ((sqrt(8.0) * (pow(2.0, 0.25) * (x_45_scale_m * pow(2.0, 0.25)))) * hypot((cos(t_1) * a), t_2));
} else if (y_45_scale_m <= 1.9e-53) {
tmp = t_0 * (sqrt(2.0) * hypot((a * sin(((0.005555555555555556 * angle) * pow(cbrt(pow(((double) M_PI), 1.5)), 2.0)))), b_m));
} else if (y_45_scale_m <= 4.4e+18) {
tmp = 0.25 * ((sqrt(8.0) * pow(sqrt((x_45_scale_m * sqrt(2.0))), 2.0)) * hypot(a, t_2));
} else if (y_45_scale_m <= 4.2e+84) {
tmp = sqrt(((8.0 * pow(y_45_scale_m, 2.0)) * 0.0625)) * (sqrt(2.0) * hypot((a * t_3), b_m));
} else if (y_45_scale_m <= 1.52e+140) {
tmp = -0.25 * ((x_45_scale_m * (y_45_scale_m * -sqrt(8.0))) * ((sqrt(2.0) * b_m) / x_45_scale_m));
} else {
tmp = t_0 * (sqrt(2.0) * hypot((a * sin(t_3)), b_m));
}
return tmp;
}
b_m = Math.abs(b);
x-scale_m = Math.abs(x_45_scale);
y-scale_m = Math.abs(y_45_scale);
public static double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double t_0 = 0.25 * (y_45_scale_m * Math.sqrt(8.0));
double t_1 = 0.005555555555555556 * (angle * Math.PI);
double t_2 = b_m * Math.sin(t_1);
double t_3 = Math.PI * (0.005555555555555556 * angle);
double tmp;
if (y_45_scale_m <= 3.5e-95) {
tmp = 0.25 * ((Math.sqrt(8.0) * (Math.pow(2.0, 0.25) * (x_45_scale_m * Math.pow(2.0, 0.25)))) * Math.hypot((Math.cos(t_1) * a), t_2));
} else if (y_45_scale_m <= 1.9e-53) {
tmp = t_0 * (Math.sqrt(2.0) * Math.hypot((a * Math.sin(((0.005555555555555556 * angle) * Math.pow(Math.cbrt(Math.pow(Math.PI, 1.5)), 2.0)))), b_m));
} else if (y_45_scale_m <= 4.4e+18) {
tmp = 0.25 * ((Math.sqrt(8.0) * Math.pow(Math.sqrt((x_45_scale_m * Math.sqrt(2.0))), 2.0)) * Math.hypot(a, t_2));
} else if (y_45_scale_m <= 4.2e+84) {
tmp = Math.sqrt(((8.0 * Math.pow(y_45_scale_m, 2.0)) * 0.0625)) * (Math.sqrt(2.0) * Math.hypot((a * t_3), b_m));
} else if (y_45_scale_m <= 1.52e+140) {
tmp = -0.25 * ((x_45_scale_m * (y_45_scale_m * -Math.sqrt(8.0))) * ((Math.sqrt(2.0) * b_m) / x_45_scale_m));
} else {
tmp = t_0 * (Math.sqrt(2.0) * Math.hypot((a * Math.sin(t_3)), b_m));
}
return tmp;
}
b_m = abs(b) x-scale_m = abs(x_45_scale) y-scale_m = abs(y_45_scale) function code(a, b_m, angle, x_45_scale_m, y_45_scale_m) t_0 = Float64(0.25 * Float64(y_45_scale_m * sqrt(8.0))) t_1 = Float64(0.005555555555555556 * Float64(angle * pi)) t_2 = Float64(b_m * sin(t_1)) t_3 = Float64(pi * Float64(0.005555555555555556 * angle)) tmp = 0.0 if (y_45_scale_m <= 3.5e-95) tmp = Float64(0.25 * Float64(Float64(sqrt(8.0) * Float64((2.0 ^ 0.25) * Float64(x_45_scale_m * (2.0 ^ 0.25)))) * hypot(Float64(cos(t_1) * a), t_2))); elseif (y_45_scale_m <= 1.9e-53) tmp = Float64(t_0 * Float64(sqrt(2.0) * hypot(Float64(a * sin(Float64(Float64(0.005555555555555556 * angle) * (cbrt((pi ^ 1.5)) ^ 2.0)))), b_m))); elseif (y_45_scale_m <= 4.4e+18) tmp = Float64(0.25 * Float64(Float64(sqrt(8.0) * (sqrt(Float64(x_45_scale_m * sqrt(2.0))) ^ 2.0)) * hypot(a, t_2))); elseif (y_45_scale_m <= 4.2e+84) tmp = Float64(sqrt(Float64(Float64(8.0 * (y_45_scale_m ^ 2.0)) * 0.0625)) * Float64(sqrt(2.0) * hypot(Float64(a * t_3), b_m))); elseif (y_45_scale_m <= 1.52e+140) tmp = Float64(-0.25 * Float64(Float64(x_45_scale_m * Float64(y_45_scale_m * Float64(-sqrt(8.0)))) * Float64(Float64(sqrt(2.0) * b_m) / x_45_scale_m))); else tmp = Float64(t_0 * Float64(sqrt(2.0) * hypot(Float64(a * sin(t_3)), b_m))); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
y-scale_m = N[Abs[y$45$scale], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := Block[{t$95$0 = N[(0.25 * N[(y$45$scale$95$m * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b$95$m * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$45$scale$95$m, 3.5e-95], N[(0.25 * N[(N[(N[Sqrt[8.0], $MachinePrecision] * N[(N[Power[2.0, 0.25], $MachinePrecision] * N[(x$45$scale$95$m * N[Power[2.0, 0.25], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[Cos[t$95$1], $MachinePrecision] * a), $MachinePrecision] ^ 2 + t$95$2 ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 1.9e-53], N[(t$95$0 * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a * N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * N[Power[N[Power[N[Power[Pi, 1.5], $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] ^ 2 + b$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 4.4e+18], N[(0.25 * N[(N[(N[Sqrt[8.0], $MachinePrecision] * N[Power[N[Sqrt[N[(x$45$scale$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[a ^ 2 + t$95$2 ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 4.2e+84], N[(N[Sqrt[N[(N[(8.0 * N[Power[y$45$scale$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * 0.0625), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a * t$95$3), $MachinePrecision] ^ 2 + b$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 1.52e+140], N[(-0.25 * N[(N[(x$45$scale$95$m * N[(y$45$scale$95$m * (-N[Sqrt[8.0], $MachinePrecision])), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sqrt[2.0], $MachinePrecision] * b$95$m), $MachinePrecision] / x$45$scale$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a * N[Sin[t$95$3], $MachinePrecision]), $MachinePrecision] ^ 2 + b$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
x-scale_m = \left|x-scale\right|
\\
y-scale_m = \left|y-scale\right|
\\
\begin{array}{l}
t_0 := 0.25 \cdot \left(y-scale\_m \cdot \sqrt{8}\right)\\
t_1 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_2 := b\_m \cdot \sin t\_1\\
t_3 := \pi \cdot \left(0.005555555555555556 \cdot angle\right)\\
\mathbf{if}\;y-scale\_m \leq 3.5 \cdot 10^{-95}:\\
\;\;\;\;0.25 \cdot \left(\left(\sqrt{8} \cdot \left({2}^{0.25} \cdot \left(x-scale\_m \cdot {2}^{0.25}\right)\right)\right) \cdot \mathsf{hypot}\left(\cos t\_1 \cdot a, t\_2\right)\right)\\
\mathbf{elif}\;y-scale\_m \leq 1.9 \cdot 10^{-53}:\\
\;\;\;\;t\_0 \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot \sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot {\left(\sqrt[3]{{\pi}^{1.5}}\right)}^{2}\right), b\_m\right)\right)\\
\mathbf{elif}\;y-scale\_m \leq 4.4 \cdot 10^{+18}:\\
\;\;\;\;0.25 \cdot \left(\left(\sqrt{8} \cdot {\left(\sqrt{x-scale\_m \cdot \sqrt{2}}\right)}^{2}\right) \cdot \mathsf{hypot}\left(a, t\_2\right)\right)\\
\mathbf{elif}\;y-scale\_m \leq 4.2 \cdot 10^{+84}:\\
\;\;\;\;\sqrt{\left(8 \cdot {y-scale\_m}^{2}\right) \cdot 0.0625} \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot t\_3, b\_m\right)\right)\\
\mathbf{elif}\;y-scale\_m \leq 1.52 \cdot 10^{+140}:\\
\;\;\;\;-0.25 \cdot \left(\left(x-scale\_m \cdot \left(y-scale\_m \cdot \left(-\sqrt{8}\right)\right)\right) \cdot \frac{\sqrt{2} \cdot b\_m}{x-scale\_m}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot \sin t\_3, b\_m\right)\right)\\
\end{array}
\end{array}
if y-scale < 3.4999999999999997e-95Initial program 2.1%
Simplified2.1%
Taylor expanded in y-scale around 0 9.0%
associate-*r*9.0%
distribute-lft-out9.0%
Simplified9.6%
Taylor expanded in x-scale around 0 25.1%
Simplified26.1%
add-sqr-sqrt25.0%
pow225.0%
*-commutative25.0%
Applied egg-rr25.0%
unpow225.0%
add-sqr-sqrt26.1%
add-sqr-sqrt26.2%
associate-*l*26.1%
pow1/226.1%
sqrt-pow126.1%
metadata-eval26.1%
pow1/226.1%
sqrt-pow126.1%
metadata-eval26.1%
Applied egg-rr26.1%
if 3.4999999999999997e-95 < y-scale < 1.8999999999999999e-53Initial program 0.5%
Simplified0.5%
Taylor expanded in x-scale around 0 32.1%
associate-*r*32.1%
distribute-lft-out32.1%
Simplified35.6%
Taylor expanded in angle around 0 35.6%
pow1/235.6%
*-commutative35.6%
unpow-prod-down35.6%
Applied egg-rr48.9%
add-sqr-sqrt49.1%
pow249.1%
Applied egg-rr49.1%
add-cbrt-cube49.1%
pow1/349.1%
add-sqr-sqrt49.1%
pow149.1%
pow1/249.1%
pow-prod-up49.1%
metadata-eval49.1%
Applied egg-rr49.1%
unpow1/350.0%
Simplified50.0%
if 1.8999999999999999e-53 < y-scale < 4.4e18Initial program 0.0%
Simplified0.2%
Taylor expanded in y-scale around 0 11.5%
associate-*r*11.5%
distribute-lft-out11.5%
Simplified11.6%
Taylor expanded in x-scale around 0 11.9%
Simplified12.9%
add-sqr-sqrt12.4%
pow212.4%
*-commutative12.4%
Applied egg-rr12.4%
Taylor expanded in angle around 0 12.3%
if 4.4e18 < y-scale < 4.20000000000000037e84Initial program 0.5%
Simplified0.8%
Taylor expanded in x-scale around 0 45.8%
associate-*r*45.8%
distribute-lft-out45.8%
Simplified45.8%
Taylor expanded in angle around 0 45.8%
pow1/245.8%
*-commutative45.8%
unpow-prod-down45.6%
Applied egg-rr54.5%
Taylor expanded in angle around 0 53.5%
associate-*r*53.5%
Simplified53.5%
add-sqr-sqrt53.3%
sqrt-unprod53.5%
swap-sqr53.5%
metadata-eval53.5%
metadata-eval53.5%
swap-sqr53.5%
*-commutative53.5%
*-commutative53.5%
swap-sqr53.5%
*-commutative53.5%
*-commutative53.5%
swap-sqr53.2%
rem-square-sqrt54.0%
pow254.0%
metadata-eval54.0%
Applied egg-rr54.0%
if 4.20000000000000037e84 < y-scale < 1.52e140Initial program 8.3%
Simplified0.0%
Taylor expanded in a around 0 0.2%
Simplified0.2%
Taylor expanded in angle around 0 34.7%
if 1.52e140 < y-scale Initial program 6.9%
Simplified6.9%
Taylor expanded in x-scale around 0 76.6%
associate-*r*76.6%
distribute-lft-out76.6%
Simplified82.7%
Taylor expanded in angle around 0 85.5%
pow1/285.5%
*-commutative85.5%
unpow-prod-down85.4%
Applied egg-rr89.2%
Final simplification35.0%
b_m = (fabs.f64 b)
x-scale_m = (fabs.f64 x-scale)
y-scale_m = (fabs.f64 y-scale)
(FPCore (a b_m angle x-scale_m y-scale_m)
:precision binary64
(let* ((t_0 (* 0.25 (* y-scale_m (sqrt 8.0))))
(t_1 (* 0.005555555555555556 (* angle PI)))
(t_2 (* PI (* 0.005555555555555556 angle)))
(t_3 (* b_m (sin t_1))))
(if (<= y-scale_m 2.2e-99)
(*
0.25
(*
(* (sqrt 8.0) (* (pow 2.0 0.25) (* x-scale_m (pow 2.0 0.25))))
(hypot (* (cos t_1) a) t_3)))
(if (<= y-scale_m 3.9e-53)
(*
t_0
(*
(sqrt 2.0)
(hypot
(*
a
(sin
(* (* 0.005555555555555556 angle) (cbrt (exp (* 3.0 (log PI)))))))
b_m)))
(if (<= y-scale_m 2e+18)
(*
0.25
(*
(* (sqrt 8.0) (pow (sqrt (* x-scale_m (sqrt 2.0))) 2.0))
(hypot a t_3)))
(if (<= y-scale_m 3.3e+84)
(*
(sqrt (* (* 8.0 (pow y-scale_m 2.0)) 0.0625))
(* (sqrt 2.0) (hypot (* a t_2) b_m)))
(if (<= y-scale_m 1.52e+140)
(*
-0.25
(*
(* x-scale_m (* y-scale_m (- (sqrt 8.0))))
(/ (* (sqrt 2.0) b_m) x-scale_m)))
(* t_0 (* (sqrt 2.0) (hypot (* a (sin t_2)) b_m))))))))))b_m = fabs(b);
x-scale_m = fabs(x_45_scale);
y-scale_m = fabs(y_45_scale);
double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double t_0 = 0.25 * (y_45_scale_m * sqrt(8.0));
double t_1 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_2 = ((double) M_PI) * (0.005555555555555556 * angle);
double t_3 = b_m * sin(t_1);
double tmp;
if (y_45_scale_m <= 2.2e-99) {
tmp = 0.25 * ((sqrt(8.0) * (pow(2.0, 0.25) * (x_45_scale_m * pow(2.0, 0.25)))) * hypot((cos(t_1) * a), t_3));
} else if (y_45_scale_m <= 3.9e-53) {
tmp = t_0 * (sqrt(2.0) * hypot((a * sin(((0.005555555555555556 * angle) * cbrt(exp((3.0 * log(((double) M_PI)))))))), b_m));
} else if (y_45_scale_m <= 2e+18) {
tmp = 0.25 * ((sqrt(8.0) * pow(sqrt((x_45_scale_m * sqrt(2.0))), 2.0)) * hypot(a, t_3));
} else if (y_45_scale_m <= 3.3e+84) {
tmp = sqrt(((8.0 * pow(y_45_scale_m, 2.0)) * 0.0625)) * (sqrt(2.0) * hypot((a * t_2), b_m));
} else if (y_45_scale_m <= 1.52e+140) {
tmp = -0.25 * ((x_45_scale_m * (y_45_scale_m * -sqrt(8.0))) * ((sqrt(2.0) * b_m) / x_45_scale_m));
} else {
tmp = t_0 * (sqrt(2.0) * hypot((a * sin(t_2)), b_m));
}
return tmp;
}
b_m = Math.abs(b);
x-scale_m = Math.abs(x_45_scale);
y-scale_m = Math.abs(y_45_scale);
public static double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double t_0 = 0.25 * (y_45_scale_m * Math.sqrt(8.0));
double t_1 = 0.005555555555555556 * (angle * Math.PI);
double t_2 = Math.PI * (0.005555555555555556 * angle);
double t_3 = b_m * Math.sin(t_1);
double tmp;
if (y_45_scale_m <= 2.2e-99) {
tmp = 0.25 * ((Math.sqrt(8.0) * (Math.pow(2.0, 0.25) * (x_45_scale_m * Math.pow(2.0, 0.25)))) * Math.hypot((Math.cos(t_1) * a), t_3));
} else if (y_45_scale_m <= 3.9e-53) {
tmp = t_0 * (Math.sqrt(2.0) * Math.hypot((a * Math.sin(((0.005555555555555556 * angle) * Math.cbrt(Math.exp((3.0 * Math.log(Math.PI))))))), b_m));
} else if (y_45_scale_m <= 2e+18) {
tmp = 0.25 * ((Math.sqrt(8.0) * Math.pow(Math.sqrt((x_45_scale_m * Math.sqrt(2.0))), 2.0)) * Math.hypot(a, t_3));
} else if (y_45_scale_m <= 3.3e+84) {
tmp = Math.sqrt(((8.0 * Math.pow(y_45_scale_m, 2.0)) * 0.0625)) * (Math.sqrt(2.0) * Math.hypot((a * t_2), b_m));
} else if (y_45_scale_m <= 1.52e+140) {
tmp = -0.25 * ((x_45_scale_m * (y_45_scale_m * -Math.sqrt(8.0))) * ((Math.sqrt(2.0) * b_m) / x_45_scale_m));
} else {
tmp = t_0 * (Math.sqrt(2.0) * Math.hypot((a * Math.sin(t_2)), b_m));
}
return tmp;
}
b_m = abs(b) x-scale_m = abs(x_45_scale) y-scale_m = abs(y_45_scale) function code(a, b_m, angle, x_45_scale_m, y_45_scale_m) t_0 = Float64(0.25 * Float64(y_45_scale_m * sqrt(8.0))) t_1 = Float64(0.005555555555555556 * Float64(angle * pi)) t_2 = Float64(pi * Float64(0.005555555555555556 * angle)) t_3 = Float64(b_m * sin(t_1)) tmp = 0.0 if (y_45_scale_m <= 2.2e-99) tmp = Float64(0.25 * Float64(Float64(sqrt(8.0) * Float64((2.0 ^ 0.25) * Float64(x_45_scale_m * (2.0 ^ 0.25)))) * hypot(Float64(cos(t_1) * a), t_3))); elseif (y_45_scale_m <= 3.9e-53) tmp = Float64(t_0 * Float64(sqrt(2.0) * hypot(Float64(a * sin(Float64(Float64(0.005555555555555556 * angle) * cbrt(exp(Float64(3.0 * log(pi))))))), b_m))); elseif (y_45_scale_m <= 2e+18) tmp = Float64(0.25 * Float64(Float64(sqrt(8.0) * (sqrt(Float64(x_45_scale_m * sqrt(2.0))) ^ 2.0)) * hypot(a, t_3))); elseif (y_45_scale_m <= 3.3e+84) tmp = Float64(sqrt(Float64(Float64(8.0 * (y_45_scale_m ^ 2.0)) * 0.0625)) * Float64(sqrt(2.0) * hypot(Float64(a * t_2), b_m))); elseif (y_45_scale_m <= 1.52e+140) tmp = Float64(-0.25 * Float64(Float64(x_45_scale_m * Float64(y_45_scale_m * Float64(-sqrt(8.0)))) * Float64(Float64(sqrt(2.0) * b_m) / x_45_scale_m))); else tmp = Float64(t_0 * Float64(sqrt(2.0) * hypot(Float64(a * sin(t_2)), b_m))); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
y-scale_m = N[Abs[y$45$scale], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := Block[{t$95$0 = N[(0.25 * N[(y$45$scale$95$m * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(b$95$m * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$45$scale$95$m, 2.2e-99], N[(0.25 * N[(N[(N[Sqrt[8.0], $MachinePrecision] * N[(N[Power[2.0, 0.25], $MachinePrecision] * N[(x$45$scale$95$m * N[Power[2.0, 0.25], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[Cos[t$95$1], $MachinePrecision] * a), $MachinePrecision] ^ 2 + t$95$3 ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 3.9e-53], N[(t$95$0 * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a * N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * N[Power[N[Exp[N[(3.0 * N[Log[Pi], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] ^ 2 + b$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 2e+18], N[(0.25 * N[(N[(N[Sqrt[8.0], $MachinePrecision] * N[Power[N[Sqrt[N[(x$45$scale$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[a ^ 2 + t$95$3 ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 3.3e+84], N[(N[Sqrt[N[(N[(8.0 * N[Power[y$45$scale$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * 0.0625), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a * t$95$2), $MachinePrecision] ^ 2 + b$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 1.52e+140], N[(-0.25 * N[(N[(x$45$scale$95$m * N[(y$45$scale$95$m * (-N[Sqrt[8.0], $MachinePrecision])), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sqrt[2.0], $MachinePrecision] * b$95$m), $MachinePrecision] / x$45$scale$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision] ^ 2 + b$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
x-scale_m = \left|x-scale\right|
\\
y-scale_m = \left|y-scale\right|
\\
\begin{array}{l}
t_0 := 0.25 \cdot \left(y-scale\_m \cdot \sqrt{8}\right)\\
t_1 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_2 := \pi \cdot \left(0.005555555555555556 \cdot angle\right)\\
t_3 := b\_m \cdot \sin t\_1\\
\mathbf{if}\;y-scale\_m \leq 2.2 \cdot 10^{-99}:\\
\;\;\;\;0.25 \cdot \left(\left(\sqrt{8} \cdot \left({2}^{0.25} \cdot \left(x-scale\_m \cdot {2}^{0.25}\right)\right)\right) \cdot \mathsf{hypot}\left(\cos t\_1 \cdot a, t\_3\right)\right)\\
\mathbf{elif}\;y-scale\_m \leq 3.9 \cdot 10^{-53}:\\
\;\;\;\;t\_0 \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot \sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \sqrt[3]{e^{3 \cdot \log \pi}}\right), b\_m\right)\right)\\
\mathbf{elif}\;y-scale\_m \leq 2 \cdot 10^{+18}:\\
\;\;\;\;0.25 \cdot \left(\left(\sqrt{8} \cdot {\left(\sqrt{x-scale\_m \cdot \sqrt{2}}\right)}^{2}\right) \cdot \mathsf{hypot}\left(a, t\_3\right)\right)\\
\mathbf{elif}\;y-scale\_m \leq 3.3 \cdot 10^{+84}:\\
\;\;\;\;\sqrt{\left(8 \cdot {y-scale\_m}^{2}\right) \cdot 0.0625} \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot t\_2, b\_m\right)\right)\\
\mathbf{elif}\;y-scale\_m \leq 1.52 \cdot 10^{+140}:\\
\;\;\;\;-0.25 \cdot \left(\left(x-scale\_m \cdot \left(y-scale\_m \cdot \left(-\sqrt{8}\right)\right)\right) \cdot \frac{\sqrt{2} \cdot b\_m}{x-scale\_m}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot \sin t\_2, b\_m\right)\right)\\
\end{array}
\end{array}
if y-scale < 2.20000000000000004e-99Initial program 2.1%
Simplified2.1%
Taylor expanded in y-scale around 0 9.0%
associate-*r*9.0%
distribute-lft-out9.0%
Simplified9.6%
Taylor expanded in x-scale around 0 25.1%
Simplified26.1%
add-sqr-sqrt25.0%
pow225.0%
*-commutative25.0%
Applied egg-rr25.0%
unpow225.0%
add-sqr-sqrt26.1%
add-sqr-sqrt26.2%
associate-*l*26.1%
pow1/226.1%
sqrt-pow126.1%
metadata-eval26.1%
pow1/226.1%
sqrt-pow126.1%
metadata-eval26.1%
Applied egg-rr26.1%
if 2.20000000000000004e-99 < y-scale < 3.9000000000000002e-53Initial program 0.5%
Simplified0.5%
Taylor expanded in x-scale around 0 29.2%
associate-*r*29.2%
distribute-lft-out29.2%
Simplified32.3%
Taylor expanded in angle around 0 32.3%
pow1/232.3%
*-commutative32.3%
unpow-prod-down32.3%
Applied egg-rr46.7%
add-cbrt-cube46.5%
pow346.5%
Applied egg-rr46.5%
add-exp-log46.5%
log-pow46.9%
Applied egg-rr46.9%
if 3.9000000000000002e-53 < y-scale < 2e18Initial program 0.0%
Simplified0.2%
Taylor expanded in y-scale around 0 12.1%
associate-*r*12.1%
distribute-lft-out12.1%
Simplified12.2%
Taylor expanded in x-scale around 0 12.2%
Simplified13.4%
add-sqr-sqrt12.8%
pow212.8%
*-commutative12.8%
Applied egg-rr12.8%
Taylor expanded in angle around 0 12.8%
if 2e18 < y-scale < 3.30000000000000017e84Initial program 0.5%
Simplified0.8%
Taylor expanded in x-scale around 0 45.8%
associate-*r*45.8%
distribute-lft-out45.8%
Simplified45.8%
Taylor expanded in angle around 0 45.8%
pow1/245.8%
*-commutative45.8%
unpow-prod-down45.6%
Applied egg-rr54.5%
Taylor expanded in angle around 0 53.5%
associate-*r*53.5%
Simplified53.5%
add-sqr-sqrt53.3%
sqrt-unprod53.5%
swap-sqr53.5%
metadata-eval53.5%
metadata-eval53.5%
swap-sqr53.5%
*-commutative53.5%
*-commutative53.5%
swap-sqr53.5%
*-commutative53.5%
*-commutative53.5%
swap-sqr53.2%
rem-square-sqrt54.0%
pow254.0%
metadata-eval54.0%
Applied egg-rr54.0%
if 3.30000000000000017e84 < y-scale < 1.52e140Initial program 8.3%
Simplified0.0%
Taylor expanded in a around 0 0.2%
Simplified0.2%
Taylor expanded in angle around 0 34.7%
if 1.52e140 < y-scale Initial program 6.9%
Simplified6.9%
Taylor expanded in x-scale around 0 76.6%
associate-*r*76.6%
distribute-lft-out76.6%
Simplified82.7%
Taylor expanded in angle around 0 85.5%
pow1/285.5%
*-commutative85.5%
unpow-prod-down85.4%
Applied egg-rr89.2%
Final simplification35.0%
b_m = (fabs.f64 b)
x-scale_m = (fabs.f64 x-scale)
y-scale_m = (fabs.f64 y-scale)
(FPCore (a b_m angle x-scale_m y-scale_m)
:precision binary64
(let* ((t_0 (* 0.25 (* y-scale_m (sqrt 8.0))))
(t_1 (* PI (* 0.005555555555555556 angle)))
(t_2 (* 0.005555555555555556 (* angle PI)))
(t_3 (* b_m (sin t_2))))
(if (<= y-scale_m 2.25e-95)
(*
0.25
(*
(* (sqrt 8.0) (* (pow 2.0 0.25) (* x-scale_m (pow 2.0 0.25))))
(hypot (* (cos t_2) a) t_3)))
(if (<= y-scale_m 7.4e-53)
(*
t_0
(*
(sqrt 2.0)
(hypot
(* a (sin (* (* 0.005555555555555556 angle) (pow (sqrt PI) 2.0))))
b_m)))
(if (<= y-scale_m 2.7e+18)
(*
0.25
(*
(* (sqrt 8.0) (pow (sqrt (* x-scale_m (sqrt 2.0))) 2.0))
(hypot a t_3)))
(if (<= y-scale_m 4.2e+84)
(*
(sqrt (* (* 8.0 (pow y-scale_m 2.0)) 0.0625))
(* (sqrt 2.0) (hypot (* a t_1) b_m)))
(if (<= y-scale_m 1.52e+140)
(*
-0.25
(*
(* x-scale_m (* y-scale_m (- (sqrt 8.0))))
(/ (* (sqrt 2.0) b_m) x-scale_m)))
(* t_0 (* (sqrt 2.0) (hypot (* a (sin t_1)) b_m))))))))))b_m = fabs(b);
x-scale_m = fabs(x_45_scale);
y-scale_m = fabs(y_45_scale);
double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double t_0 = 0.25 * (y_45_scale_m * sqrt(8.0));
double t_1 = ((double) M_PI) * (0.005555555555555556 * angle);
double t_2 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_3 = b_m * sin(t_2);
double tmp;
if (y_45_scale_m <= 2.25e-95) {
tmp = 0.25 * ((sqrt(8.0) * (pow(2.0, 0.25) * (x_45_scale_m * pow(2.0, 0.25)))) * hypot((cos(t_2) * a), t_3));
} else if (y_45_scale_m <= 7.4e-53) {
tmp = t_0 * (sqrt(2.0) * hypot((a * sin(((0.005555555555555556 * angle) * pow(sqrt(((double) M_PI)), 2.0)))), b_m));
} else if (y_45_scale_m <= 2.7e+18) {
tmp = 0.25 * ((sqrt(8.0) * pow(sqrt((x_45_scale_m * sqrt(2.0))), 2.0)) * hypot(a, t_3));
} else if (y_45_scale_m <= 4.2e+84) {
tmp = sqrt(((8.0 * pow(y_45_scale_m, 2.0)) * 0.0625)) * (sqrt(2.0) * hypot((a * t_1), b_m));
} else if (y_45_scale_m <= 1.52e+140) {
tmp = -0.25 * ((x_45_scale_m * (y_45_scale_m * -sqrt(8.0))) * ((sqrt(2.0) * b_m) / x_45_scale_m));
} else {
tmp = t_0 * (sqrt(2.0) * hypot((a * sin(t_1)), b_m));
}
return tmp;
}
b_m = Math.abs(b);
x-scale_m = Math.abs(x_45_scale);
y-scale_m = Math.abs(y_45_scale);
public static double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double t_0 = 0.25 * (y_45_scale_m * Math.sqrt(8.0));
double t_1 = Math.PI * (0.005555555555555556 * angle);
double t_2 = 0.005555555555555556 * (angle * Math.PI);
double t_3 = b_m * Math.sin(t_2);
double tmp;
if (y_45_scale_m <= 2.25e-95) {
tmp = 0.25 * ((Math.sqrt(8.0) * (Math.pow(2.0, 0.25) * (x_45_scale_m * Math.pow(2.0, 0.25)))) * Math.hypot((Math.cos(t_2) * a), t_3));
} else if (y_45_scale_m <= 7.4e-53) {
tmp = t_0 * (Math.sqrt(2.0) * Math.hypot((a * Math.sin(((0.005555555555555556 * angle) * Math.pow(Math.sqrt(Math.PI), 2.0)))), b_m));
} else if (y_45_scale_m <= 2.7e+18) {
tmp = 0.25 * ((Math.sqrt(8.0) * Math.pow(Math.sqrt((x_45_scale_m * Math.sqrt(2.0))), 2.0)) * Math.hypot(a, t_3));
} else if (y_45_scale_m <= 4.2e+84) {
tmp = Math.sqrt(((8.0 * Math.pow(y_45_scale_m, 2.0)) * 0.0625)) * (Math.sqrt(2.0) * Math.hypot((a * t_1), b_m));
} else if (y_45_scale_m <= 1.52e+140) {
tmp = -0.25 * ((x_45_scale_m * (y_45_scale_m * -Math.sqrt(8.0))) * ((Math.sqrt(2.0) * b_m) / x_45_scale_m));
} else {
tmp = t_0 * (Math.sqrt(2.0) * Math.hypot((a * Math.sin(t_1)), b_m));
}
return tmp;
}
b_m = math.fabs(b) x-scale_m = math.fabs(x_45_scale) y-scale_m = math.fabs(y_45_scale) def code(a, b_m, angle, x_45_scale_m, y_45_scale_m): t_0 = 0.25 * (y_45_scale_m * math.sqrt(8.0)) t_1 = math.pi * (0.005555555555555556 * angle) t_2 = 0.005555555555555556 * (angle * math.pi) t_3 = b_m * math.sin(t_2) tmp = 0 if y_45_scale_m <= 2.25e-95: tmp = 0.25 * ((math.sqrt(8.0) * (math.pow(2.0, 0.25) * (x_45_scale_m * math.pow(2.0, 0.25)))) * math.hypot((math.cos(t_2) * a), t_3)) elif y_45_scale_m <= 7.4e-53: tmp = t_0 * (math.sqrt(2.0) * math.hypot((a * math.sin(((0.005555555555555556 * angle) * math.pow(math.sqrt(math.pi), 2.0)))), b_m)) elif y_45_scale_m <= 2.7e+18: tmp = 0.25 * ((math.sqrt(8.0) * math.pow(math.sqrt((x_45_scale_m * math.sqrt(2.0))), 2.0)) * math.hypot(a, t_3)) elif y_45_scale_m <= 4.2e+84: tmp = math.sqrt(((8.0 * math.pow(y_45_scale_m, 2.0)) * 0.0625)) * (math.sqrt(2.0) * math.hypot((a * t_1), b_m)) elif y_45_scale_m <= 1.52e+140: tmp = -0.25 * ((x_45_scale_m * (y_45_scale_m * -math.sqrt(8.0))) * ((math.sqrt(2.0) * b_m) / x_45_scale_m)) else: tmp = t_0 * (math.sqrt(2.0) * math.hypot((a * math.sin(t_1)), b_m)) return tmp
b_m = abs(b) x-scale_m = abs(x_45_scale) y-scale_m = abs(y_45_scale) function code(a, b_m, angle, x_45_scale_m, y_45_scale_m) t_0 = Float64(0.25 * Float64(y_45_scale_m * sqrt(8.0))) t_1 = Float64(pi * Float64(0.005555555555555556 * angle)) t_2 = Float64(0.005555555555555556 * Float64(angle * pi)) t_3 = Float64(b_m * sin(t_2)) tmp = 0.0 if (y_45_scale_m <= 2.25e-95) tmp = Float64(0.25 * Float64(Float64(sqrt(8.0) * Float64((2.0 ^ 0.25) * Float64(x_45_scale_m * (2.0 ^ 0.25)))) * hypot(Float64(cos(t_2) * a), t_3))); elseif (y_45_scale_m <= 7.4e-53) tmp = Float64(t_0 * Float64(sqrt(2.0) * hypot(Float64(a * sin(Float64(Float64(0.005555555555555556 * angle) * (sqrt(pi) ^ 2.0)))), b_m))); elseif (y_45_scale_m <= 2.7e+18) tmp = Float64(0.25 * Float64(Float64(sqrt(8.0) * (sqrt(Float64(x_45_scale_m * sqrt(2.0))) ^ 2.0)) * hypot(a, t_3))); elseif (y_45_scale_m <= 4.2e+84) tmp = Float64(sqrt(Float64(Float64(8.0 * (y_45_scale_m ^ 2.0)) * 0.0625)) * Float64(sqrt(2.0) * hypot(Float64(a * t_1), b_m))); elseif (y_45_scale_m <= 1.52e+140) tmp = Float64(-0.25 * Float64(Float64(x_45_scale_m * Float64(y_45_scale_m * Float64(-sqrt(8.0)))) * Float64(Float64(sqrt(2.0) * b_m) / x_45_scale_m))); else tmp = Float64(t_0 * Float64(sqrt(2.0) * hypot(Float64(a * sin(t_1)), b_m))); end return tmp end
b_m = abs(b); x-scale_m = abs(x_45_scale); y-scale_m = abs(y_45_scale); function tmp_2 = code(a, b_m, angle, x_45_scale_m, y_45_scale_m) t_0 = 0.25 * (y_45_scale_m * sqrt(8.0)); t_1 = pi * (0.005555555555555556 * angle); t_2 = 0.005555555555555556 * (angle * pi); t_3 = b_m * sin(t_2); tmp = 0.0; if (y_45_scale_m <= 2.25e-95) tmp = 0.25 * ((sqrt(8.0) * ((2.0 ^ 0.25) * (x_45_scale_m * (2.0 ^ 0.25)))) * hypot((cos(t_2) * a), t_3)); elseif (y_45_scale_m <= 7.4e-53) tmp = t_0 * (sqrt(2.0) * hypot((a * sin(((0.005555555555555556 * angle) * (sqrt(pi) ^ 2.0)))), b_m)); elseif (y_45_scale_m <= 2.7e+18) tmp = 0.25 * ((sqrt(8.0) * (sqrt((x_45_scale_m * sqrt(2.0))) ^ 2.0)) * hypot(a, t_3)); elseif (y_45_scale_m <= 4.2e+84) tmp = sqrt(((8.0 * (y_45_scale_m ^ 2.0)) * 0.0625)) * (sqrt(2.0) * hypot((a * t_1), b_m)); elseif (y_45_scale_m <= 1.52e+140) tmp = -0.25 * ((x_45_scale_m * (y_45_scale_m * -sqrt(8.0))) * ((sqrt(2.0) * b_m) / x_45_scale_m)); else tmp = t_0 * (sqrt(2.0) * hypot((a * sin(t_1)), b_m)); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
y-scale_m = N[Abs[y$45$scale], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := Block[{t$95$0 = N[(0.25 * N[(y$45$scale$95$m * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(b$95$m * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$45$scale$95$m, 2.25e-95], N[(0.25 * N[(N[(N[Sqrt[8.0], $MachinePrecision] * N[(N[Power[2.0, 0.25], $MachinePrecision] * N[(x$45$scale$95$m * N[Power[2.0, 0.25], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[Cos[t$95$2], $MachinePrecision] * a), $MachinePrecision] ^ 2 + t$95$3 ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 7.4e-53], N[(t$95$0 * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a * N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] ^ 2 + b$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 2.7e+18], N[(0.25 * N[(N[(N[Sqrt[8.0], $MachinePrecision] * N[Power[N[Sqrt[N[(x$45$scale$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[a ^ 2 + t$95$3 ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 4.2e+84], N[(N[Sqrt[N[(N[(8.0 * N[Power[y$45$scale$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * 0.0625), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a * t$95$1), $MachinePrecision] ^ 2 + b$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 1.52e+140], N[(-0.25 * N[(N[(x$45$scale$95$m * N[(y$45$scale$95$m * (-N[Sqrt[8.0], $MachinePrecision])), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sqrt[2.0], $MachinePrecision] * b$95$m), $MachinePrecision] / x$45$scale$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision] ^ 2 + b$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
x-scale_m = \left|x-scale\right|
\\
y-scale_m = \left|y-scale\right|
\\
\begin{array}{l}
t_0 := 0.25 \cdot \left(y-scale\_m \cdot \sqrt{8}\right)\\
t_1 := \pi \cdot \left(0.005555555555555556 \cdot angle\right)\\
t_2 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_3 := b\_m \cdot \sin t\_2\\
\mathbf{if}\;y-scale\_m \leq 2.25 \cdot 10^{-95}:\\
\;\;\;\;0.25 \cdot \left(\left(\sqrt{8} \cdot \left({2}^{0.25} \cdot \left(x-scale\_m \cdot {2}^{0.25}\right)\right)\right) \cdot \mathsf{hypot}\left(\cos t\_2 \cdot a, t\_3\right)\right)\\
\mathbf{elif}\;y-scale\_m \leq 7.4 \cdot 10^{-53}:\\
\;\;\;\;t\_0 \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot \sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot {\left(\sqrt{\pi}\right)}^{2}\right), b\_m\right)\right)\\
\mathbf{elif}\;y-scale\_m \leq 2.7 \cdot 10^{+18}:\\
\;\;\;\;0.25 \cdot \left(\left(\sqrt{8} \cdot {\left(\sqrt{x-scale\_m \cdot \sqrt{2}}\right)}^{2}\right) \cdot \mathsf{hypot}\left(a, t\_3\right)\right)\\
\mathbf{elif}\;y-scale\_m \leq 4.2 \cdot 10^{+84}:\\
\;\;\;\;\sqrt{\left(8 \cdot {y-scale\_m}^{2}\right) \cdot 0.0625} \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot t\_1, b\_m\right)\right)\\
\mathbf{elif}\;y-scale\_m \leq 1.52 \cdot 10^{+140}:\\
\;\;\;\;-0.25 \cdot \left(\left(x-scale\_m \cdot \left(y-scale\_m \cdot \left(-\sqrt{8}\right)\right)\right) \cdot \frac{\sqrt{2} \cdot b\_m}{x-scale\_m}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot \sin t\_1, b\_m\right)\right)\\
\end{array}
\end{array}
if y-scale < 2.25e-95Initial program 2.1%
Simplified2.1%
Taylor expanded in y-scale around 0 9.0%
associate-*r*9.0%
distribute-lft-out9.0%
Simplified9.6%
Taylor expanded in x-scale around 0 25.1%
Simplified26.1%
add-sqr-sqrt25.0%
pow225.0%
*-commutative25.0%
Applied egg-rr25.0%
unpow225.0%
add-sqr-sqrt26.1%
add-sqr-sqrt26.2%
associate-*l*26.1%
pow1/226.1%
sqrt-pow126.1%
metadata-eval26.1%
pow1/226.1%
sqrt-pow126.1%
metadata-eval26.1%
Applied egg-rr26.1%
if 2.25e-95 < y-scale < 7.39999999999999965e-53Initial program 0.5%
Simplified0.5%
Taylor expanded in x-scale around 0 29.2%
associate-*r*29.2%
distribute-lft-out29.2%
Simplified32.3%
Taylor expanded in angle around 0 32.3%
pow1/232.3%
*-commutative32.3%
unpow-prod-down32.3%
Applied egg-rr46.7%
add-sqr-sqrt46.9%
pow246.9%
Applied egg-rr46.9%
if 7.39999999999999965e-53 < y-scale < 2.7e18Initial program 0.0%
Simplified0.2%
Taylor expanded in y-scale around 0 12.1%
associate-*r*12.1%
distribute-lft-out12.1%
Simplified12.2%
Taylor expanded in x-scale around 0 12.2%
Simplified13.4%
add-sqr-sqrt12.8%
pow212.8%
*-commutative12.8%
Applied egg-rr12.8%
Taylor expanded in angle around 0 12.8%
if 2.7e18 < y-scale < 4.20000000000000037e84Initial program 0.5%
Simplified0.8%
Taylor expanded in x-scale around 0 45.8%
associate-*r*45.8%
distribute-lft-out45.8%
Simplified45.8%
Taylor expanded in angle around 0 45.8%
pow1/245.8%
*-commutative45.8%
unpow-prod-down45.6%
Applied egg-rr54.5%
Taylor expanded in angle around 0 53.5%
associate-*r*53.5%
Simplified53.5%
add-sqr-sqrt53.3%
sqrt-unprod53.5%
swap-sqr53.5%
metadata-eval53.5%
metadata-eval53.5%
swap-sqr53.5%
*-commutative53.5%
*-commutative53.5%
swap-sqr53.5%
*-commutative53.5%
*-commutative53.5%
swap-sqr53.2%
rem-square-sqrt54.0%
pow254.0%
metadata-eval54.0%
Applied egg-rr54.0%
if 4.20000000000000037e84 < y-scale < 1.52e140Initial program 8.3%
Simplified0.0%
Taylor expanded in a around 0 0.2%
Simplified0.2%
Taylor expanded in angle around 0 34.7%
if 1.52e140 < y-scale Initial program 6.9%
Simplified6.9%
Taylor expanded in x-scale around 0 76.6%
associate-*r*76.6%
distribute-lft-out76.6%
Simplified82.7%
Taylor expanded in angle around 0 85.5%
pow1/285.5%
*-commutative85.5%
unpow-prod-down85.4%
Applied egg-rr89.2%
Final simplification35.0%
b_m = (fabs.f64 b)
x-scale_m = (fabs.f64 x-scale)
y-scale_m = (fabs.f64 y-scale)
(FPCore (a b_m angle x-scale_m y-scale_m)
:precision binary64
(let* ((t_0 (* 0.25 (* y-scale_m (sqrt 8.0))))
(t_1
(*
0.25
(*
(* (sqrt 8.0) (pow (sqrt (* x-scale_m (sqrt 2.0))) 2.0))
(hypot a (* b_m (sin (* 0.005555555555555556 (* angle PI))))))))
(t_2 (* PI (* 0.005555555555555556 angle))))
(if (<= y-scale_m 1.1e-95)
t_1
(if (<= y-scale_m 4.5e-53)
(*
t_0
(*
(sqrt 2.0)
(hypot
(* a (sin (* (* 0.005555555555555556 angle) (pow (sqrt PI) 2.0))))
b_m)))
(if (<= y-scale_m 2.1e+18)
t_1
(if (<= y-scale_m 6.5e+83)
(*
(sqrt (* (* 8.0 (pow y-scale_m 2.0)) 0.0625))
(* (sqrt 2.0) (hypot (* a t_2) b_m)))
(if (<= y-scale_m 1.52e+140)
(*
-0.25
(*
(* x-scale_m (* y-scale_m (- (sqrt 8.0))))
(/ (* (sqrt 2.0) b_m) x-scale_m)))
(* t_0 (* (sqrt 2.0) (hypot (* a (sin t_2)) b_m))))))))))b_m = fabs(b);
x-scale_m = fabs(x_45_scale);
y-scale_m = fabs(y_45_scale);
double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double t_0 = 0.25 * (y_45_scale_m * sqrt(8.0));
double t_1 = 0.25 * ((sqrt(8.0) * pow(sqrt((x_45_scale_m * sqrt(2.0))), 2.0)) * hypot(a, (b_m * sin((0.005555555555555556 * (angle * ((double) M_PI)))))));
double t_2 = ((double) M_PI) * (0.005555555555555556 * angle);
double tmp;
if (y_45_scale_m <= 1.1e-95) {
tmp = t_1;
} else if (y_45_scale_m <= 4.5e-53) {
tmp = t_0 * (sqrt(2.0) * hypot((a * sin(((0.005555555555555556 * angle) * pow(sqrt(((double) M_PI)), 2.0)))), b_m));
} else if (y_45_scale_m <= 2.1e+18) {
tmp = t_1;
} else if (y_45_scale_m <= 6.5e+83) {
tmp = sqrt(((8.0 * pow(y_45_scale_m, 2.0)) * 0.0625)) * (sqrt(2.0) * hypot((a * t_2), b_m));
} else if (y_45_scale_m <= 1.52e+140) {
tmp = -0.25 * ((x_45_scale_m * (y_45_scale_m * -sqrt(8.0))) * ((sqrt(2.0) * b_m) / x_45_scale_m));
} else {
tmp = t_0 * (sqrt(2.0) * hypot((a * sin(t_2)), b_m));
}
return tmp;
}
b_m = Math.abs(b);
x-scale_m = Math.abs(x_45_scale);
y-scale_m = Math.abs(y_45_scale);
public static double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double t_0 = 0.25 * (y_45_scale_m * Math.sqrt(8.0));
double t_1 = 0.25 * ((Math.sqrt(8.0) * Math.pow(Math.sqrt((x_45_scale_m * Math.sqrt(2.0))), 2.0)) * Math.hypot(a, (b_m * Math.sin((0.005555555555555556 * (angle * Math.PI))))));
double t_2 = Math.PI * (0.005555555555555556 * angle);
double tmp;
if (y_45_scale_m <= 1.1e-95) {
tmp = t_1;
} else if (y_45_scale_m <= 4.5e-53) {
tmp = t_0 * (Math.sqrt(2.0) * Math.hypot((a * Math.sin(((0.005555555555555556 * angle) * Math.pow(Math.sqrt(Math.PI), 2.0)))), b_m));
} else if (y_45_scale_m <= 2.1e+18) {
tmp = t_1;
} else if (y_45_scale_m <= 6.5e+83) {
tmp = Math.sqrt(((8.0 * Math.pow(y_45_scale_m, 2.0)) * 0.0625)) * (Math.sqrt(2.0) * Math.hypot((a * t_2), b_m));
} else if (y_45_scale_m <= 1.52e+140) {
tmp = -0.25 * ((x_45_scale_m * (y_45_scale_m * -Math.sqrt(8.0))) * ((Math.sqrt(2.0) * b_m) / x_45_scale_m));
} else {
tmp = t_0 * (Math.sqrt(2.0) * Math.hypot((a * Math.sin(t_2)), b_m));
}
return tmp;
}
b_m = math.fabs(b) x-scale_m = math.fabs(x_45_scale) y-scale_m = math.fabs(y_45_scale) def code(a, b_m, angle, x_45_scale_m, y_45_scale_m): t_0 = 0.25 * (y_45_scale_m * math.sqrt(8.0)) t_1 = 0.25 * ((math.sqrt(8.0) * math.pow(math.sqrt((x_45_scale_m * math.sqrt(2.0))), 2.0)) * math.hypot(a, (b_m * math.sin((0.005555555555555556 * (angle * math.pi)))))) t_2 = math.pi * (0.005555555555555556 * angle) tmp = 0 if y_45_scale_m <= 1.1e-95: tmp = t_1 elif y_45_scale_m <= 4.5e-53: tmp = t_0 * (math.sqrt(2.0) * math.hypot((a * math.sin(((0.005555555555555556 * angle) * math.pow(math.sqrt(math.pi), 2.0)))), b_m)) elif y_45_scale_m <= 2.1e+18: tmp = t_1 elif y_45_scale_m <= 6.5e+83: tmp = math.sqrt(((8.0 * math.pow(y_45_scale_m, 2.0)) * 0.0625)) * (math.sqrt(2.0) * math.hypot((a * t_2), b_m)) elif y_45_scale_m <= 1.52e+140: tmp = -0.25 * ((x_45_scale_m * (y_45_scale_m * -math.sqrt(8.0))) * ((math.sqrt(2.0) * b_m) / x_45_scale_m)) else: tmp = t_0 * (math.sqrt(2.0) * math.hypot((a * math.sin(t_2)), b_m)) return tmp
b_m = abs(b) x-scale_m = abs(x_45_scale) y-scale_m = abs(y_45_scale) function code(a, b_m, angle, x_45_scale_m, y_45_scale_m) t_0 = Float64(0.25 * Float64(y_45_scale_m * sqrt(8.0))) t_1 = Float64(0.25 * Float64(Float64(sqrt(8.0) * (sqrt(Float64(x_45_scale_m * sqrt(2.0))) ^ 2.0)) * hypot(a, Float64(b_m * sin(Float64(0.005555555555555556 * Float64(angle * pi))))))) t_2 = Float64(pi * Float64(0.005555555555555556 * angle)) tmp = 0.0 if (y_45_scale_m <= 1.1e-95) tmp = t_1; elseif (y_45_scale_m <= 4.5e-53) tmp = Float64(t_0 * Float64(sqrt(2.0) * hypot(Float64(a * sin(Float64(Float64(0.005555555555555556 * angle) * (sqrt(pi) ^ 2.0)))), b_m))); elseif (y_45_scale_m <= 2.1e+18) tmp = t_1; elseif (y_45_scale_m <= 6.5e+83) tmp = Float64(sqrt(Float64(Float64(8.0 * (y_45_scale_m ^ 2.0)) * 0.0625)) * Float64(sqrt(2.0) * hypot(Float64(a * t_2), b_m))); elseif (y_45_scale_m <= 1.52e+140) tmp = Float64(-0.25 * Float64(Float64(x_45_scale_m * Float64(y_45_scale_m * Float64(-sqrt(8.0)))) * Float64(Float64(sqrt(2.0) * b_m) / x_45_scale_m))); else tmp = Float64(t_0 * Float64(sqrt(2.0) * hypot(Float64(a * sin(t_2)), b_m))); end return tmp end
b_m = abs(b); x-scale_m = abs(x_45_scale); y-scale_m = abs(y_45_scale); function tmp_2 = code(a, b_m, angle, x_45_scale_m, y_45_scale_m) t_0 = 0.25 * (y_45_scale_m * sqrt(8.0)); t_1 = 0.25 * ((sqrt(8.0) * (sqrt((x_45_scale_m * sqrt(2.0))) ^ 2.0)) * hypot(a, (b_m * sin((0.005555555555555556 * (angle * pi)))))); t_2 = pi * (0.005555555555555556 * angle); tmp = 0.0; if (y_45_scale_m <= 1.1e-95) tmp = t_1; elseif (y_45_scale_m <= 4.5e-53) tmp = t_0 * (sqrt(2.0) * hypot((a * sin(((0.005555555555555556 * angle) * (sqrt(pi) ^ 2.0)))), b_m)); elseif (y_45_scale_m <= 2.1e+18) tmp = t_1; elseif (y_45_scale_m <= 6.5e+83) tmp = sqrt(((8.0 * (y_45_scale_m ^ 2.0)) * 0.0625)) * (sqrt(2.0) * hypot((a * t_2), b_m)); elseif (y_45_scale_m <= 1.52e+140) tmp = -0.25 * ((x_45_scale_m * (y_45_scale_m * -sqrt(8.0))) * ((sqrt(2.0) * b_m) / x_45_scale_m)); else tmp = t_0 * (sqrt(2.0) * hypot((a * sin(t_2)), b_m)); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
y-scale_m = N[Abs[y$45$scale], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := Block[{t$95$0 = N[(0.25 * N[(y$45$scale$95$m * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.25 * N[(N[(N[Sqrt[8.0], $MachinePrecision] * N[Power[N[Sqrt[N[(x$45$scale$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[a ^ 2 + N[(b$95$m * N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$45$scale$95$m, 1.1e-95], t$95$1, If[LessEqual[y$45$scale$95$m, 4.5e-53], N[(t$95$0 * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a * N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] ^ 2 + b$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 2.1e+18], t$95$1, If[LessEqual[y$45$scale$95$m, 6.5e+83], N[(N[Sqrt[N[(N[(8.0 * N[Power[y$45$scale$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * 0.0625), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a * t$95$2), $MachinePrecision] ^ 2 + b$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 1.52e+140], N[(-0.25 * N[(N[(x$45$scale$95$m * N[(y$45$scale$95$m * (-N[Sqrt[8.0], $MachinePrecision])), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sqrt[2.0], $MachinePrecision] * b$95$m), $MachinePrecision] / x$45$scale$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision] ^ 2 + b$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
x-scale_m = \left|x-scale\right|
\\
y-scale_m = \left|y-scale\right|
\\
\begin{array}{l}
t_0 := 0.25 \cdot \left(y-scale\_m \cdot \sqrt{8}\right)\\
t_1 := 0.25 \cdot \left(\left(\sqrt{8} \cdot {\left(\sqrt{x-scale\_m \cdot \sqrt{2}}\right)}^{2}\right) \cdot \mathsf{hypot}\left(a, b\_m \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\\
t_2 := \pi \cdot \left(0.005555555555555556 \cdot angle\right)\\
\mathbf{if}\;y-scale\_m \leq 1.1 \cdot 10^{-95}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y-scale\_m \leq 4.5 \cdot 10^{-53}:\\
\;\;\;\;t\_0 \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot \sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot {\left(\sqrt{\pi}\right)}^{2}\right), b\_m\right)\right)\\
\mathbf{elif}\;y-scale\_m \leq 2.1 \cdot 10^{+18}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y-scale\_m \leq 6.5 \cdot 10^{+83}:\\
\;\;\;\;\sqrt{\left(8 \cdot {y-scale\_m}^{2}\right) \cdot 0.0625} \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot t\_2, b\_m\right)\right)\\
\mathbf{elif}\;y-scale\_m \leq 1.52 \cdot 10^{+140}:\\
\;\;\;\;-0.25 \cdot \left(\left(x-scale\_m \cdot \left(y-scale\_m \cdot \left(-\sqrt{8}\right)\right)\right) \cdot \frac{\sqrt{2} \cdot b\_m}{x-scale\_m}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot \sin t\_2, b\_m\right)\right)\\
\end{array}
\end{array}
if y-scale < 1.0999999999999999e-95 or 4.49999999999999985e-53 < y-scale < 2.1e18Initial program 1.9%
Simplified2.0%
Taylor expanded in y-scale around 0 9.3%
associate-*r*9.3%
distribute-lft-out9.3%
Simplified9.8%
Taylor expanded in x-scale around 0 23.9%
Simplified24.9%
add-sqr-sqrt23.9%
pow223.9%
*-commutative23.9%
Applied egg-rr23.9%
Taylor expanded in angle around 0 24.0%
if 1.0999999999999999e-95 < y-scale < 4.49999999999999985e-53Initial program 0.5%
Simplified0.5%
Taylor expanded in x-scale around 0 29.2%
associate-*r*29.2%
distribute-lft-out29.2%
Simplified32.3%
Taylor expanded in angle around 0 32.3%
pow1/232.3%
*-commutative32.3%
unpow-prod-down32.3%
Applied egg-rr46.7%
add-sqr-sqrt46.9%
pow246.9%
Applied egg-rr46.9%
if 2.1e18 < y-scale < 6.5000000000000003e83Initial program 0.5%
Simplified0.8%
Taylor expanded in x-scale around 0 45.8%
associate-*r*45.8%
distribute-lft-out45.8%
Simplified45.8%
Taylor expanded in angle around 0 45.8%
pow1/245.8%
*-commutative45.8%
unpow-prod-down45.6%
Applied egg-rr54.5%
Taylor expanded in angle around 0 53.5%
associate-*r*53.5%
Simplified53.5%
add-sqr-sqrt53.3%
sqrt-unprod53.5%
swap-sqr53.5%
metadata-eval53.5%
metadata-eval53.5%
swap-sqr53.5%
*-commutative53.5%
*-commutative53.5%
swap-sqr53.5%
*-commutative53.5%
*-commutative53.5%
swap-sqr53.2%
rem-square-sqrt54.0%
pow254.0%
metadata-eval54.0%
Applied egg-rr54.0%
if 6.5000000000000003e83 < y-scale < 1.52e140Initial program 8.3%
Simplified0.0%
Taylor expanded in a around 0 0.2%
Simplified0.2%
Taylor expanded in angle around 0 34.7%
if 1.52e140 < y-scale Initial program 6.9%
Simplified6.9%
Taylor expanded in x-scale around 0 76.6%
associate-*r*76.6%
distribute-lft-out76.6%
Simplified82.7%
Taylor expanded in angle around 0 85.5%
pow1/285.5%
*-commutative85.5%
unpow-prod-down85.4%
Applied egg-rr89.2%
Final simplification34.3%
b_m = (fabs.f64 b)
x-scale_m = (fabs.f64 x-scale)
y-scale_m = (fabs.f64 y-scale)
(FPCore (a b_m angle x-scale_m y-scale_m)
:precision binary64
(let* ((t_0 (* y-scale_m (sqrt 8.0)))
(t_1 (* 0.25 t_0))
(t_2 (* 0.005555555555555556 (* angle PI)))
(t_3 (* PI (* 0.005555555555555556 angle)))
(t_4 (sin t_3)))
(if (<= y-scale_m 2.6e-95)
(*
0.25
(*
(* (* x-scale_m (sqrt 2.0)) (sqrt 8.0))
(hypot (* (cos t_2) a) (* b_m (sin t_2)))))
(if (<= y-scale_m 5e-53)
(*
t_1
(*
(sqrt 2.0)
(hypot
(* a (sin (* (* 0.005555555555555556 angle) (pow (sqrt PI) 2.0))))
b_m)))
(if (<= y-scale_m 8e+18)
(*
0.25
(*
(* x-scale_m t_0)
(* (sqrt 2.0) (hypot (/ a y-scale_m) (* t_4 (/ b_m y-scale_m))))))
(if (<= y-scale_m 3.8e+84)
(*
(sqrt (* (* 8.0 (pow y-scale_m 2.0)) 0.0625))
(* (sqrt 2.0) (hypot (* a t_3) b_m)))
(if (<= y-scale_m 1.52e+140)
(*
-0.25
(*
(* x-scale_m (* y-scale_m (- (sqrt 8.0))))
(/ (* (sqrt 2.0) b_m) x-scale_m)))
(* t_1 (* (sqrt 2.0) (hypot (* a t_4) b_m))))))))))b_m = fabs(b);
x-scale_m = fabs(x_45_scale);
y-scale_m = fabs(y_45_scale);
double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double t_0 = y_45_scale_m * sqrt(8.0);
double t_1 = 0.25 * t_0;
double t_2 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_3 = ((double) M_PI) * (0.005555555555555556 * angle);
double t_4 = sin(t_3);
double tmp;
if (y_45_scale_m <= 2.6e-95) {
tmp = 0.25 * (((x_45_scale_m * sqrt(2.0)) * sqrt(8.0)) * hypot((cos(t_2) * a), (b_m * sin(t_2))));
} else if (y_45_scale_m <= 5e-53) {
tmp = t_1 * (sqrt(2.0) * hypot((a * sin(((0.005555555555555556 * angle) * pow(sqrt(((double) M_PI)), 2.0)))), b_m));
} else if (y_45_scale_m <= 8e+18) {
tmp = 0.25 * ((x_45_scale_m * t_0) * (sqrt(2.0) * hypot((a / y_45_scale_m), (t_4 * (b_m / y_45_scale_m)))));
} else if (y_45_scale_m <= 3.8e+84) {
tmp = sqrt(((8.0 * pow(y_45_scale_m, 2.0)) * 0.0625)) * (sqrt(2.0) * hypot((a * t_3), b_m));
} else if (y_45_scale_m <= 1.52e+140) {
tmp = -0.25 * ((x_45_scale_m * (y_45_scale_m * -sqrt(8.0))) * ((sqrt(2.0) * b_m) / x_45_scale_m));
} else {
tmp = t_1 * (sqrt(2.0) * hypot((a * t_4), b_m));
}
return tmp;
}
b_m = Math.abs(b);
x-scale_m = Math.abs(x_45_scale);
y-scale_m = Math.abs(y_45_scale);
public static double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double t_0 = y_45_scale_m * Math.sqrt(8.0);
double t_1 = 0.25 * t_0;
double t_2 = 0.005555555555555556 * (angle * Math.PI);
double t_3 = Math.PI * (0.005555555555555556 * angle);
double t_4 = Math.sin(t_3);
double tmp;
if (y_45_scale_m <= 2.6e-95) {
tmp = 0.25 * (((x_45_scale_m * Math.sqrt(2.0)) * Math.sqrt(8.0)) * Math.hypot((Math.cos(t_2) * a), (b_m * Math.sin(t_2))));
} else if (y_45_scale_m <= 5e-53) {
tmp = t_1 * (Math.sqrt(2.0) * Math.hypot((a * Math.sin(((0.005555555555555556 * angle) * Math.pow(Math.sqrt(Math.PI), 2.0)))), b_m));
} else if (y_45_scale_m <= 8e+18) {
tmp = 0.25 * ((x_45_scale_m * t_0) * (Math.sqrt(2.0) * Math.hypot((a / y_45_scale_m), (t_4 * (b_m / y_45_scale_m)))));
} else if (y_45_scale_m <= 3.8e+84) {
tmp = Math.sqrt(((8.0 * Math.pow(y_45_scale_m, 2.0)) * 0.0625)) * (Math.sqrt(2.0) * Math.hypot((a * t_3), b_m));
} else if (y_45_scale_m <= 1.52e+140) {
tmp = -0.25 * ((x_45_scale_m * (y_45_scale_m * -Math.sqrt(8.0))) * ((Math.sqrt(2.0) * b_m) / x_45_scale_m));
} else {
tmp = t_1 * (Math.sqrt(2.0) * Math.hypot((a * t_4), b_m));
}
return tmp;
}
b_m = math.fabs(b) x-scale_m = math.fabs(x_45_scale) y-scale_m = math.fabs(y_45_scale) def code(a, b_m, angle, x_45_scale_m, y_45_scale_m): t_0 = y_45_scale_m * math.sqrt(8.0) t_1 = 0.25 * t_0 t_2 = 0.005555555555555556 * (angle * math.pi) t_3 = math.pi * (0.005555555555555556 * angle) t_4 = math.sin(t_3) tmp = 0 if y_45_scale_m <= 2.6e-95: tmp = 0.25 * (((x_45_scale_m * math.sqrt(2.0)) * math.sqrt(8.0)) * math.hypot((math.cos(t_2) * a), (b_m * math.sin(t_2)))) elif y_45_scale_m <= 5e-53: tmp = t_1 * (math.sqrt(2.0) * math.hypot((a * math.sin(((0.005555555555555556 * angle) * math.pow(math.sqrt(math.pi), 2.0)))), b_m)) elif y_45_scale_m <= 8e+18: tmp = 0.25 * ((x_45_scale_m * t_0) * (math.sqrt(2.0) * math.hypot((a / y_45_scale_m), (t_4 * (b_m / y_45_scale_m))))) elif y_45_scale_m <= 3.8e+84: tmp = math.sqrt(((8.0 * math.pow(y_45_scale_m, 2.0)) * 0.0625)) * (math.sqrt(2.0) * math.hypot((a * t_3), b_m)) elif y_45_scale_m <= 1.52e+140: tmp = -0.25 * ((x_45_scale_m * (y_45_scale_m * -math.sqrt(8.0))) * ((math.sqrt(2.0) * b_m) / x_45_scale_m)) else: tmp = t_1 * (math.sqrt(2.0) * math.hypot((a * t_4), b_m)) return tmp
b_m = abs(b) x-scale_m = abs(x_45_scale) y-scale_m = abs(y_45_scale) function code(a, b_m, angle, x_45_scale_m, y_45_scale_m) t_0 = Float64(y_45_scale_m * sqrt(8.0)) t_1 = Float64(0.25 * t_0) t_2 = Float64(0.005555555555555556 * Float64(angle * pi)) t_3 = Float64(pi * Float64(0.005555555555555556 * angle)) t_4 = sin(t_3) tmp = 0.0 if (y_45_scale_m <= 2.6e-95) tmp = Float64(0.25 * Float64(Float64(Float64(x_45_scale_m * sqrt(2.0)) * sqrt(8.0)) * hypot(Float64(cos(t_2) * a), Float64(b_m * sin(t_2))))); elseif (y_45_scale_m <= 5e-53) tmp = Float64(t_1 * Float64(sqrt(2.0) * hypot(Float64(a * sin(Float64(Float64(0.005555555555555556 * angle) * (sqrt(pi) ^ 2.0)))), b_m))); elseif (y_45_scale_m <= 8e+18) tmp = Float64(0.25 * Float64(Float64(x_45_scale_m * t_0) * Float64(sqrt(2.0) * hypot(Float64(a / y_45_scale_m), Float64(t_4 * Float64(b_m / y_45_scale_m)))))); elseif (y_45_scale_m <= 3.8e+84) tmp = Float64(sqrt(Float64(Float64(8.0 * (y_45_scale_m ^ 2.0)) * 0.0625)) * Float64(sqrt(2.0) * hypot(Float64(a * t_3), b_m))); elseif (y_45_scale_m <= 1.52e+140) tmp = Float64(-0.25 * Float64(Float64(x_45_scale_m * Float64(y_45_scale_m * Float64(-sqrt(8.0)))) * Float64(Float64(sqrt(2.0) * b_m) / x_45_scale_m))); else tmp = Float64(t_1 * Float64(sqrt(2.0) * hypot(Float64(a * t_4), b_m))); end return tmp end
b_m = abs(b); x-scale_m = abs(x_45_scale); y-scale_m = abs(y_45_scale); function tmp_2 = code(a, b_m, angle, x_45_scale_m, y_45_scale_m) t_0 = y_45_scale_m * sqrt(8.0); t_1 = 0.25 * t_0; t_2 = 0.005555555555555556 * (angle * pi); t_3 = pi * (0.005555555555555556 * angle); t_4 = sin(t_3); tmp = 0.0; if (y_45_scale_m <= 2.6e-95) tmp = 0.25 * (((x_45_scale_m * sqrt(2.0)) * sqrt(8.0)) * hypot((cos(t_2) * a), (b_m * sin(t_2)))); elseif (y_45_scale_m <= 5e-53) tmp = t_1 * (sqrt(2.0) * hypot((a * sin(((0.005555555555555556 * angle) * (sqrt(pi) ^ 2.0)))), b_m)); elseif (y_45_scale_m <= 8e+18) tmp = 0.25 * ((x_45_scale_m * t_0) * (sqrt(2.0) * hypot((a / y_45_scale_m), (t_4 * (b_m / y_45_scale_m))))); elseif (y_45_scale_m <= 3.8e+84) tmp = sqrt(((8.0 * (y_45_scale_m ^ 2.0)) * 0.0625)) * (sqrt(2.0) * hypot((a * t_3), b_m)); elseif (y_45_scale_m <= 1.52e+140) tmp = -0.25 * ((x_45_scale_m * (y_45_scale_m * -sqrt(8.0))) * ((sqrt(2.0) * b_m) / x_45_scale_m)); else tmp = t_1 * (sqrt(2.0) * hypot((a * t_4), b_m)); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
y-scale_m = N[Abs[y$45$scale], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := Block[{t$95$0 = N[(y$45$scale$95$m * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.25 * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Sin[t$95$3], $MachinePrecision]}, If[LessEqual[y$45$scale$95$m, 2.6e-95], N[(0.25 * N[(N[(N[(x$45$scale$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[Cos[t$95$2], $MachinePrecision] * a), $MachinePrecision] ^ 2 + N[(b$95$m * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 5e-53], N[(t$95$1 * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a * N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] ^ 2 + b$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 8e+18], N[(0.25 * N[(N[(x$45$scale$95$m * t$95$0), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a / y$45$scale$95$m), $MachinePrecision] ^ 2 + N[(t$95$4 * N[(b$95$m / y$45$scale$95$m), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 3.8e+84], N[(N[Sqrt[N[(N[(8.0 * N[Power[y$45$scale$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * 0.0625), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a * t$95$3), $MachinePrecision] ^ 2 + b$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 1.52e+140], N[(-0.25 * N[(N[(x$45$scale$95$m * N[(y$45$scale$95$m * (-N[Sqrt[8.0], $MachinePrecision])), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sqrt[2.0], $MachinePrecision] * b$95$m), $MachinePrecision] / x$45$scale$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a * t$95$4), $MachinePrecision] ^ 2 + b$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
x-scale_m = \left|x-scale\right|
\\
y-scale_m = \left|y-scale\right|
\\
\begin{array}{l}
t_0 := y-scale\_m \cdot \sqrt{8}\\
t_1 := 0.25 \cdot t\_0\\
t_2 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_3 := \pi \cdot \left(0.005555555555555556 \cdot angle\right)\\
t_4 := \sin t\_3\\
\mathbf{if}\;y-scale\_m \leq 2.6 \cdot 10^{-95}:\\
\;\;\;\;0.25 \cdot \left(\left(\left(x-scale\_m \cdot \sqrt{2}\right) \cdot \sqrt{8}\right) \cdot \mathsf{hypot}\left(\cos t\_2 \cdot a, b\_m \cdot \sin t\_2\right)\right)\\
\mathbf{elif}\;y-scale\_m \leq 5 \cdot 10^{-53}:\\
\;\;\;\;t\_1 \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot \sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot {\left(\sqrt{\pi}\right)}^{2}\right), b\_m\right)\right)\\
\mathbf{elif}\;y-scale\_m \leq 8 \cdot 10^{+18}:\\
\;\;\;\;0.25 \cdot \left(\left(x-scale\_m \cdot t\_0\right) \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(\frac{a}{y-scale\_m}, t\_4 \cdot \frac{b\_m}{y-scale\_m}\right)\right)\right)\\
\mathbf{elif}\;y-scale\_m \leq 3.8 \cdot 10^{+84}:\\
\;\;\;\;\sqrt{\left(8 \cdot {y-scale\_m}^{2}\right) \cdot 0.0625} \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot t\_3, b\_m\right)\right)\\
\mathbf{elif}\;y-scale\_m \leq 1.52 \cdot 10^{+140}:\\
\;\;\;\;-0.25 \cdot \left(\left(x-scale\_m \cdot \left(y-scale\_m \cdot \left(-\sqrt{8}\right)\right)\right) \cdot \frac{\sqrt{2} \cdot b\_m}{x-scale\_m}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot t\_4, b\_m\right)\right)\\
\end{array}
\end{array}
if y-scale < 2.60000000000000001e-95Initial program 2.1%
Simplified2.1%
Taylor expanded in y-scale around 0 9.0%
associate-*r*9.0%
distribute-lft-out9.0%
Simplified9.6%
Taylor expanded in x-scale around 0 25.1%
Simplified26.1%
if 2.60000000000000001e-95 < y-scale < 5e-53Initial program 0.5%
Simplified0.5%
Taylor expanded in x-scale around 0 29.2%
associate-*r*29.2%
distribute-lft-out29.2%
Simplified32.3%
Taylor expanded in angle around 0 32.3%
pow1/232.3%
*-commutative32.3%
unpow-prod-down32.3%
Applied egg-rr46.7%
add-sqr-sqrt46.9%
pow246.9%
Applied egg-rr46.9%
if 5e-53 < y-scale < 8e18Initial program 0.0%
Simplified0.2%
Taylor expanded in x-scale around inf 12.3%
Taylor expanded in angle around 0 12.3%
pow1/212.3%
distribute-lft-out12.3%
unpow-prod-down12.2%
pow1/212.2%
Applied egg-rr12.4%
unpow1/212.4%
unpow212.4%
unpow212.4%
hypot-define13.3%
*-commutative13.3%
associate-/l*13.3%
associate-*r*13.3%
Simplified13.3%
if 8e18 < y-scale < 3.8000000000000001e84Initial program 0.5%
Simplified0.8%
Taylor expanded in x-scale around 0 45.8%
associate-*r*45.8%
distribute-lft-out45.8%
Simplified45.8%
Taylor expanded in angle around 0 45.8%
pow1/245.8%
*-commutative45.8%
unpow-prod-down45.6%
Applied egg-rr54.5%
Taylor expanded in angle around 0 53.5%
associate-*r*53.5%
Simplified53.5%
add-sqr-sqrt53.3%
sqrt-unprod53.5%
swap-sqr53.5%
metadata-eval53.5%
metadata-eval53.5%
swap-sqr53.5%
*-commutative53.5%
*-commutative53.5%
swap-sqr53.5%
*-commutative53.5%
*-commutative53.5%
swap-sqr53.2%
rem-square-sqrt54.0%
pow254.0%
metadata-eval54.0%
Applied egg-rr54.0%
if 3.8000000000000001e84 < y-scale < 1.52e140Initial program 8.3%
Simplified0.0%
Taylor expanded in a around 0 0.2%
Simplified0.2%
Taylor expanded in angle around 0 34.7%
if 1.52e140 < y-scale Initial program 6.9%
Simplified6.9%
Taylor expanded in x-scale around 0 76.6%
associate-*r*76.6%
distribute-lft-out76.6%
Simplified82.7%
Taylor expanded in angle around 0 85.5%
pow1/285.5%
*-commutative85.5%
unpow-prod-down85.4%
Applied egg-rr89.2%
Final simplification35.0%
b_m = (fabs.f64 b)
x-scale_m = (fabs.f64 x-scale)
y-scale_m = (fabs.f64 y-scale)
(FPCore (a b_m angle x-scale_m y-scale_m)
:precision binary64
(let* ((t_0 (* y-scale_m (sqrt 8.0)))
(t_1 (* 0.005555555555555556 (* angle PI)))
(t_2 (* PI (* 0.005555555555555556 angle)))
(t_3 (sin t_2))
(t_4 (* (* 0.25 t_0) (* (sqrt 2.0) (hypot (* a t_3) b_m)))))
(if (<= y-scale_m 2.25e-95)
(*
0.25
(*
(* (* x-scale_m (sqrt 2.0)) (sqrt 8.0))
(hypot (* (cos t_1) a) (* b_m (sin t_1)))))
(if (<= y-scale_m 1.5e-52)
t_4
(if (<= y-scale_m 1.4e+19)
(*
0.25
(*
(* x-scale_m t_0)
(* (sqrt 2.0) (hypot (/ a y-scale_m) (* t_3 (/ b_m y-scale_m))))))
(if (<= y-scale_m 3.8e+84)
(*
(sqrt (* (* 8.0 (pow y-scale_m 2.0)) 0.0625))
(* (sqrt 2.0) (hypot (* a t_2) b_m)))
(if (<= y-scale_m 1.52e+140)
(*
-0.25
(*
(* x-scale_m (* y-scale_m (- (sqrt 8.0))))
(/ (* (sqrt 2.0) b_m) x-scale_m)))
t_4)))))))b_m = fabs(b);
x-scale_m = fabs(x_45_scale);
y-scale_m = fabs(y_45_scale);
double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double t_0 = y_45_scale_m * sqrt(8.0);
double t_1 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_2 = ((double) M_PI) * (0.005555555555555556 * angle);
double t_3 = sin(t_2);
double t_4 = (0.25 * t_0) * (sqrt(2.0) * hypot((a * t_3), b_m));
double tmp;
if (y_45_scale_m <= 2.25e-95) {
tmp = 0.25 * (((x_45_scale_m * sqrt(2.0)) * sqrt(8.0)) * hypot((cos(t_1) * a), (b_m * sin(t_1))));
} else if (y_45_scale_m <= 1.5e-52) {
tmp = t_4;
} else if (y_45_scale_m <= 1.4e+19) {
tmp = 0.25 * ((x_45_scale_m * t_0) * (sqrt(2.0) * hypot((a / y_45_scale_m), (t_3 * (b_m / y_45_scale_m)))));
} else if (y_45_scale_m <= 3.8e+84) {
tmp = sqrt(((8.0 * pow(y_45_scale_m, 2.0)) * 0.0625)) * (sqrt(2.0) * hypot((a * t_2), b_m));
} else if (y_45_scale_m <= 1.52e+140) {
tmp = -0.25 * ((x_45_scale_m * (y_45_scale_m * -sqrt(8.0))) * ((sqrt(2.0) * b_m) / x_45_scale_m));
} else {
tmp = t_4;
}
return tmp;
}
b_m = Math.abs(b);
x-scale_m = Math.abs(x_45_scale);
y-scale_m = Math.abs(y_45_scale);
public static double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double t_0 = y_45_scale_m * Math.sqrt(8.0);
double t_1 = 0.005555555555555556 * (angle * Math.PI);
double t_2 = Math.PI * (0.005555555555555556 * angle);
double t_3 = Math.sin(t_2);
double t_4 = (0.25 * t_0) * (Math.sqrt(2.0) * Math.hypot((a * t_3), b_m));
double tmp;
if (y_45_scale_m <= 2.25e-95) {
tmp = 0.25 * (((x_45_scale_m * Math.sqrt(2.0)) * Math.sqrt(8.0)) * Math.hypot((Math.cos(t_1) * a), (b_m * Math.sin(t_1))));
} else if (y_45_scale_m <= 1.5e-52) {
tmp = t_4;
} else if (y_45_scale_m <= 1.4e+19) {
tmp = 0.25 * ((x_45_scale_m * t_0) * (Math.sqrt(2.0) * Math.hypot((a / y_45_scale_m), (t_3 * (b_m / y_45_scale_m)))));
} else if (y_45_scale_m <= 3.8e+84) {
tmp = Math.sqrt(((8.0 * Math.pow(y_45_scale_m, 2.0)) * 0.0625)) * (Math.sqrt(2.0) * Math.hypot((a * t_2), b_m));
} else if (y_45_scale_m <= 1.52e+140) {
tmp = -0.25 * ((x_45_scale_m * (y_45_scale_m * -Math.sqrt(8.0))) * ((Math.sqrt(2.0) * b_m) / x_45_scale_m));
} else {
tmp = t_4;
}
return tmp;
}
b_m = math.fabs(b) x-scale_m = math.fabs(x_45_scale) y-scale_m = math.fabs(y_45_scale) def code(a, b_m, angle, x_45_scale_m, y_45_scale_m): t_0 = y_45_scale_m * math.sqrt(8.0) t_1 = 0.005555555555555556 * (angle * math.pi) t_2 = math.pi * (0.005555555555555556 * angle) t_3 = math.sin(t_2) t_4 = (0.25 * t_0) * (math.sqrt(2.0) * math.hypot((a * t_3), b_m)) tmp = 0 if y_45_scale_m <= 2.25e-95: tmp = 0.25 * (((x_45_scale_m * math.sqrt(2.0)) * math.sqrt(8.0)) * math.hypot((math.cos(t_1) * a), (b_m * math.sin(t_1)))) elif y_45_scale_m <= 1.5e-52: tmp = t_4 elif y_45_scale_m <= 1.4e+19: tmp = 0.25 * ((x_45_scale_m * t_0) * (math.sqrt(2.0) * math.hypot((a / y_45_scale_m), (t_3 * (b_m / y_45_scale_m))))) elif y_45_scale_m <= 3.8e+84: tmp = math.sqrt(((8.0 * math.pow(y_45_scale_m, 2.0)) * 0.0625)) * (math.sqrt(2.0) * math.hypot((a * t_2), b_m)) elif y_45_scale_m <= 1.52e+140: tmp = -0.25 * ((x_45_scale_m * (y_45_scale_m * -math.sqrt(8.0))) * ((math.sqrt(2.0) * b_m) / x_45_scale_m)) else: tmp = t_4 return tmp
b_m = abs(b) x-scale_m = abs(x_45_scale) y-scale_m = abs(y_45_scale) function code(a, b_m, angle, x_45_scale_m, y_45_scale_m) t_0 = Float64(y_45_scale_m * sqrt(8.0)) t_1 = Float64(0.005555555555555556 * Float64(angle * pi)) t_2 = Float64(pi * Float64(0.005555555555555556 * angle)) t_3 = sin(t_2) t_4 = Float64(Float64(0.25 * t_0) * Float64(sqrt(2.0) * hypot(Float64(a * t_3), b_m))) tmp = 0.0 if (y_45_scale_m <= 2.25e-95) tmp = Float64(0.25 * Float64(Float64(Float64(x_45_scale_m * sqrt(2.0)) * sqrt(8.0)) * hypot(Float64(cos(t_1) * a), Float64(b_m * sin(t_1))))); elseif (y_45_scale_m <= 1.5e-52) tmp = t_4; elseif (y_45_scale_m <= 1.4e+19) tmp = Float64(0.25 * Float64(Float64(x_45_scale_m * t_0) * Float64(sqrt(2.0) * hypot(Float64(a / y_45_scale_m), Float64(t_3 * Float64(b_m / y_45_scale_m)))))); elseif (y_45_scale_m <= 3.8e+84) tmp = Float64(sqrt(Float64(Float64(8.0 * (y_45_scale_m ^ 2.0)) * 0.0625)) * Float64(sqrt(2.0) * hypot(Float64(a * t_2), b_m))); elseif (y_45_scale_m <= 1.52e+140) tmp = Float64(-0.25 * Float64(Float64(x_45_scale_m * Float64(y_45_scale_m * Float64(-sqrt(8.0)))) * Float64(Float64(sqrt(2.0) * b_m) / x_45_scale_m))); else tmp = t_4; end return tmp end
b_m = abs(b); x-scale_m = abs(x_45_scale); y-scale_m = abs(y_45_scale); function tmp_2 = code(a, b_m, angle, x_45_scale_m, y_45_scale_m) t_0 = y_45_scale_m * sqrt(8.0); t_1 = 0.005555555555555556 * (angle * pi); t_2 = pi * (0.005555555555555556 * angle); t_3 = sin(t_2); t_4 = (0.25 * t_0) * (sqrt(2.0) * hypot((a * t_3), b_m)); tmp = 0.0; if (y_45_scale_m <= 2.25e-95) tmp = 0.25 * (((x_45_scale_m * sqrt(2.0)) * sqrt(8.0)) * hypot((cos(t_1) * a), (b_m * sin(t_1)))); elseif (y_45_scale_m <= 1.5e-52) tmp = t_4; elseif (y_45_scale_m <= 1.4e+19) tmp = 0.25 * ((x_45_scale_m * t_0) * (sqrt(2.0) * hypot((a / y_45_scale_m), (t_3 * (b_m / y_45_scale_m))))); elseif (y_45_scale_m <= 3.8e+84) tmp = sqrt(((8.0 * (y_45_scale_m ^ 2.0)) * 0.0625)) * (sqrt(2.0) * hypot((a * t_2), b_m)); elseif (y_45_scale_m <= 1.52e+140) tmp = -0.25 * ((x_45_scale_m * (y_45_scale_m * -sqrt(8.0))) * ((sqrt(2.0) * b_m) / x_45_scale_m)); else tmp = t_4; end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
y-scale_m = N[Abs[y$45$scale], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := Block[{t$95$0 = N[(y$45$scale$95$m * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sin[t$95$2], $MachinePrecision]}, Block[{t$95$4 = N[(N[(0.25 * t$95$0), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a * t$95$3), $MachinePrecision] ^ 2 + b$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$45$scale$95$m, 2.25e-95], N[(0.25 * N[(N[(N[(x$45$scale$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[Cos[t$95$1], $MachinePrecision] * a), $MachinePrecision] ^ 2 + N[(b$95$m * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 1.5e-52], t$95$4, If[LessEqual[y$45$scale$95$m, 1.4e+19], N[(0.25 * N[(N[(x$45$scale$95$m * t$95$0), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a / y$45$scale$95$m), $MachinePrecision] ^ 2 + N[(t$95$3 * N[(b$95$m / y$45$scale$95$m), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 3.8e+84], N[(N[Sqrt[N[(N[(8.0 * N[Power[y$45$scale$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * 0.0625), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a * t$95$2), $MachinePrecision] ^ 2 + b$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 1.52e+140], N[(-0.25 * N[(N[(x$45$scale$95$m * N[(y$45$scale$95$m * (-N[Sqrt[8.0], $MachinePrecision])), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sqrt[2.0], $MachinePrecision] * b$95$m), $MachinePrecision] / x$45$scale$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
x-scale_m = \left|x-scale\right|
\\
y-scale_m = \left|y-scale\right|
\\
\begin{array}{l}
t_0 := y-scale\_m \cdot \sqrt{8}\\
t_1 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_2 := \pi \cdot \left(0.005555555555555556 \cdot angle\right)\\
t_3 := \sin t\_2\\
t_4 := \left(0.25 \cdot t\_0\right) \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot t\_3, b\_m\right)\right)\\
\mathbf{if}\;y-scale\_m \leq 2.25 \cdot 10^{-95}:\\
\;\;\;\;0.25 \cdot \left(\left(\left(x-scale\_m \cdot \sqrt{2}\right) \cdot \sqrt{8}\right) \cdot \mathsf{hypot}\left(\cos t\_1 \cdot a, b\_m \cdot \sin t\_1\right)\right)\\
\mathbf{elif}\;y-scale\_m \leq 1.5 \cdot 10^{-52}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y-scale\_m \leq 1.4 \cdot 10^{+19}:\\
\;\;\;\;0.25 \cdot \left(\left(x-scale\_m \cdot t\_0\right) \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(\frac{a}{y-scale\_m}, t\_3 \cdot \frac{b\_m}{y-scale\_m}\right)\right)\right)\\
\mathbf{elif}\;y-scale\_m \leq 3.8 \cdot 10^{+84}:\\
\;\;\;\;\sqrt{\left(8 \cdot {y-scale\_m}^{2}\right) \cdot 0.0625} \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot t\_2, b\_m\right)\right)\\
\mathbf{elif}\;y-scale\_m \leq 1.52 \cdot 10^{+140}:\\
\;\;\;\;-0.25 \cdot \left(\left(x-scale\_m \cdot \left(y-scale\_m \cdot \left(-\sqrt{8}\right)\right)\right) \cdot \frac{\sqrt{2} \cdot b\_m}{x-scale\_m}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if y-scale < 2.25e-95Initial program 2.1%
Simplified2.1%
Taylor expanded in y-scale around 0 9.0%
associate-*r*9.0%
distribute-lft-out9.0%
Simplified9.6%
Taylor expanded in x-scale around 0 25.1%
Simplified26.1%
if 2.25e-95 < y-scale < 1.5e-52 or 1.52e140 < y-scale Initial program 5.4%
Simplified5.4%
Taylor expanded in x-scale around 0 66.0%
associate-*r*66.0%
distribute-lft-out66.0%
Simplified71.3%
Taylor expanded in angle around 0 73.5%
pow1/273.5%
*-commutative73.5%
unpow-prod-down73.4%
Applied egg-rr79.6%
if 1.5e-52 < y-scale < 1.4e19Initial program 0.0%
Simplified0.2%
Taylor expanded in x-scale around inf 12.3%
Taylor expanded in angle around 0 12.3%
pow1/212.3%
distribute-lft-out12.3%
unpow-prod-down12.2%
pow1/212.2%
Applied egg-rr12.4%
unpow1/212.4%
unpow212.4%
unpow212.4%
hypot-define13.3%
*-commutative13.3%
associate-/l*13.3%
associate-*r*13.3%
Simplified13.3%
if 1.4e19 < y-scale < 3.8000000000000001e84Initial program 0.5%
Simplified0.8%
Taylor expanded in x-scale around 0 45.8%
associate-*r*45.8%
distribute-lft-out45.8%
Simplified45.8%
Taylor expanded in angle around 0 45.8%
pow1/245.8%
*-commutative45.8%
unpow-prod-down45.6%
Applied egg-rr54.5%
Taylor expanded in angle around 0 53.5%
associate-*r*53.5%
Simplified53.5%
add-sqr-sqrt53.3%
sqrt-unprod53.5%
swap-sqr53.5%
metadata-eval53.5%
metadata-eval53.5%
swap-sqr53.5%
*-commutative53.5%
*-commutative53.5%
swap-sqr53.5%
*-commutative53.5%
*-commutative53.5%
swap-sqr53.2%
rem-square-sqrt54.0%
pow254.0%
metadata-eval54.0%
Applied egg-rr54.0%
if 3.8000000000000001e84 < y-scale < 1.52e140Initial program 8.3%
Simplified0.0%
Taylor expanded in a around 0 0.2%
Simplified0.2%
Taylor expanded in angle around 0 34.7%
Final simplification35.0%
b_m = (fabs.f64 b)
x-scale_m = (fabs.f64 x-scale)
y-scale_m = (fabs.f64 y-scale)
(FPCore (a b_m angle x-scale_m y-scale_m)
:precision binary64
(let* ((t_0 (* PI (* 0.005555555555555556 angle)))
(t_1 (sin t_0))
(t_2 (* y-scale_m (sqrt 8.0)))
(t_3
(*
0.25
(*
(* x-scale_m t_2)
(* (sqrt 2.0) (hypot (/ a y-scale_m) (* t_1 (/ b_m y-scale_m)))))))
(t_4 (* (* 0.25 t_2) (* (sqrt 2.0) (hypot (* a t_1) b_m)))))
(if (<= y-scale_m 2.55e-223)
(* 0.25 (* (* (* x-scale_m (sqrt 2.0)) (sqrt 8.0)) a))
(if (<= y-scale_m 2.1e-95)
t_3
(if (<= y-scale_m 1.75e-53)
t_4
(if (<= y-scale_m 3.8e+18)
t_3
(if (<= y-scale_m 2e+81)
(*
(sqrt (* (* 8.0 (pow y-scale_m 2.0)) 0.0625))
(* (sqrt 2.0) (hypot (* a t_0) b_m)))
t_4)))))))b_m = fabs(b);
x-scale_m = fabs(x_45_scale);
y-scale_m = fabs(y_45_scale);
double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double t_0 = ((double) M_PI) * (0.005555555555555556 * angle);
double t_1 = sin(t_0);
double t_2 = y_45_scale_m * sqrt(8.0);
double t_3 = 0.25 * ((x_45_scale_m * t_2) * (sqrt(2.0) * hypot((a / y_45_scale_m), (t_1 * (b_m / y_45_scale_m)))));
double t_4 = (0.25 * t_2) * (sqrt(2.0) * hypot((a * t_1), b_m));
double tmp;
if (y_45_scale_m <= 2.55e-223) {
tmp = 0.25 * (((x_45_scale_m * sqrt(2.0)) * sqrt(8.0)) * a);
} else if (y_45_scale_m <= 2.1e-95) {
tmp = t_3;
} else if (y_45_scale_m <= 1.75e-53) {
tmp = t_4;
} else if (y_45_scale_m <= 3.8e+18) {
tmp = t_3;
} else if (y_45_scale_m <= 2e+81) {
tmp = sqrt(((8.0 * pow(y_45_scale_m, 2.0)) * 0.0625)) * (sqrt(2.0) * hypot((a * t_0), b_m));
} else {
tmp = t_4;
}
return tmp;
}
b_m = Math.abs(b);
x-scale_m = Math.abs(x_45_scale);
y-scale_m = Math.abs(y_45_scale);
public static double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double t_0 = Math.PI * (0.005555555555555556 * angle);
double t_1 = Math.sin(t_0);
double t_2 = y_45_scale_m * Math.sqrt(8.0);
double t_3 = 0.25 * ((x_45_scale_m * t_2) * (Math.sqrt(2.0) * Math.hypot((a / y_45_scale_m), (t_1 * (b_m / y_45_scale_m)))));
double t_4 = (0.25 * t_2) * (Math.sqrt(2.0) * Math.hypot((a * t_1), b_m));
double tmp;
if (y_45_scale_m <= 2.55e-223) {
tmp = 0.25 * (((x_45_scale_m * Math.sqrt(2.0)) * Math.sqrt(8.0)) * a);
} else if (y_45_scale_m <= 2.1e-95) {
tmp = t_3;
} else if (y_45_scale_m <= 1.75e-53) {
tmp = t_4;
} else if (y_45_scale_m <= 3.8e+18) {
tmp = t_3;
} else if (y_45_scale_m <= 2e+81) {
tmp = Math.sqrt(((8.0 * Math.pow(y_45_scale_m, 2.0)) * 0.0625)) * (Math.sqrt(2.0) * Math.hypot((a * t_0), b_m));
} else {
tmp = t_4;
}
return tmp;
}
b_m = math.fabs(b) x-scale_m = math.fabs(x_45_scale) y-scale_m = math.fabs(y_45_scale) def code(a, b_m, angle, x_45_scale_m, y_45_scale_m): t_0 = math.pi * (0.005555555555555556 * angle) t_1 = math.sin(t_0) t_2 = y_45_scale_m * math.sqrt(8.0) t_3 = 0.25 * ((x_45_scale_m * t_2) * (math.sqrt(2.0) * math.hypot((a / y_45_scale_m), (t_1 * (b_m / y_45_scale_m))))) t_4 = (0.25 * t_2) * (math.sqrt(2.0) * math.hypot((a * t_1), b_m)) tmp = 0 if y_45_scale_m <= 2.55e-223: tmp = 0.25 * (((x_45_scale_m * math.sqrt(2.0)) * math.sqrt(8.0)) * a) elif y_45_scale_m <= 2.1e-95: tmp = t_3 elif y_45_scale_m <= 1.75e-53: tmp = t_4 elif y_45_scale_m <= 3.8e+18: tmp = t_3 elif y_45_scale_m <= 2e+81: tmp = math.sqrt(((8.0 * math.pow(y_45_scale_m, 2.0)) * 0.0625)) * (math.sqrt(2.0) * math.hypot((a * t_0), b_m)) else: tmp = t_4 return tmp
b_m = abs(b) x-scale_m = abs(x_45_scale) y-scale_m = abs(y_45_scale) function code(a, b_m, angle, x_45_scale_m, y_45_scale_m) t_0 = Float64(pi * Float64(0.005555555555555556 * angle)) t_1 = sin(t_0) t_2 = Float64(y_45_scale_m * sqrt(8.0)) t_3 = Float64(0.25 * Float64(Float64(x_45_scale_m * t_2) * Float64(sqrt(2.0) * hypot(Float64(a / y_45_scale_m), Float64(t_1 * Float64(b_m / y_45_scale_m)))))) t_4 = Float64(Float64(0.25 * t_2) * Float64(sqrt(2.0) * hypot(Float64(a * t_1), b_m))) tmp = 0.0 if (y_45_scale_m <= 2.55e-223) tmp = Float64(0.25 * Float64(Float64(Float64(x_45_scale_m * sqrt(2.0)) * sqrt(8.0)) * a)); elseif (y_45_scale_m <= 2.1e-95) tmp = t_3; elseif (y_45_scale_m <= 1.75e-53) tmp = t_4; elseif (y_45_scale_m <= 3.8e+18) tmp = t_3; elseif (y_45_scale_m <= 2e+81) tmp = Float64(sqrt(Float64(Float64(8.0 * (y_45_scale_m ^ 2.0)) * 0.0625)) * Float64(sqrt(2.0) * hypot(Float64(a * t_0), b_m))); else tmp = t_4; end return tmp end
b_m = abs(b); x-scale_m = abs(x_45_scale); y-scale_m = abs(y_45_scale); function tmp_2 = code(a, b_m, angle, x_45_scale_m, y_45_scale_m) t_0 = pi * (0.005555555555555556 * angle); t_1 = sin(t_0); t_2 = y_45_scale_m * sqrt(8.0); t_3 = 0.25 * ((x_45_scale_m * t_2) * (sqrt(2.0) * hypot((a / y_45_scale_m), (t_1 * (b_m / y_45_scale_m))))); t_4 = (0.25 * t_2) * (sqrt(2.0) * hypot((a * t_1), b_m)); tmp = 0.0; if (y_45_scale_m <= 2.55e-223) tmp = 0.25 * (((x_45_scale_m * sqrt(2.0)) * sqrt(8.0)) * a); elseif (y_45_scale_m <= 2.1e-95) tmp = t_3; elseif (y_45_scale_m <= 1.75e-53) tmp = t_4; elseif (y_45_scale_m <= 3.8e+18) tmp = t_3; elseif (y_45_scale_m <= 2e+81) tmp = sqrt(((8.0 * (y_45_scale_m ^ 2.0)) * 0.0625)) * (sqrt(2.0) * hypot((a * t_0), b_m)); else tmp = t_4; end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
y-scale_m = N[Abs[y$45$scale], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := Block[{t$95$0 = N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(y$45$scale$95$m * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(0.25 * N[(N[(x$45$scale$95$m * t$95$2), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a / y$45$scale$95$m), $MachinePrecision] ^ 2 + N[(t$95$1 * N[(b$95$m / y$45$scale$95$m), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(0.25 * t$95$2), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a * t$95$1), $MachinePrecision] ^ 2 + b$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$45$scale$95$m, 2.55e-223], N[(0.25 * N[(N[(N[(x$45$scale$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 2.1e-95], t$95$3, If[LessEqual[y$45$scale$95$m, 1.75e-53], t$95$4, If[LessEqual[y$45$scale$95$m, 3.8e+18], t$95$3, If[LessEqual[y$45$scale$95$m, 2e+81], N[(N[Sqrt[N[(N[(8.0 * N[Power[y$45$scale$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * 0.0625), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a * t$95$0), $MachinePrecision] ^ 2 + b$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
x-scale_m = \left|x-scale\right|
\\
y-scale_m = \left|y-scale\right|
\\
\begin{array}{l}
t_0 := \pi \cdot \left(0.005555555555555556 \cdot angle\right)\\
t_1 := \sin t\_0\\
t_2 := y-scale\_m \cdot \sqrt{8}\\
t_3 := 0.25 \cdot \left(\left(x-scale\_m \cdot t\_2\right) \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(\frac{a}{y-scale\_m}, t\_1 \cdot \frac{b\_m}{y-scale\_m}\right)\right)\right)\\
t_4 := \left(0.25 \cdot t\_2\right) \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot t\_1, b\_m\right)\right)\\
\mathbf{if}\;y-scale\_m \leq 2.55 \cdot 10^{-223}:\\
\;\;\;\;0.25 \cdot \left(\left(\left(x-scale\_m \cdot \sqrt{2}\right) \cdot \sqrt{8}\right) \cdot a\right)\\
\mathbf{elif}\;y-scale\_m \leq 2.1 \cdot 10^{-95}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y-scale\_m \leq 1.75 \cdot 10^{-53}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y-scale\_m \leq 3.8 \cdot 10^{+18}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y-scale\_m \leq 2 \cdot 10^{+81}:\\
\;\;\;\;\sqrt{\left(8 \cdot {y-scale\_m}^{2}\right) \cdot 0.0625} \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot t\_0, b\_m\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if y-scale < 2.54999999999999987e-223Initial program 1.7%
Simplified1.8%
Taylor expanded in y-scale around 0 9.1%
associate-*r*9.1%
distribute-lft-out9.1%
Simplified9.8%
Taylor expanded in angle around 0 16.2%
associate-*r*16.2%
Simplified16.2%
if 2.54999999999999987e-223 < y-scale < 2.1e-95 or 1.74999999999999997e-53 < y-scale < 3.8e18Initial program 2.5%
Simplified2.5%
Taylor expanded in x-scale around inf 12.4%
Taylor expanded in angle around 0 12.4%
pow1/212.4%
distribute-lft-out12.4%
unpow-prod-down12.4%
pow1/212.4%
Applied egg-rr16.9%
unpow1/216.9%
unpow216.9%
unpow216.9%
hypot-define19.7%
*-commutative19.7%
associate-/l*19.7%
associate-*r*19.7%
Simplified19.7%
if 2.1e-95 < y-scale < 1.74999999999999997e-53 or 1.99999999999999984e81 < y-scale Initial program 6.1%
Simplified4.2%
Taylor expanded in x-scale around 0 66.8%
associate-*r*66.8%
distribute-lft-out66.8%
Simplified71.0%
Taylor expanded in angle around 0 72.7%
pow1/272.7%
*-commutative72.7%
unpow-prod-down72.6%
Applied egg-rr78.6%
if 3.8e18 < y-scale < 1.99999999999999984e81Initial program 0.6%
Simplified0.9%
Taylor expanded in x-scale around 0 40.0%
associate-*r*40.0%
distribute-lft-out40.0%
Simplified40.0%
Taylor expanded in angle around 0 39.9%
pow1/239.9%
*-commutative39.9%
unpow-prod-down39.8%
Applied egg-rr49.6%
Taylor expanded in angle around 0 48.5%
associate-*r*48.5%
Simplified48.5%
add-sqr-sqrt48.3%
sqrt-unprod48.5%
swap-sqr48.5%
metadata-eval48.5%
metadata-eval48.5%
swap-sqr48.5%
*-commutative48.5%
*-commutative48.5%
swap-sqr48.5%
*-commutative48.5%
*-commutative48.5%
swap-sqr48.2%
rem-square-sqrt48.9%
pow248.9%
metadata-eval48.9%
Applied egg-rr48.9%
Final simplification30.7%
b_m = (fabs.f64 b)
x-scale_m = (fabs.f64 x-scale)
y-scale_m = (fabs.f64 y-scale)
(FPCore (a b_m angle x-scale_m y-scale_m)
:precision binary64
(let* ((t_0 (* PI (* 0.005555555555555556 angle)))
(t_1
(*
(sqrt (* (* 8.0 (pow y-scale_m 2.0)) 0.0625))
(* (sqrt 2.0) (hypot (* a t_0) b_m)))))
(if (<= y-scale_m 3.9e-144)
(* 0.25 (* (* (* x-scale_m (sqrt 2.0)) (sqrt 8.0)) a))
(if (<= y-scale_m 7e-83)
t_1
(if (<= y-scale_m 4.4e+18)
(* 0.25 (* (* x-scale_m (sqrt 8.0)) (* (sqrt 2.0) a)))
(if (<= y-scale_m 1.5e+85)
t_1
(if (<= y-scale_m 1.1e+95)
(*
-0.25
(*
(* x-scale_m (* y-scale_m (- (sqrt 8.0))))
(/ (* (sqrt 2.0) b_m) x-scale_m)))
(*
(* 0.25 (* y-scale_m (sqrt 8.0)))
(* (sqrt 2.0) (hypot (* a (sin t_0)) b_m))))))))))b_m = fabs(b);
x-scale_m = fabs(x_45_scale);
y-scale_m = fabs(y_45_scale);
double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double t_0 = ((double) M_PI) * (0.005555555555555556 * angle);
double t_1 = sqrt(((8.0 * pow(y_45_scale_m, 2.0)) * 0.0625)) * (sqrt(2.0) * hypot((a * t_0), b_m));
double tmp;
if (y_45_scale_m <= 3.9e-144) {
tmp = 0.25 * (((x_45_scale_m * sqrt(2.0)) * sqrt(8.0)) * a);
} else if (y_45_scale_m <= 7e-83) {
tmp = t_1;
} else if (y_45_scale_m <= 4.4e+18) {
tmp = 0.25 * ((x_45_scale_m * sqrt(8.0)) * (sqrt(2.0) * a));
} else if (y_45_scale_m <= 1.5e+85) {
tmp = t_1;
} else if (y_45_scale_m <= 1.1e+95) {
tmp = -0.25 * ((x_45_scale_m * (y_45_scale_m * -sqrt(8.0))) * ((sqrt(2.0) * b_m) / x_45_scale_m));
} else {
tmp = (0.25 * (y_45_scale_m * sqrt(8.0))) * (sqrt(2.0) * hypot((a * sin(t_0)), b_m));
}
return tmp;
}
b_m = Math.abs(b);
x-scale_m = Math.abs(x_45_scale);
y-scale_m = Math.abs(y_45_scale);
public static double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double t_0 = Math.PI * (0.005555555555555556 * angle);
double t_1 = Math.sqrt(((8.0 * Math.pow(y_45_scale_m, 2.0)) * 0.0625)) * (Math.sqrt(2.0) * Math.hypot((a * t_0), b_m));
double tmp;
if (y_45_scale_m <= 3.9e-144) {
tmp = 0.25 * (((x_45_scale_m * Math.sqrt(2.0)) * Math.sqrt(8.0)) * a);
} else if (y_45_scale_m <= 7e-83) {
tmp = t_1;
} else if (y_45_scale_m <= 4.4e+18) {
tmp = 0.25 * ((x_45_scale_m * Math.sqrt(8.0)) * (Math.sqrt(2.0) * a));
} else if (y_45_scale_m <= 1.5e+85) {
tmp = t_1;
} else if (y_45_scale_m <= 1.1e+95) {
tmp = -0.25 * ((x_45_scale_m * (y_45_scale_m * -Math.sqrt(8.0))) * ((Math.sqrt(2.0) * b_m) / x_45_scale_m));
} else {
tmp = (0.25 * (y_45_scale_m * Math.sqrt(8.0))) * (Math.sqrt(2.0) * Math.hypot((a * Math.sin(t_0)), b_m));
}
return tmp;
}
b_m = math.fabs(b) x-scale_m = math.fabs(x_45_scale) y-scale_m = math.fabs(y_45_scale) def code(a, b_m, angle, x_45_scale_m, y_45_scale_m): t_0 = math.pi * (0.005555555555555556 * angle) t_1 = math.sqrt(((8.0 * math.pow(y_45_scale_m, 2.0)) * 0.0625)) * (math.sqrt(2.0) * math.hypot((a * t_0), b_m)) tmp = 0 if y_45_scale_m <= 3.9e-144: tmp = 0.25 * (((x_45_scale_m * math.sqrt(2.0)) * math.sqrt(8.0)) * a) elif y_45_scale_m <= 7e-83: tmp = t_1 elif y_45_scale_m <= 4.4e+18: tmp = 0.25 * ((x_45_scale_m * math.sqrt(8.0)) * (math.sqrt(2.0) * a)) elif y_45_scale_m <= 1.5e+85: tmp = t_1 elif y_45_scale_m <= 1.1e+95: tmp = -0.25 * ((x_45_scale_m * (y_45_scale_m * -math.sqrt(8.0))) * ((math.sqrt(2.0) * b_m) / x_45_scale_m)) else: tmp = (0.25 * (y_45_scale_m * math.sqrt(8.0))) * (math.sqrt(2.0) * math.hypot((a * math.sin(t_0)), b_m)) return tmp
b_m = abs(b) x-scale_m = abs(x_45_scale) y-scale_m = abs(y_45_scale) function code(a, b_m, angle, x_45_scale_m, y_45_scale_m) t_0 = Float64(pi * Float64(0.005555555555555556 * angle)) t_1 = Float64(sqrt(Float64(Float64(8.0 * (y_45_scale_m ^ 2.0)) * 0.0625)) * Float64(sqrt(2.0) * hypot(Float64(a * t_0), b_m))) tmp = 0.0 if (y_45_scale_m <= 3.9e-144) tmp = Float64(0.25 * Float64(Float64(Float64(x_45_scale_m * sqrt(2.0)) * sqrt(8.0)) * a)); elseif (y_45_scale_m <= 7e-83) tmp = t_1; elseif (y_45_scale_m <= 4.4e+18) tmp = Float64(0.25 * Float64(Float64(x_45_scale_m * sqrt(8.0)) * Float64(sqrt(2.0) * a))); elseif (y_45_scale_m <= 1.5e+85) tmp = t_1; elseif (y_45_scale_m <= 1.1e+95) tmp = Float64(-0.25 * Float64(Float64(x_45_scale_m * Float64(y_45_scale_m * Float64(-sqrt(8.0)))) * Float64(Float64(sqrt(2.0) * b_m) / x_45_scale_m))); else tmp = Float64(Float64(0.25 * Float64(y_45_scale_m * sqrt(8.0))) * Float64(sqrt(2.0) * hypot(Float64(a * sin(t_0)), b_m))); end return tmp end
b_m = abs(b); x-scale_m = abs(x_45_scale); y-scale_m = abs(y_45_scale); function tmp_2 = code(a, b_m, angle, x_45_scale_m, y_45_scale_m) t_0 = pi * (0.005555555555555556 * angle); t_1 = sqrt(((8.0 * (y_45_scale_m ^ 2.0)) * 0.0625)) * (sqrt(2.0) * hypot((a * t_0), b_m)); tmp = 0.0; if (y_45_scale_m <= 3.9e-144) tmp = 0.25 * (((x_45_scale_m * sqrt(2.0)) * sqrt(8.0)) * a); elseif (y_45_scale_m <= 7e-83) tmp = t_1; elseif (y_45_scale_m <= 4.4e+18) tmp = 0.25 * ((x_45_scale_m * sqrt(8.0)) * (sqrt(2.0) * a)); elseif (y_45_scale_m <= 1.5e+85) tmp = t_1; elseif (y_45_scale_m <= 1.1e+95) tmp = -0.25 * ((x_45_scale_m * (y_45_scale_m * -sqrt(8.0))) * ((sqrt(2.0) * b_m) / x_45_scale_m)); else tmp = (0.25 * (y_45_scale_m * sqrt(8.0))) * (sqrt(2.0) * hypot((a * sin(t_0)), b_m)); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
y-scale_m = N[Abs[y$45$scale], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := Block[{t$95$0 = N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Sqrt[N[(N[(8.0 * N[Power[y$45$scale$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * 0.0625), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a * t$95$0), $MachinePrecision] ^ 2 + b$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$45$scale$95$m, 3.9e-144], N[(0.25 * N[(N[(N[(x$45$scale$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 7e-83], t$95$1, If[LessEqual[y$45$scale$95$m, 4.4e+18], N[(0.25 * N[(N[(x$45$scale$95$m * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 1.5e+85], t$95$1, If[LessEqual[y$45$scale$95$m, 1.1e+95], N[(-0.25 * N[(N[(x$45$scale$95$m * N[(y$45$scale$95$m * (-N[Sqrt[8.0], $MachinePrecision])), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sqrt[2.0], $MachinePrecision] * b$95$m), $MachinePrecision] / x$45$scale$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.25 * N[(y$45$scale$95$m * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] ^ 2 + b$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
x-scale_m = \left|x-scale\right|
\\
y-scale_m = \left|y-scale\right|
\\
\begin{array}{l}
t_0 := \pi \cdot \left(0.005555555555555556 \cdot angle\right)\\
t_1 := \sqrt{\left(8 \cdot {y-scale\_m}^{2}\right) \cdot 0.0625} \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot t\_0, b\_m\right)\right)\\
\mathbf{if}\;y-scale\_m \leq 3.9 \cdot 10^{-144}:\\
\;\;\;\;0.25 \cdot \left(\left(\left(x-scale\_m \cdot \sqrt{2}\right) \cdot \sqrt{8}\right) \cdot a\right)\\
\mathbf{elif}\;y-scale\_m \leq 7 \cdot 10^{-83}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y-scale\_m \leq 4.4 \cdot 10^{+18}:\\
\;\;\;\;0.25 \cdot \left(\left(x-scale\_m \cdot \sqrt{8}\right) \cdot \left(\sqrt{2} \cdot a\right)\right)\\
\mathbf{elif}\;y-scale\_m \leq 1.5 \cdot 10^{+85}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y-scale\_m \leq 1.1 \cdot 10^{+95}:\\
\;\;\;\;-0.25 \cdot \left(\left(x-scale\_m \cdot \left(y-scale\_m \cdot \left(-\sqrt{8}\right)\right)\right) \cdot \frac{\sqrt{2} \cdot b\_m}{x-scale\_m}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.25 \cdot \left(y-scale\_m \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot \sin t\_0, b\_m\right)\right)\\
\end{array}
\end{array}
if y-scale < 3.90000000000000015e-144Initial program 1.6%
Simplified1.7%
Taylor expanded in y-scale around 0 8.4%
associate-*r*8.4%
distribute-lft-out8.4%
Simplified9.0%
Taylor expanded in angle around 0 16.8%
associate-*r*16.9%
Simplified16.9%
if 3.90000000000000015e-144 < y-scale < 7.00000000000000061e-83 or 4.4e18 < y-scale < 1.5e85Initial program 4.5%
Simplified4.6%
Taylor expanded in x-scale around 0 44.0%
associate-*r*44.0%
distribute-lft-out44.0%
Simplified48.1%
Taylor expanded in angle around 0 48.1%
pow1/248.1%
*-commutative48.1%
unpow-prod-down48.0%
Applied egg-rr48.0%
Taylor expanded in angle around 0 46.5%
associate-*r*46.5%
Simplified46.5%
add-sqr-sqrt46.4%
sqrt-unprod46.5%
swap-sqr46.5%
metadata-eval46.5%
metadata-eval46.5%
swap-sqr46.5%
*-commutative46.5%
*-commutative46.5%
swap-sqr46.5%
*-commutative46.5%
*-commutative46.5%
swap-sqr46.4%
rem-square-sqrt46.8%
pow246.8%
metadata-eval46.8%
Applied egg-rr46.8%
if 7.00000000000000061e-83 < y-scale < 4.4e18Initial program 0.2%
Simplified0.3%
Taylor expanded in y-scale around 0 9.6%
distribute-lft-out9.6%
Simplified9.7%
Taylor expanded in angle around 0 18.0%
*-commutative18.0%
Simplified18.0%
if 1.5e85 < y-scale < 1.0999999999999999e95Initial program 25.0%
Simplified0.0%
Taylor expanded in a around 0 0.5%
Simplified0.5%
Taylor expanded in angle around 0 54.1%
if 1.0999999999999999e95 < y-scale Initial program 5.6%
Simplified5.6%
Taylor expanded in x-scale around 0 75.8%
associate-*r*75.8%
distribute-lft-out75.8%
Simplified80.9%
Taylor expanded in angle around 0 83.1%
pow1/283.1%
*-commutative83.1%
unpow-prod-down83.1%
Applied egg-rr86.2%
Final simplification30.6%
b_m = (fabs.f64 b)
x-scale_m = (fabs.f64 x-scale)
y-scale_m = (fabs.f64 y-scale)
(FPCore (a b_m angle x-scale_m y-scale_m)
:precision binary64
(let* ((t_0 (* y-scale_m (sqrt 8.0)))
(t_1 (* 0.005555555555555556 (* angle PI)))
(t_2 (* PI (* 0.005555555555555556 angle)))
(t_3 (sin t_2))
(t_4 (* (* 0.25 t_0) (* (sqrt 2.0) (hypot (* a t_3) b_m)))))
(if (<= y-scale_m 2.6e-95)
(*
0.25
(*
(* (* x-scale_m (sqrt 2.0)) (sqrt 8.0))
(hypot (* (cos t_1) a) (* t_1 b_m))))
(if (<= y-scale_m 1.95e-57)
t_4
(if (<= y-scale_m 2.1e+18)
(*
0.25
(*
(* x-scale_m t_0)
(* (sqrt 2.0) (hypot (/ a y-scale_m) (* t_3 (/ b_m y-scale_m))))))
(if (<= y-scale_m 2.4e+81)
(*
(sqrt (* (* 8.0 (pow y-scale_m 2.0)) 0.0625))
(* (sqrt 2.0) (hypot (* a t_2) b_m)))
t_4))))))b_m = fabs(b);
x-scale_m = fabs(x_45_scale);
y-scale_m = fabs(y_45_scale);
double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double t_0 = y_45_scale_m * sqrt(8.0);
double t_1 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_2 = ((double) M_PI) * (0.005555555555555556 * angle);
double t_3 = sin(t_2);
double t_4 = (0.25 * t_0) * (sqrt(2.0) * hypot((a * t_3), b_m));
double tmp;
if (y_45_scale_m <= 2.6e-95) {
tmp = 0.25 * (((x_45_scale_m * sqrt(2.0)) * sqrt(8.0)) * hypot((cos(t_1) * a), (t_1 * b_m)));
} else if (y_45_scale_m <= 1.95e-57) {
tmp = t_4;
} else if (y_45_scale_m <= 2.1e+18) {
tmp = 0.25 * ((x_45_scale_m * t_0) * (sqrt(2.0) * hypot((a / y_45_scale_m), (t_3 * (b_m / y_45_scale_m)))));
} else if (y_45_scale_m <= 2.4e+81) {
tmp = sqrt(((8.0 * pow(y_45_scale_m, 2.0)) * 0.0625)) * (sqrt(2.0) * hypot((a * t_2), b_m));
} else {
tmp = t_4;
}
return tmp;
}
b_m = Math.abs(b);
x-scale_m = Math.abs(x_45_scale);
y-scale_m = Math.abs(y_45_scale);
public static double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double t_0 = y_45_scale_m * Math.sqrt(8.0);
double t_1 = 0.005555555555555556 * (angle * Math.PI);
double t_2 = Math.PI * (0.005555555555555556 * angle);
double t_3 = Math.sin(t_2);
double t_4 = (0.25 * t_0) * (Math.sqrt(2.0) * Math.hypot((a * t_3), b_m));
double tmp;
if (y_45_scale_m <= 2.6e-95) {
tmp = 0.25 * (((x_45_scale_m * Math.sqrt(2.0)) * Math.sqrt(8.0)) * Math.hypot((Math.cos(t_1) * a), (t_1 * b_m)));
} else if (y_45_scale_m <= 1.95e-57) {
tmp = t_4;
} else if (y_45_scale_m <= 2.1e+18) {
tmp = 0.25 * ((x_45_scale_m * t_0) * (Math.sqrt(2.0) * Math.hypot((a / y_45_scale_m), (t_3 * (b_m / y_45_scale_m)))));
} else if (y_45_scale_m <= 2.4e+81) {
tmp = Math.sqrt(((8.0 * Math.pow(y_45_scale_m, 2.0)) * 0.0625)) * (Math.sqrt(2.0) * Math.hypot((a * t_2), b_m));
} else {
tmp = t_4;
}
return tmp;
}
b_m = math.fabs(b) x-scale_m = math.fabs(x_45_scale) y-scale_m = math.fabs(y_45_scale) def code(a, b_m, angle, x_45_scale_m, y_45_scale_m): t_0 = y_45_scale_m * math.sqrt(8.0) t_1 = 0.005555555555555556 * (angle * math.pi) t_2 = math.pi * (0.005555555555555556 * angle) t_3 = math.sin(t_2) t_4 = (0.25 * t_0) * (math.sqrt(2.0) * math.hypot((a * t_3), b_m)) tmp = 0 if y_45_scale_m <= 2.6e-95: tmp = 0.25 * (((x_45_scale_m * math.sqrt(2.0)) * math.sqrt(8.0)) * math.hypot((math.cos(t_1) * a), (t_1 * b_m))) elif y_45_scale_m <= 1.95e-57: tmp = t_4 elif y_45_scale_m <= 2.1e+18: tmp = 0.25 * ((x_45_scale_m * t_0) * (math.sqrt(2.0) * math.hypot((a / y_45_scale_m), (t_3 * (b_m / y_45_scale_m))))) elif y_45_scale_m <= 2.4e+81: tmp = math.sqrt(((8.0 * math.pow(y_45_scale_m, 2.0)) * 0.0625)) * (math.sqrt(2.0) * math.hypot((a * t_2), b_m)) else: tmp = t_4 return tmp
b_m = abs(b) x-scale_m = abs(x_45_scale) y-scale_m = abs(y_45_scale) function code(a, b_m, angle, x_45_scale_m, y_45_scale_m) t_0 = Float64(y_45_scale_m * sqrt(8.0)) t_1 = Float64(0.005555555555555556 * Float64(angle * pi)) t_2 = Float64(pi * Float64(0.005555555555555556 * angle)) t_3 = sin(t_2) t_4 = Float64(Float64(0.25 * t_0) * Float64(sqrt(2.0) * hypot(Float64(a * t_3), b_m))) tmp = 0.0 if (y_45_scale_m <= 2.6e-95) tmp = Float64(0.25 * Float64(Float64(Float64(x_45_scale_m * sqrt(2.0)) * sqrt(8.0)) * hypot(Float64(cos(t_1) * a), Float64(t_1 * b_m)))); elseif (y_45_scale_m <= 1.95e-57) tmp = t_4; elseif (y_45_scale_m <= 2.1e+18) tmp = Float64(0.25 * Float64(Float64(x_45_scale_m * t_0) * Float64(sqrt(2.0) * hypot(Float64(a / y_45_scale_m), Float64(t_3 * Float64(b_m / y_45_scale_m)))))); elseif (y_45_scale_m <= 2.4e+81) tmp = Float64(sqrt(Float64(Float64(8.0 * (y_45_scale_m ^ 2.0)) * 0.0625)) * Float64(sqrt(2.0) * hypot(Float64(a * t_2), b_m))); else tmp = t_4; end return tmp end
b_m = abs(b); x-scale_m = abs(x_45_scale); y-scale_m = abs(y_45_scale); function tmp_2 = code(a, b_m, angle, x_45_scale_m, y_45_scale_m) t_0 = y_45_scale_m * sqrt(8.0); t_1 = 0.005555555555555556 * (angle * pi); t_2 = pi * (0.005555555555555556 * angle); t_3 = sin(t_2); t_4 = (0.25 * t_0) * (sqrt(2.0) * hypot((a * t_3), b_m)); tmp = 0.0; if (y_45_scale_m <= 2.6e-95) tmp = 0.25 * (((x_45_scale_m * sqrt(2.0)) * sqrt(8.0)) * hypot((cos(t_1) * a), (t_1 * b_m))); elseif (y_45_scale_m <= 1.95e-57) tmp = t_4; elseif (y_45_scale_m <= 2.1e+18) tmp = 0.25 * ((x_45_scale_m * t_0) * (sqrt(2.0) * hypot((a / y_45_scale_m), (t_3 * (b_m / y_45_scale_m))))); elseif (y_45_scale_m <= 2.4e+81) tmp = sqrt(((8.0 * (y_45_scale_m ^ 2.0)) * 0.0625)) * (sqrt(2.0) * hypot((a * t_2), b_m)); else tmp = t_4; end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
y-scale_m = N[Abs[y$45$scale], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := Block[{t$95$0 = N[(y$45$scale$95$m * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sin[t$95$2], $MachinePrecision]}, Block[{t$95$4 = N[(N[(0.25 * t$95$0), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a * t$95$3), $MachinePrecision] ^ 2 + b$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$45$scale$95$m, 2.6e-95], N[(0.25 * N[(N[(N[(x$45$scale$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[Cos[t$95$1], $MachinePrecision] * a), $MachinePrecision] ^ 2 + N[(t$95$1 * b$95$m), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 1.95e-57], t$95$4, If[LessEqual[y$45$scale$95$m, 2.1e+18], N[(0.25 * N[(N[(x$45$scale$95$m * t$95$0), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a / y$45$scale$95$m), $MachinePrecision] ^ 2 + N[(t$95$3 * N[(b$95$m / y$45$scale$95$m), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 2.4e+81], N[(N[Sqrt[N[(N[(8.0 * N[Power[y$45$scale$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * 0.0625), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a * t$95$2), $MachinePrecision] ^ 2 + b$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
x-scale_m = \left|x-scale\right|
\\
y-scale_m = \left|y-scale\right|
\\
\begin{array}{l}
t_0 := y-scale\_m \cdot \sqrt{8}\\
t_1 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_2 := \pi \cdot \left(0.005555555555555556 \cdot angle\right)\\
t_3 := \sin t\_2\\
t_4 := \left(0.25 \cdot t\_0\right) \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot t\_3, b\_m\right)\right)\\
\mathbf{if}\;y-scale\_m \leq 2.6 \cdot 10^{-95}:\\
\;\;\;\;0.25 \cdot \left(\left(\left(x-scale\_m \cdot \sqrt{2}\right) \cdot \sqrt{8}\right) \cdot \mathsf{hypot}\left(\cos t\_1 \cdot a, t\_1 \cdot b\_m\right)\right)\\
\mathbf{elif}\;y-scale\_m \leq 1.95 \cdot 10^{-57}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y-scale\_m \leq 2.1 \cdot 10^{+18}:\\
\;\;\;\;0.25 \cdot \left(\left(x-scale\_m \cdot t\_0\right) \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(\frac{a}{y-scale\_m}, t\_3 \cdot \frac{b\_m}{y-scale\_m}\right)\right)\right)\\
\mathbf{elif}\;y-scale\_m \leq 2.4 \cdot 10^{+81}:\\
\;\;\;\;\sqrt{\left(8 \cdot {y-scale\_m}^{2}\right) \cdot 0.0625} \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot t\_2, b\_m\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if y-scale < 2.60000000000000001e-95Initial program 2.1%
Simplified2.1%
Taylor expanded in y-scale around 0 9.0%
associate-*r*9.0%
distribute-lft-out9.0%
Simplified9.6%
Taylor expanded in x-scale around 0 25.1%
Simplified26.1%
Taylor expanded in angle around 0 24.9%
if 2.60000000000000001e-95 < y-scale < 1.95000000000000003e-57 or 2.3999999999999999e81 < y-scale Initial program 6.2%
Simplified4.3%
Taylor expanded in x-scale around 0 67.7%
associate-*r*67.7%
distribute-lft-out67.7%
Simplified72.0%
Taylor expanded in angle around 0 73.7%
pow1/273.7%
*-commutative73.7%
unpow-prod-down73.7%
Applied egg-rr79.7%
if 1.95000000000000003e-57 < y-scale < 2.1e18Initial program 0.0%
Simplified0.1%
Taylor expanded in x-scale around inf 11.5%
Taylor expanded in angle around 0 11.5%
pow1/211.5%
distribute-lft-out11.5%
unpow-prod-down11.4%
pow1/211.4%
Applied egg-rr11.6%
unpow1/211.6%
unpow211.6%
unpow211.6%
hypot-define12.4%
*-commutative12.4%
associate-/l*12.4%
associate-*r*12.4%
Simplified12.4%
if 2.1e18 < y-scale < 2.3999999999999999e81Initial program 0.6%
Simplified0.9%
Taylor expanded in x-scale around 0 40.0%
associate-*r*40.0%
distribute-lft-out40.0%
Simplified40.0%
Taylor expanded in angle around 0 39.9%
pow1/239.9%
*-commutative39.9%
unpow-prod-down39.8%
Applied egg-rr49.6%
Taylor expanded in angle around 0 48.5%
associate-*r*48.5%
Simplified48.5%
add-sqr-sqrt48.3%
sqrt-unprod48.5%
swap-sqr48.5%
metadata-eval48.5%
metadata-eval48.5%
swap-sqr48.5%
*-commutative48.5%
*-commutative48.5%
swap-sqr48.5%
*-commutative48.5%
*-commutative48.5%
swap-sqr48.2%
rem-square-sqrt48.9%
pow248.9%
metadata-eval48.9%
Applied egg-rr48.9%
Final simplification35.7%
b_m = (fabs.f64 b)
x-scale_m = (fabs.f64 x-scale)
y-scale_m = (fabs.f64 y-scale)
(FPCore (a b_m angle x-scale_m y-scale_m)
:precision binary64
(let* ((t_0 (* 0.25 (* y-scale_m (sqrt 8.0))))
(t_1 (* PI (* 0.005555555555555556 angle))))
(if (<= y-scale_m 3.9e-144)
(* 0.25 (* (* (* x-scale_m (sqrt 2.0)) (sqrt 8.0)) a))
(if (<= y-scale_m 7e-83)
(* t_0 (* (sqrt 2.0) (hypot (* a t_1) b_m)))
(if (<= y-scale_m 10500000.0)
(* 0.25 (* (* x-scale_m (sqrt 8.0)) (* (sqrt 2.0) a)))
(* t_0 (* (sqrt 2.0) (hypot (* a (sin t_1)) b_m))))))))b_m = fabs(b);
x-scale_m = fabs(x_45_scale);
y-scale_m = fabs(y_45_scale);
double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double t_0 = 0.25 * (y_45_scale_m * sqrt(8.0));
double t_1 = ((double) M_PI) * (0.005555555555555556 * angle);
double tmp;
if (y_45_scale_m <= 3.9e-144) {
tmp = 0.25 * (((x_45_scale_m * sqrt(2.0)) * sqrt(8.0)) * a);
} else if (y_45_scale_m <= 7e-83) {
tmp = t_0 * (sqrt(2.0) * hypot((a * t_1), b_m));
} else if (y_45_scale_m <= 10500000.0) {
tmp = 0.25 * ((x_45_scale_m * sqrt(8.0)) * (sqrt(2.0) * a));
} else {
tmp = t_0 * (sqrt(2.0) * hypot((a * sin(t_1)), b_m));
}
return tmp;
}
b_m = Math.abs(b);
x-scale_m = Math.abs(x_45_scale);
y-scale_m = Math.abs(y_45_scale);
public static double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double t_0 = 0.25 * (y_45_scale_m * Math.sqrt(8.0));
double t_1 = Math.PI * (0.005555555555555556 * angle);
double tmp;
if (y_45_scale_m <= 3.9e-144) {
tmp = 0.25 * (((x_45_scale_m * Math.sqrt(2.0)) * Math.sqrt(8.0)) * a);
} else if (y_45_scale_m <= 7e-83) {
tmp = t_0 * (Math.sqrt(2.0) * Math.hypot((a * t_1), b_m));
} else if (y_45_scale_m <= 10500000.0) {
tmp = 0.25 * ((x_45_scale_m * Math.sqrt(8.0)) * (Math.sqrt(2.0) * a));
} else {
tmp = t_0 * (Math.sqrt(2.0) * Math.hypot((a * Math.sin(t_1)), b_m));
}
return tmp;
}
b_m = math.fabs(b) x-scale_m = math.fabs(x_45_scale) y-scale_m = math.fabs(y_45_scale) def code(a, b_m, angle, x_45_scale_m, y_45_scale_m): t_0 = 0.25 * (y_45_scale_m * math.sqrt(8.0)) t_1 = math.pi * (0.005555555555555556 * angle) tmp = 0 if y_45_scale_m <= 3.9e-144: tmp = 0.25 * (((x_45_scale_m * math.sqrt(2.0)) * math.sqrt(8.0)) * a) elif y_45_scale_m <= 7e-83: tmp = t_0 * (math.sqrt(2.0) * math.hypot((a * t_1), b_m)) elif y_45_scale_m <= 10500000.0: tmp = 0.25 * ((x_45_scale_m * math.sqrt(8.0)) * (math.sqrt(2.0) * a)) else: tmp = t_0 * (math.sqrt(2.0) * math.hypot((a * math.sin(t_1)), b_m)) return tmp
b_m = abs(b) x-scale_m = abs(x_45_scale) y-scale_m = abs(y_45_scale) function code(a, b_m, angle, x_45_scale_m, y_45_scale_m) t_0 = Float64(0.25 * Float64(y_45_scale_m * sqrt(8.0))) t_1 = Float64(pi * Float64(0.005555555555555556 * angle)) tmp = 0.0 if (y_45_scale_m <= 3.9e-144) tmp = Float64(0.25 * Float64(Float64(Float64(x_45_scale_m * sqrt(2.0)) * sqrt(8.0)) * a)); elseif (y_45_scale_m <= 7e-83) tmp = Float64(t_0 * Float64(sqrt(2.0) * hypot(Float64(a * t_1), b_m))); elseif (y_45_scale_m <= 10500000.0) tmp = Float64(0.25 * Float64(Float64(x_45_scale_m * sqrt(8.0)) * Float64(sqrt(2.0) * a))); else tmp = Float64(t_0 * Float64(sqrt(2.0) * hypot(Float64(a * sin(t_1)), b_m))); end return tmp end
b_m = abs(b); x-scale_m = abs(x_45_scale); y-scale_m = abs(y_45_scale); function tmp_2 = code(a, b_m, angle, x_45_scale_m, y_45_scale_m) t_0 = 0.25 * (y_45_scale_m * sqrt(8.0)); t_1 = pi * (0.005555555555555556 * angle); tmp = 0.0; if (y_45_scale_m <= 3.9e-144) tmp = 0.25 * (((x_45_scale_m * sqrt(2.0)) * sqrt(8.0)) * a); elseif (y_45_scale_m <= 7e-83) tmp = t_0 * (sqrt(2.0) * hypot((a * t_1), b_m)); elseif (y_45_scale_m <= 10500000.0) tmp = 0.25 * ((x_45_scale_m * sqrt(8.0)) * (sqrt(2.0) * a)); else tmp = t_0 * (sqrt(2.0) * hypot((a * sin(t_1)), b_m)); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
y-scale_m = N[Abs[y$45$scale], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := Block[{t$95$0 = N[(0.25 * N[(y$45$scale$95$m * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$45$scale$95$m, 3.9e-144], N[(0.25 * N[(N[(N[(x$45$scale$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 7e-83], N[(t$95$0 * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a * t$95$1), $MachinePrecision] ^ 2 + b$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale$95$m, 10500000.0], N[(0.25 * N[(N[(x$45$scale$95$m * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision] ^ 2 + b$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
x-scale_m = \left|x-scale\right|
\\
y-scale_m = \left|y-scale\right|
\\
\begin{array}{l}
t_0 := 0.25 \cdot \left(y-scale\_m \cdot \sqrt{8}\right)\\
t_1 := \pi \cdot \left(0.005555555555555556 \cdot angle\right)\\
\mathbf{if}\;y-scale\_m \leq 3.9 \cdot 10^{-144}:\\
\;\;\;\;0.25 \cdot \left(\left(\left(x-scale\_m \cdot \sqrt{2}\right) \cdot \sqrt{8}\right) \cdot a\right)\\
\mathbf{elif}\;y-scale\_m \leq 7 \cdot 10^{-83}:\\
\;\;\;\;t\_0 \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot t\_1, b\_m\right)\right)\\
\mathbf{elif}\;y-scale\_m \leq 10500000:\\
\;\;\;\;0.25 \cdot \left(\left(x-scale\_m \cdot \sqrt{8}\right) \cdot \left(\sqrt{2} \cdot a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot \sin t\_1, b\_m\right)\right)\\
\end{array}
\end{array}
if y-scale < 3.90000000000000015e-144Initial program 1.6%
Simplified1.7%
Taylor expanded in y-scale around 0 8.4%
associate-*r*8.4%
distribute-lft-out8.4%
Simplified9.0%
Taylor expanded in angle around 0 16.8%
associate-*r*16.9%
Simplified16.9%
if 3.90000000000000015e-144 < y-scale < 7.00000000000000061e-83Initial program 8.2%
Simplified8.2%
Taylor expanded in x-scale around 0 37.8%
associate-*r*37.8%
distribute-lft-out37.8%
Simplified45.7%
Taylor expanded in angle around 0 45.7%
pow1/245.7%
*-commutative45.7%
unpow-prod-down45.7%
Applied egg-rr38.3%
Taylor expanded in angle around 0 36.2%
associate-*r*36.2%
Simplified36.2%
if 7.00000000000000061e-83 < y-scale < 1.05e7Initial program 0.2%
Simplified0.3%
Taylor expanded in y-scale around 0 9.6%
distribute-lft-out9.6%
Simplified9.7%
Taylor expanded in angle around 0 18.0%
*-commutative18.0%
Simplified18.0%
if 1.05e7 < y-scale Initial program 6.0%
Simplified4.2%
Taylor expanded in x-scale around 0 67.5%
associate-*r*67.5%
distribute-lft-out67.5%
Simplified71.1%
Taylor expanded in angle around 0 72.7%
pow1/272.7%
*-commutative72.7%
unpow-prod-down72.7%
Applied egg-rr78.2%
Final simplification30.6%
b_m = (fabs.f64 b)
x-scale_m = (fabs.f64 x-scale)
y-scale_m = (fabs.f64 y-scale)
(FPCore (a b_m angle x-scale_m y-scale_m)
:precision binary64
(if (<= y-scale_m 3.2e-144)
(* 0.25 (* (* (* x-scale_m (sqrt 2.0)) (sqrt 8.0)) a))
(if (or (<= y-scale_m 7e-83) (not (<= y-scale_m 400000000.0)))
(*
(* 0.25 (* y-scale_m (sqrt 8.0)))
(* (sqrt 2.0) (hypot (* a (* PI (* 0.005555555555555556 angle))) b_m)))
(* 0.25 (* (* x-scale_m (sqrt 8.0)) (* (sqrt 2.0) a))))))b_m = fabs(b);
x-scale_m = fabs(x_45_scale);
y-scale_m = fabs(y_45_scale);
double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double tmp;
if (y_45_scale_m <= 3.2e-144) {
tmp = 0.25 * (((x_45_scale_m * sqrt(2.0)) * sqrt(8.0)) * a);
} else if ((y_45_scale_m <= 7e-83) || !(y_45_scale_m <= 400000000.0)) {
tmp = (0.25 * (y_45_scale_m * sqrt(8.0))) * (sqrt(2.0) * hypot((a * (((double) M_PI) * (0.005555555555555556 * angle))), b_m));
} else {
tmp = 0.25 * ((x_45_scale_m * sqrt(8.0)) * (sqrt(2.0) * a));
}
return tmp;
}
b_m = Math.abs(b);
x-scale_m = Math.abs(x_45_scale);
y-scale_m = Math.abs(y_45_scale);
public static double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double tmp;
if (y_45_scale_m <= 3.2e-144) {
tmp = 0.25 * (((x_45_scale_m * Math.sqrt(2.0)) * Math.sqrt(8.0)) * a);
} else if ((y_45_scale_m <= 7e-83) || !(y_45_scale_m <= 400000000.0)) {
tmp = (0.25 * (y_45_scale_m * Math.sqrt(8.0))) * (Math.sqrt(2.0) * Math.hypot((a * (Math.PI * (0.005555555555555556 * angle))), b_m));
} else {
tmp = 0.25 * ((x_45_scale_m * Math.sqrt(8.0)) * (Math.sqrt(2.0) * a));
}
return tmp;
}
b_m = math.fabs(b) x-scale_m = math.fabs(x_45_scale) y-scale_m = math.fabs(y_45_scale) def code(a, b_m, angle, x_45_scale_m, y_45_scale_m): tmp = 0 if y_45_scale_m <= 3.2e-144: tmp = 0.25 * (((x_45_scale_m * math.sqrt(2.0)) * math.sqrt(8.0)) * a) elif (y_45_scale_m <= 7e-83) or not (y_45_scale_m <= 400000000.0): tmp = (0.25 * (y_45_scale_m * math.sqrt(8.0))) * (math.sqrt(2.0) * math.hypot((a * (math.pi * (0.005555555555555556 * angle))), b_m)) else: tmp = 0.25 * ((x_45_scale_m * math.sqrt(8.0)) * (math.sqrt(2.0) * a)) return tmp
b_m = abs(b) x-scale_m = abs(x_45_scale) y-scale_m = abs(y_45_scale) function code(a, b_m, angle, x_45_scale_m, y_45_scale_m) tmp = 0.0 if (y_45_scale_m <= 3.2e-144) tmp = Float64(0.25 * Float64(Float64(Float64(x_45_scale_m * sqrt(2.0)) * sqrt(8.0)) * a)); elseif ((y_45_scale_m <= 7e-83) || !(y_45_scale_m <= 400000000.0)) tmp = Float64(Float64(0.25 * Float64(y_45_scale_m * sqrt(8.0))) * Float64(sqrt(2.0) * hypot(Float64(a * Float64(pi * Float64(0.005555555555555556 * angle))), b_m))); else tmp = Float64(0.25 * Float64(Float64(x_45_scale_m * sqrt(8.0)) * Float64(sqrt(2.0) * a))); end return tmp end
b_m = abs(b); x-scale_m = abs(x_45_scale); y-scale_m = abs(y_45_scale); function tmp_2 = code(a, b_m, angle, x_45_scale_m, y_45_scale_m) tmp = 0.0; if (y_45_scale_m <= 3.2e-144) tmp = 0.25 * (((x_45_scale_m * sqrt(2.0)) * sqrt(8.0)) * a); elseif ((y_45_scale_m <= 7e-83) || ~((y_45_scale_m <= 400000000.0))) tmp = (0.25 * (y_45_scale_m * sqrt(8.0))) * (sqrt(2.0) * hypot((a * (pi * (0.005555555555555556 * angle))), b_m)); else tmp = 0.25 * ((x_45_scale_m * sqrt(8.0)) * (sqrt(2.0) * a)); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] x-scale_m = N[Abs[x$45$scale], $MachinePrecision] y-scale_m = N[Abs[y$45$scale], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := If[LessEqual[y$45$scale$95$m, 3.2e-144], N[(0.25 * N[(N[(N[(x$45$scale$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y$45$scale$95$m, 7e-83], N[Not[LessEqual[y$45$scale$95$m, 400000000.0]], $MachinePrecision]], N[(N[(0.25 * N[(y$45$scale$95$m * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a * N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] ^ 2 + b$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.25 * N[(N[(x$45$scale$95$m * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
x-scale_m = \left|x-scale\right|
\\
y-scale_m = \left|y-scale\right|
\\
\begin{array}{l}
\mathbf{if}\;y-scale\_m \leq 3.2 \cdot 10^{-144}:\\
\;\;\;\;0.25 \cdot \left(\left(\left(x-scale\_m \cdot \sqrt{2}\right) \cdot \sqrt{8}\right) \cdot a\right)\\
\mathbf{elif}\;y-scale\_m \leq 7 \cdot 10^{-83} \lor \neg \left(y-scale\_m \leq 400000000\right):\\
\;\;\;\;\left(0.25 \cdot \left(y-scale\_m \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right), b\_m\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.25 \cdot \left(\left(x-scale\_m \cdot \sqrt{8}\right) \cdot \left(\sqrt{2} \cdot a\right)\right)\\
\end{array}
\end{array}
if y-scale < 3.19999999999999973e-144Initial program 1.6%
Simplified1.7%
Taylor expanded in y-scale around 0 8.4%
associate-*r*8.4%
distribute-lft-out8.4%
Simplified9.0%
Taylor expanded in angle around 0 16.8%
associate-*r*16.9%
Simplified16.9%
if 3.19999999999999973e-144 < y-scale < 7.00000000000000061e-83 or 4e8 < y-scale Initial program 6.4%
Simplified4.9%
Taylor expanded in x-scale around 0 62.0%
associate-*r*62.0%
distribute-lft-out62.0%
Simplified66.4%
Taylor expanded in angle around 0 67.7%
pow1/267.7%
*-commutative67.7%
unpow-prod-down67.7%
Applied egg-rr70.8%
Taylor expanded in angle around 0 68.5%
associate-*r*68.5%
Simplified68.5%
if 7.00000000000000061e-83 < y-scale < 4e8Initial program 0.2%
Simplified0.3%
Taylor expanded in y-scale around 0 9.6%
distribute-lft-out9.6%
Simplified9.7%
Taylor expanded in angle around 0 18.0%
*-commutative18.0%
Simplified18.0%
Final simplification30.1%
b_m = (fabs.f64 b)
x-scale_m = (fabs.f64 x-scale)
y-scale_m = (fabs.f64 y-scale)
(FPCore (a b_m angle x-scale_m y-scale_m)
:precision binary64
(let* ((t_0 (* b_m (* y-scale_m 4.0))))
(if (<= b_m 3.2e+37)
(* 0.25 (* (* x-scale_m (sqrt 8.0)) (* (sqrt 2.0) a)))
(if (<= b_m 6.2e+219)
(* 0.25 (sqrt (pow t_0 2.0)))
(if (<= b_m 1.38e+243)
(* 0.25 t_0)
(if (<= b_m 1.55e+265)
(* 0.25 (log1p (expm1 t_0)))
(* 0.25 (+ 1.0 (fabs (fma b_m (* y-scale_m 4.0) -1.0))))))))))b_m = fabs(b);
x-scale_m = fabs(x_45_scale);
y-scale_m = fabs(y_45_scale);
double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double t_0 = b_m * (y_45_scale_m * 4.0);
double tmp;
if (b_m <= 3.2e+37) {
tmp = 0.25 * ((x_45_scale_m * sqrt(8.0)) * (sqrt(2.0) * a));
} else if (b_m <= 6.2e+219) {
tmp = 0.25 * sqrt(pow(t_0, 2.0));
} else if (b_m <= 1.38e+243) {
tmp = 0.25 * t_0;
} else if (b_m <= 1.55e+265) {
tmp = 0.25 * log1p(expm1(t_0));
} else {
tmp = 0.25 * (1.0 + fabs(fma(b_m, (y_45_scale_m * 4.0), -1.0)));
}
return tmp;
}
b_m = abs(b) x-scale_m = abs(x_45_scale) y-scale_m = abs(y_45_scale) function code(a, b_m, angle, x_45_scale_m, y_45_scale_m) t_0 = Float64(b_m * Float64(y_45_scale_m * 4.0)) tmp = 0.0 if (b_m <= 3.2e+37) tmp = Float64(0.25 * Float64(Float64(x_45_scale_m * sqrt(8.0)) * Float64(sqrt(2.0) * a))); elseif (b_m <= 6.2e+219) tmp = Float64(0.25 * sqrt((t_0 ^ 2.0))); elseif (b_m <= 1.38e+243) tmp = Float64(0.25 * t_0); elseif (b_m <= 1.55e+265) tmp = Float64(0.25 * log1p(expm1(t_0))); else tmp = Float64(0.25 * Float64(1.0 + abs(fma(b_m, Float64(y_45_scale_m * 4.0), -1.0)))); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
y-scale_m = N[Abs[y$45$scale], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := Block[{t$95$0 = N[(b$95$m * N[(y$45$scale$95$m * 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 3.2e+37], N[(0.25 * N[(N[(x$45$scale$95$m * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 6.2e+219], N[(0.25 * N[Sqrt[N[Power[t$95$0, 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.38e+243], N[(0.25 * t$95$0), $MachinePrecision], If[LessEqual[b$95$m, 1.55e+265], N[(0.25 * N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(0.25 * N[(1.0 + N[Abs[N[(b$95$m * N[(y$45$scale$95$m * 4.0), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
x-scale_m = \left|x-scale\right|
\\
y-scale_m = \left|y-scale\right|
\\
\begin{array}{l}
t_0 := b\_m \cdot \left(y-scale\_m \cdot 4\right)\\
\mathbf{if}\;b\_m \leq 3.2 \cdot 10^{+37}:\\
\;\;\;\;0.25 \cdot \left(\left(x-scale\_m \cdot \sqrt{8}\right) \cdot \left(\sqrt{2} \cdot a\right)\right)\\
\mathbf{elif}\;b\_m \leq 6.2 \cdot 10^{+219}:\\
\;\;\;\;0.25 \cdot \sqrt{{t\_0}^{2}}\\
\mathbf{elif}\;b\_m \leq 1.38 \cdot 10^{+243}:\\
\;\;\;\;0.25 \cdot t\_0\\
\mathbf{elif}\;b\_m \leq 1.55 \cdot 10^{+265}:\\
\;\;\;\;0.25 \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.25 \cdot \left(1 + \left|\mathsf{fma}\left(b\_m, y-scale\_m \cdot 4, -1\right)\right|\right)\\
\end{array}
\end{array}
if b < 3.20000000000000014e37Initial program 1.9%
Simplified2.0%
Taylor expanded in y-scale around 0 23.6%
distribute-lft-out23.6%
Simplified24.3%
Taylor expanded in angle around 0 18.0%
*-commutative18.0%
Simplified18.0%
if 3.20000000000000014e37 < b < 6.19999999999999938e219Initial program 6.8%
Simplified6.9%
Taylor expanded in angle around 0 28.6%
*-commutative28.6%
Simplified28.6%
sqrt-unprod28.8%
metadata-eval28.8%
metadata-eval28.8%
Applied egg-rr28.8%
add-exp-log27.5%
Applied egg-rr27.5%
rem-exp-log28.8%
add-sqr-sqrt28.4%
sqrt-unprod62.0%
pow262.0%
Applied egg-rr62.0%
if 6.19999999999999938e219 < b < 1.38000000000000003e243Initial program 16.7%
Simplified0.0%
Taylor expanded in angle around 0 50.6%
*-commutative50.6%
Simplified50.6%
sqrt-unprod50.8%
metadata-eval50.8%
metadata-eval50.8%
Applied egg-rr50.8%
if 1.38000000000000003e243 < b < 1.55000000000000004e265Initial program 0.0%
Simplified0.0%
Taylor expanded in angle around 0 34.3%
*-commutative34.3%
Simplified34.3%
log1p-expm1-u35.2%
*-commutative35.2%
sqrt-unprod35.2%
metadata-eval35.2%
metadata-eval35.2%
Applied egg-rr35.2%
if 1.55000000000000004e265 < b Initial program 0.7%
Simplified0.0%
Taylor expanded in angle around 0 15.2%
*-commutative15.2%
Simplified15.2%
sqrt-unprod15.4%
metadata-eval15.4%
metadata-eval15.4%
Applied egg-rr15.4%
add-exp-log14.3%
Applied egg-rr14.3%
rem-exp-log15.4%
expm1-log1p-u14.3%
expm1-undefine14.3%
Applied egg-rr14.3%
log1p-undefine14.3%
rem-exp-log15.4%
associate-+r-15.4%
fma-neg15.4%
metadata-eval15.4%
*-commutative15.4%
Simplified15.4%
add-sqr-sqrt15.2%
sqrt-unprod54.1%
pow254.1%
*-commutative54.1%
Applied egg-rr54.1%
unpow254.1%
rem-sqrt-square70.0%
*-commutative70.0%
Simplified70.0%
Final simplification27.0%
b_m = (fabs.f64 b)
x-scale_m = (fabs.f64 x-scale)
y-scale_m = (fabs.f64 y-scale)
(FPCore (a b_m angle x-scale_m y-scale_m)
:precision binary64
(let* ((t_0 (* b_m (* y-scale_m 4.0))))
(if (<= b_m 1.15e+38)
(* 0.25 (* (* x-scale_m (sqrt 8.0)) (* (sqrt 2.0) a)))
(if (<= b_m 7.6e+219)
(* 0.25 (sqrt (pow t_0 2.0)))
(if (<= b_m 4.8e+242)
(* 0.25 t_0)
(if (<= b_m 1.8e+265)
(* 0.25 (log1p (expm1 t_0)))
(* 0.25 (+ 1.0 t_0))))))))b_m = fabs(b);
x-scale_m = fabs(x_45_scale);
y-scale_m = fabs(y_45_scale);
double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double t_0 = b_m * (y_45_scale_m * 4.0);
double tmp;
if (b_m <= 1.15e+38) {
tmp = 0.25 * ((x_45_scale_m * sqrt(8.0)) * (sqrt(2.0) * a));
} else if (b_m <= 7.6e+219) {
tmp = 0.25 * sqrt(pow(t_0, 2.0));
} else if (b_m <= 4.8e+242) {
tmp = 0.25 * t_0;
} else if (b_m <= 1.8e+265) {
tmp = 0.25 * log1p(expm1(t_0));
} else {
tmp = 0.25 * (1.0 + t_0);
}
return tmp;
}
b_m = Math.abs(b);
x-scale_m = Math.abs(x_45_scale);
y-scale_m = Math.abs(y_45_scale);
public static double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double t_0 = b_m * (y_45_scale_m * 4.0);
double tmp;
if (b_m <= 1.15e+38) {
tmp = 0.25 * ((x_45_scale_m * Math.sqrt(8.0)) * (Math.sqrt(2.0) * a));
} else if (b_m <= 7.6e+219) {
tmp = 0.25 * Math.sqrt(Math.pow(t_0, 2.0));
} else if (b_m <= 4.8e+242) {
tmp = 0.25 * t_0;
} else if (b_m <= 1.8e+265) {
tmp = 0.25 * Math.log1p(Math.expm1(t_0));
} else {
tmp = 0.25 * (1.0 + t_0);
}
return tmp;
}
b_m = math.fabs(b) x-scale_m = math.fabs(x_45_scale) y-scale_m = math.fabs(y_45_scale) def code(a, b_m, angle, x_45_scale_m, y_45_scale_m): t_0 = b_m * (y_45_scale_m * 4.0) tmp = 0 if b_m <= 1.15e+38: tmp = 0.25 * ((x_45_scale_m * math.sqrt(8.0)) * (math.sqrt(2.0) * a)) elif b_m <= 7.6e+219: tmp = 0.25 * math.sqrt(math.pow(t_0, 2.0)) elif b_m <= 4.8e+242: tmp = 0.25 * t_0 elif b_m <= 1.8e+265: tmp = 0.25 * math.log1p(math.expm1(t_0)) else: tmp = 0.25 * (1.0 + t_0) return tmp
b_m = abs(b) x-scale_m = abs(x_45_scale) y-scale_m = abs(y_45_scale) function code(a, b_m, angle, x_45_scale_m, y_45_scale_m) t_0 = Float64(b_m * Float64(y_45_scale_m * 4.0)) tmp = 0.0 if (b_m <= 1.15e+38) tmp = Float64(0.25 * Float64(Float64(x_45_scale_m * sqrt(8.0)) * Float64(sqrt(2.0) * a))); elseif (b_m <= 7.6e+219) tmp = Float64(0.25 * sqrt((t_0 ^ 2.0))); elseif (b_m <= 4.8e+242) tmp = Float64(0.25 * t_0); elseif (b_m <= 1.8e+265) tmp = Float64(0.25 * log1p(expm1(t_0))); else tmp = Float64(0.25 * Float64(1.0 + t_0)); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
y-scale_m = N[Abs[y$45$scale], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := Block[{t$95$0 = N[(b$95$m * N[(y$45$scale$95$m * 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 1.15e+38], N[(0.25 * N[(N[(x$45$scale$95$m * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 7.6e+219], N[(0.25 * N[Sqrt[N[Power[t$95$0, 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 4.8e+242], N[(0.25 * t$95$0), $MachinePrecision], If[LessEqual[b$95$m, 1.8e+265], N[(0.25 * N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(0.25 * N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
x-scale_m = \left|x-scale\right|
\\
y-scale_m = \left|y-scale\right|
\\
\begin{array}{l}
t_0 := b\_m \cdot \left(y-scale\_m \cdot 4\right)\\
\mathbf{if}\;b\_m \leq 1.15 \cdot 10^{+38}:\\
\;\;\;\;0.25 \cdot \left(\left(x-scale\_m \cdot \sqrt{8}\right) \cdot \left(\sqrt{2} \cdot a\right)\right)\\
\mathbf{elif}\;b\_m \leq 7.6 \cdot 10^{+219}:\\
\;\;\;\;0.25 \cdot \sqrt{{t\_0}^{2}}\\
\mathbf{elif}\;b\_m \leq 4.8 \cdot 10^{+242}:\\
\;\;\;\;0.25 \cdot t\_0\\
\mathbf{elif}\;b\_m \leq 1.8 \cdot 10^{+265}:\\
\;\;\;\;0.25 \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.25 \cdot \left(1 + t\_0\right)\\
\end{array}
\end{array}
if b < 1.1500000000000001e38Initial program 1.9%
Simplified2.0%
Taylor expanded in y-scale around 0 23.6%
distribute-lft-out23.6%
Simplified24.3%
Taylor expanded in angle around 0 18.0%
*-commutative18.0%
Simplified18.0%
if 1.1500000000000001e38 < b < 7.59999999999999992e219Initial program 6.8%
Simplified6.9%
Taylor expanded in angle around 0 28.6%
*-commutative28.6%
Simplified28.6%
sqrt-unprod28.8%
metadata-eval28.8%
metadata-eval28.8%
Applied egg-rr28.8%
add-exp-log27.5%
Applied egg-rr27.5%
rem-exp-log28.8%
add-sqr-sqrt28.4%
sqrt-unprod62.0%
pow262.0%
Applied egg-rr62.0%
if 7.59999999999999992e219 < b < 4.80000000000000024e242Initial program 16.7%
Simplified0.0%
Taylor expanded in angle around 0 50.6%
*-commutative50.6%
Simplified50.6%
sqrt-unprod50.8%
metadata-eval50.8%
metadata-eval50.8%
Applied egg-rr50.8%
if 4.80000000000000024e242 < b < 1.80000000000000001e265Initial program 0.0%
Simplified0.0%
Taylor expanded in angle around 0 34.3%
*-commutative34.3%
Simplified34.3%
log1p-expm1-u35.2%
*-commutative35.2%
sqrt-unprod35.2%
metadata-eval35.2%
metadata-eval35.2%
Applied egg-rr35.2%
if 1.80000000000000001e265 < b Initial program 0.7%
Simplified0.0%
Taylor expanded in angle around 0 15.2%
*-commutative15.2%
Simplified15.2%
sqrt-unprod15.4%
metadata-eval15.4%
metadata-eval15.4%
Applied egg-rr15.4%
add-exp-log14.3%
Applied egg-rr14.3%
rem-exp-log15.4%
expm1-log1p-u14.3%
expm1-undefine14.3%
Applied egg-rr14.3%
log1p-undefine14.3%
rem-exp-log15.4%
associate-+r-15.4%
fma-neg15.4%
metadata-eval15.4%
*-commutative15.4%
Simplified15.4%
Taylor expanded in b around inf 15.4%
Taylor expanded in y-scale around inf 15.6%
Final simplification24.2%
b_m = (fabs.f64 b)
x-scale_m = (fabs.f64 x-scale)
y-scale_m = (fabs.f64 y-scale)
(FPCore (a b_m angle x-scale_m y-scale_m)
:precision binary64
(let* ((t_0 (* b_m (* y-scale_m 4.0))))
(if (or (<= a 1.26e+26) (and (not (<= a 1.3e+173)) (<= a 6e+173)))
(* 0.25 t_0)
(* 0.25 (log1p (expm1 t_0))))))b_m = fabs(b);
x-scale_m = fabs(x_45_scale);
y-scale_m = fabs(y_45_scale);
double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double t_0 = b_m * (y_45_scale_m * 4.0);
double tmp;
if ((a <= 1.26e+26) || (!(a <= 1.3e+173) && (a <= 6e+173))) {
tmp = 0.25 * t_0;
} else {
tmp = 0.25 * log1p(expm1(t_0));
}
return tmp;
}
b_m = Math.abs(b);
x-scale_m = Math.abs(x_45_scale);
y-scale_m = Math.abs(y_45_scale);
public static double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double t_0 = b_m * (y_45_scale_m * 4.0);
double tmp;
if ((a <= 1.26e+26) || (!(a <= 1.3e+173) && (a <= 6e+173))) {
tmp = 0.25 * t_0;
} else {
tmp = 0.25 * Math.log1p(Math.expm1(t_0));
}
return tmp;
}
b_m = math.fabs(b) x-scale_m = math.fabs(x_45_scale) y-scale_m = math.fabs(y_45_scale) def code(a, b_m, angle, x_45_scale_m, y_45_scale_m): t_0 = b_m * (y_45_scale_m * 4.0) tmp = 0 if (a <= 1.26e+26) or (not (a <= 1.3e+173) and (a <= 6e+173)): tmp = 0.25 * t_0 else: tmp = 0.25 * math.log1p(math.expm1(t_0)) return tmp
b_m = abs(b) x-scale_m = abs(x_45_scale) y-scale_m = abs(y_45_scale) function code(a, b_m, angle, x_45_scale_m, y_45_scale_m) t_0 = Float64(b_m * Float64(y_45_scale_m * 4.0)) tmp = 0.0 if ((a <= 1.26e+26) || (!(a <= 1.3e+173) && (a <= 6e+173))) tmp = Float64(0.25 * t_0); else tmp = Float64(0.25 * log1p(expm1(t_0))); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
y-scale_m = N[Abs[y$45$scale], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := Block[{t$95$0 = N[(b$95$m * N[(y$45$scale$95$m * 4.0), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[a, 1.26e+26], And[N[Not[LessEqual[a, 1.3e+173]], $MachinePrecision], LessEqual[a, 6e+173]]], N[(0.25 * t$95$0), $MachinePrecision], N[(0.25 * N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
x-scale_m = \left|x-scale\right|
\\
y-scale_m = \left|y-scale\right|
\\
\begin{array}{l}
t_0 := b\_m \cdot \left(y-scale\_m \cdot 4\right)\\
\mathbf{if}\;a \leq 1.26 \cdot 10^{+26} \lor \neg \left(a \leq 1.3 \cdot 10^{+173}\right) \land a \leq 6 \cdot 10^{+173}:\\
\;\;\;\;0.25 \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;0.25 \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(t\_0\right)\right)\\
\end{array}
\end{array}
if a < 1.25999999999999995e26 or 1.2999999999999999e173 < a < 5.9999999999999995e173Initial program 3.0%
Simplified2.4%
Taylor expanded in angle around 0 25.1%
*-commutative25.1%
Simplified25.1%
sqrt-unprod25.3%
metadata-eval25.3%
metadata-eval25.3%
Applied egg-rr25.3%
if 1.25999999999999995e26 < a < 1.2999999999999999e173 or 5.9999999999999995e173 < a Initial program 1.9%
Simplified2.1%
Taylor expanded in angle around 0 12.0%
*-commutative12.0%
Simplified12.0%
log1p-expm1-u18.6%
*-commutative18.6%
sqrt-unprod18.6%
metadata-eval18.6%
metadata-eval18.6%
Applied egg-rr18.6%
Final simplification23.6%
b_m = (fabs.f64 b)
x-scale_m = (fabs.f64 x-scale)
y-scale_m = (fabs.f64 y-scale)
(FPCore (a b_m angle x-scale_m y-scale_m)
:precision binary64
(let* ((t_0 (* b_m (* y-scale_m 4.0))))
(if (<= b_m 3.5e+70)
(* 0.25 (* (* (* x-scale_m (sqrt 2.0)) (sqrt 8.0)) a))
(if (<= b_m 6.6e+205)
(* 0.25 (sqrt (pow t_0 2.0)))
(* 0.25 (+ 1.0 t_0))))))b_m = fabs(b);
x-scale_m = fabs(x_45_scale);
y-scale_m = fabs(y_45_scale);
double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double t_0 = b_m * (y_45_scale_m * 4.0);
double tmp;
if (b_m <= 3.5e+70) {
tmp = 0.25 * (((x_45_scale_m * sqrt(2.0)) * sqrt(8.0)) * a);
} else if (b_m <= 6.6e+205) {
tmp = 0.25 * sqrt(pow(t_0, 2.0));
} else {
tmp = 0.25 * (1.0 + t_0);
}
return tmp;
}
b_m = abs(b)
x-scale_m = abs(x_45scale)
y-scale_m = abs(y_45scale)
real(8) function code(a, b_m, angle, x_45scale_m, y_45scale_m)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: angle
real(8), intent (in) :: x_45scale_m
real(8), intent (in) :: y_45scale_m
real(8) :: t_0
real(8) :: tmp
t_0 = b_m * (y_45scale_m * 4.0d0)
if (b_m <= 3.5d+70) then
tmp = 0.25d0 * (((x_45scale_m * sqrt(2.0d0)) * sqrt(8.0d0)) * a)
else if (b_m <= 6.6d+205) then
tmp = 0.25d0 * sqrt((t_0 ** 2.0d0))
else
tmp = 0.25d0 * (1.0d0 + t_0)
end if
code = tmp
end function
b_m = Math.abs(b);
x-scale_m = Math.abs(x_45_scale);
y-scale_m = Math.abs(y_45_scale);
public static double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double t_0 = b_m * (y_45_scale_m * 4.0);
double tmp;
if (b_m <= 3.5e+70) {
tmp = 0.25 * (((x_45_scale_m * Math.sqrt(2.0)) * Math.sqrt(8.0)) * a);
} else if (b_m <= 6.6e+205) {
tmp = 0.25 * Math.sqrt(Math.pow(t_0, 2.0));
} else {
tmp = 0.25 * (1.0 + t_0);
}
return tmp;
}
b_m = math.fabs(b) x-scale_m = math.fabs(x_45_scale) y-scale_m = math.fabs(y_45_scale) def code(a, b_m, angle, x_45_scale_m, y_45_scale_m): t_0 = b_m * (y_45_scale_m * 4.0) tmp = 0 if b_m <= 3.5e+70: tmp = 0.25 * (((x_45_scale_m * math.sqrt(2.0)) * math.sqrt(8.0)) * a) elif b_m <= 6.6e+205: tmp = 0.25 * math.sqrt(math.pow(t_0, 2.0)) else: tmp = 0.25 * (1.0 + t_0) return tmp
b_m = abs(b) x-scale_m = abs(x_45_scale) y-scale_m = abs(y_45_scale) function code(a, b_m, angle, x_45_scale_m, y_45_scale_m) t_0 = Float64(b_m * Float64(y_45_scale_m * 4.0)) tmp = 0.0 if (b_m <= 3.5e+70) tmp = Float64(0.25 * Float64(Float64(Float64(x_45_scale_m * sqrt(2.0)) * sqrt(8.0)) * a)); elseif (b_m <= 6.6e+205) tmp = Float64(0.25 * sqrt((t_0 ^ 2.0))); else tmp = Float64(0.25 * Float64(1.0 + t_0)); end return tmp end
b_m = abs(b); x-scale_m = abs(x_45_scale); y-scale_m = abs(y_45_scale); function tmp_2 = code(a, b_m, angle, x_45_scale_m, y_45_scale_m) t_0 = b_m * (y_45_scale_m * 4.0); tmp = 0.0; if (b_m <= 3.5e+70) tmp = 0.25 * (((x_45_scale_m * sqrt(2.0)) * sqrt(8.0)) * a); elseif (b_m <= 6.6e+205) tmp = 0.25 * sqrt((t_0 ^ 2.0)); else tmp = 0.25 * (1.0 + t_0); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
y-scale_m = N[Abs[y$45$scale], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := Block[{t$95$0 = N[(b$95$m * N[(y$45$scale$95$m * 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 3.5e+70], N[(0.25 * N[(N[(N[(x$45$scale$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 6.6e+205], N[(0.25 * N[Sqrt[N[Power[t$95$0, 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(0.25 * N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
x-scale_m = \left|x-scale\right|
\\
y-scale_m = \left|y-scale\right|
\\
\begin{array}{l}
t_0 := b\_m \cdot \left(y-scale\_m \cdot 4\right)\\
\mathbf{if}\;b\_m \leq 3.5 \cdot 10^{+70}:\\
\;\;\;\;0.25 \cdot \left(\left(\left(x-scale\_m \cdot \sqrt{2}\right) \cdot \sqrt{8}\right) \cdot a\right)\\
\mathbf{elif}\;b\_m \leq 6.6 \cdot 10^{+205}:\\
\;\;\;\;0.25 \cdot \sqrt{{t\_0}^{2}}\\
\mathbf{else}:\\
\;\;\;\;0.25 \cdot \left(1 + t\_0\right)\\
\end{array}
\end{array}
if b < 3.50000000000000002e70Initial program 1.9%
Simplified2.0%
Taylor expanded in y-scale around 0 8.4%
associate-*r*8.4%
distribute-lft-out8.4%
Simplified8.9%
Taylor expanded in angle around 0 17.7%
associate-*r*17.8%
Simplified17.8%
if 3.50000000000000002e70 < b < 6.6000000000000004e205Initial program 9.1%
Simplified9.1%
Taylor expanded in angle around 0 33.7%
*-commutative33.7%
Simplified33.7%
sqrt-unprod33.9%
metadata-eval33.9%
metadata-eval33.9%
Applied egg-rr33.9%
add-exp-log32.3%
Applied egg-rr32.3%
rem-exp-log33.9%
add-sqr-sqrt33.6%
sqrt-unprod61.1%
pow261.1%
Applied egg-rr61.1%
if 6.6000000000000004e205 < b Initial program 3.8%
Simplified0.0%
Taylor expanded in angle around 0 24.6%
*-commutative24.6%
Simplified24.6%
sqrt-unprod24.8%
metadata-eval24.8%
metadata-eval24.8%
Applied egg-rr24.8%
add-exp-log23.6%
Applied egg-rr23.6%
rem-exp-log24.8%
expm1-log1p-u23.7%
expm1-undefine23.6%
Applied egg-rr23.6%
log1p-undefine23.6%
rem-exp-log24.8%
associate-+r-24.8%
fma-neg24.8%
metadata-eval24.8%
*-commutative24.8%
Simplified24.8%
Taylor expanded in b around inf 24.8%
Taylor expanded in y-scale around inf 25.0%
Final simplification22.3%
b_m = (fabs.f64 b)
x-scale_m = (fabs.f64 x-scale)
y-scale_m = (fabs.f64 y-scale)
(FPCore (a b_m angle x-scale_m y-scale_m)
:precision binary64
(let* ((t_0 (* b_m (* y-scale_m 4.0))))
(if (<= b_m 3.4e+70)
(* 0.25 (* a (* x-scale_m (* (sqrt 2.0) (sqrt 8.0)))))
(if (<= b_m 1e+206) (* 0.25 (sqrt (pow t_0 2.0))) (* 0.25 (+ 1.0 t_0))))))b_m = fabs(b);
x-scale_m = fabs(x_45_scale);
y-scale_m = fabs(y_45_scale);
double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double t_0 = b_m * (y_45_scale_m * 4.0);
double tmp;
if (b_m <= 3.4e+70) {
tmp = 0.25 * (a * (x_45_scale_m * (sqrt(2.0) * sqrt(8.0))));
} else if (b_m <= 1e+206) {
tmp = 0.25 * sqrt(pow(t_0, 2.0));
} else {
tmp = 0.25 * (1.0 + t_0);
}
return tmp;
}
b_m = abs(b)
x-scale_m = abs(x_45scale)
y-scale_m = abs(y_45scale)
real(8) function code(a, b_m, angle, x_45scale_m, y_45scale_m)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: angle
real(8), intent (in) :: x_45scale_m
real(8), intent (in) :: y_45scale_m
real(8) :: t_0
real(8) :: tmp
t_0 = b_m * (y_45scale_m * 4.0d0)
if (b_m <= 3.4d+70) then
tmp = 0.25d0 * (a * (x_45scale_m * (sqrt(2.0d0) * sqrt(8.0d0))))
else if (b_m <= 1d+206) then
tmp = 0.25d0 * sqrt((t_0 ** 2.0d0))
else
tmp = 0.25d0 * (1.0d0 + t_0)
end if
code = tmp
end function
b_m = Math.abs(b);
x-scale_m = Math.abs(x_45_scale);
y-scale_m = Math.abs(y_45_scale);
public static double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double t_0 = b_m * (y_45_scale_m * 4.0);
double tmp;
if (b_m <= 3.4e+70) {
tmp = 0.25 * (a * (x_45_scale_m * (Math.sqrt(2.0) * Math.sqrt(8.0))));
} else if (b_m <= 1e+206) {
tmp = 0.25 * Math.sqrt(Math.pow(t_0, 2.0));
} else {
tmp = 0.25 * (1.0 + t_0);
}
return tmp;
}
b_m = math.fabs(b) x-scale_m = math.fabs(x_45_scale) y-scale_m = math.fabs(y_45_scale) def code(a, b_m, angle, x_45_scale_m, y_45_scale_m): t_0 = b_m * (y_45_scale_m * 4.0) tmp = 0 if b_m <= 3.4e+70: tmp = 0.25 * (a * (x_45_scale_m * (math.sqrt(2.0) * math.sqrt(8.0)))) elif b_m <= 1e+206: tmp = 0.25 * math.sqrt(math.pow(t_0, 2.0)) else: tmp = 0.25 * (1.0 + t_0) return tmp
b_m = abs(b) x-scale_m = abs(x_45_scale) y-scale_m = abs(y_45_scale) function code(a, b_m, angle, x_45_scale_m, y_45_scale_m) t_0 = Float64(b_m * Float64(y_45_scale_m * 4.0)) tmp = 0.0 if (b_m <= 3.4e+70) tmp = Float64(0.25 * Float64(a * Float64(x_45_scale_m * Float64(sqrt(2.0) * sqrt(8.0))))); elseif (b_m <= 1e+206) tmp = Float64(0.25 * sqrt((t_0 ^ 2.0))); else tmp = Float64(0.25 * Float64(1.0 + t_0)); end return tmp end
b_m = abs(b); x-scale_m = abs(x_45_scale); y-scale_m = abs(y_45_scale); function tmp_2 = code(a, b_m, angle, x_45_scale_m, y_45_scale_m) t_0 = b_m * (y_45_scale_m * 4.0); tmp = 0.0; if (b_m <= 3.4e+70) tmp = 0.25 * (a * (x_45_scale_m * (sqrt(2.0) * sqrt(8.0)))); elseif (b_m <= 1e+206) tmp = 0.25 * sqrt((t_0 ^ 2.0)); else tmp = 0.25 * (1.0 + t_0); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
y-scale_m = N[Abs[y$45$scale], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := Block[{t$95$0 = N[(b$95$m * N[(y$45$scale$95$m * 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 3.4e+70], N[(0.25 * N[(a * N[(x$45$scale$95$m * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1e+206], N[(0.25 * N[Sqrt[N[Power[t$95$0, 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(0.25 * N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
x-scale_m = \left|x-scale\right|
\\
y-scale_m = \left|y-scale\right|
\\
\begin{array}{l}
t_0 := b\_m \cdot \left(y-scale\_m \cdot 4\right)\\
\mathbf{if}\;b\_m \leq 3.4 \cdot 10^{+70}:\\
\;\;\;\;0.25 \cdot \left(a \cdot \left(x-scale\_m \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right)\\
\mathbf{elif}\;b\_m \leq 10^{+206}:\\
\;\;\;\;0.25 \cdot \sqrt{{t\_0}^{2}}\\
\mathbf{else}:\\
\;\;\;\;0.25 \cdot \left(1 + t\_0\right)\\
\end{array}
\end{array}
if b < 3.4000000000000001e70Initial program 1.9%
Simplified2.0%
Taylor expanded in y-scale around 0 8.4%
associate-*r*8.4%
distribute-lft-out8.4%
Simplified8.9%
Taylor expanded in angle around 0 17.7%
if 3.4000000000000001e70 < b < 1e206Initial program 9.1%
Simplified9.1%
Taylor expanded in angle around 0 33.7%
*-commutative33.7%
Simplified33.7%
sqrt-unprod33.9%
metadata-eval33.9%
metadata-eval33.9%
Applied egg-rr33.9%
add-exp-log32.3%
Applied egg-rr32.3%
rem-exp-log33.9%
add-sqr-sqrt33.6%
sqrt-unprod61.1%
pow261.1%
Applied egg-rr61.1%
if 1e206 < b Initial program 3.8%
Simplified0.0%
Taylor expanded in angle around 0 24.6%
*-commutative24.6%
Simplified24.6%
sqrt-unprod24.8%
metadata-eval24.8%
metadata-eval24.8%
Applied egg-rr24.8%
add-exp-log23.6%
Applied egg-rr23.6%
rem-exp-log24.8%
expm1-log1p-u23.7%
expm1-undefine23.6%
Applied egg-rr23.6%
log1p-undefine23.6%
rem-exp-log24.8%
associate-+r-24.8%
fma-neg24.8%
metadata-eval24.8%
*-commutative24.8%
Simplified24.8%
Taylor expanded in b around inf 24.8%
Taylor expanded in y-scale around inf 25.0%
Final simplification22.3%
b_m = (fabs.f64 b)
x-scale_m = (fabs.f64 x-scale)
y-scale_m = (fabs.f64 y-scale)
(FPCore (a b_m angle x-scale_m y-scale_m)
:precision binary64
(if (<= a 4.8e+78)
(* 0.25 (* b_m (* y-scale_m 4.0)))
(*
0.25
(+
1.0
(*
b_m
(/
(- (* (pow y-scale_m 2.0) 16.0) (* (/ -1.0 b_m) (/ -1.0 b_m)))
(- (* y-scale_m 4.0) (/ -1.0 b_m))))))))b_m = fabs(b);
x-scale_m = fabs(x_45_scale);
y-scale_m = fabs(y_45_scale);
double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double tmp;
if (a <= 4.8e+78) {
tmp = 0.25 * (b_m * (y_45_scale_m * 4.0));
} else {
tmp = 0.25 * (1.0 + (b_m * (((pow(y_45_scale_m, 2.0) * 16.0) - ((-1.0 / b_m) * (-1.0 / b_m))) / ((y_45_scale_m * 4.0) - (-1.0 / b_m)))));
}
return tmp;
}
b_m = abs(b)
x-scale_m = abs(x_45scale)
y-scale_m = abs(y_45scale)
real(8) function code(a, b_m, angle, x_45scale_m, y_45scale_m)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: angle
real(8), intent (in) :: x_45scale_m
real(8), intent (in) :: y_45scale_m
real(8) :: tmp
if (a <= 4.8d+78) then
tmp = 0.25d0 * (b_m * (y_45scale_m * 4.0d0))
else
tmp = 0.25d0 * (1.0d0 + (b_m * ((((y_45scale_m ** 2.0d0) * 16.0d0) - (((-1.0d0) / b_m) * ((-1.0d0) / b_m))) / ((y_45scale_m * 4.0d0) - ((-1.0d0) / b_m)))))
end if
code = tmp
end function
b_m = Math.abs(b);
x-scale_m = Math.abs(x_45_scale);
y-scale_m = Math.abs(y_45_scale);
public static double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
double tmp;
if (a <= 4.8e+78) {
tmp = 0.25 * (b_m * (y_45_scale_m * 4.0));
} else {
tmp = 0.25 * (1.0 + (b_m * (((Math.pow(y_45_scale_m, 2.0) * 16.0) - ((-1.0 / b_m) * (-1.0 / b_m))) / ((y_45_scale_m * 4.0) - (-1.0 / b_m)))));
}
return tmp;
}
b_m = math.fabs(b) x-scale_m = math.fabs(x_45_scale) y-scale_m = math.fabs(y_45_scale) def code(a, b_m, angle, x_45_scale_m, y_45_scale_m): tmp = 0 if a <= 4.8e+78: tmp = 0.25 * (b_m * (y_45_scale_m * 4.0)) else: tmp = 0.25 * (1.0 + (b_m * (((math.pow(y_45_scale_m, 2.0) * 16.0) - ((-1.0 / b_m) * (-1.0 / b_m))) / ((y_45_scale_m * 4.0) - (-1.0 / b_m))))) return tmp
b_m = abs(b) x-scale_m = abs(x_45_scale) y-scale_m = abs(y_45_scale) function code(a, b_m, angle, x_45_scale_m, y_45_scale_m) tmp = 0.0 if (a <= 4.8e+78) tmp = Float64(0.25 * Float64(b_m * Float64(y_45_scale_m * 4.0))); else tmp = Float64(0.25 * Float64(1.0 + Float64(b_m * Float64(Float64(Float64((y_45_scale_m ^ 2.0) * 16.0) - Float64(Float64(-1.0 / b_m) * Float64(-1.0 / b_m))) / Float64(Float64(y_45_scale_m * 4.0) - Float64(-1.0 / b_m)))))); end return tmp end
b_m = abs(b); x-scale_m = abs(x_45_scale); y-scale_m = abs(y_45_scale); function tmp_2 = code(a, b_m, angle, x_45_scale_m, y_45_scale_m) tmp = 0.0; if (a <= 4.8e+78) tmp = 0.25 * (b_m * (y_45_scale_m * 4.0)); else tmp = 0.25 * (1.0 + (b_m * ((((y_45_scale_m ^ 2.0) * 16.0) - ((-1.0 / b_m) * (-1.0 / b_m))) / ((y_45_scale_m * 4.0) - (-1.0 / b_m))))); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] x-scale_m = N[Abs[x$45$scale], $MachinePrecision] y-scale_m = N[Abs[y$45$scale], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := If[LessEqual[a, 4.8e+78], N[(0.25 * N[(b$95$m * N[(y$45$scale$95$m * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.25 * N[(1.0 + N[(b$95$m * N[(N[(N[(N[Power[y$45$scale$95$m, 2.0], $MachinePrecision] * 16.0), $MachinePrecision] - N[(N[(-1.0 / b$95$m), $MachinePrecision] * N[(-1.0 / b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(y$45$scale$95$m * 4.0), $MachinePrecision] - N[(-1.0 / b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
x-scale_m = \left|x-scale\right|
\\
y-scale_m = \left|y-scale\right|
\\
\begin{array}{l}
\mathbf{if}\;a \leq 4.8 \cdot 10^{+78}:\\
\;\;\;\;0.25 \cdot \left(b\_m \cdot \left(y-scale\_m \cdot 4\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.25 \cdot \left(1 + b\_m \cdot \frac{{y-scale\_m}^{2} \cdot 16 - \frac{-1}{b\_m} \cdot \frac{-1}{b\_m}}{y-scale\_m \cdot 4 - \frac{-1}{b\_m}}\right)\\
\end{array}
\end{array}
if a < 4.7999999999999997e78Initial program 2.8%
Simplified2.4%
Taylor expanded in angle around 0 24.1%
*-commutative24.1%
Simplified24.1%
sqrt-unprod24.3%
metadata-eval24.3%
metadata-eval24.3%
Applied egg-rr24.3%
if 4.7999999999999997e78 < a Initial program 2.2%
Simplified2.4%
Taylor expanded in angle around 0 12.3%
*-commutative12.3%
Simplified12.3%
sqrt-unprod12.4%
metadata-eval12.4%
metadata-eval12.4%
Applied egg-rr12.4%
add-exp-log11.5%
Applied egg-rr11.5%
rem-exp-log12.4%
expm1-log1p-u11.8%
expm1-undefine11.8%
Applied egg-rr11.8%
log1p-undefine11.8%
rem-exp-log12.4%
associate-+r-12.4%
fma-neg12.4%
metadata-eval12.4%
*-commutative12.4%
Simplified12.4%
Taylor expanded in b around inf 12.5%
sub-neg12.5%
flip-+15.9%
*-commutative15.9%
*-commutative15.9%
swap-sqr15.9%
pow215.9%
metadata-eval15.9%
distribute-neg-frac15.9%
metadata-eval15.9%
distribute-neg-frac15.9%
metadata-eval15.9%
distribute-neg-frac15.9%
metadata-eval15.9%
Applied egg-rr15.9%
Final simplification22.6%
b_m = (fabs.f64 b) x-scale_m = (fabs.f64 x-scale) y-scale_m = (fabs.f64 y-scale) (FPCore (a b_m angle x-scale_m y-scale_m) :precision binary64 (* 0.25 (* b_m (* y-scale_m 4.0))))
b_m = fabs(b);
x-scale_m = fabs(x_45_scale);
y-scale_m = fabs(y_45_scale);
double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
return 0.25 * (b_m * (y_45_scale_m * 4.0));
}
b_m = abs(b)
x-scale_m = abs(x_45scale)
y-scale_m = abs(y_45scale)
real(8) function code(a, b_m, angle, x_45scale_m, y_45scale_m)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: angle
real(8), intent (in) :: x_45scale_m
real(8), intent (in) :: y_45scale_m
code = 0.25d0 * (b_m * (y_45scale_m * 4.0d0))
end function
b_m = Math.abs(b);
x-scale_m = Math.abs(x_45_scale);
y-scale_m = Math.abs(y_45_scale);
public static double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
return 0.25 * (b_m * (y_45_scale_m * 4.0));
}
b_m = math.fabs(b) x-scale_m = math.fabs(x_45_scale) y-scale_m = math.fabs(y_45_scale) def code(a, b_m, angle, x_45_scale_m, y_45_scale_m): return 0.25 * (b_m * (y_45_scale_m * 4.0))
b_m = abs(b) x-scale_m = abs(x_45_scale) y-scale_m = abs(y_45_scale) function code(a, b_m, angle, x_45_scale_m, y_45_scale_m) return Float64(0.25 * Float64(b_m * Float64(y_45_scale_m * 4.0))) end
b_m = abs(b); x-scale_m = abs(x_45_scale); y-scale_m = abs(y_45_scale); function tmp = code(a, b_m, angle, x_45_scale_m, y_45_scale_m) tmp = 0.25 * (b_m * (y_45_scale_m * 4.0)); end
b_m = N[Abs[b], $MachinePrecision] x-scale_m = N[Abs[x$45$scale], $MachinePrecision] y-scale_m = N[Abs[y$45$scale], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := N[(0.25 * N[(b$95$m * N[(y$45$scale$95$m * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
x-scale_m = \left|x-scale\right|
\\
y-scale_m = \left|y-scale\right|
\\
0.25 \cdot \left(b\_m \cdot \left(y-scale\_m \cdot 4\right)\right)
\end{array}
Initial program 2.7%
Simplified2.4%
Taylor expanded in angle around 0 21.7%
*-commutative21.7%
Simplified21.7%
sqrt-unprod21.9%
metadata-eval21.9%
metadata-eval21.9%
Applied egg-rr21.9%
b_m = (fabs.f64 b) x-scale_m = (fabs.f64 x-scale) y-scale_m = (fabs.f64 y-scale) (FPCore (a b_m angle x-scale_m y-scale_m) :precision binary64 0.0)
b_m = fabs(b);
x-scale_m = fabs(x_45_scale);
y-scale_m = fabs(y_45_scale);
double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
return 0.0;
}
b_m = abs(b)
x-scale_m = abs(x_45scale)
y-scale_m = abs(y_45scale)
real(8) function code(a, b_m, angle, x_45scale_m, y_45scale_m)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: angle
real(8), intent (in) :: x_45scale_m
real(8), intent (in) :: y_45scale_m
code = 0.0d0
end function
b_m = Math.abs(b);
x-scale_m = Math.abs(x_45_scale);
y-scale_m = Math.abs(y_45_scale);
public static double code(double a, double b_m, double angle, double x_45_scale_m, double y_45_scale_m) {
return 0.0;
}
b_m = math.fabs(b) x-scale_m = math.fabs(x_45_scale) y-scale_m = math.fabs(y_45_scale) def code(a, b_m, angle, x_45_scale_m, y_45_scale_m): return 0.0
b_m = abs(b) x-scale_m = abs(x_45_scale) y-scale_m = abs(y_45_scale) function code(a, b_m, angle, x_45_scale_m, y_45_scale_m) return 0.0 end
b_m = abs(b); x-scale_m = abs(x_45_scale); y-scale_m = abs(y_45_scale); function tmp = code(a, b_m, angle, x_45_scale_m, y_45_scale_m) tmp = 0.0; end
b_m = N[Abs[b], $MachinePrecision] x-scale_m = N[Abs[x$45$scale], $MachinePrecision] y-scale_m = N[Abs[y$45$scale], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := 0.0
\begin{array}{l}
b_m = \left|b\right|
\\
x-scale_m = \left|x-scale\right|
\\
y-scale_m = \left|y-scale\right|
\\
0
\end{array}
Initial program 2.7%
Simplified2.4%
Taylor expanded in angle around 0 21.7%
*-commutative21.7%
Simplified21.7%
sqrt-unprod21.9%
metadata-eval21.9%
metadata-eval21.9%
Applied egg-rr21.9%
add-exp-log20.6%
Applied egg-rr20.6%
rem-exp-log21.9%
expm1-log1p-u21.1%
expm1-undefine19.0%
Applied egg-rr19.0%
log1p-undefine19.0%
rem-exp-log19.8%
associate-+r-19.8%
fma-neg19.8%
metadata-eval19.8%
*-commutative19.8%
Simplified19.8%
Taylor expanded in b around 0 3.8%
Final simplification3.8%
herbie shell --seed 2024107
(FPCore (a b angle x-scale y-scale)
:name "a from scale-rotated-ellipse"
:precision binary64
(/ (- (sqrt (* (* (* 2.0 (/ (* 4.0 (* (* b a) (* b (- a)))) (pow (* x-scale y-scale) 2.0))) (* (* b a) (* b (- a)))) (+ (+ (/ (/ (+ (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)) (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))))))) (/ (* 4.0 (* (* b a) (* b (- a)))) (pow (* x-scale y-scale) 2.0))))