
(FPCore (x c s) :precision binary64 (/ (cos (* 2.0 x)) (* (pow c 2.0) (* (* x (pow s 2.0)) x))))
double code(double x, double c, double s) {
return cos((2.0 * x)) / (pow(c, 2.0) * ((x * pow(s, 2.0)) * x));
}
real(8) function code(x, c, s)
real(8), intent (in) :: x
real(8), intent (in) :: c
real(8), intent (in) :: s
code = cos((2.0d0 * x)) / ((c ** 2.0d0) * ((x * (s ** 2.0d0)) * x))
end function
public static double code(double x, double c, double s) {
return Math.cos((2.0 * x)) / (Math.pow(c, 2.0) * ((x * Math.pow(s, 2.0)) * x));
}
def code(x, c, s): return math.cos((2.0 * x)) / (math.pow(c, 2.0) * ((x * math.pow(s, 2.0)) * x))
function code(x, c, s) return Float64(cos(Float64(2.0 * x)) / Float64((c ^ 2.0) * Float64(Float64(x * (s ^ 2.0)) * x))) end
function tmp = code(x, c, s) tmp = cos((2.0 * x)) / ((c ^ 2.0) * ((x * (s ^ 2.0)) * x)); end
code[x_, c_, s_] := N[(N[Cos[N[(2.0 * x), $MachinePrecision]], $MachinePrecision] / N[(N[Power[c, 2.0], $MachinePrecision] * N[(N[(x * N[Power[s, 2.0], $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\cos \left(2 \cdot x\right)}{{c}^{2} \cdot \left(\left(x \cdot {s}^{2}\right) \cdot x\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x c s) :precision binary64 (/ (cos (* 2.0 x)) (* (pow c 2.0) (* (* x (pow s 2.0)) x))))
double code(double x, double c, double s) {
return cos((2.0 * x)) / (pow(c, 2.0) * ((x * pow(s, 2.0)) * x));
}
real(8) function code(x, c, s)
real(8), intent (in) :: x
real(8), intent (in) :: c
real(8), intent (in) :: s
code = cos((2.0d0 * x)) / ((c ** 2.0d0) * ((x * (s ** 2.0d0)) * x))
end function
public static double code(double x, double c, double s) {
return Math.cos((2.0 * x)) / (Math.pow(c, 2.0) * ((x * Math.pow(s, 2.0)) * x));
}
def code(x, c, s): return math.cos((2.0 * x)) / (math.pow(c, 2.0) * ((x * math.pow(s, 2.0)) * x))
function code(x, c, s) return Float64(cos(Float64(2.0 * x)) / Float64((c ^ 2.0) * Float64(Float64(x * (s ^ 2.0)) * x))) end
function tmp = code(x, c, s) tmp = cos((2.0 * x)) / ((c ^ 2.0) * ((x * (s ^ 2.0)) * x)); end
code[x_, c_, s_] := N[(N[Cos[N[(2.0 * x), $MachinePrecision]], $MachinePrecision] / N[(N[Power[c, 2.0], $MachinePrecision] * N[(N[(x * N[Power[s, 2.0], $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\cos \left(2 \cdot x\right)}{{c}^{2} \cdot \left(\left(x \cdot {s}^{2}\right) \cdot x\right)}
\end{array}
x_m = (fabs.f64 x)
c_m = (fabs.f64 c)
s_m = (fabs.f64 s)
NOTE: x_m, c_m, and s_m should be sorted in increasing order before calling this function.
(FPCore (x_m c_m s_m)
:precision binary64
(let* ((t_0 (* s_m (/ c_m (/ 1.0 x_m))))
(t_1 (cos (* x_m 2.0)))
(t_2 (* c_m (* x_m s_m))))
(if (<= x_m 9e+30) (/ (/ t_1 t_2) t_2) (/ t_1 (* t_0 t_0)))))x_m = fabs(x);
c_m = fabs(c);
s_m = fabs(s);
assert(x_m < c_m && c_m < s_m);
double code(double x_m, double c_m, double s_m) {
double t_0 = s_m * (c_m / (1.0 / x_m));
double t_1 = cos((x_m * 2.0));
double t_2 = c_m * (x_m * s_m);
double tmp;
if (x_m <= 9e+30) {
tmp = (t_1 / t_2) / t_2;
} else {
tmp = t_1 / (t_0 * t_0);
}
return tmp;
}
x_m = abs(x)
c_m = abs(c)
s_m = abs(s)
NOTE: x_m, c_m, and s_m should be sorted in increasing order before calling this function.
real(8) function code(x_m, c_m, s_m)
real(8), intent (in) :: x_m
real(8), intent (in) :: c_m
real(8), intent (in) :: s_m
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = s_m * (c_m / (1.0d0 / x_m))
t_1 = cos((x_m * 2.0d0))
t_2 = c_m * (x_m * s_m)
if (x_m <= 9d+30) then
tmp = (t_1 / t_2) / t_2
else
tmp = t_1 / (t_0 * t_0)
end if
code = tmp
end function
x_m = Math.abs(x);
c_m = Math.abs(c);
s_m = Math.abs(s);
assert x_m < c_m && c_m < s_m;
public static double code(double x_m, double c_m, double s_m) {
double t_0 = s_m * (c_m / (1.0 / x_m));
double t_1 = Math.cos((x_m * 2.0));
double t_2 = c_m * (x_m * s_m);
double tmp;
if (x_m <= 9e+30) {
tmp = (t_1 / t_2) / t_2;
} else {
tmp = t_1 / (t_0 * t_0);
}
return tmp;
}
x_m = math.fabs(x) c_m = math.fabs(c) s_m = math.fabs(s) [x_m, c_m, s_m] = sort([x_m, c_m, s_m]) def code(x_m, c_m, s_m): t_0 = s_m * (c_m / (1.0 / x_m)) t_1 = math.cos((x_m * 2.0)) t_2 = c_m * (x_m * s_m) tmp = 0 if x_m <= 9e+30: tmp = (t_1 / t_2) / t_2 else: tmp = t_1 / (t_0 * t_0) return tmp
x_m = abs(x) c_m = abs(c) s_m = abs(s) x_m, c_m, s_m = sort([x_m, c_m, s_m]) function code(x_m, c_m, s_m) t_0 = Float64(s_m * Float64(c_m / Float64(1.0 / x_m))) t_1 = cos(Float64(x_m * 2.0)) t_2 = Float64(c_m * Float64(x_m * s_m)) tmp = 0.0 if (x_m <= 9e+30) tmp = Float64(Float64(t_1 / t_2) / t_2); else tmp = Float64(t_1 / Float64(t_0 * t_0)); end return tmp end
x_m = abs(x);
c_m = abs(c);
s_m = abs(s);
x_m, c_m, s_m = num2cell(sort([x_m, c_m, s_m])){:}
function tmp_2 = code(x_m, c_m, s_m)
t_0 = s_m * (c_m / (1.0 / x_m));
t_1 = cos((x_m * 2.0));
t_2 = c_m * (x_m * s_m);
tmp = 0.0;
if (x_m <= 9e+30)
tmp = (t_1 / t_2) / t_2;
else
tmp = t_1 / (t_0 * t_0);
end
tmp_2 = tmp;
end
x_m = N[Abs[x], $MachinePrecision]
c_m = N[Abs[c], $MachinePrecision]
s_m = N[Abs[s], $MachinePrecision]
NOTE: x_m, c_m, and s_m should be sorted in increasing order before calling this function.
code[x$95$m_, c$95$m_, s$95$m_] := Block[{t$95$0 = N[(s$95$m * N[(c$95$m / N[(1.0 / x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[N[(x$95$m * 2.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(c$95$m * N[(x$95$m * s$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$95$m, 9e+30], N[(N[(t$95$1 / t$95$2), $MachinePrecision] / t$95$2), $MachinePrecision], N[(t$95$1 / N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
x_m = \left|x\right|
\\
c_m = \left|c\right|
\\
s_m = \left|s\right|
\\
[x_m, c_m, s_m] = \mathsf{sort}([x_m, c_m, s_m])\\
\\
\begin{array}{l}
t_0 := s\_m \cdot \frac{c\_m}{\frac{1}{x\_m}}\\
t_1 := \cos \left(x\_m \cdot 2\right)\\
t_2 := c\_m \cdot \left(x\_m \cdot s\_m\right)\\
\mathbf{if}\;x\_m \leq 9 \cdot 10^{+30}:\\
\;\;\;\;\frac{\frac{t\_1}{t\_2}}{t\_2}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{t\_0 \cdot t\_0}\\
\end{array}
\end{array}
if x < 8.9999999999999999e30Initial program 65.2%
Taylor expanded in x around inf 57.3%
associate-/r*57.3%
*-commutative57.3%
unpow257.3%
unpow257.3%
swap-sqr74.7%
unpow274.7%
associate-/r*74.7%
unpow274.7%
unpow274.7%
swap-sqr94.3%
unpow294.3%
*-commutative94.3%
Simplified94.3%
Applied egg-rr93.9%
associate-/r*93.9%
div-inv93.9%
div-inv93.9%
associate-/l/94.0%
remove-double-div94.0%
*-commutative94.0%
associate-/r/91.7%
associate-/r/94.0%
div-inv94.0%
associate-/l/93.9%
remove-double-div94.4%
*-commutative94.4%
Applied egg-rr94.4%
un-div-inv94.4%
Applied egg-rr94.4%
if 8.9999999999999999e30 < x Initial program 64.5%
Taylor expanded in x around inf 60.8%
associate-/r*57.6%
*-commutative57.6%
unpow257.6%
unpow257.6%
swap-sqr75.5%
unpow275.5%
associate-/r*78.8%
unpow278.8%
unpow278.8%
swap-sqr98.1%
unpow298.1%
*-commutative98.1%
Simplified98.1%
Applied egg-rr98.0%
associate-/r/95.0%
associate-/r/94.9%
Simplified94.9%
Final simplification94.5%
x_m = (fabs.f64 x)
c_m = (fabs.f64 c)
s_m = (fabs.f64 s)
NOTE: x_m, c_m, and s_m should be sorted in increasing order before calling this function.
(FPCore (x_m c_m s_m)
:precision binary64
(let* ((t_0 (* x_m (* c_m s_m))) (t_1 (cos (* x_m 2.0))))
(if (<= (pow s_m 2.0) 5e+27)
(/ t_1 (* s_m (* (* c_m (* x_m s_m)) (* x_m c_m))))
(/ (/ t_1 t_0) t_0))))x_m = fabs(x);
c_m = fabs(c);
s_m = fabs(s);
assert(x_m < c_m && c_m < s_m);
double code(double x_m, double c_m, double s_m) {
double t_0 = x_m * (c_m * s_m);
double t_1 = cos((x_m * 2.0));
double tmp;
if (pow(s_m, 2.0) <= 5e+27) {
tmp = t_1 / (s_m * ((c_m * (x_m * s_m)) * (x_m * c_m)));
} else {
tmp = (t_1 / t_0) / t_0;
}
return tmp;
}
x_m = abs(x)
c_m = abs(c)
s_m = abs(s)
NOTE: x_m, c_m, and s_m should be sorted in increasing order before calling this function.
real(8) function code(x_m, c_m, s_m)
real(8), intent (in) :: x_m
real(8), intent (in) :: c_m
real(8), intent (in) :: s_m
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x_m * (c_m * s_m)
t_1 = cos((x_m * 2.0d0))
if ((s_m ** 2.0d0) <= 5d+27) then
tmp = t_1 / (s_m * ((c_m * (x_m * s_m)) * (x_m * c_m)))
else
tmp = (t_1 / t_0) / t_0
end if
code = tmp
end function
x_m = Math.abs(x);
c_m = Math.abs(c);
s_m = Math.abs(s);
assert x_m < c_m && c_m < s_m;
public static double code(double x_m, double c_m, double s_m) {
double t_0 = x_m * (c_m * s_m);
double t_1 = Math.cos((x_m * 2.0));
double tmp;
if (Math.pow(s_m, 2.0) <= 5e+27) {
tmp = t_1 / (s_m * ((c_m * (x_m * s_m)) * (x_m * c_m)));
} else {
tmp = (t_1 / t_0) / t_0;
}
return tmp;
}
x_m = math.fabs(x) c_m = math.fabs(c) s_m = math.fabs(s) [x_m, c_m, s_m] = sort([x_m, c_m, s_m]) def code(x_m, c_m, s_m): t_0 = x_m * (c_m * s_m) t_1 = math.cos((x_m * 2.0)) tmp = 0 if math.pow(s_m, 2.0) <= 5e+27: tmp = t_1 / (s_m * ((c_m * (x_m * s_m)) * (x_m * c_m))) else: tmp = (t_1 / t_0) / t_0 return tmp
x_m = abs(x) c_m = abs(c) s_m = abs(s) x_m, c_m, s_m = sort([x_m, c_m, s_m]) function code(x_m, c_m, s_m) t_0 = Float64(x_m * Float64(c_m * s_m)) t_1 = cos(Float64(x_m * 2.0)) tmp = 0.0 if ((s_m ^ 2.0) <= 5e+27) tmp = Float64(t_1 / Float64(s_m * Float64(Float64(c_m * Float64(x_m * s_m)) * Float64(x_m * c_m)))); else tmp = Float64(Float64(t_1 / t_0) / t_0); end return tmp end
x_m = abs(x);
c_m = abs(c);
s_m = abs(s);
x_m, c_m, s_m = num2cell(sort([x_m, c_m, s_m])){:}
function tmp_2 = code(x_m, c_m, s_m)
t_0 = x_m * (c_m * s_m);
t_1 = cos((x_m * 2.0));
tmp = 0.0;
if ((s_m ^ 2.0) <= 5e+27)
tmp = t_1 / (s_m * ((c_m * (x_m * s_m)) * (x_m * c_m)));
else
tmp = (t_1 / t_0) / t_0;
end
tmp_2 = tmp;
end
x_m = N[Abs[x], $MachinePrecision]
c_m = N[Abs[c], $MachinePrecision]
s_m = N[Abs[s], $MachinePrecision]
NOTE: x_m, c_m, and s_m should be sorted in increasing order before calling this function.
code[x$95$m_, c$95$m_, s$95$m_] := Block[{t$95$0 = N[(x$95$m * N[(c$95$m * s$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[N[(x$95$m * 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[Power[s$95$m, 2.0], $MachinePrecision], 5e+27], N[(t$95$1 / N[(s$95$m * N[(N[(c$95$m * N[(x$95$m * s$95$m), $MachinePrecision]), $MachinePrecision] * N[(x$95$m * c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$1 / t$95$0), $MachinePrecision] / t$95$0), $MachinePrecision]]]]
\begin{array}{l}
x_m = \left|x\right|
\\
c_m = \left|c\right|
\\
s_m = \left|s\right|
\\
[x_m, c_m, s_m] = \mathsf{sort}([x_m, c_m, s_m])\\
\\
\begin{array}{l}
t_0 := x\_m \cdot \left(c\_m \cdot s\_m\right)\\
t_1 := \cos \left(x\_m \cdot 2\right)\\
\mathbf{if}\;{s\_m}^{2} \leq 5 \cdot 10^{+27}:\\
\;\;\;\;\frac{t\_1}{s\_m \cdot \left(\left(c\_m \cdot \left(x\_m \cdot s\_m\right)\right) \cdot \left(x\_m \cdot c\_m\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t\_1}{t\_0}}{t\_0}\\
\end{array}
\end{array}
if (pow.f64 s #s(literal 2 binary64)) < 4.99999999999999979e27Initial program 58.7%
Taylor expanded in x around inf 54.7%
associate-/r*54.7%
*-commutative54.7%
unpow254.7%
unpow254.7%
swap-sqr71.3%
unpow271.3%
associate-/r*71.3%
unpow271.3%
unpow271.3%
swap-sqr94.7%
unpow294.7%
*-commutative94.7%
Simplified94.7%
unpow294.7%
associate-*r*92.2%
associate-*r*90.8%
*-commutative90.8%
associate-*l*89.8%
*-commutative89.8%
Applied egg-rr89.8%
*-commutative89.8%
associate-*r*90.8%
*-commutative90.8%
*-commutative90.8%
*-commutative90.8%
Simplified90.8%
if 4.99999999999999979e27 < (pow.f64 s #s(literal 2 binary64)) Initial program 72.4%
associate-/r*70.7%
*-commutative70.7%
unpow270.7%
sqr-neg70.7%
unpow270.7%
cos-neg70.7%
*-commutative70.7%
distribute-rgt-neg-in70.7%
metadata-eval70.7%
unpow270.7%
sqr-neg70.7%
unpow270.7%
associate-*r*60.5%
unpow260.5%
*-commutative60.5%
Simplified60.5%
Applied egg-rr78.6%
rem-cbrt-cube95.8%
unpow295.8%
associate-/r*95.9%
*-commutative95.9%
*-commutative95.9%
associate-*l*94.4%
*-commutative94.4%
associate-*l*98.1%
Applied egg-rr98.1%
Final simplification94.2%
x_m = (fabs.f64 x)
c_m = (fabs.f64 c)
s_m = (fabs.f64 s)
NOTE: x_m, c_m, and s_m should be sorted in increasing order before calling this function.
(FPCore (x_m c_m s_m)
:precision binary64
(let* ((t_0 (cos (* x_m 2.0))) (t_1 (* c_m (* x_m s_m))))
(if (<= x_m 0.00012)
(pow t_1 -2.0)
(if (<= x_m 3.6e+221)
(/ t_0 (* s_m (* (* x_m c_m) (* x_m (* c_m s_m)))))
(/ t_0 (* t_1 (* s_m (* x_m c_m))))))))x_m = fabs(x);
c_m = fabs(c);
s_m = fabs(s);
assert(x_m < c_m && c_m < s_m);
double code(double x_m, double c_m, double s_m) {
double t_0 = cos((x_m * 2.0));
double t_1 = c_m * (x_m * s_m);
double tmp;
if (x_m <= 0.00012) {
tmp = pow(t_1, -2.0);
} else if (x_m <= 3.6e+221) {
tmp = t_0 / (s_m * ((x_m * c_m) * (x_m * (c_m * s_m))));
} else {
tmp = t_0 / (t_1 * (s_m * (x_m * c_m)));
}
return tmp;
}
x_m = abs(x)
c_m = abs(c)
s_m = abs(s)
NOTE: x_m, c_m, and s_m should be sorted in increasing order before calling this function.
real(8) function code(x_m, c_m, s_m)
real(8), intent (in) :: x_m
real(8), intent (in) :: c_m
real(8), intent (in) :: s_m
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = cos((x_m * 2.0d0))
t_1 = c_m * (x_m * s_m)
if (x_m <= 0.00012d0) then
tmp = t_1 ** (-2.0d0)
else if (x_m <= 3.6d+221) then
tmp = t_0 / (s_m * ((x_m * c_m) * (x_m * (c_m * s_m))))
else
tmp = t_0 / (t_1 * (s_m * (x_m * c_m)))
end if
code = tmp
end function
x_m = Math.abs(x);
c_m = Math.abs(c);
s_m = Math.abs(s);
assert x_m < c_m && c_m < s_m;
public static double code(double x_m, double c_m, double s_m) {
double t_0 = Math.cos((x_m * 2.0));
double t_1 = c_m * (x_m * s_m);
double tmp;
if (x_m <= 0.00012) {
tmp = Math.pow(t_1, -2.0);
} else if (x_m <= 3.6e+221) {
tmp = t_0 / (s_m * ((x_m * c_m) * (x_m * (c_m * s_m))));
} else {
tmp = t_0 / (t_1 * (s_m * (x_m * c_m)));
}
return tmp;
}
x_m = math.fabs(x) c_m = math.fabs(c) s_m = math.fabs(s) [x_m, c_m, s_m] = sort([x_m, c_m, s_m]) def code(x_m, c_m, s_m): t_0 = math.cos((x_m * 2.0)) t_1 = c_m * (x_m * s_m) tmp = 0 if x_m <= 0.00012: tmp = math.pow(t_1, -2.0) elif x_m <= 3.6e+221: tmp = t_0 / (s_m * ((x_m * c_m) * (x_m * (c_m * s_m)))) else: tmp = t_0 / (t_1 * (s_m * (x_m * c_m))) return tmp
x_m = abs(x) c_m = abs(c) s_m = abs(s) x_m, c_m, s_m = sort([x_m, c_m, s_m]) function code(x_m, c_m, s_m) t_0 = cos(Float64(x_m * 2.0)) t_1 = Float64(c_m * Float64(x_m * s_m)) tmp = 0.0 if (x_m <= 0.00012) tmp = t_1 ^ -2.0; elseif (x_m <= 3.6e+221) tmp = Float64(t_0 / Float64(s_m * Float64(Float64(x_m * c_m) * Float64(x_m * Float64(c_m * s_m))))); else tmp = Float64(t_0 / Float64(t_1 * Float64(s_m * Float64(x_m * c_m)))); end return tmp end
x_m = abs(x);
c_m = abs(c);
s_m = abs(s);
x_m, c_m, s_m = num2cell(sort([x_m, c_m, s_m])){:}
function tmp_2 = code(x_m, c_m, s_m)
t_0 = cos((x_m * 2.0));
t_1 = c_m * (x_m * s_m);
tmp = 0.0;
if (x_m <= 0.00012)
tmp = t_1 ^ -2.0;
elseif (x_m <= 3.6e+221)
tmp = t_0 / (s_m * ((x_m * c_m) * (x_m * (c_m * s_m))));
else
tmp = t_0 / (t_1 * (s_m * (x_m * c_m)));
end
tmp_2 = tmp;
end
x_m = N[Abs[x], $MachinePrecision]
c_m = N[Abs[c], $MachinePrecision]
s_m = N[Abs[s], $MachinePrecision]
NOTE: x_m, c_m, and s_m should be sorted in increasing order before calling this function.
code[x$95$m_, c$95$m_, s$95$m_] := Block[{t$95$0 = N[Cos[N[(x$95$m * 2.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(c$95$m * N[(x$95$m * s$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$95$m, 0.00012], N[Power[t$95$1, -2.0], $MachinePrecision], If[LessEqual[x$95$m, 3.6e+221], N[(t$95$0 / N[(s$95$m * N[(N[(x$95$m * c$95$m), $MachinePrecision] * N[(x$95$m * N[(c$95$m * s$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 / N[(t$95$1 * N[(s$95$m * N[(x$95$m * c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
x_m = \left|x\right|
\\
c_m = \left|c\right|
\\
s_m = \left|s\right|
\\
[x_m, c_m, s_m] = \mathsf{sort}([x_m, c_m, s_m])\\
\\
\begin{array}{l}
t_0 := \cos \left(x\_m \cdot 2\right)\\
t_1 := c\_m \cdot \left(x\_m \cdot s\_m\right)\\
\mathbf{if}\;x\_m \leq 0.00012:\\
\;\;\;\;{t\_1}^{-2}\\
\mathbf{elif}\;x\_m \leq 3.6 \cdot 10^{+221}:\\
\;\;\;\;\frac{t\_0}{s\_m \cdot \left(\left(x\_m \cdot c\_m\right) \cdot \left(x\_m \cdot \left(c\_m \cdot s\_m\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_0}{t\_1 \cdot \left(s\_m \cdot \left(x\_m \cdot c\_m\right)\right)}\\
\end{array}
\end{array}
if x < 1.20000000000000003e-4Initial program 64.8%
associate-/r*64.8%
*-commutative64.8%
unpow264.8%
sqr-neg64.8%
unpow264.8%
cos-neg64.8%
*-commutative64.8%
distribute-rgt-neg-in64.8%
metadata-eval64.8%
unpow264.8%
sqr-neg64.8%
unpow264.8%
associate-*r*56.6%
unpow256.6%
*-commutative56.6%
Simplified56.6%
Taylor expanded in x around 0 53.2%
associate-/r*53.2%
*-commutative53.2%
unpow253.2%
unpow253.2%
swap-sqr67.6%
unpow267.6%
associate-/r*67.6%
unpow267.6%
unpow267.6%
swap-sqr81.5%
unpow281.5%
Simplified81.5%
*-un-lft-identity81.5%
pow-flip81.5%
*-commutative81.5%
associate-*l*83.6%
metadata-eval83.6%
Applied egg-rr83.6%
*-lft-identity83.6%
associate-*r*81.5%
*-commutative81.5%
*-commutative81.5%
Simplified81.5%
if 1.20000000000000003e-4 < x < 3.60000000000000009e221Initial program 71.9%
Taylor expanded in x around inf 69.5%
associate-/r*67.1%
*-commutative67.1%
unpow267.1%
unpow267.1%
swap-sqr76.5%
unpow276.5%
associate-/r*78.9%
unpow278.9%
unpow278.9%
swap-sqr99.8%
unpow299.8%
*-commutative99.8%
Simplified99.8%
unpow299.8%
associate-*r*97.7%
associate-*r*97.6%
*-commutative97.6%
associate-*l*97.6%
*-commutative97.6%
Applied egg-rr97.6%
if 3.60000000000000009e221 < x Initial program 55.1%
Taylor expanded in x around inf 50.0%
associate-/r*45.8%
*-commutative45.8%
unpow245.8%
unpow245.8%
swap-sqr75.0%
unpow275.0%
associate-/r*79.1%
unpow279.1%
unpow279.1%
swap-sqr95.3%
unpow295.3%
*-commutative95.3%
Simplified95.3%
unpow295.3%
associate-*r*91.5%
associate-*r*91.5%
*-commutative91.5%
associate-*l*79.6%
*-commutative79.6%
Applied egg-rr79.6%
associate-*l*79.6%
associate-*r*91.5%
*-commutative91.5%
*-commutative91.5%
*-commutative91.5%
Simplified91.5%
Final simplification85.1%
x_m = (fabs.f64 x)
c_m = (fabs.f64 c)
s_m = (fabs.f64 s)
NOTE: x_m, c_m, and s_m should be sorted in increasing order before calling this function.
(FPCore (x_m c_m s_m)
:precision binary64
(let* ((t_0 (* c_m (* x_m s_m))))
(if (<= x_m 7.5e-9)
(pow t_0 -2.0)
(/ (cos (* x_m 2.0)) (* t_0 (* s_m (* x_m c_m)))))))x_m = fabs(x);
c_m = fabs(c);
s_m = fabs(s);
assert(x_m < c_m && c_m < s_m);
double code(double x_m, double c_m, double s_m) {
double t_0 = c_m * (x_m * s_m);
double tmp;
if (x_m <= 7.5e-9) {
tmp = pow(t_0, -2.0);
} else {
tmp = cos((x_m * 2.0)) / (t_0 * (s_m * (x_m * c_m)));
}
return tmp;
}
x_m = abs(x)
c_m = abs(c)
s_m = abs(s)
NOTE: x_m, c_m, and s_m should be sorted in increasing order before calling this function.
real(8) function code(x_m, c_m, s_m)
real(8), intent (in) :: x_m
real(8), intent (in) :: c_m
real(8), intent (in) :: s_m
real(8) :: t_0
real(8) :: tmp
t_0 = c_m * (x_m * s_m)
if (x_m <= 7.5d-9) then
tmp = t_0 ** (-2.0d0)
else
tmp = cos((x_m * 2.0d0)) / (t_0 * (s_m * (x_m * c_m)))
end if
code = tmp
end function
x_m = Math.abs(x);
c_m = Math.abs(c);
s_m = Math.abs(s);
assert x_m < c_m && c_m < s_m;
public static double code(double x_m, double c_m, double s_m) {
double t_0 = c_m * (x_m * s_m);
double tmp;
if (x_m <= 7.5e-9) {
tmp = Math.pow(t_0, -2.0);
} else {
tmp = Math.cos((x_m * 2.0)) / (t_0 * (s_m * (x_m * c_m)));
}
return tmp;
}
x_m = math.fabs(x) c_m = math.fabs(c) s_m = math.fabs(s) [x_m, c_m, s_m] = sort([x_m, c_m, s_m]) def code(x_m, c_m, s_m): t_0 = c_m * (x_m * s_m) tmp = 0 if x_m <= 7.5e-9: tmp = math.pow(t_0, -2.0) else: tmp = math.cos((x_m * 2.0)) / (t_0 * (s_m * (x_m * c_m))) return tmp
x_m = abs(x) c_m = abs(c) s_m = abs(s) x_m, c_m, s_m = sort([x_m, c_m, s_m]) function code(x_m, c_m, s_m) t_0 = Float64(c_m * Float64(x_m * s_m)) tmp = 0.0 if (x_m <= 7.5e-9) tmp = t_0 ^ -2.0; else tmp = Float64(cos(Float64(x_m * 2.0)) / Float64(t_0 * Float64(s_m * Float64(x_m * c_m)))); end return tmp end
x_m = abs(x);
c_m = abs(c);
s_m = abs(s);
x_m, c_m, s_m = num2cell(sort([x_m, c_m, s_m])){:}
function tmp_2 = code(x_m, c_m, s_m)
t_0 = c_m * (x_m * s_m);
tmp = 0.0;
if (x_m <= 7.5e-9)
tmp = t_0 ^ -2.0;
else
tmp = cos((x_m * 2.0)) / (t_0 * (s_m * (x_m * c_m)));
end
tmp_2 = tmp;
end
x_m = N[Abs[x], $MachinePrecision]
c_m = N[Abs[c], $MachinePrecision]
s_m = N[Abs[s], $MachinePrecision]
NOTE: x_m, c_m, and s_m should be sorted in increasing order before calling this function.
code[x$95$m_, c$95$m_, s$95$m_] := Block[{t$95$0 = N[(c$95$m * N[(x$95$m * s$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$95$m, 7.5e-9], N[Power[t$95$0, -2.0], $MachinePrecision], N[(N[Cos[N[(x$95$m * 2.0), $MachinePrecision]], $MachinePrecision] / N[(t$95$0 * N[(s$95$m * N[(x$95$m * c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
x_m = \left|x\right|
\\
c_m = \left|c\right|
\\
s_m = \left|s\right|
\\
[x_m, c_m, s_m] = \mathsf{sort}([x_m, c_m, s_m])\\
\\
\begin{array}{l}
t_0 := c\_m \cdot \left(x\_m \cdot s\_m\right)\\
\mathbf{if}\;x\_m \leq 7.5 \cdot 10^{-9}:\\
\;\;\;\;{t\_0}^{-2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\cos \left(x\_m \cdot 2\right)}{t\_0 \cdot \left(s\_m \cdot \left(x\_m \cdot c\_m\right)\right)}\\
\end{array}
\end{array}
if x < 7.49999999999999933e-9Initial program 65.5%
associate-/r*65.4%
*-commutative65.4%
unpow265.4%
sqr-neg65.4%
unpow265.4%
cos-neg65.4%
*-commutative65.4%
distribute-rgt-neg-in65.4%
metadata-eval65.4%
unpow265.4%
sqr-neg65.4%
unpow265.4%
associate-*r*57.2%
unpow257.2%
*-commutative57.2%
Simplified57.2%
Taylor expanded in x around 0 53.7%
associate-/r*53.7%
*-commutative53.7%
unpow253.7%
unpow253.7%
swap-sqr68.2%
unpow268.2%
associate-/r*68.3%
unpow268.3%
unpow268.3%
swap-sqr81.6%
unpow281.6%
Simplified81.6%
*-un-lft-identity81.6%
pow-flip81.6%
*-commutative81.6%
associate-*l*83.7%
metadata-eval83.7%
Applied egg-rr83.7%
*-lft-identity83.7%
associate-*r*81.6%
*-commutative81.6%
*-commutative81.6%
Simplified81.6%
if 7.49999999999999933e-9 < x Initial program 63.9%
Taylor expanded in x around inf 60.7%
associate-/r*57.7%
*-commutative57.7%
unpow257.7%
unpow257.7%
swap-sqr73.8%
unpow273.8%
associate-/r*76.8%
unpow276.8%
unpow276.8%
swap-sqr98.2%
unpow298.2%
*-commutative98.2%
Simplified98.2%
unpow298.2%
associate-*r*95.6%
associate-*r*95.5%
*-commutative95.5%
associate-*l*91.4%
*-commutative91.4%
Applied egg-rr91.4%
associate-*l*91.3%
associate-*r*95.6%
*-commutative95.6%
*-commutative95.6%
*-commutative95.6%
Simplified95.6%
Final simplification85.3%
x_m = (fabs.f64 x)
c_m = (fabs.f64 c)
s_m = (fabs.f64 s)
NOTE: x_m, c_m, and s_m should be sorted in increasing order before calling this function.
(FPCore (x_m c_m s_m)
:precision binary64
(let* ((t_0 (* c_m (* x_m s_m))))
(if (<= x_m 0.00012)
(pow t_0 -2.0)
(/ (cos (* x_m 2.0)) (* s_m (* t_0 (* x_m c_m)))))))x_m = fabs(x);
c_m = fabs(c);
s_m = fabs(s);
assert(x_m < c_m && c_m < s_m);
double code(double x_m, double c_m, double s_m) {
double t_0 = c_m * (x_m * s_m);
double tmp;
if (x_m <= 0.00012) {
tmp = pow(t_0, -2.0);
} else {
tmp = cos((x_m * 2.0)) / (s_m * (t_0 * (x_m * c_m)));
}
return tmp;
}
x_m = abs(x)
c_m = abs(c)
s_m = abs(s)
NOTE: x_m, c_m, and s_m should be sorted in increasing order before calling this function.
real(8) function code(x_m, c_m, s_m)
real(8), intent (in) :: x_m
real(8), intent (in) :: c_m
real(8), intent (in) :: s_m
real(8) :: t_0
real(8) :: tmp
t_0 = c_m * (x_m * s_m)
if (x_m <= 0.00012d0) then
tmp = t_0 ** (-2.0d0)
else
tmp = cos((x_m * 2.0d0)) / (s_m * (t_0 * (x_m * c_m)))
end if
code = tmp
end function
x_m = Math.abs(x);
c_m = Math.abs(c);
s_m = Math.abs(s);
assert x_m < c_m && c_m < s_m;
public static double code(double x_m, double c_m, double s_m) {
double t_0 = c_m * (x_m * s_m);
double tmp;
if (x_m <= 0.00012) {
tmp = Math.pow(t_0, -2.0);
} else {
tmp = Math.cos((x_m * 2.0)) / (s_m * (t_0 * (x_m * c_m)));
}
return tmp;
}
x_m = math.fabs(x) c_m = math.fabs(c) s_m = math.fabs(s) [x_m, c_m, s_m] = sort([x_m, c_m, s_m]) def code(x_m, c_m, s_m): t_0 = c_m * (x_m * s_m) tmp = 0 if x_m <= 0.00012: tmp = math.pow(t_0, -2.0) else: tmp = math.cos((x_m * 2.0)) / (s_m * (t_0 * (x_m * c_m))) return tmp
x_m = abs(x) c_m = abs(c) s_m = abs(s) x_m, c_m, s_m = sort([x_m, c_m, s_m]) function code(x_m, c_m, s_m) t_0 = Float64(c_m * Float64(x_m * s_m)) tmp = 0.0 if (x_m <= 0.00012) tmp = t_0 ^ -2.0; else tmp = Float64(cos(Float64(x_m * 2.0)) / Float64(s_m * Float64(t_0 * Float64(x_m * c_m)))); end return tmp end
x_m = abs(x);
c_m = abs(c);
s_m = abs(s);
x_m, c_m, s_m = num2cell(sort([x_m, c_m, s_m])){:}
function tmp_2 = code(x_m, c_m, s_m)
t_0 = c_m * (x_m * s_m);
tmp = 0.0;
if (x_m <= 0.00012)
tmp = t_0 ^ -2.0;
else
tmp = cos((x_m * 2.0)) / (s_m * (t_0 * (x_m * c_m)));
end
tmp_2 = tmp;
end
x_m = N[Abs[x], $MachinePrecision]
c_m = N[Abs[c], $MachinePrecision]
s_m = N[Abs[s], $MachinePrecision]
NOTE: x_m, c_m, and s_m should be sorted in increasing order before calling this function.
code[x$95$m_, c$95$m_, s$95$m_] := Block[{t$95$0 = N[(c$95$m * N[(x$95$m * s$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$95$m, 0.00012], N[Power[t$95$0, -2.0], $MachinePrecision], N[(N[Cos[N[(x$95$m * 2.0), $MachinePrecision]], $MachinePrecision] / N[(s$95$m * N[(t$95$0 * N[(x$95$m * c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
x_m = \left|x\right|
\\
c_m = \left|c\right|
\\
s_m = \left|s\right|
\\
[x_m, c_m, s_m] = \mathsf{sort}([x_m, c_m, s_m])\\
\\
\begin{array}{l}
t_0 := c\_m \cdot \left(x\_m \cdot s\_m\right)\\
\mathbf{if}\;x\_m \leq 0.00012:\\
\;\;\;\;{t\_0}^{-2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\cos \left(x\_m \cdot 2\right)}{s\_m \cdot \left(t\_0 \cdot \left(x\_m \cdot c\_m\right)\right)}\\
\end{array}
\end{array}
if x < 1.20000000000000003e-4Initial program 64.8%
associate-/r*64.8%
*-commutative64.8%
unpow264.8%
sqr-neg64.8%
unpow264.8%
cos-neg64.8%
*-commutative64.8%
distribute-rgt-neg-in64.8%
metadata-eval64.8%
unpow264.8%
sqr-neg64.8%
unpow264.8%
associate-*r*56.6%
unpow256.6%
*-commutative56.6%
Simplified56.6%
Taylor expanded in x around 0 53.2%
associate-/r*53.2%
*-commutative53.2%
unpow253.2%
unpow253.2%
swap-sqr67.6%
unpow267.6%
associate-/r*67.6%
unpow267.6%
unpow267.6%
swap-sqr81.5%
unpow281.5%
Simplified81.5%
*-un-lft-identity81.5%
pow-flip81.5%
*-commutative81.5%
associate-*l*83.6%
metadata-eval83.6%
Applied egg-rr83.6%
*-lft-identity83.6%
associate-*r*81.5%
*-commutative81.5%
*-commutative81.5%
Simplified81.5%
if 1.20000000000000003e-4 < x Initial program 65.8%
Taylor expanded in x around inf 62.4%
associate-/r*59.4%
*-commutative59.4%
unpow259.4%
unpow259.4%
swap-sqr75.9%
unpow275.9%
associate-/r*79.0%
unpow279.0%
unpow279.0%
swap-sqr98.2%
unpow298.2%
*-commutative98.2%
Simplified98.2%
unpow298.2%
associate-*r*95.4%
associate-*r*95.4%
*-commutative95.4%
associate-*l*91.1%
*-commutative91.1%
Applied egg-rr91.1%
*-commutative91.1%
associate-*r*95.4%
*-commutative95.4%
*-commutative95.4%
*-commutative95.4%
Simplified95.4%
Final simplification85.1%
x_m = (fabs.f64 x) c_m = (fabs.f64 c) s_m = (fabs.f64 s) NOTE: x_m, c_m, and s_m should be sorted in increasing order before calling this function. (FPCore (x_m c_m s_m) :precision binary64 (let* ((t_0 (* c_m (* x_m s_m)))) (/ (/ (cos (* x_m 2.0)) t_0) t_0)))
x_m = fabs(x);
c_m = fabs(c);
s_m = fabs(s);
assert(x_m < c_m && c_m < s_m);
double code(double x_m, double c_m, double s_m) {
double t_0 = c_m * (x_m * s_m);
return (cos((x_m * 2.0)) / t_0) / t_0;
}
x_m = abs(x)
c_m = abs(c)
s_m = abs(s)
NOTE: x_m, c_m, and s_m should be sorted in increasing order before calling this function.
real(8) function code(x_m, c_m, s_m)
real(8), intent (in) :: x_m
real(8), intent (in) :: c_m
real(8), intent (in) :: s_m
real(8) :: t_0
t_0 = c_m * (x_m * s_m)
code = (cos((x_m * 2.0d0)) / t_0) / t_0
end function
x_m = Math.abs(x);
c_m = Math.abs(c);
s_m = Math.abs(s);
assert x_m < c_m && c_m < s_m;
public static double code(double x_m, double c_m, double s_m) {
double t_0 = c_m * (x_m * s_m);
return (Math.cos((x_m * 2.0)) / t_0) / t_0;
}
x_m = math.fabs(x) c_m = math.fabs(c) s_m = math.fabs(s) [x_m, c_m, s_m] = sort([x_m, c_m, s_m]) def code(x_m, c_m, s_m): t_0 = c_m * (x_m * s_m) return (math.cos((x_m * 2.0)) / t_0) / t_0
x_m = abs(x) c_m = abs(c) s_m = abs(s) x_m, c_m, s_m = sort([x_m, c_m, s_m]) function code(x_m, c_m, s_m) t_0 = Float64(c_m * Float64(x_m * s_m)) return Float64(Float64(cos(Float64(x_m * 2.0)) / t_0) / t_0) end
x_m = abs(x);
c_m = abs(c);
s_m = abs(s);
x_m, c_m, s_m = num2cell(sort([x_m, c_m, s_m])){:}
function tmp = code(x_m, c_m, s_m)
t_0 = c_m * (x_m * s_m);
tmp = (cos((x_m * 2.0)) / t_0) / t_0;
end
x_m = N[Abs[x], $MachinePrecision]
c_m = N[Abs[c], $MachinePrecision]
s_m = N[Abs[s], $MachinePrecision]
NOTE: x_m, c_m, and s_m should be sorted in increasing order before calling this function.
code[x$95$m_, c$95$m_, s$95$m_] := Block[{t$95$0 = N[(c$95$m * N[(x$95$m * s$95$m), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[Cos[N[(x$95$m * 2.0), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision] / t$95$0), $MachinePrecision]]
\begin{array}{l}
x_m = \left|x\right|
\\
c_m = \left|c\right|
\\
s_m = \left|s\right|
\\
[x_m, c_m, s_m] = \mathsf{sort}([x_m, c_m, s_m])\\
\\
\begin{array}{l}
t_0 := c\_m \cdot \left(x\_m \cdot s\_m\right)\\
\frac{\frac{\cos \left(x\_m \cdot 2\right)}{t\_0}}{t\_0}
\end{array}
\end{array}
Initial program 65.0%
Taylor expanded in x around inf 58.1%
associate-/r*57.3%
*-commutative57.3%
unpow257.3%
unpow257.3%
swap-sqr74.9%
unpow274.9%
associate-/r*75.7%
unpow275.7%
unpow275.7%
swap-sqr95.2%
unpow295.2%
*-commutative95.2%
Simplified95.2%
Applied egg-rr94.9%
associate-/r*94.9%
div-inv94.9%
div-inv94.9%
associate-/l/95.0%
remove-double-div95.0%
*-commutative95.0%
associate-/r/92.5%
associate-/r/95.0%
div-inv94.9%
associate-/l/94.9%
remove-double-div95.2%
*-commutative95.2%
Applied egg-rr95.2%
un-div-inv95.3%
Applied egg-rr95.3%
x_m = (fabs.f64 x) c_m = (fabs.f64 c) s_m = (fabs.f64 s) NOTE: x_m, c_m, and s_m should be sorted in increasing order before calling this function. (FPCore (x_m c_m s_m) :precision binary64 (let* ((t_0 (/ (/ (/ 1.0 x_m) s_m) c_m))) (if (<= x_m 4e+236) (* t_0 t_0) (- (pow (* c_m (* x_m s_m)) -2.0)))))
x_m = fabs(x);
c_m = fabs(c);
s_m = fabs(s);
assert(x_m < c_m && c_m < s_m);
double code(double x_m, double c_m, double s_m) {
double t_0 = ((1.0 / x_m) / s_m) / c_m;
double tmp;
if (x_m <= 4e+236) {
tmp = t_0 * t_0;
} else {
tmp = -pow((c_m * (x_m * s_m)), -2.0);
}
return tmp;
}
x_m = abs(x)
c_m = abs(c)
s_m = abs(s)
NOTE: x_m, c_m, and s_m should be sorted in increasing order before calling this function.
real(8) function code(x_m, c_m, s_m)
real(8), intent (in) :: x_m
real(8), intent (in) :: c_m
real(8), intent (in) :: s_m
real(8) :: t_0
real(8) :: tmp
t_0 = ((1.0d0 / x_m) / s_m) / c_m
if (x_m <= 4d+236) then
tmp = t_0 * t_0
else
tmp = -((c_m * (x_m * s_m)) ** (-2.0d0))
end if
code = tmp
end function
x_m = Math.abs(x);
c_m = Math.abs(c);
s_m = Math.abs(s);
assert x_m < c_m && c_m < s_m;
public static double code(double x_m, double c_m, double s_m) {
double t_0 = ((1.0 / x_m) / s_m) / c_m;
double tmp;
if (x_m <= 4e+236) {
tmp = t_0 * t_0;
} else {
tmp = -Math.pow((c_m * (x_m * s_m)), -2.0);
}
return tmp;
}
x_m = math.fabs(x) c_m = math.fabs(c) s_m = math.fabs(s) [x_m, c_m, s_m] = sort([x_m, c_m, s_m]) def code(x_m, c_m, s_m): t_0 = ((1.0 / x_m) / s_m) / c_m tmp = 0 if x_m <= 4e+236: tmp = t_0 * t_0 else: tmp = -math.pow((c_m * (x_m * s_m)), -2.0) return tmp
x_m = abs(x) c_m = abs(c) s_m = abs(s) x_m, c_m, s_m = sort([x_m, c_m, s_m]) function code(x_m, c_m, s_m) t_0 = Float64(Float64(Float64(1.0 / x_m) / s_m) / c_m) tmp = 0.0 if (x_m <= 4e+236) tmp = Float64(t_0 * t_0); else tmp = Float64(-(Float64(c_m * Float64(x_m * s_m)) ^ -2.0)); end return tmp end
x_m = abs(x);
c_m = abs(c);
s_m = abs(s);
x_m, c_m, s_m = num2cell(sort([x_m, c_m, s_m])){:}
function tmp_2 = code(x_m, c_m, s_m)
t_0 = ((1.0 / x_m) / s_m) / c_m;
tmp = 0.0;
if (x_m <= 4e+236)
tmp = t_0 * t_0;
else
tmp = -((c_m * (x_m * s_m)) ^ -2.0);
end
tmp_2 = tmp;
end
x_m = N[Abs[x], $MachinePrecision]
c_m = N[Abs[c], $MachinePrecision]
s_m = N[Abs[s], $MachinePrecision]
NOTE: x_m, c_m, and s_m should be sorted in increasing order before calling this function.
code[x$95$m_, c$95$m_, s$95$m_] := Block[{t$95$0 = N[(N[(N[(1.0 / x$95$m), $MachinePrecision] / s$95$m), $MachinePrecision] / c$95$m), $MachinePrecision]}, If[LessEqual[x$95$m, 4e+236], N[(t$95$0 * t$95$0), $MachinePrecision], (-N[Power[N[(c$95$m * N[(x$95$m * s$95$m), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision])]]
\begin{array}{l}
x_m = \left|x\right|
\\
c_m = \left|c\right|
\\
s_m = \left|s\right|
\\
[x_m, c_m, s_m] = \mathsf{sort}([x_m, c_m, s_m])\\
\\
\begin{array}{l}
t_0 := \frac{\frac{\frac{1}{x\_m}}{s\_m}}{c\_m}\\
\mathbf{if}\;x\_m \leq 4 \cdot 10^{+236}:\\
\;\;\;\;t\_0 \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;-{\left(c\_m \cdot \left(x\_m \cdot s\_m\right)\right)}^{-2}\\
\end{array}
\end{array}
if x < 4.00000000000000021e236Initial program 66.3%
associate-/r*65.8%
*-commutative65.8%
unpow265.8%
sqr-neg65.8%
unpow265.8%
cos-neg65.8%
*-commutative65.8%
distribute-rgt-neg-in65.8%
metadata-eval65.8%
unpow265.8%
sqr-neg65.8%
unpow265.8%
associate-*r*58.8%
unpow258.8%
*-commutative58.8%
Simplified58.8%
Taylor expanded in x around 0 53.7%
associate-/r*53.3%
*-commutative53.3%
unpow253.3%
unpow253.3%
swap-sqr65.5%
unpow265.5%
associate-/r*65.9%
unpow265.9%
unpow265.9%
swap-sqr78.6%
unpow278.6%
Simplified78.6%
unpow278.6%
unpow278.6%
unpow-prod-down65.9%
*-commutative65.9%
unpow-prod-down53.7%
associate-/l/53.7%
associate-/l/53.7%
add-sqr-sqrt53.7%
Applied egg-rr78.1%
if 4.00000000000000021e236 < x Initial program 50.9%
associate-/r*45.9%
*-commutative45.9%
unpow245.9%
sqr-neg45.9%
unpow245.9%
cos-neg45.9%
*-commutative45.9%
distribute-rgt-neg-in45.9%
metadata-eval45.9%
unpow245.9%
sqr-neg45.9%
unpow245.9%
associate-*r*40.0%
unpow240.0%
*-commutative40.0%
Simplified40.0%
associate-/l/45.0%
associate-/r*45.0%
associate-/l/45.0%
unpow245.0%
*-un-lft-identity45.0%
times-frac50.4%
Applied egg-rr85.1%
Taylor expanded in x around 0 50.4%
associate-/r*50.4%
*-commutative50.4%
unpow250.4%
unpow250.4%
swap-sqr62.9%
unpow262.9%
*-commutative62.9%
Simplified62.9%
unpow262.9%
*-commutative62.9%
associate-*r*61.7%
*-commutative61.7%
Applied egg-rr61.7%
frac-2neg61.7%
metadata-eval61.7%
clear-num61.7%
frac-times61.7%
metadata-eval61.7%
add-sqr-sqrt41.5%
sqrt-unprod62.2%
sqr-neg62.2%
sqrt-unprod26.1%
add-sqr-sqrt67.9%
associate-*l*72.7%
pow272.7%
Applied egg-rr72.7%
associate-/r*72.7%
metadata-eval72.7%
associate-*r/72.7%
associate-/r/72.7%
associate-*l/72.7%
*-commutative72.7%
/-rgt-identity72.7%
associate-/l*72.7%
unpow272.7%
associate-*l*73.4%
associate-/l/73.4%
*-lft-identity73.4%
associate-*l/73.4%
unpow-173.4%
associate-/l/73.4%
*-commutative73.4%
unpow-173.4%
pow-sqr73.4%
*-commutative73.4%
metadata-eval73.4%
Simplified73.4%
Final simplification77.8%
x_m = (fabs.f64 x) c_m = (fabs.f64 c) s_m = (fabs.f64 s) NOTE: x_m, c_m, and s_m should be sorted in increasing order before calling this function. (FPCore (x_m c_m s_m) :precision binary64 (let* ((t_0 (/ (/ (/ 1.0 x_m) s_m) c_m))) (* t_0 t_0)))
x_m = fabs(x);
c_m = fabs(c);
s_m = fabs(s);
assert(x_m < c_m && c_m < s_m);
double code(double x_m, double c_m, double s_m) {
double t_0 = ((1.0 / x_m) / s_m) / c_m;
return t_0 * t_0;
}
x_m = abs(x)
c_m = abs(c)
s_m = abs(s)
NOTE: x_m, c_m, and s_m should be sorted in increasing order before calling this function.
real(8) function code(x_m, c_m, s_m)
real(8), intent (in) :: x_m
real(8), intent (in) :: c_m
real(8), intent (in) :: s_m
real(8) :: t_0
t_0 = ((1.0d0 / x_m) / s_m) / c_m
code = t_0 * t_0
end function
x_m = Math.abs(x);
c_m = Math.abs(c);
s_m = Math.abs(s);
assert x_m < c_m && c_m < s_m;
public static double code(double x_m, double c_m, double s_m) {
double t_0 = ((1.0 / x_m) / s_m) / c_m;
return t_0 * t_0;
}
x_m = math.fabs(x) c_m = math.fabs(c) s_m = math.fabs(s) [x_m, c_m, s_m] = sort([x_m, c_m, s_m]) def code(x_m, c_m, s_m): t_0 = ((1.0 / x_m) / s_m) / c_m return t_0 * t_0
x_m = abs(x) c_m = abs(c) s_m = abs(s) x_m, c_m, s_m = sort([x_m, c_m, s_m]) function code(x_m, c_m, s_m) t_0 = Float64(Float64(Float64(1.0 / x_m) / s_m) / c_m) return Float64(t_0 * t_0) end
x_m = abs(x);
c_m = abs(c);
s_m = abs(s);
x_m, c_m, s_m = num2cell(sort([x_m, c_m, s_m])){:}
function tmp = code(x_m, c_m, s_m)
t_0 = ((1.0 / x_m) / s_m) / c_m;
tmp = t_0 * t_0;
end
x_m = N[Abs[x], $MachinePrecision]
c_m = N[Abs[c], $MachinePrecision]
s_m = N[Abs[s], $MachinePrecision]
NOTE: x_m, c_m, and s_m should be sorted in increasing order before calling this function.
code[x$95$m_, c$95$m_, s$95$m_] := Block[{t$95$0 = N[(N[(N[(1.0 / x$95$m), $MachinePrecision] / s$95$m), $MachinePrecision] / c$95$m), $MachinePrecision]}, N[(t$95$0 * t$95$0), $MachinePrecision]]
\begin{array}{l}
x_m = \left|x\right|
\\
c_m = \left|c\right|
\\
s_m = \left|s\right|
\\
[x_m, c_m, s_m] = \mathsf{sort}([x_m, c_m, s_m])\\
\\
\begin{array}{l}
t_0 := \frac{\frac{\frac{1}{x\_m}}{s\_m}}{c\_m}\\
t\_0 \cdot t\_0
\end{array}
\end{array}
Initial program 65.0%
associate-/r*64.3%
*-commutative64.3%
unpow264.3%
sqr-neg64.3%
unpow264.3%
cos-neg64.3%
*-commutative64.3%
distribute-rgt-neg-in64.3%
metadata-eval64.3%
unpow264.3%
sqr-neg64.3%
unpow264.3%
associate-*r*57.3%
unpow257.3%
*-commutative57.3%
Simplified57.3%
Taylor expanded in x around 0 53.0%
associate-/r*52.2%
*-commutative52.2%
unpow252.2%
unpow252.2%
swap-sqr64.4%
unpow264.4%
associate-/r*65.2%
unpow265.2%
unpow265.2%
swap-sqr77.4%
unpow277.4%
Simplified77.4%
unpow277.4%
unpow277.4%
unpow-prod-down65.2%
*-commutative65.2%
unpow-prod-down53.0%
associate-/l/53.0%
associate-/l/53.0%
add-sqr-sqrt53.0%
Applied egg-rr77.0%
x_m = (fabs.f64 x) c_m = (fabs.f64 c) s_m = (fabs.f64 s) NOTE: x_m, c_m, and s_m should be sorted in increasing order before calling this function. (FPCore (x_m c_m s_m) :precision binary64 (/ -1.0 (* (* c_m (* x_m s_m)) (* c_m (* x_m (- s_m))))))
x_m = fabs(x);
c_m = fabs(c);
s_m = fabs(s);
assert(x_m < c_m && c_m < s_m);
double code(double x_m, double c_m, double s_m) {
return -1.0 / ((c_m * (x_m * s_m)) * (c_m * (x_m * -s_m)));
}
x_m = abs(x)
c_m = abs(c)
s_m = abs(s)
NOTE: x_m, c_m, and s_m should be sorted in increasing order before calling this function.
real(8) function code(x_m, c_m, s_m)
real(8), intent (in) :: x_m
real(8), intent (in) :: c_m
real(8), intent (in) :: s_m
code = (-1.0d0) / ((c_m * (x_m * s_m)) * (c_m * (x_m * -s_m)))
end function
x_m = Math.abs(x);
c_m = Math.abs(c);
s_m = Math.abs(s);
assert x_m < c_m && c_m < s_m;
public static double code(double x_m, double c_m, double s_m) {
return -1.0 / ((c_m * (x_m * s_m)) * (c_m * (x_m * -s_m)));
}
x_m = math.fabs(x) c_m = math.fabs(c) s_m = math.fabs(s) [x_m, c_m, s_m] = sort([x_m, c_m, s_m]) def code(x_m, c_m, s_m): return -1.0 / ((c_m * (x_m * s_m)) * (c_m * (x_m * -s_m)))
x_m = abs(x) c_m = abs(c) s_m = abs(s) x_m, c_m, s_m = sort([x_m, c_m, s_m]) function code(x_m, c_m, s_m) return Float64(-1.0 / Float64(Float64(c_m * Float64(x_m * s_m)) * Float64(c_m * Float64(x_m * Float64(-s_m))))) end
x_m = abs(x);
c_m = abs(c);
s_m = abs(s);
x_m, c_m, s_m = num2cell(sort([x_m, c_m, s_m])){:}
function tmp = code(x_m, c_m, s_m)
tmp = -1.0 / ((c_m * (x_m * s_m)) * (c_m * (x_m * -s_m)));
end
x_m = N[Abs[x], $MachinePrecision] c_m = N[Abs[c], $MachinePrecision] s_m = N[Abs[s], $MachinePrecision] NOTE: x_m, c_m, and s_m should be sorted in increasing order before calling this function. code[x$95$m_, c$95$m_, s$95$m_] := N[(-1.0 / N[(N[(c$95$m * N[(x$95$m * s$95$m), $MachinePrecision]), $MachinePrecision] * N[(c$95$m * N[(x$95$m * (-s$95$m)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
c_m = \left|c\right|
\\
s_m = \left|s\right|
\\
[x_m, c_m, s_m] = \mathsf{sort}([x_m, c_m, s_m])\\
\\
\frac{-1}{\left(c\_m \cdot \left(x\_m \cdot s\_m\right)\right) \cdot \left(c\_m \cdot \left(x\_m \cdot \left(-s\_m\right)\right)\right)}
\end{array}
Initial program 65.0%
associate-/r*64.3%
*-commutative64.3%
unpow264.3%
sqr-neg64.3%
unpow264.3%
cos-neg64.3%
*-commutative64.3%
distribute-rgt-neg-in64.3%
metadata-eval64.3%
unpow264.3%
sqr-neg64.3%
unpow264.3%
associate-*r*57.3%
unpow257.3%
*-commutative57.3%
Simplified57.3%
associate-/l/58.1%
associate-/r*58.1%
associate-/l/58.1%
unpow258.1%
*-un-lft-identity58.1%
times-frac65.7%
Applied egg-rr86.4%
Taylor expanded in x around 0 60.2%
associate-/r*60.2%
*-commutative60.2%
unpow260.2%
unpow260.2%
swap-sqr73.5%
unpow273.5%
*-commutative73.5%
Simplified73.5%
unpow273.5%
*-commutative73.5%
associate-*r*72.2%
*-commutative72.2%
Applied egg-rr72.2%
associate-*r/63.6%
associate-*l*64.8%
frac-times77.3%
associate-/r*77.4%
associate-/r*77.4%
frac-2neg77.4%
metadata-eval77.4%
frac-times77.4%
metadata-eval77.4%
Applied egg-rr77.4%
Final simplification77.4%
x_m = (fabs.f64 x) c_m = (fabs.f64 c) s_m = (fabs.f64 s) NOTE: x_m, c_m, and s_m should be sorted in increasing order before calling this function. (FPCore (x_m c_m s_m) :precision binary64 (let* ((t_0 (* x_m (* c_m s_m)))) (/ 1.0 (* t_0 t_0))))
x_m = fabs(x);
c_m = fabs(c);
s_m = fabs(s);
assert(x_m < c_m && c_m < s_m);
double code(double x_m, double c_m, double s_m) {
double t_0 = x_m * (c_m * s_m);
return 1.0 / (t_0 * t_0);
}
x_m = abs(x)
c_m = abs(c)
s_m = abs(s)
NOTE: x_m, c_m, and s_m should be sorted in increasing order before calling this function.
real(8) function code(x_m, c_m, s_m)
real(8), intent (in) :: x_m
real(8), intent (in) :: c_m
real(8), intent (in) :: s_m
real(8) :: t_0
t_0 = x_m * (c_m * s_m)
code = 1.0d0 / (t_0 * t_0)
end function
x_m = Math.abs(x);
c_m = Math.abs(c);
s_m = Math.abs(s);
assert x_m < c_m && c_m < s_m;
public static double code(double x_m, double c_m, double s_m) {
double t_0 = x_m * (c_m * s_m);
return 1.0 / (t_0 * t_0);
}
x_m = math.fabs(x) c_m = math.fabs(c) s_m = math.fabs(s) [x_m, c_m, s_m] = sort([x_m, c_m, s_m]) def code(x_m, c_m, s_m): t_0 = x_m * (c_m * s_m) return 1.0 / (t_0 * t_0)
x_m = abs(x) c_m = abs(c) s_m = abs(s) x_m, c_m, s_m = sort([x_m, c_m, s_m]) function code(x_m, c_m, s_m) t_0 = Float64(x_m * Float64(c_m * s_m)) return Float64(1.0 / Float64(t_0 * t_0)) end
x_m = abs(x);
c_m = abs(c);
s_m = abs(s);
x_m, c_m, s_m = num2cell(sort([x_m, c_m, s_m])){:}
function tmp = code(x_m, c_m, s_m)
t_0 = x_m * (c_m * s_m);
tmp = 1.0 / (t_0 * t_0);
end
x_m = N[Abs[x], $MachinePrecision]
c_m = N[Abs[c], $MachinePrecision]
s_m = N[Abs[s], $MachinePrecision]
NOTE: x_m, c_m, and s_m should be sorted in increasing order before calling this function.
code[x$95$m_, c$95$m_, s$95$m_] := Block[{t$95$0 = N[(x$95$m * N[(c$95$m * s$95$m), $MachinePrecision]), $MachinePrecision]}, N[(1.0 / N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
x_m = \left|x\right|
\\
c_m = \left|c\right|
\\
s_m = \left|s\right|
\\
[x_m, c_m, s_m] = \mathsf{sort}([x_m, c_m, s_m])\\
\\
\begin{array}{l}
t_0 := x\_m \cdot \left(c\_m \cdot s\_m\right)\\
\frac{1}{t\_0 \cdot t\_0}
\end{array}
\end{array}
Initial program 65.0%
associate-/r*64.3%
*-commutative64.3%
unpow264.3%
sqr-neg64.3%
unpow264.3%
cos-neg64.3%
*-commutative64.3%
distribute-rgt-neg-in64.3%
metadata-eval64.3%
unpow264.3%
sqr-neg64.3%
unpow264.3%
associate-*r*57.3%
unpow257.3%
*-commutative57.3%
Simplified57.3%
Taylor expanded in x around 0 53.0%
associate-/r*52.2%
*-commutative52.2%
unpow252.2%
unpow252.2%
swap-sqr64.4%
unpow264.4%
associate-/r*65.2%
unpow265.2%
unpow265.2%
swap-sqr77.4%
unpow277.4%
Simplified77.4%
unpow277.4%
*-commutative77.4%
associate-*l*76.6%
*-commutative76.6%
associate-*l*78.8%
Applied egg-rr78.8%
Final simplification78.8%
x_m = (fabs.f64 x) c_m = (fabs.f64 c) s_m = (fabs.f64 s) NOTE: x_m, c_m, and s_m should be sorted in increasing order before calling this function. (FPCore (x_m c_m s_m) :precision binary64 (/ 1.0 (* x_m (* c_m (* s_m (* c_m (* x_m s_m)))))))
x_m = fabs(x);
c_m = fabs(c);
s_m = fabs(s);
assert(x_m < c_m && c_m < s_m);
double code(double x_m, double c_m, double s_m) {
return 1.0 / (x_m * (c_m * (s_m * (c_m * (x_m * s_m)))));
}
x_m = abs(x)
c_m = abs(c)
s_m = abs(s)
NOTE: x_m, c_m, and s_m should be sorted in increasing order before calling this function.
real(8) function code(x_m, c_m, s_m)
real(8), intent (in) :: x_m
real(8), intent (in) :: c_m
real(8), intent (in) :: s_m
code = 1.0d0 / (x_m * (c_m * (s_m * (c_m * (x_m * s_m)))))
end function
x_m = Math.abs(x);
c_m = Math.abs(c);
s_m = Math.abs(s);
assert x_m < c_m && c_m < s_m;
public static double code(double x_m, double c_m, double s_m) {
return 1.0 / (x_m * (c_m * (s_m * (c_m * (x_m * s_m)))));
}
x_m = math.fabs(x) c_m = math.fabs(c) s_m = math.fabs(s) [x_m, c_m, s_m] = sort([x_m, c_m, s_m]) def code(x_m, c_m, s_m): return 1.0 / (x_m * (c_m * (s_m * (c_m * (x_m * s_m)))))
x_m = abs(x) c_m = abs(c) s_m = abs(s) x_m, c_m, s_m = sort([x_m, c_m, s_m]) function code(x_m, c_m, s_m) return Float64(1.0 / Float64(x_m * Float64(c_m * Float64(s_m * Float64(c_m * Float64(x_m * s_m)))))) end
x_m = abs(x);
c_m = abs(c);
s_m = abs(s);
x_m, c_m, s_m = num2cell(sort([x_m, c_m, s_m])){:}
function tmp = code(x_m, c_m, s_m)
tmp = 1.0 / (x_m * (c_m * (s_m * (c_m * (x_m * s_m)))));
end
x_m = N[Abs[x], $MachinePrecision] c_m = N[Abs[c], $MachinePrecision] s_m = N[Abs[s], $MachinePrecision] NOTE: x_m, c_m, and s_m should be sorted in increasing order before calling this function. code[x$95$m_, c$95$m_, s$95$m_] := N[(1.0 / N[(x$95$m * N[(c$95$m * N[(s$95$m * N[(c$95$m * N[(x$95$m * s$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
c_m = \left|c\right|
\\
s_m = \left|s\right|
\\
[x_m, c_m, s_m] = \mathsf{sort}([x_m, c_m, s_m])\\
\\
\frac{1}{x\_m \cdot \left(c\_m \cdot \left(s\_m \cdot \left(c\_m \cdot \left(x\_m \cdot s\_m\right)\right)\right)\right)}
\end{array}
Initial program 65.0%
associate-/r*64.3%
*-commutative64.3%
unpow264.3%
sqr-neg64.3%
unpow264.3%
cos-neg64.3%
*-commutative64.3%
distribute-rgt-neg-in64.3%
metadata-eval64.3%
unpow264.3%
sqr-neg64.3%
unpow264.3%
associate-*r*57.3%
unpow257.3%
*-commutative57.3%
Simplified57.3%
Taylor expanded in x around 0 53.0%
associate-/r*52.2%
*-commutative52.2%
unpow252.2%
unpow252.2%
swap-sqr64.4%
unpow264.4%
associate-/r*65.2%
unpow265.2%
unpow265.2%
swap-sqr77.4%
unpow277.4%
Simplified77.4%
unpow277.4%
associate-*r*75.8%
associate-*l*74.4%
*-commutative74.4%
*-commutative74.4%
associate-*l*75.5%
Applied egg-rr75.5%
associate-*l*76.7%
associate-*r*75.0%
*-commutative75.0%
*-commutative75.0%
Simplified75.0%
Final simplification75.0%
x_m = (fabs.f64 x) c_m = (fabs.f64 c) s_m = (fabs.f64 s) NOTE: x_m, c_m, and s_m should be sorted in increasing order before calling this function. (FPCore (x_m c_m s_m) :precision binary64 (/ 1.0 (* s_m (* (* c_m (* x_m s_m)) (* x_m c_m)))))
x_m = fabs(x);
c_m = fabs(c);
s_m = fabs(s);
assert(x_m < c_m && c_m < s_m);
double code(double x_m, double c_m, double s_m) {
return 1.0 / (s_m * ((c_m * (x_m * s_m)) * (x_m * c_m)));
}
x_m = abs(x)
c_m = abs(c)
s_m = abs(s)
NOTE: x_m, c_m, and s_m should be sorted in increasing order before calling this function.
real(8) function code(x_m, c_m, s_m)
real(8), intent (in) :: x_m
real(8), intent (in) :: c_m
real(8), intent (in) :: s_m
code = 1.0d0 / (s_m * ((c_m * (x_m * s_m)) * (x_m * c_m)))
end function
x_m = Math.abs(x);
c_m = Math.abs(c);
s_m = Math.abs(s);
assert x_m < c_m && c_m < s_m;
public static double code(double x_m, double c_m, double s_m) {
return 1.0 / (s_m * ((c_m * (x_m * s_m)) * (x_m * c_m)));
}
x_m = math.fabs(x) c_m = math.fabs(c) s_m = math.fabs(s) [x_m, c_m, s_m] = sort([x_m, c_m, s_m]) def code(x_m, c_m, s_m): return 1.0 / (s_m * ((c_m * (x_m * s_m)) * (x_m * c_m)))
x_m = abs(x) c_m = abs(c) s_m = abs(s) x_m, c_m, s_m = sort([x_m, c_m, s_m]) function code(x_m, c_m, s_m) return Float64(1.0 / Float64(s_m * Float64(Float64(c_m * Float64(x_m * s_m)) * Float64(x_m * c_m)))) end
x_m = abs(x);
c_m = abs(c);
s_m = abs(s);
x_m, c_m, s_m = num2cell(sort([x_m, c_m, s_m])){:}
function tmp = code(x_m, c_m, s_m)
tmp = 1.0 / (s_m * ((c_m * (x_m * s_m)) * (x_m * c_m)));
end
x_m = N[Abs[x], $MachinePrecision] c_m = N[Abs[c], $MachinePrecision] s_m = N[Abs[s], $MachinePrecision] NOTE: x_m, c_m, and s_m should be sorted in increasing order before calling this function. code[x$95$m_, c$95$m_, s$95$m_] := N[(1.0 / N[(s$95$m * N[(N[(c$95$m * N[(x$95$m * s$95$m), $MachinePrecision]), $MachinePrecision] * N[(x$95$m * c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
c_m = \left|c\right|
\\
s_m = \left|s\right|
\\
[x_m, c_m, s_m] = \mathsf{sort}([x_m, c_m, s_m])\\
\\
\frac{1}{s\_m \cdot \left(\left(c\_m \cdot \left(x\_m \cdot s\_m\right)\right) \cdot \left(x\_m \cdot c\_m\right)\right)}
\end{array}
Initial program 65.0%
associate-/r*64.3%
*-commutative64.3%
unpow264.3%
sqr-neg64.3%
unpow264.3%
cos-neg64.3%
*-commutative64.3%
distribute-rgt-neg-in64.3%
metadata-eval64.3%
unpow264.3%
sqr-neg64.3%
unpow264.3%
associate-*r*57.3%
unpow257.3%
*-commutative57.3%
Simplified57.3%
Taylor expanded in x around 0 53.0%
associate-/r*52.2%
*-commutative52.2%
unpow252.2%
unpow252.2%
swap-sqr64.4%
unpow264.4%
associate-/r*65.2%
unpow265.2%
unpow265.2%
swap-sqr77.4%
unpow277.4%
Simplified77.4%
unpow295.2%
associate-*r*92.5%
associate-*r*90.6%
*-commutative90.6%
associate-*l*90.8%
*-commutative90.8%
Applied egg-rr75.4%
*-commutative90.8%
associate-*r*90.6%
*-commutative90.6%
*-commutative90.6%
*-commutative90.6%
Simplified74.0%
Final simplification74.0%
herbie shell --seed 2024157
(FPCore (x c s)
:name "mixedcos"
:precision binary64
(/ (cos (* 2.0 x)) (* (pow c 2.0) (* (* x (pow s 2.0)) x))))