\[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}
\]
↓
\[\frac{1}{\sin B} - \frac{x}{\tan B}
\]
(FPCore (B x)
:precision binary64
(+ (- (* x (/ 1.0 (tan B)))) (/ 1.0 (sin B))))
↓
(FPCore (B x) :precision binary64 (- (/ 1.0 (sin B)) (/ x (tan B))))
double code(double B, double x) {
return -(x * (1.0 / tan(B))) + (1.0 / sin(B));
}
↓
double code(double B, double x) {
return (1.0 / sin(B)) - (x / tan(B));
}
real(8) function code(b, x)
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + (1.0d0 / sin(b))
end function
↓
real(8) function code(b, x)
real(8), intent (in) :: b
real(8), intent (in) :: x
code = (1.0d0 / sin(b)) - (x / tan(b))
end function
public static double code(double B, double x) {
return -(x * (1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
↓
public static double code(double B, double x) {
return (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
def code(B, x):
return -(x * (1.0 / math.tan(B))) + (1.0 / math.sin(B))
↓
def code(B, x):
return (1.0 / math.sin(B)) - (x / math.tan(B))
function code(B, x)
return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(1.0 / sin(B)))
end
↓
function code(B, x)
return Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B)))
end
function tmp = code(B, x)
tmp = -(x * (1.0 / tan(B))) + (1.0 / sin(B));
end
↓
function tmp = code(B, x)
tmp = (1.0 / sin(B)) - (x / tan(B));
end
code[B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
↓
code[B_, x_] := N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}
↓
\frac{1}{\sin B} - \frac{x}{\tan B}
Alternatives
| Alternative 1 |
|---|
| Error | 1.0 |
|---|
| Cost | 13316 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -10200000:\\
\;\;\;\;-\frac{x \cdot \cos B}{\sin B}\\
\mathbf{elif}\;x \leq 0.96:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{\tan B}\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 1.0 |
|---|
| Cost | 7112 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -14500:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;x \leq 0.78:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{\tan B}\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 1.1 |
|---|
| Cost | 6985 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -2400000 \lor \neg \left(x \leq 29000\right):\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{\sin B}\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 1.0 |
|---|
| Cost | 6984 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -13200000:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;x \leq 1:\\
\;\;\;\;\frac{1 - x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{\tan B}\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 1.7 |
|---|
| Cost | 6921 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.7 \lor \neg \left(x \leq 1\right):\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 18.7 |
|---|
| Cost | 6857 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -7.4 \cdot 10^{-6} \lor \neg \left(x \leq 14000000\right):\\
\;\;\;\;\left(B \cdot 0.16666666666666666 + \frac{1}{B}\right) - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 35.5 |
|---|
| Cost | 704 |
|---|
\[\left(B \cdot 0.16666666666666666 + \frac{1}{B}\right) - \frac{x}{B}
\]
| Alternative 8 |
|---|
| Error | 37.3 |
|---|
| Cost | 521 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -1 \lor \neg \left(x \leq 1.35 \cdot 10^{-39}\right):\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 35.6 |
|---|
| Cost | 320 |
|---|
\[\frac{1 - x}{B}
\]
| Alternative 10 |
|---|
| Error | 44.9 |
|---|
| Cost | 192 |
|---|
\[\frac{1}{B}
\]