\[ \begin{array}{c}[c, s] = \mathsf{sort}([c, s])\\ \end{array} \]
Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[\frac{\cos \left(2 \cdot x\right)}{{c}^{2} \cdot \left(\left(x \cdot {s}^{2}\right) \cdot x\right)}
\]
↓
\[{\left(c \cdot \left(x \cdot s\right)\right)}^{-2} \cdot \cos \left(x + x\right)
\]
(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 (* (pow (* c (* x s)) -2.0) (cos (+ x x)))) 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) {
return pow((c * (x * s)), -2.0) * cos((x + 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
↓
real(8) function code(x, c, s)
real(8), intent (in) :: x
real(8), intent (in) :: c
real(8), intent (in) :: s
code = ((c * (x * s)) ** (-2.0d0)) * cos((x + 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));
}
↓
public static double code(double x, double c, double s) {
return Math.pow((c * (x * s)), -2.0) * Math.cos((x + x));
}
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):
return math.pow((c * (x * s)), -2.0) * math.cos((x + 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 code(x, c, s)
return Float64((Float64(c * Float64(x * s)) ^ -2.0) * cos(Float64(x + x)))
end
function tmp = code(x, c, s)
tmp = cos((2.0 * x)) / ((c ^ 2.0) * ((x * (s ^ 2.0)) * x));
end
↓
function tmp = code(x, c, s)
tmp = ((c * (x * s)) ^ -2.0) * cos((x + 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]
↓
code[x_, c_, s_] := N[(N[Power[N[(c * N[(x * s), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision] * N[Cos[N[(x + x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\frac{\cos \left(2 \cdot x\right)}{{c}^{2} \cdot \left(\left(x \cdot {s}^{2}\right) \cdot x\right)}
↓
{\left(c \cdot \left(x \cdot s\right)\right)}^{-2} \cdot \cos \left(x + x\right)
Alternatives Alternative 1 Error 11.0 Cost 8548
\[\begin{array}{l}
t_0 := s \cdot \left(x \cdot s\right)\\
t_1 := c \cdot \left(x \cdot s\right)\\
t_2 := \frac{1}{t_1}\\
t_3 := \cos \left(x \cdot 2\right)\\
t_4 := \frac{t_3}{t_0 \cdot \left(c \cdot \left(c \cdot x\right)\right)}\\
t_5 := \frac{t_3}{x \cdot \left(x \cdot \left(\left(c \cdot s\right) \cdot \left(c \cdot s\right)\right)\right)}\\
t_6 := \frac{1}{x \cdot \left(c \cdot s\right)}\\
\mathbf{if}\;c \leq -5 \cdot 10^{+226}:\\
\;\;\;\;t_5\\
\mathbf{elif}\;c \leq -2.15 \cdot 10^{+153}:\\
\;\;\;\;t_2 \cdot \frac{1}{\frac{c}{\frac{1}{x \cdot s}}}\\
\mathbf{elif}\;c \leq -1.22 \cdot 10^{+36}:\\
\;\;\;\;t_5\\
\mathbf{elif}\;c \leq -4.1 \cdot 10^{-134}:\\
\;\;\;\;\frac{t_3}{c \cdot \left(c \cdot \left(x \cdot t_0\right)\right)}\\
\mathbf{elif}\;c \leq -8.6 \cdot 10^{-203}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;c \leq 2.4 \cdot 10^{-178}:\\
\;\;\;\;t_5\\
\mathbf{elif}\;c \leq 1.45 \cdot 10^{-128}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;c \leq 4.2 \cdot 10^{-116}:\\
\;\;\;\;t_6 \cdot t_6\\
\mathbf{elif}\;c \leq 4.9 \cdot 10^{-61}:\\
\;\;\;\;t_5\\
\mathbf{else}:\\
\;\;\;\;\frac{t_2}{t_1}\\
\end{array}
\]
Alternative 2 Error 8.8 Cost 7756
\[\begin{array}{l}
t_0 := \cos \left(x \cdot 2\right)\\
t_1 := \frac{t_0}{c \cdot \left(c \cdot \left(x \cdot \left(s \cdot \left(x \cdot s\right)\right)\right)\right)}\\
\mathbf{if}\;x \leq -6.2 \cdot 10^{+21}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 2.1 \cdot 10^{-18}:\\
\;\;\;\;\frac{1}{c \cdot \left(x \cdot s\right)} \cdot \frac{\frac{1}{c}}{x \cdot s}\\
\mathbf{elif}\;x \leq 1.65 \cdot 10^{+109}:\\
\;\;\;\;\frac{t_0}{x \cdot \left(x \cdot \left(\left(c \cdot s\right) \cdot \left(c \cdot s\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 3 Error 10.1 Cost 7624
\[\begin{array}{l}
t_0 := \frac{\cos \left(x \cdot 2\right)}{c \cdot \left(c \cdot \left(x \cdot \left(s \cdot \left(x \cdot s\right)\right)\right)\right)}\\
\mathbf{if}\;x \leq -6.2 \cdot 10^{+21}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 1.8 \cdot 10^{-40}:\\
\;\;\;\;\frac{1}{c \cdot \left(x \cdot s\right)} \cdot \frac{\frac{1}{c}}{x \cdot s}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 4 Error 2.5 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 18.9 Cost 1096
\[\begin{array}{l}
t_0 := \frac{1}{\left(c \cdot s\right) \cdot \left(x \cdot \left(c \cdot \left(x \cdot s\right)\right)\right)}\\
\mathbf{if}\;x \leq -1.9 \cdot 10^{-263}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 1.9 \cdot 10^{-237}:\\
\;\;\;\;\frac{1}{\left(s \cdot s\right) \cdot \left(\left(c \cdot x\right) \cdot \left(c \cdot x\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 6 Error 17.8 Cost 1096
\[\begin{array}{l}
t_0 := \frac{1}{\left(x \cdot s\right) \cdot \left(c \cdot \left(c \cdot \left(x \cdot s\right)\right)\right)}\\
\mathbf{if}\;x \leq 7.5 \cdot 10^{-155}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 2 \cdot 10^{+22}:\\
\;\;\;\;\frac{1}{\left(c \cdot s\right) \cdot \left(\left(c \cdot s\right) \cdot \left(x \cdot x\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 7 Error 17.5 Cost 964
\[\begin{array}{l}
\mathbf{if}\;s \leq 9 \cdot 10^{-95}:\\
\;\;\;\;\frac{1}{\left(c \cdot s\right) \cdot \left(x \cdot \left(s \cdot \left(c \cdot x\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{c \cdot \left(\left(x \cdot s\right) \cdot \left(c \cdot \left(x \cdot s\right)\right)\right)}\\
\end{array}
\]
Alternative 8 Error 16.6 Cost 960
\[\begin{array}{l}
t_0 := \frac{1}{c \cdot \left(x \cdot s\right)}\\
t_0 \cdot t_0
\end{array}
\]
Alternative 9 Error 16.6 Cost 960
\[\frac{1}{c \cdot \left(x \cdot s\right)} \cdot \frac{\frac{1}{c}}{x \cdot s}
\]
Alternative 10 Error 22.5 Cost 832
\[\frac{1}{\left(c \cdot s\right) \cdot \left(c \cdot \left(x \cdot \left(x \cdot s\right)\right)\right)}
\]
Alternative 11 Error 19.3 Cost 832
\[\frac{1}{\left(c \cdot s\right) \cdot \left(x \cdot \left(c \cdot \left(x \cdot s\right)\right)\right)}
\]
Alternative 12 Error 16.6 Cost 832
\[\begin{array}{l}
t_0 := c \cdot \left(x \cdot s\right)\\
\frac{\frac{1}{t_0}}{t_0}
\end{array}
\]