
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -100000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 980000.0)
(- (/ F (* (sin B) (sqrt (fma F F 2.0)))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -100000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 980000.0) {
tmp = (F / (sin(B) * sqrt(fma(F, F, 2.0)))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -100000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 980000.0) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(fma(F, F, 2.0)))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -100000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 980000.0], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -100000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 980000:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1e8Initial program 53.7%
Simplified65.4%
Taylor expanded in x around 0 69.8%
associate-*l/69.9%
*-lft-identity69.9%
+-commutative69.9%
unpow269.9%
fma-undefine69.9%
Simplified69.9%
Taylor expanded in F around -inf 99.8%
if -1e8 < F < 9.8e5Initial program 71.0%
Simplified71.0%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
associate-*r/99.6%
clear-num99.6%
sqrt-div99.6%
metadata-eval99.6%
un-div-inv99.6%
Applied egg-rr99.6%
associate-/r/99.6%
times-frac99.7%
*-lft-identity99.7%
Simplified99.7%
if 9.8e5 < F Initial program 46.7%
Simplified58.8%
Taylor expanded in x around 0 61.8%
associate-*l/61.8%
*-lft-identity61.8%
+-commutative61.8%
unpow261.8%
fma-undefine61.8%
Simplified61.8%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -13000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.035)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -13000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.035) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-13000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.035d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -13000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.035) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -13000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.035: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -13000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.035) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -13000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.035) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -13000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.035], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -13000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.035:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.3e7Initial program 53.7%
Simplified65.4%
Taylor expanded in x around 0 69.8%
associate-*l/69.9%
*-lft-identity69.9%
+-commutative69.9%
unpow269.9%
fma-undefine69.9%
Simplified69.9%
Taylor expanded in F around -inf 99.8%
if -1.3e7 < F < 0.035000000000000003Initial program 71.3%
Simplified71.3%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 98.5%
if 0.035000000000000003 < F Initial program 46.8%
Simplified58.5%
Taylor expanded in x around 0 62.9%
associate-*l/62.9%
*-lft-identity62.9%
+-commutative62.9%
unpow262.9%
fma-undefine62.9%
Simplified62.9%
Taylor expanded in F around inf 99.0%
Final simplification98.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -13000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.035)
(- (/ F (* (sin B) (sqrt 2.0))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -13000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.035) {
tmp = (F / (sin(B) * sqrt(2.0))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-13000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.035d0) then
tmp = (f / (sin(b) * sqrt(2.0d0))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -13000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.035) {
tmp = (F / (Math.sin(B) * Math.sqrt(2.0))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -13000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.035: tmp = (F / (math.sin(B) * math.sqrt(2.0))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -13000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.035) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(2.0))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -13000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.035) tmp = (F / (sin(B) * sqrt(2.0))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -13000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.035], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -13000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.035:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{2}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.3e7Initial program 53.7%
Simplified65.4%
Taylor expanded in x around 0 69.8%
associate-*l/69.9%
*-lft-identity69.9%
+-commutative69.9%
unpow269.9%
fma-undefine69.9%
Simplified69.9%
Taylor expanded in F around -inf 99.8%
if -1.3e7 < F < 0.035000000000000003Initial program 71.3%
Simplified71.3%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
associate-*r/99.6%
clear-num99.7%
sqrt-div99.6%
metadata-eval99.6%
un-div-inv99.6%
Applied egg-rr99.6%
associate-/r/99.6%
times-frac99.7%
*-lft-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 98.5%
*-commutative98.5%
Simplified98.5%
if 0.035000000000000003 < F Initial program 46.8%
Simplified58.5%
Taylor expanded in x around 0 62.9%
associate-*l/62.9%
*-lft-identity62.9%
+-commutative62.9%
unpow262.9%
fma-undefine62.9%
Simplified62.9%
Taylor expanded in F around inf 99.0%
Final simplification99.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.0035)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.0305)
(- (* F (/ (sqrt 0.5) B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.0035) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.0305) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.0035d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.0305d0) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.0035) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.0305) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.0035: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.0305: tmp = (F * (math.sqrt(0.5) / B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.0035) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.0305) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.0035) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.0305) tmp = (F * (sqrt(0.5) / B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.0035], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.0305], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.0035:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.0305:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -0.00350000000000000007Initial program 53.6%
Simplified64.9%
Taylor expanded in x around 0 70.7%
associate-*l/70.7%
*-lft-identity70.7%
+-commutative70.7%
unpow270.7%
fma-undefine70.7%
Simplified70.7%
Taylor expanded in F around -inf 98.5%
if -0.00350000000000000007 < F < 0.030499999999999999Initial program 71.7%
Simplified71.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 98.9%
Taylor expanded in B around 0 82.5%
if 0.030499999999999999 < F Initial program 46.8%
Simplified58.5%
Taylor expanded in x around 0 62.9%
associate-*l/62.9%
*-lft-identity62.9%
+-commutative62.9%
unpow262.9%
fma-undefine62.9%
Simplified62.9%
Taylor expanded in F around inf 99.0%
Final simplification91.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -9e-51)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 9.5e-63) (/ (- x) (tan B)) (- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -9e-51) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 9.5e-63) {
tmp = -x / tan(B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-9d-51)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 9.5d-63) then
tmp = -x / tan(b)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -9e-51) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 9.5e-63) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -9e-51: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 9.5e-63: tmp = -x / math.tan(B) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -9e-51) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 9.5e-63) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -9e-51) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 9.5e-63) tmp = -x / tan(B); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -9e-51], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 9.5e-63], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -9 \cdot 10^{-51}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 9.5 \cdot 10^{-63}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -8.99999999999999948e-51Initial program 58.2%
Simplified67.5%
Taylor expanded in x around 0 75.8%
associate-*l/75.8%
*-lft-identity75.8%
+-commutative75.8%
unpow275.8%
fma-undefine75.8%
Simplified75.8%
Taylor expanded in F around -inf 92.3%
if -8.99999999999999948e-51 < F < 9.50000000000000016e-63Initial program 67.1%
Simplified67.1%
Taylor expanded in F around 0 67.2%
Taylor expanded in F around 0 79.0%
associate-/l*78.9%
clear-num78.9%
tan-quot79.0%
Applied egg-rr79.0%
associate-*r/79.2%
*-rgt-identity79.2%
Simplified79.2%
if 9.50000000000000016e-63 < F Initial program 55.1%
Simplified64.4%
Taylor expanded in x around 0 70.2%
associate-*l/70.2%
*-lft-identity70.2%
+-commutative70.2%
unpow270.2%
fma-undefine70.2%
Simplified70.2%
Taylor expanded in F around inf 86.3%
Final simplification85.9%
(FPCore (F B x) :precision binary64 (if (<= F -4.5e-53) (- (/ -1.0 (sin B)) (/ x (tan B))) (if (<= F 62.0) (/ (- x) (tan B)) (- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.5e-53) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 62.0) {
tmp = -x / tan(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-4.5d-53)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 62.0d0) then
tmp = -x / tan(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4.5e-53) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 62.0) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.5e-53: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 62.0: tmp = -x / math.tan(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.5e-53) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 62.0) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4.5e-53) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 62.0) tmp = -x / tan(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.5e-53], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 62.0], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.5 \cdot 10^{-53}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 62:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -4.49999999999999985e-53Initial program 58.2%
Simplified67.5%
Taylor expanded in x around 0 75.8%
associate-*l/75.8%
*-lft-identity75.8%
+-commutative75.8%
unpow275.8%
fma-undefine75.8%
Simplified75.8%
Taylor expanded in F around -inf 92.3%
if -4.49999999999999985e-53 < F < 62Initial program 69.9%
Simplified69.8%
Taylor expanded in F around 0 69.0%
Taylor expanded in F around 0 71.5%
associate-/l*71.5%
clear-num71.5%
tan-quot71.6%
Applied egg-rr71.6%
associate-*r/71.7%
*-rgt-identity71.7%
Simplified71.7%
if 62 < F Initial program 47.5%
Taylor expanded in F around -inf 41.2%
Taylor expanded in B around 0 25.4%
add-sqr-sqrt15.8%
sqrt-unprod35.5%
frac-times35.5%
metadata-eval35.5%
metadata-eval35.5%
frac-times35.5%
sqrt-unprod38.2%
add-sqr-sqrt83.2%
*-un-lft-identity83.2%
Applied egg-rr83.2%
Final simplification81.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ -1.0 (sin B))))
(if (<= F -1.1e+168)
t_0
(if (<= F -1.75e+121)
(/ (- -1.0 x) B)
(if (<= F -1.12e-10)
t_0
(if (<= F 1.5e-56) (/ x (- (sin B))) (/ (- 1.0 x) B)))))))
double code(double F, double B, double x) {
double t_0 = -1.0 / sin(B);
double tmp;
if (F <= -1.1e+168) {
tmp = t_0;
} else if (F <= -1.75e+121) {
tmp = (-1.0 - x) / B;
} else if (F <= -1.12e-10) {
tmp = t_0;
} else if (F <= 1.5e-56) {
tmp = x / -sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = (-1.0d0) / sin(b)
if (f <= (-1.1d+168)) then
tmp = t_0
else if (f <= (-1.75d+121)) then
tmp = ((-1.0d0) - x) / b
else if (f <= (-1.12d-10)) then
tmp = t_0
else if (f <= 1.5d-56) then
tmp = x / -sin(b)
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = -1.0 / Math.sin(B);
double tmp;
if (F <= -1.1e+168) {
tmp = t_0;
} else if (F <= -1.75e+121) {
tmp = (-1.0 - x) / B;
} else if (F <= -1.12e-10) {
tmp = t_0;
} else if (F <= 1.5e-56) {
tmp = x / -Math.sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): t_0 = -1.0 / math.sin(B) tmp = 0 if F <= -1.1e+168: tmp = t_0 elif F <= -1.75e+121: tmp = (-1.0 - x) / B elif F <= -1.12e-10: tmp = t_0 elif F <= 1.5e-56: tmp = x / -math.sin(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) t_0 = Float64(-1.0 / sin(B)) tmp = 0.0 if (F <= -1.1e+168) tmp = t_0; elseif (F <= -1.75e+121) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= -1.12e-10) tmp = t_0; elseif (F <= 1.5e-56) tmp = Float64(x / Float64(-sin(B))); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) t_0 = -1.0 / sin(B); tmp = 0.0; if (F <= -1.1e+168) tmp = t_0; elseif (F <= -1.75e+121) tmp = (-1.0 - x) / B; elseif (F <= -1.12e-10) tmp = t_0; elseif (F <= 1.5e-56) tmp = x / -sin(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.1e+168], t$95$0, If[LessEqual[F, -1.75e+121], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -1.12e-10], t$95$0, If[LessEqual[F, 1.5e-56], N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\sin B}\\
\mathbf{if}\;F \leq -1.1 \cdot 10^{+168}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -1.75 \cdot 10^{+121}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq -1.12 \cdot 10^{-10}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.5 \cdot 10^{-56}:\\
\;\;\;\;\frac{x}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.1000000000000001e168 or -1.75e121 < F < -1.12e-10Initial program 53.2%
Simplified59.8%
Taylor expanded in x around 0 66.4%
associate-*l/66.4%
*-lft-identity66.4%
+-commutative66.4%
unpow266.4%
fma-undefine66.4%
Simplified66.4%
Taylor expanded in F around -inf 96.9%
Taylor expanded in x around 0 66.0%
if -1.1000000000000001e168 < F < -1.75e121Initial program 64.4%
Taylor expanded in F around -inf 99.9%
Taylor expanded in B around 0 82.7%
Taylor expanded in B around 0 73.1%
mul-1-neg73.1%
distribute-neg-frac273.1%
Simplified73.1%
if -1.12e-10 < F < 1.49999999999999995e-56Initial program 69.0%
Simplified69.0%
Taylor expanded in F around 0 69.0%
Taylor expanded in F around 0 75.4%
Taylor expanded in B around 0 41.0%
if 1.49999999999999995e-56 < F Initial program 54.0%
Simplified63.5%
Taylor expanded in F around inf 87.9%
Taylor expanded in B around 0 67.1%
Taylor expanded in B around 0 50.6%
Final simplification51.4%
(FPCore (F B x)
:precision binary64
(if (<= F -5.5e+166)
(/ -1.0 (sin B))
(if (<= F -2.7e-145)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F 2.3e+44) (/ (- x) (tan B)) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.5e+166) {
tmp = -1.0 / sin(B);
} else if (F <= -2.7e-145) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= 2.3e+44) {
tmp = -x / tan(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-5.5d+166)) then
tmp = (-1.0d0) / sin(b)
else if (f <= (-2.7d-145)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= 2.3d+44) then
tmp = -x / tan(b)
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -5.5e+166) {
tmp = -1.0 / Math.sin(B);
} else if (F <= -2.7e-145) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= 2.3e+44) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5.5e+166: tmp = -1.0 / math.sin(B) elif F <= -2.7e-145: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= 2.3e+44: tmp = -x / math.tan(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5.5e+166) tmp = Float64(-1.0 / sin(B)); elseif (F <= -2.7e-145) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= 2.3e+44) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -5.5e+166) tmp = -1.0 / sin(B); elseif (F <= -2.7e-145) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= 2.3e+44) tmp = -x / tan(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5.5e+166], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.7e-145], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.3e+44], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5.5 \cdot 10^{+166}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -2.7 \cdot 10^{-145}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 2.3 \cdot 10^{+44}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -5.50000000000000008e166Initial program 16.5%
Simplified24.7%
Taylor expanded in x around 0 24.7%
associate-*l/24.7%
*-lft-identity24.7%
+-commutative24.7%
unpow224.7%
fma-undefine24.7%
Simplified24.7%
Taylor expanded in F around -inf 99.7%
Taylor expanded in x around 0 78.3%
if -5.50000000000000008e166 < F < -2.7e-145Initial program 74.5%
Simplified82.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-undefine99.5%
Simplified99.5%
Taylor expanded in F around -inf 80.2%
Taylor expanded in B around 0 63.8%
if -2.7e-145 < F < 2.30000000000000004e44Initial program 71.1%
Simplified71.2%
Taylor expanded in F around 0 66.6%
Taylor expanded in F around 0 73.6%
associate-/l*73.5%
clear-num73.5%
tan-quot73.6%
Applied egg-rr73.6%
associate-*r/73.8%
*-rgt-identity73.8%
Simplified73.8%
if 2.30000000000000004e44 < F Initial program 44.8%
Simplified58.0%
Taylor expanded in F around inf 99.5%
Taylor expanded in B around 0 72.9%
Taylor expanded in B around 0 58.3%
Final simplification67.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ -1.0 (sin B))))
(if (<= F -3.3e+165)
t_0
(if (<= F -2.8e+120)
(/ (- -1.0 x) B)
(if (<= F -1.12e-10)
t_0
(if (<= F 2.6e-81) (/ x (- B)) (/ (- 1.0 x) B)))))))
double code(double F, double B, double x) {
double t_0 = -1.0 / sin(B);
double tmp;
if (F <= -3.3e+165) {
tmp = t_0;
} else if (F <= -2.8e+120) {
tmp = (-1.0 - x) / B;
} else if (F <= -1.12e-10) {
tmp = t_0;
} else if (F <= 2.6e-81) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = (-1.0d0) / sin(b)
if (f <= (-3.3d+165)) then
tmp = t_0
else if (f <= (-2.8d+120)) then
tmp = ((-1.0d0) - x) / b
else if (f <= (-1.12d-10)) then
tmp = t_0
else if (f <= 2.6d-81) then
tmp = x / -b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = -1.0 / Math.sin(B);
double tmp;
if (F <= -3.3e+165) {
tmp = t_0;
} else if (F <= -2.8e+120) {
tmp = (-1.0 - x) / B;
} else if (F <= -1.12e-10) {
tmp = t_0;
} else if (F <= 2.6e-81) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): t_0 = -1.0 / math.sin(B) tmp = 0 if F <= -3.3e+165: tmp = t_0 elif F <= -2.8e+120: tmp = (-1.0 - x) / B elif F <= -1.12e-10: tmp = t_0 elif F <= 2.6e-81: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) t_0 = Float64(-1.0 / sin(B)) tmp = 0.0 if (F <= -3.3e+165) tmp = t_0; elseif (F <= -2.8e+120) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= -1.12e-10) tmp = t_0; elseif (F <= 2.6e-81) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) t_0 = -1.0 / sin(B); tmp = 0.0; if (F <= -3.3e+165) tmp = t_0; elseif (F <= -2.8e+120) tmp = (-1.0 - x) / B; elseif (F <= -1.12e-10) tmp = t_0; elseif (F <= 2.6e-81) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.3e+165], t$95$0, If[LessEqual[F, -2.8e+120], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -1.12e-10], t$95$0, If[LessEqual[F, 2.6e-81], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\sin B}\\
\mathbf{if}\;F \leq -3.3 \cdot 10^{+165}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -2.8 \cdot 10^{+120}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq -1.12 \cdot 10^{-10}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 2.6 \cdot 10^{-81}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -3.2999999999999999e165 or -2.8000000000000001e120 < F < -1.12e-10Initial program 53.2%
Simplified59.8%
Taylor expanded in x around 0 66.4%
associate-*l/66.4%
*-lft-identity66.4%
+-commutative66.4%
unpow266.4%
fma-undefine66.4%
Simplified66.4%
Taylor expanded in F around -inf 96.9%
Taylor expanded in x around 0 66.0%
if -3.2999999999999999e165 < F < -2.8000000000000001e120Initial program 64.4%
Taylor expanded in F around -inf 99.9%
Taylor expanded in B around 0 82.7%
Taylor expanded in B around 0 73.1%
mul-1-neg73.1%
distribute-neg-frac273.1%
Simplified73.1%
if -1.12e-10 < F < 2.5999999999999999e-81Initial program 67.3%
Taylor expanded in F around -inf 56.7%
Taylor expanded in B around 0 27.5%
Taylor expanded in x around inf 38.7%
associate-*r/38.7%
neg-mul-138.7%
Simplified38.7%
if 2.5999999999999999e-81 < F Initial program 56.6%
Simplified65.6%
Taylor expanded in F around inf 85.4%
Taylor expanded in B around 0 66.7%
Taylor expanded in B around 0 49.1%
Final simplification50.3%
(FPCore (F B x) :precision binary64 (if (<= F -62000000.0) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 8.5e-60) (/ (- x) (tan B)) (- (/ 1.0 B) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -62000000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 8.5e-60) {
tmp = -x / tan(B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-62000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 8.5d-60) then
tmp = -x / tan(b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -62000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 8.5e-60) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -62000000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 8.5e-60: tmp = -x / math.tan(B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -62000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 8.5e-60) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -62000000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 8.5e-60) tmp = -x / tan(B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -62000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.5e-60], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -62000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{-60}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -6.2e7Initial program 53.7%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 84.3%
Taylor expanded in x around 0 84.3%
sub-neg84.3%
mul-1-neg84.3%
distribute-neg-in84.3%
+-commutative84.3%
distribute-neg-in84.3%
distribute-neg-frac84.3%
metadata-eval84.3%
sub-neg84.3%
Simplified84.3%
if -6.2e7 < F < 8.50000000000000044e-60Initial program 68.9%
Simplified68.9%
Taylor expanded in F around 0 68.4%
Taylor expanded in F around 0 75.1%
associate-/l*75.1%
clear-num75.1%
tan-quot75.2%
Applied egg-rr75.2%
associate-*r/75.3%
*-rgt-identity75.3%
Simplified75.3%
if 8.50000000000000044e-60 < F Initial program 54.5%
Simplified63.9%
Taylor expanded in F around inf 87.0%
Taylor expanded in B around 0 66.3%
Final simplification74.7%
(FPCore (F B x) :precision binary64 (if (<= F -13000000.0) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 53.0) (/ (- x) (tan B)) (- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -13000000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 53.0) {
tmp = -x / tan(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-13000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 53.0d0) then
tmp = -x / tan(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -13000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 53.0) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -13000000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 53.0: tmp = -x / math.tan(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -13000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 53.0) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -13000000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 53.0) tmp = -x / tan(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -13000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 53.0], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -13000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 53:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.3e7Initial program 53.7%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 84.3%
Taylor expanded in x around 0 84.3%
sub-neg84.3%
mul-1-neg84.3%
distribute-neg-in84.3%
+-commutative84.3%
distribute-neg-in84.3%
distribute-neg-frac84.3%
metadata-eval84.3%
sub-neg84.3%
Simplified84.3%
if -1.3e7 < F < 53Initial program 70.7%
Simplified70.7%
Taylor expanded in F around 0 69.6%
Taylor expanded in F around 0 69.9%
associate-/l*69.9%
clear-num69.9%
tan-quot70.0%
Applied egg-rr70.0%
associate-*r/70.1%
*-rgt-identity70.1%
Simplified70.1%
if 53 < F Initial program 47.5%
Taylor expanded in F around -inf 41.2%
Taylor expanded in B around 0 25.4%
add-sqr-sqrt15.8%
sqrt-unprod35.5%
frac-times35.5%
metadata-eval35.5%
metadata-eval35.5%
frac-times35.5%
sqrt-unprod38.2%
add-sqr-sqrt83.2%
*-un-lft-identity83.2%
Applied egg-rr83.2%
Final simplification77.3%
(FPCore (F B x) :precision binary64 (if (or (<= x -9.5e-90) (not (<= x 1.05e-136))) (/ (- x) (tan B)) (/ -1.0 (sin B))))
double code(double F, double B, double x) {
double tmp;
if ((x <= -9.5e-90) || !(x <= 1.05e-136)) {
tmp = -x / tan(B);
} else {
tmp = -1.0 / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-9.5d-90)) .or. (.not. (x <= 1.05d-136))) then
tmp = -x / tan(b)
else
tmp = (-1.0d0) / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -9.5e-90) || !(x <= 1.05e-136)) {
tmp = -x / Math.tan(B);
} else {
tmp = -1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -9.5e-90) or not (x <= 1.05e-136): tmp = -x / math.tan(B) else: tmp = -1.0 / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -9.5e-90) || !(x <= 1.05e-136)) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(-1.0 / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -9.5e-90) || ~((x <= 1.05e-136))) tmp = -x / tan(B); else tmp = -1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -9.5e-90], N[Not[LessEqual[x, 1.05e-136]], $MachinePrecision]], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.5 \cdot 10^{-90} \lor \neg \left(x \leq 1.05 \cdot 10^{-136}\right):\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\end{array}
\end{array}
if x < -9.5000000000000003e-90 or 1.0499999999999999e-136 < x Initial program 59.1%
Simplified66.7%
Taylor expanded in F around 0 42.2%
Taylor expanded in F around 0 80.9%
associate-/l*80.7%
clear-num80.7%
tan-quot80.8%
Applied egg-rr80.8%
associate-*r/81.0%
*-rgt-identity81.0%
Simplified81.0%
if -9.5000000000000003e-90 < x < 1.0499999999999999e-136Initial program 61.9%
Simplified65.8%
Taylor expanded in x around 0 65.8%
associate-*l/65.9%
*-lft-identity65.9%
+-commutative65.9%
unpow265.9%
fma-undefine65.9%
Simplified65.9%
Taylor expanded in F around -inf 36.6%
Taylor expanded in x around 0 36.6%
Final simplification64.5%
(FPCore (F B x) :precision binary64 (if (<= F -76000000.0) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 5.5e+43) (/ (- x) (tan B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -76000000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 5.5e+43) {
tmp = -x / tan(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-76000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 5.5d+43) then
tmp = -x / tan(b)
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -76000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 5.5e+43) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -76000000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 5.5e+43: tmp = -x / math.tan(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -76000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 5.5e+43) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -76000000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 5.5e+43) tmp = -x / tan(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -76000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.5e+43], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -76000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 5.5 \cdot 10^{+43}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -7.6e7Initial program 53.7%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 84.3%
Taylor expanded in x around 0 84.3%
sub-neg84.3%
mul-1-neg84.3%
distribute-neg-in84.3%
+-commutative84.3%
distribute-neg-in84.3%
distribute-neg-frac84.3%
metadata-eval84.3%
sub-neg84.3%
Simplified84.3%
if -7.6e7 < F < 5.49999999999999989e43Initial program 70.8%
Simplified70.8%
Taylor expanded in F around 0 66.8%
Taylor expanded in F around 0 68.8%
associate-/l*68.7%
clear-num68.7%
tan-quot68.8%
Applied egg-rr68.8%
associate-*r/68.9%
*-rgt-identity68.9%
Simplified68.9%
if 5.49999999999999989e43 < F Initial program 44.8%
Simplified58.0%
Taylor expanded in F around inf 99.5%
Taylor expanded in B around 0 72.9%
Taylor expanded in B around 0 58.3%
Final simplification70.5%
(FPCore (F B x) :precision binary64 (if (<= F -8.6e-146) (/ (- -1.0 x) B) (if (<= F 1.85e-81) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8.6e-146) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.85e-81) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-8.6d-146)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.85d-81) then
tmp = x / -b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -8.6e-146) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.85e-81) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -8.6e-146: tmp = (-1.0 - x) / B elif F <= 1.85e-81: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -8.6e-146) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.85e-81) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -8.6e-146) tmp = (-1.0 - x) / B; elseif (F <= 1.85e-81) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -8.6e-146], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.85e-81], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -8.6 \cdot 10^{-146}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.85 \cdot 10^{-81}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -8.5999999999999998e-146Initial program 58.5%
Taylor expanded in F around -inf 85.5%
Taylor expanded in B around 0 66.9%
Taylor expanded in B around 0 44.2%
mul-1-neg44.2%
distribute-neg-frac244.2%
Simplified44.2%
if -8.5999999999999998e-146 < F < 1.84999999999999993e-81Initial program 66.8%
Taylor expanded in F around -inf 58.1%
Taylor expanded in B around 0 26.4%
Taylor expanded in x around inf 42.2%
associate-*r/42.2%
neg-mul-142.2%
Simplified42.2%
if 1.84999999999999993e-81 < F Initial program 56.6%
Simplified65.6%
Taylor expanded in F around inf 85.4%
Taylor expanded in B around 0 66.7%
Taylor expanded in B around 0 49.1%
Final simplification45.3%
(FPCore (F B x) :precision binary64 (if (or (<= x -1.8e-109) (not (<= x 8.5e-171))) (/ x (- B)) (/ 1.0 B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -1.8e-109) || !(x <= 8.5e-171)) {
tmp = x / -B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-1.8d-109)) .or. (.not. (x <= 8.5d-171))) then
tmp = x / -b
else
tmp = 1.0d0 / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -1.8e-109) || !(x <= 8.5e-171)) {
tmp = x / -B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -1.8e-109) or not (x <= 8.5e-171): tmp = x / -B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -1.8e-109) || !(x <= 8.5e-171)) tmp = Float64(x / Float64(-B)); else tmp = Float64(1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -1.8e-109) || ~((x <= 8.5e-171))) tmp = x / -B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -1.8e-109], N[Not[LessEqual[x, 8.5e-171]], $MachinePrecision]], N[(x / (-B)), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.8 \cdot 10^{-109} \lor \neg \left(x \leq 8.5 \cdot 10^{-171}\right):\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if x < -1.8e-109 or 8.50000000000000032e-171 < x Initial program 58.7%
Taylor expanded in F around -inf 75.7%
Taylor expanded in B around 0 44.1%
Taylor expanded in x around inf 41.2%
associate-*r/41.2%
neg-mul-141.2%
Simplified41.2%
if -1.8e-109 < x < 8.50000000000000032e-171Initial program 63.1%
Simplified67.6%
Taylor expanded in F around inf 29.0%
Taylor expanded in B around 0 19.3%
Taylor expanded in x around 0 19.3%
Final simplification34.2%
(FPCore (F B x) :precision binary64 (if (<= F 1.75e-81) (/ x (- B)) (/ (- 1.0 x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 1.75e-81) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= 1.75d-81) then
tmp = x / -b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= 1.75e-81) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 1.75e-81: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 1.75e-81) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= 1.75e-81) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 1.75e-81], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 1.75 \cdot 10^{-81}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < 1.74999999999999993e-81Initial program 62.0%
Taylor expanded in F around -inf 74.1%
Taylor expanded in B around 0 50.0%
Taylor expanded in x around inf 31.8%
associate-*r/31.8%
neg-mul-131.8%
Simplified31.8%
if 1.74999999999999993e-81 < F Initial program 56.6%
Simplified65.6%
Taylor expanded in F around inf 85.4%
Taylor expanded in B around 0 66.7%
Taylor expanded in B around 0 49.1%
Final simplification37.7%
(FPCore (F B x) :precision binary64 (/ 1.0 B))
double code(double F, double B, double x) {
return 1.0 / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = 1.0d0 / b
end function
public static double code(double F, double B, double x) {
return 1.0 / B;
}
def code(F, B, x): return 1.0 / B
function code(F, B, x) return Float64(1.0 / B) end
function tmp = code(F, B, x) tmp = 1.0 / B; end
code[F_, B_, x_] := N[(1.0 / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{B}
\end{array}
Initial program 60.1%
Simplified66.4%
Taylor expanded in F around inf 58.2%
Taylor expanded in B around 0 56.1%
Taylor expanded in x around 0 10.6%
Final simplification10.6%
herbie shell --seed 2024060
(FPCore (F B x)
:name "VandenBroeck and Keller, Equation (23)"
:precision binary64
(+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))