\[ \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)}
\]
↓
\[\begin{array}{l}
t_0 := \cos \left(x + x\right)\\
t_1 := x \cdot \left(c \cdot s\right)\\
\mathbf{if}\;c \leq -5.621496803332658 \cdot 10^{+190}:\\
\;\;\;\;\frac{\frac{t_0}{t_1}}{t_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t_0}{x \cdot s}}{c} \cdot \frac{1}{c \cdot \left(x \cdot s\right)}\\
\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 (* x (* c s))))
(if (<= c -5.621496803332658e+190)
(/ (/ t_0 t_1) t_1)
(* (/ (/ t_0 (* x s)) c) (/ 1.0 (* c (* x s))))))) 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 = x * (c * s);
double tmp;
if (c <= -5.621496803332658e+190) {
tmp = (t_0 / t_1) / t_1;
} else {
tmp = ((t_0 / (x * s)) / c) * (1.0 / (c * (x * s)));
}
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 = x * (c * s)
if (c <= (-5.621496803332658d+190)) then
tmp = (t_0 / t_1) / t_1
else
tmp = ((t_0 / (x * s)) / c) * (1.0d0 / (c * (x * s)))
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 = x * (c * s);
double tmp;
if (c <= -5.621496803332658e+190) {
tmp = (t_0 / t_1) / t_1;
} else {
tmp = ((t_0 / (x * s)) / c) * (1.0 / (c * (x * s)));
}
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 = x * (c * s)
tmp = 0
if c <= -5.621496803332658e+190:
tmp = (t_0 / t_1) / t_1
else:
tmp = ((t_0 / (x * s)) / c) * (1.0 / (c * (x * s)))
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(x * Float64(c * s))
tmp = 0.0
if (c <= -5.621496803332658e+190)
tmp = Float64(Float64(t_0 / t_1) / t_1);
else
tmp = Float64(Float64(Float64(t_0 / Float64(x * s)) / c) * Float64(1.0 / Float64(c * Float64(x * s))));
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 = x * (c * s);
tmp = 0.0;
if (c <= -5.621496803332658e+190)
tmp = (t_0 / t_1) / t_1;
else
tmp = ((t_0 / (x * s)) / c) * (1.0 / (c * (x * s)));
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[(x * N[(c * s), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -5.621496803332658e+190], N[(N[(t$95$0 / t$95$1), $MachinePrecision] / t$95$1), $MachinePrecision], N[(N[(N[(t$95$0 / N[(x * s), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] * N[(1.0 / N[(c * N[(x * s), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 := x \cdot \left(c \cdot s\right)\\
\mathbf{if}\;c \leq -5.621496803332658 \cdot 10^{+190}:\\
\;\;\;\;\frac{\frac{t_0}{t_1}}{t_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t_0}{x \cdot s}}{c} \cdot \frac{1}{c \cdot \left(x \cdot s\right)}\\
\end{array}
Alternatives Alternative 1 Error 2.5 Cost 7624
\[\begin{array}{l}
t_0 := x \cdot \left(c \cdot s\right)\\
t_1 := \frac{\cos \left(x \cdot 2\right)}{t_0 \cdot t_0}\\
\mathbf{if}\;x \leq -1 \cdot 10^{-242}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 10^{-200}:\\
\;\;\;\;\frac{1}{c \cdot \left(x \cdot s\right)} \cdot \left(\frac{1}{c} \cdot \left(-2 \cdot \frac{x}{s} + \frac{1}{x \cdot s}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 2 Error 2.5 Cost 7624
\[\begin{array}{l}
t_0 := x \cdot \left(c \cdot s\right)\\
\mathbf{if}\;x \leq -1 \cdot 10^{-242}:\\
\;\;\;\;\frac{\frac{\cos \left(x + x\right)}{t_0}}{t_0}\\
\mathbf{elif}\;x \leq 10^{-88}:\\
\;\;\;\;\frac{-1}{\left(c \cdot \left(x \cdot s\right)\right) \cdot \left(c \cdot \left(x \cdot \left(-s\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\cos \left(x \cdot 2\right)}{t_0 \cdot t_0}\\
\end{array}
\]
Alternative 3 Error 17.3 Cost 1096
\[\begin{array}{l}
t_0 := x \cdot \left(c \cdot s\right)\\
t_1 := \frac{1}{t_0 \cdot t_0}\\
\mathbf{if}\;x \leq -1 \cdot 10^{-242}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 10^{-200}:\\
\;\;\;\;\frac{\frac{\frac{1}{x \cdot s}}{c \cdot \left(x \cdot s\right)}}{c}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 4 Error 17.2 Cost 1096
\[\begin{array}{l}
t_0 := x \cdot \left(c \cdot s\right)\\
t_1 := \frac{1}{t_0 \cdot t_0}\\
\mathbf{if}\;x \leq -1 \cdot 10^{-242}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 10^{-200}:\\
\;\;\;\;\frac{\frac{\frac{1}{s}}{x}}{c \cdot \left(c \cdot \left(x \cdot s\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 5 Error 17.6 Cost 1096
\[\begin{array}{l}
t_0 := x \cdot \left(c \cdot s\right)\\
t_1 := \frac{1}{t_0 \cdot t_0}\\
\mathbf{if}\;x \leq -1 \cdot 10^{-170}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 10^{-278}:\\
\;\;\;\;\frac{1}{s \cdot \left(x \cdot \left(c \cdot \left(s \cdot \left(c \cdot x\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 6 Error 17.2 Cost 1028
\[\begin{array}{l}
\mathbf{if}\;s \leq 10^{-90}:\\
\;\;\;\;\frac{1}{s \cdot \left(x \cdot \left(c \cdot \left(s \cdot \left(c \cdot x\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\left(c \cdot \left(x \cdot s\right)\right) \cdot \left(c \cdot \left(x \cdot \left(-s\right)\right)\right)}\\
\end{array}
\]
Alternative 7 Error 17.2 Cost 832
\[\begin{array}{l}
t_0 := x \cdot \left(c \cdot s\right)\\
\frac{1}{t_0 \cdot t_0}
\end{array}
\]