\[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}
\]
↓
\[\frac{1 - x \cdot \cos B}{\sin B}
\]
(FPCore (B x)
:precision binary64
(+ (- (* x (/ 1.0 (tan B)))) (/ 1.0 (sin B))))
↓
(FPCore (B x) :precision binary64 (/ (- 1.0 (* x (cos B))) (sin 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 - (x * cos(B))) / sin(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 - (x * cos(b))) / sin(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 - (x * Math.cos(B))) / Math.sin(B);
}
def code(B, x):
return -(x * (1.0 / math.tan(B))) + (1.0 / math.sin(B))
↓
def code(B, x):
return (1.0 - (x * math.cos(B))) / math.sin(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 - Float64(x * cos(B))) / sin(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 - (x * cos(B))) / sin(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[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}
↓
\frac{1 - x \cdot \cos B}{\sin B}
Alternatives
| Alternative 1 |
|---|
| Error | 1.0 |
|---|
| Cost | 13252 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -648305768939.0497:\\
\;\;\;\;\frac{\tan B - x}{\tan B}\\
\mathbf{elif}\;x \leq 622.0381124410854:\\
\;\;\;\;\frac{1 - x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{B} + -1\right) - \frac{x}{\tan B}\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 0.2 |
|---|
| Cost | 13248 |
|---|
\[\frac{1}{\sin B} - \frac{x}{\tan B}
\]
| Alternative 3 |
|---|
| Error | 1.0 |
|---|
| Cost | 7240 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;x \leq -648305768939.0497:\\
\;\;\;\;1 - t_0\\
\mathbf{elif}\;x \leq 622.0381124410854:\\
\;\;\;\;\frac{1 - x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{B} + -1\right) - t_0\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 1.0 |
|---|
| Cost | 7112 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;x \leq -648305768939.0497:\\
\;\;\;\;1 - t_0\\
\mathbf{elif}\;x \leq 622.0381124410854:\\
\;\;\;\;\frac{1 - x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 1.1 |
|---|
| Cost | 6984 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -648305768939.0497:\\
\;\;\;\;1 - \frac{x}{\tan B}\\
\mathbf{elif}\;x \leq 622.0381124410854:\\
\;\;\;\;\frac{1 - x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 1.9 |
|---|
| Cost | 6920 |
|---|
\[\begin{array}{l}
t_0 := \frac{-x}{\tan B}\\
\mathbf{if}\;x \leq -648305768939.0497:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 0.9811528645762814:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 1.9 |
|---|
| Cost | 6920 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -648305768939.0497:\\
\;\;\;\;1 - \frac{x}{\tan B}\\
\mathbf{elif}\;x \leq 0.9811528645762814:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 19.4 |
|---|
| Cost | 6856 |
|---|
\[\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
\mathbf{if}\;B \leq -7.99763360581275:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 1.906517941247706 \cdot 10^{-27}:\\
\;\;\;\;\frac{1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 33.9 |
|---|
| Cost | 1224 |
|---|
\[\begin{array}{l}
\mathbf{if}\;B \leq -6484.3315407407235:\\
\;\;\;\;1\\
\mathbf{elif}\;B \leq 7.171363942527516 \cdot 10^{+58}:\\
\;\;\;\;\left(\frac{1}{B} + B \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right)\right) - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 34.1 |
|---|
| Cost | 1096 |
|---|
\[\begin{array}{l}
\mathbf{if}\;B \leq -6484.3315407407235:\\
\;\;\;\;1\\
\mathbf{elif}\;B \leq 7.696352384136389 \cdot 10^{+96}:\\
\;\;\;\;\left(\frac{1}{B} + B \cdot \left(x \cdot 0.3333333333333333\right)\right) - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\]
| Alternative 11 |
|---|
| Error | 36.6 |
|---|
| Cost | 520 |
|---|
\[\begin{array}{l}
t_0 := \frac{-x}{B}\\
\mathbf{if}\;x \leq -8.813665526574962 \cdot 10^{+20}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 0.9811528645762814:\\
\;\;\;\;\frac{1}{B}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 12 |
|---|
| Error | 43.9 |
|---|
| Cost | 324 |
|---|
\[\begin{array}{l}
\mathbf{if}\;B \leq -6484.3315407407235:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\]
| Alternative 13 |
|---|
| Error | 35.5 |
|---|
| Cost | 320 |
|---|
\[\frac{1 - x}{B}
\]
| Alternative 14 |
|---|
| Error | 60.4 |
|---|
| Cost | 64 |
|---|
\[1
\]