\[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}
\]
↓
\[{\sin B}^{-1} - \frac{x}{\tan B}
\]
(FPCore (B x)
:precision binary64
(+ (- (* x (/ 1.0 (tan B)))) (/ 1.0 (sin B))))
↓
(FPCore (B x) :precision binary64 (- (pow (sin B) -1.0) (/ 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 pow(sin(B), -1.0) - (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 = (sin(b) ** (-1.0d0)) - (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 Math.pow(Math.sin(B), -1.0) - (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 math.pow(math.sin(B), -1.0) - (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((sin(B) ^ -1.0) - 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 = (sin(B) ^ -1.0) - (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[Power[N[Sin[B], $MachinePrecision], -1.0], $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}
↓
{\sin B}^{-1} - \frac{x}{\tan B}
Alternatives
| Alternative 1 |
|---|
| Error | 1.3 |
|---|
| Cost | 13448 |
|---|
\[\begin{array}{l}
t_0 := \frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;x \leq -2496.6943410533304:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 2.3157180201846665 \cdot 10^{-20}:\\
\;\;\;\;{\sin B}^{-1} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 0.2 |
|---|
| Cost | 13248 |
|---|
\[\frac{1 - x \cdot \cos B}{\sin B}
\]
| Alternative 3 |
|---|
| Error | 0.2 |
|---|
| Cost | 13248 |
|---|
\[\frac{1}{\sin B} - \frac{x}{\tan B}
\]
| Alternative 4 |
|---|
| Error | 0.9 |
|---|
| Cost | 7240 |
|---|
\[\begin{array}{l}
t_0 := \frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;x \leq -2496.6943410533304:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 0.1953353148812451:\\
\;\;\;\;\frac{1}{\sin B} + x \cdot \frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 0.9 |
|---|
| Cost | 7112 |
|---|
\[\begin{array}{l}
t_0 := \frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;x \leq -2496.6943410533304:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 0.1953353148812451:\\
\;\;\;\;\frac{1 - x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 1.3 |
|---|
| Cost | 7112 |
|---|
\[\begin{array}{l}
t_0 := \frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;x \leq -2496.6943410533304:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 2.3157180201846665 \cdot 10^{-20}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 19.6 |
|---|
| Cost | 6856 |
|---|
\[\begin{array}{l}
t_0 := \left(\frac{1}{B} + B \cdot 0.16666666666666666\right) - \frac{x}{B}\\
\mathbf{if}\;x \leq -9.863705822434112 \cdot 10^{+20}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 2.3157180201846665 \cdot 10^{-20}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 17.0 |
|---|
| Cost | 6720 |
|---|
\[\frac{1 - x}{\sin B}
\]
| Alternative 9 |
|---|
| Error | 35.6 |
|---|
| Cost | 704 |
|---|
\[\left(\frac{1}{B} + B \cdot 0.16666666666666666\right) - \frac{x}{B}
\]
| Alternative 10 |
|---|
| Error | 37.0 |
|---|
| Cost | 520 |
|---|
\[\begin{array}{l}
t_0 := \frac{-x}{B}\\
\mathbf{if}\;x \leq -9.863705822434112 \cdot 10^{+20}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 0.1953353148812451:\\
\;\;\;\;\frac{1}{B}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 11 |
|---|
| Error | 35.8 |
|---|
| Cost | 320 |
|---|
\[\frac{1 - x}{B}
\]
| Alternative 12 |
|---|
| Error | 44.7 |
|---|
| Cost | 192 |
|---|
\[\frac{1}{B}
\]