\[\frac{\cos \left(2 \cdot x\right)}{{c}^{2} \cdot \left(\left(x \cdot {s}^{2}\right) \cdot x\right)}
\]
↓
\[\begin{array}{l}
t_0 := \cos \left(x + x\right)\\
t_1 := c \cdot \left(x \cdot s\right)\\
\mathbf{if}\;c \leq -1 \cdot 10^{-91}:\\
\;\;\;\;\frac{t_0}{t_1 \cdot t_1}\\
\mathbf{elif}\;c \leq 10^{-228}:\\
\;\;\;\;\cos \left(-2 \cdot x\right) \cdot {\left(\left(c \cdot s\right) \cdot x\right)}^{-2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{t_0}{x \cdot s}}{c}}{t_1}\\
\end{array}
\]
(FPCore (x c s)
:precision binary64
(/ (cos (* 2.0 x)) (* (pow c 2.0) (* (* x (pow s 2.0)) x))))
↓
(FPCore (x c s)
:precision binary64
(let* ((t_0 (cos (+ x x))) (t_1 (* c (* x s))))
(if (<= c -1e-91)
(/ t_0 (* t_1 t_1))
(if (<= c 1e-228)
(* (cos (* -2.0 x)) (pow (* (* c s) x) -2.0))
(/ (/ (/ t_0 (* x s)) c) t_1)))))double code(double x, double c, double s) {
return cos((2.0 * x)) / (pow(c, 2.0) * ((x * pow(s, 2.0)) * x));
}
↓
double code(double x, double c, double s) {
double t_0 = cos((x + x));
double t_1 = c * (x * s);
double tmp;
if (c <= -1e-91) {
tmp = t_0 / (t_1 * t_1);
} else if (c <= 1e-228) {
tmp = cos((-2.0 * x)) * pow(((c * s) * x), -2.0);
} else {
tmp = ((t_0 / (x * s)) / c) / t_1;
}
return tmp;
}
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
↓
real(8) function code(x, c, s)
real(8), intent (in) :: x
real(8), intent (in) :: c
real(8), intent (in) :: s
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = cos((x + x))
t_1 = c * (x * s)
if (c <= (-1d-91)) then
tmp = t_0 / (t_1 * t_1)
else if (c <= 1d-228) then
tmp = cos(((-2.0d0) * x)) * (((c * s) * x) ** (-2.0d0))
else
tmp = ((t_0 / (x * s)) / c) / t_1
end if
code = tmp
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));
}
↓
public static double code(double x, double c, double s) {
double t_0 = Math.cos((x + x));
double t_1 = c * (x * s);
double tmp;
if (c <= -1e-91) {
tmp = t_0 / (t_1 * t_1);
} else if (c <= 1e-228) {
tmp = Math.cos((-2.0 * x)) * Math.pow(((c * s) * x), -2.0);
} else {
tmp = ((t_0 / (x * s)) / c) / t_1;
}
return tmp;
}
def code(x, c, s):
return math.cos((2.0 * x)) / (math.pow(c, 2.0) * ((x * math.pow(s, 2.0)) * x))
↓
def code(x, c, s):
t_0 = math.cos((x + x))
t_1 = c * (x * s)
tmp = 0
if c <= -1e-91:
tmp = t_0 / (t_1 * t_1)
elif c <= 1e-228:
tmp = math.cos((-2.0 * x)) * math.pow(((c * s) * x), -2.0)
else:
tmp = ((t_0 / (x * s)) / c) / t_1
return tmp
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 code(x, c, s)
t_0 = cos(Float64(x + x))
t_1 = Float64(c * Float64(x * s))
tmp = 0.0
if (c <= -1e-91)
tmp = Float64(t_0 / Float64(t_1 * t_1));
elseif (c <= 1e-228)
tmp = Float64(cos(Float64(-2.0 * x)) * (Float64(Float64(c * s) * x) ^ -2.0));
else
tmp = Float64(Float64(Float64(t_0 / Float64(x * s)) / c) / t_1);
end
return tmp
end
function tmp = code(x, c, s)
tmp = cos((2.0 * x)) / ((c ^ 2.0) * ((x * (s ^ 2.0)) * x));
end
↓
function tmp_2 = code(x, c, s)
t_0 = cos((x + x));
t_1 = c * (x * s);
tmp = 0.0;
if (c <= -1e-91)
tmp = t_0 / (t_1 * t_1);
elseif (c <= 1e-228)
tmp = cos((-2.0 * x)) * (((c * s) * x) ^ -2.0);
else
tmp = ((t_0 / (x * s)) / c) / t_1;
end
tmp_2 = tmp;
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]
↓
code[x_, c_, s_] := Block[{t$95$0 = N[Cos[N[(x + x), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(c * N[(x * s), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1e-91], N[(t$95$0 / N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1e-228], N[(N[Cos[N[(-2.0 * x), $MachinePrecision]], $MachinePrecision] * N[Power[N[(N[(c * s), $MachinePrecision] * x), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], N[(N[(N[(t$95$0 / N[(x * s), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] / t$95$1), $MachinePrecision]]]]]
\frac{\cos \left(2 \cdot x\right)}{{c}^{2} \cdot \left(\left(x \cdot {s}^{2}\right) \cdot x\right)}
↓
\begin{array}{l}
t_0 := \cos \left(x + x\right)\\
t_1 := c \cdot \left(x \cdot s\right)\\
\mathbf{if}\;c \leq -1 \cdot 10^{-91}:\\
\;\;\;\;\frac{t_0}{t_1 \cdot t_1}\\
\mathbf{elif}\;c \leq 10^{-228}:\\
\;\;\;\;\cos \left(-2 \cdot x\right) \cdot {\left(\left(c \cdot s\right) \cdot x\right)}^{-2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{t_0}{x \cdot s}}{c}}{t_1}\\
\end{array}
Alternatives
| Alternative 1 |
|---|
| Error | 2.5 |
|---|
| Cost | 13704 |
|---|
\[\begin{array}{l}
t_0 := \cos \left(x + x\right)\\
t_1 := c \cdot \left(x \cdot s\right)\\
\mathbf{if}\;c \leq -1 \cdot 10^{-86}:\\
\;\;\;\;\frac{t_0}{t_1 \cdot t_1}\\
\mathbf{elif}\;c \leq 10^{-228}:\\
\;\;\;\;\frac{t_0}{{\left(\left(c \cdot s\right) \cdot x\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{t_0}{x \cdot s}}{c}}{t_1}\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 2.7 |
|---|
| Cost | 13572 |
|---|
\[\begin{array}{l}
\mathbf{if}\;s \leq 10^{-257}:\\
\;\;\;\;\frac{\frac{\frac{\cos \left(x + x\right)}{x \cdot s}}{c}}{c \cdot \left(x \cdot s\right)}\\
\mathbf{else}:\\
\;\;\;\;\cos \left(-2 \cdot x\right) \cdot {\left(s \cdot \left(x \cdot c\right)\right)}^{-2}\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 2.7 |
|---|
| Cost | 7360 |
|---|
\[\frac{\frac{\frac{\cos \left(x + x\right)}{x \cdot s}}{c}}{c \cdot \left(x \cdot s\right)}
\]
| Alternative 4 |
|---|
| Error | 2.6 |
|---|
| Cost | 7360 |
|---|
\[\begin{array}{l}
t_0 := c \cdot \left(x \cdot s\right)\\
\frac{\frac{\cos \left(x + x\right)}{t_0}}{t_0}
\end{array}
\]
| Alternative 5 |
|---|
| Error | 17.0 |
|---|
| Cost | 6784 |
|---|
\[{\left(c \cdot \left(s \cdot x\right)\right)}^{-2}
\]
| Alternative 6 |
|---|
| Error | 18.5 |
|---|
| Cost | 1096 |
|---|
\[\begin{array}{l}
t_0 := c \cdot \left(x \cdot s\right)\\
\mathbf{if}\;s \leq -1.3062042617860737 \cdot 10^{+215}:\\
\;\;\;\;\frac{\frac{\frac{1}{c}}{s}}{x \cdot t_0}\\
\mathbf{elif}\;s \leq 4.224848830981019 \cdot 10^{+123}:\\
\;\;\;\;\frac{\frac{1}{c \cdot x}}{s \cdot t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\left(x \cdot \left(s \cdot c\right)\right) \cdot t_0}\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 18.7 |
|---|
| Cost | 1096 |
|---|
\[\begin{array}{l}
t_0 := c \cdot \left(x \cdot s\right)\\
\mathbf{if}\;s \leq -5.0014805212985674 \cdot 10^{+187}:\\
\;\;\;\;\frac{\frac{\frac{1}{c}}{\left(x \cdot s\right) \cdot \left(c \cdot x\right)}}{s}\\
\mathbf{elif}\;s \leq 4.224848830981019 \cdot 10^{+123}:\\
\;\;\;\;\frac{\frac{1}{c \cdot x}}{s \cdot t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\left(x \cdot \left(s \cdot c\right)\right) \cdot t_0}\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 19.1 |
|---|
| Cost | 832 |
|---|
\[\frac{\frac{\frac{1}{c \cdot \left(x \cdot s\right)}}{c}}{x \cdot s}
\]
| Alternative 9 |
|---|
| Error | 18.4 |
|---|
| Cost | 832 |
|---|
\[\frac{1}{\left(x \cdot \left(s \cdot c\right)\right) \cdot \left(c \cdot \left(x \cdot s\right)\right)}
\]
| Alternative 10 |
|---|
| Error | 18.0 |
|---|
| Cost | 832 |
|---|
\[\frac{\frac{1}{s \cdot \left(c \cdot x\right)}}{c \cdot \left(x \cdot s\right)}
\]
| Alternative 11 |
|---|
| Error | 17.0 |
|---|
| Cost | 832 |
|---|
\[\frac{\frac{1}{c \cdot \left(s \cdot x\right)}}{c \cdot \left(x \cdot s\right)}
\]