\[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}
\]
↓
\[\frac{1}{\sin B} - \left(\left(1 + \frac{x}{\tan B}\right) + -1\right)
\]
(FPCore (B x)
:precision binary64
(+ (- (* x (/ 1.0 (tan B)))) (/ 1.0 (sin B))))
↓
(FPCore (B x)
:precision binary64
(- (/ 1.0 (sin B)) (+ (+ 1.0 (/ x (tan B))) -1.0)))
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)) - ((1.0 + (x / tan(B))) + -1.0);
}
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)) - ((1.0d0 + (x / tan(b))) + (-1.0d0))
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)) - ((1.0 + (x / Math.tan(B))) + -1.0);
}
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)) - ((1.0 + (x / math.tan(B))) + -1.0)
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(Float64(1.0 + Float64(x / tan(B))) + -1.0))
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)) - ((1.0 + (x / tan(B))) + -1.0);
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[(N[(1.0 + N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}
↓
\frac{1}{\sin B} - \left(\left(1 + \frac{x}{\tan B}\right) + -1\right)
Alternatives
| Alternative 1 |
|---|
| Error | 1.1 |
|---|
| Cost | 13449 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -39000000000 \lor \neg \left(x \leq 3800000\right):\\
\;\;\;\;\frac{\left(-x\right) \cdot \cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{1}{\frac{B}{x}}\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 0.2 |
|---|
| Cost | 13248 |
|---|
\[\frac{1}{\sin B} - \frac{x}{\tan B}
\]
| Alternative 3 |
|---|
| Error | 8.8 |
|---|
| Cost | 7369 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -780000000000 \lor \neg \left(x \leq 4.5 \cdot 10^{+14}\right):\\
\;\;\;\;\left(B \cdot 0.16666666666666666 + \frac{1}{B}\right) - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{1}{\frac{B}{x}}\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 17.7 |
|---|
| Cost | 6857 |
|---|
\[\begin{array}{l}
\mathbf{if}\;B \leq -0.03 \lor \neg \left(B \leq 0.031\right):\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\left(B \cdot 0.16666666666666666 + \frac{1}{B}\right) + \left(B \cdot \left(x \cdot 0.3333333333333333\right) - \frac{x}{B}\right)\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 17.7 |
|---|
| Cost | 6848 |
|---|
\[\frac{1}{\sin B} - \frac{x}{B}
\]
| Alternative 6 |
|---|
| Error | 35.1 |
|---|
| Cost | 704 |
|---|
\[\left(B \cdot 0.16666666666666666 + \frac{1}{B}\right) - \frac{x}{B}
\]
| Alternative 7 |
|---|
| Error | 36.1 |
|---|
| Cost | 585 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -0.5 \lor \neg \left(x \leq 1\right):\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + x}{B}\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 35.2 |
|---|
| Cost | 320 |
|---|
\[\frac{1 - x}{B}
\]
| Alternative 9 |
|---|
| Error | 53.1 |
|---|
| Cost | 256 |
|---|
\[\frac{-x}{B}
\]
| Alternative 10 |
|---|
| Error | 61.8 |
|---|
| Cost | 192 |
|---|
\[B \cdot 0.16666666666666666
\]