
(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 30 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 -1.7e+110)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 200000000.0)
(fma
(/ F (sin B))
(pow (fma x 2.0 (fma F F 2.0)) -0.5)
(/ (- 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 <= -1.7e+110) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 200000000.0) {
tmp = fma((F / sin(B)), pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5), (-x / tan(B)));
} 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 <= -1.7e+110) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 200000000.0) tmp = fma(Float64(F / sin(B)), (fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5), Float64(Float64(-x) / tan(B))); 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, -1.7e+110], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 200000000.0], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] + N[((-x) / N[Tan[B], $MachinePrecision]), $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 -1.7 \cdot 10^{+110}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 200000000:\\
\;\;\;\;\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{-x}{\tan B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.7000000000000001e110Initial program 59.8%
distribute-lft-neg-in59.8%
+-commutative59.8%
cancel-sign-sub-inv59.8%
Simplified72.6%
Taylor expanded in x around 0 72.6%
associate-*l/72.6%
*-lft-identity72.6%
unpow272.6%
fma-udef72.6%
Simplified72.6%
Taylor expanded in F around -inf 99.9%
if -1.7000000000000001e110 < F < 2e8Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
if 2e8 < F Initial program 61.8%
distribute-lft-neg-in61.8%
+-commutative61.8%
cancel-sign-sub-inv61.8%
Simplified75.4%
Taylor expanded in x around 0 75.4%
associate-*l/75.4%
*-lft-identity75.4%
unpow275.4%
fma-udef75.4%
Simplified75.4%
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 -1e+154)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 50.0)
(- (/ (/ F (sqrt (fma F F 2.0))) (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 <= -1e+154) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 50.0) {
tmp = ((F / sqrt(fma(F, F, 2.0))) / sin(B)) - 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 <= -1e+154) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 50.0) tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, 2.0))) / sin(B)) - 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, -1e+154], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 50.0], N[(N[(N[(F / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[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 -1 \cdot 10^{+154}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 50:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.00000000000000004e154Initial program 44.0%
distribute-lft-neg-in44.0%
+-commutative44.0%
cancel-sign-sub-inv44.0%
Simplified53.8%
Taylor expanded in x around 0 53.8%
associate-*l/53.8%
*-lft-identity53.8%
unpow253.8%
fma-udef53.8%
Simplified53.8%
Taylor expanded in F around -inf 99.9%
if -1.00000000000000004e154 < F < 50Initial program 97.8%
distribute-lft-neg-in97.8%
+-commutative97.8%
cancel-sign-sub-inv97.8%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
associate-*r/99.7%
sqrt-div99.6%
metadata-eval99.6%
un-div-inv99.7%
Applied egg-rr99.7%
if 50 < F Initial program 61.8%
distribute-lft-neg-in61.8%
+-commutative61.8%
cancel-sign-sub-inv61.8%
Simplified75.4%
Taylor expanded in x around 0 75.4%
associate-*l/75.4%
*-lft-identity75.4%
unpow275.4%
fma-udef75.4%
Simplified75.4%
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 -590000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 180000000.0)
(+
(* x (/ -1.0 (tan B)))
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -590000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 180000000.0) {
tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} 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 <= (-590000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 180000000.0d0) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
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 <= -590000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 180000000.0) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} 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 <= -590000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 180000000.0: tmp = (x * (-1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) 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 <= -590000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 180000000.0) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5))); 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 <= -590000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 180000000.0) tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); 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, -590000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 180000000.0], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $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 -590000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 180000000:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -5.9e5Initial program 74.9%
distribute-lft-neg-in74.9%
+-commutative74.9%
cancel-sign-sub-inv74.9%
Simplified82.8%
Taylor expanded in x around 0 82.9%
associate-*l/82.9%
*-lft-identity82.9%
unpow282.9%
fma-udef82.9%
Simplified82.9%
Taylor expanded in F around -inf 99.8%
if -5.9e5 < F < 1.8e8Initial program 99.5%
if 1.8e8 < F Initial program 61.8%
distribute-lft-neg-in61.8%
+-commutative61.8%
cancel-sign-sub-inv61.8%
Simplified75.4%
Taylor expanded in x around 0 75.4%
associate-*l/75.4%
*-lft-identity75.4%
unpow275.4%
fma-udef75.4%
Simplified75.4%
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 -600000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.98)
(- (* F (* (/ 1.0 (sin B)) (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))))) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -600000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.98) {
tmp = (F * ((1.0 / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / 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 <= (-600000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.98d0) then
tmp = (f * ((1.0d0 / sin(b)) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / 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 <= -600000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.98) {
tmp = (F * ((1.0 / Math.sin(B)) * Math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -600000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.98: tmp = (F * ((1.0 / math.sin(B)) * math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -600000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.98) tmp = Float64(Float64(F * Float64(Float64(1.0 / sin(B)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))))) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / 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 <= -600000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.98) tmp = (F * ((1.0 / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_0; else tmp = ((F / (F + (1.0 / F))) / 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, -600000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.98], N[(N[(F * N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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 -600000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.98:\\
\;\;\;\;F \cdot \left(\frac{1}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\right) - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -6e5Initial program 74.5%
distribute-lft-neg-in74.5%
+-commutative74.5%
cancel-sign-sub-inv74.5%
Simplified82.6%
Taylor expanded in x around 0 82.6%
associate-*l/82.6%
*-lft-identity82.6%
unpow282.6%
fma-udef82.6%
Simplified82.6%
Taylor expanded in F around -inf 99.8%
if -6e5 < F < 0.97999999999999998Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.6%
Taylor expanded in F around 0 99.5%
if 0.97999999999999998 < F Initial program 62.3%
distribute-lft-neg-in62.3%
+-commutative62.3%
cancel-sign-sub-inv62.3%
Simplified75.7%
Taylor expanded in x around 0 75.7%
associate-*l/75.7%
*-lft-identity75.7%
unpow275.7%
fma-udef75.7%
Simplified75.7%
associate-*r/75.8%
sqrt-div75.8%
metadata-eval75.8%
un-div-inv75.8%
Applied egg-rr75.8%
Taylor expanded in F around inf 99.2%
Final simplification99.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -600000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.9)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -600000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.9) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / 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 <= (-600000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.9d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / 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 <= -600000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.9) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -600000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.9: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -600000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.9) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / 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 <= -600000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.9) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; else tmp = ((F / (F + (1.0 / F))) / 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, -600000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.9], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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 -600000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.9:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -6e5Initial program 74.5%
distribute-lft-neg-in74.5%
+-commutative74.5%
cancel-sign-sub-inv74.5%
Simplified82.6%
Taylor expanded in x around 0 82.6%
associate-*l/82.6%
*-lft-identity82.6%
unpow282.6%
fma-udef82.6%
Simplified82.6%
Taylor expanded in F around -inf 99.8%
if -6e5 < F < 0.900000000000000022Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.6%
Taylor expanded in x around 0 99.7%
associate-*l/99.6%
*-lft-identity99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around 0 99.5%
if 0.900000000000000022 < F Initial program 62.3%
distribute-lft-neg-in62.3%
+-commutative62.3%
cancel-sign-sub-inv62.3%
Simplified75.7%
Taylor expanded in x around 0 75.7%
associate-*l/75.7%
*-lft-identity75.7%
unpow275.7%
fma-udef75.7%
Simplified75.7%
associate-*r/75.8%
sqrt-div75.8%
metadata-eval75.8%
un-div-inv75.8%
Applied egg-rr75.8%
Taylor expanded in F around inf 99.2%
Final simplification99.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -600000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.92)
(- (/ (sqrt 0.5) (/ (sin B) F)) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -600000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.92) {
tmp = (sqrt(0.5) / (sin(B) / F)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / 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 <= (-600000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.92d0) then
tmp = (sqrt(0.5d0) / (sin(b) / f)) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / 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 <= -600000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.92) {
tmp = (Math.sqrt(0.5) / (Math.sin(B) / F)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -600000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.92: tmp = (math.sqrt(0.5) / (math.sin(B) / F)) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -600000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.92) tmp = Float64(Float64(sqrt(0.5) / Float64(sin(B) / F)) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / 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 <= -600000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.92) tmp = (sqrt(0.5) / (sin(B) / F)) - t_0; else tmp = ((F / (F + (1.0 / F))) / 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, -600000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.92], N[(N[(N[Sqrt[0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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 -600000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.92:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{\sin B}{F}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -6e5Initial program 74.5%
distribute-lft-neg-in74.5%
+-commutative74.5%
cancel-sign-sub-inv74.5%
Simplified82.6%
Taylor expanded in x around 0 82.6%
associate-*l/82.6%
*-lft-identity82.6%
unpow282.6%
fma-udef82.6%
Simplified82.6%
Taylor expanded in F around -inf 99.8%
if -6e5 < F < 0.92000000000000004Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.6%
Taylor expanded in x around 0 99.7%
associate-*l/99.6%
*-lft-identity99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
associate-*r/99.6%
sqrt-div99.6%
metadata-eval99.6%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in F around 0 99.5%
associate-/l*99.5%
Simplified99.5%
if 0.92000000000000004 < F Initial program 62.3%
distribute-lft-neg-in62.3%
+-commutative62.3%
cancel-sign-sub-inv62.3%
Simplified75.7%
Taylor expanded in x around 0 75.7%
associate-*l/75.7%
*-lft-identity75.7%
unpow275.7%
fma-udef75.7%
Simplified75.7%
associate-*r/75.8%
sqrt-div75.8%
metadata-eval75.8%
un-div-inv75.8%
Applied egg-rr75.8%
Taylor expanded in F around inf 99.2%
Final simplification99.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -600000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.9)
(- (/ (/ F (sqrt 2.0)) (sin B)) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -600000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.9) {
tmp = ((F / sqrt(2.0)) / sin(B)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / 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 <= (-600000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.9d0) then
tmp = ((f / sqrt(2.0d0)) / sin(b)) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / 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 <= -600000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.9) {
tmp = ((F / Math.sqrt(2.0)) / Math.sin(B)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -600000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.9: tmp = ((F / math.sqrt(2.0)) / math.sin(B)) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -600000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.9) tmp = Float64(Float64(Float64(F / sqrt(2.0)) / sin(B)) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / 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 <= -600000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.9) tmp = ((F / sqrt(2.0)) / sin(B)) - t_0; else tmp = ((F / (F + (1.0 / F))) / 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, -600000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.9], N[(N[(N[(F / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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 -600000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.9:\\
\;\;\;\;\frac{\frac{F}{\sqrt{2}}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -6e5Initial program 74.5%
distribute-lft-neg-in74.5%
+-commutative74.5%
cancel-sign-sub-inv74.5%
Simplified82.6%
Taylor expanded in x around 0 82.6%
associate-*l/82.6%
*-lft-identity82.6%
unpow282.6%
fma-udef82.6%
Simplified82.6%
Taylor expanded in F around -inf 99.8%
if -6e5 < F < 0.900000000000000022Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.6%
Taylor expanded in x around 0 99.7%
associate-*l/99.6%
*-lft-identity99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
associate-*r/99.6%
sqrt-div99.6%
metadata-eval99.6%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in F around 0 99.5%
if 0.900000000000000022 < F Initial program 62.3%
distribute-lft-neg-in62.3%
+-commutative62.3%
cancel-sign-sub-inv62.3%
Simplified75.7%
Taylor expanded in x around 0 75.7%
associate-*l/75.7%
*-lft-identity75.7%
unpow275.7%
fma-udef75.7%
Simplified75.7%
associate-*r/75.8%
sqrt-div75.8%
metadata-eval75.8%
un-div-inv75.8%
Applied egg-rr75.8%
Taylor expanded in F around inf 99.2%
Final simplification99.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0
(-
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(/ x B)))
(t_1 (/ x (tan B))))
(if (<= F -1.42e+20)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -6.2e-126)
t_0
(if (<= F 3.8e-123)
(- (/ (* F F) (sin B)) t_1)
(if (<= F 430000.0) t_0 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
double t_1 = x / tan(B);
double tmp;
if (F <= -1.42e+20) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -6.2e-126) {
tmp = t_0;
} else if (F <= 3.8e-123) {
tmp = ((F * F) / sin(B)) - t_1;
} else if (F <= 430000.0) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - t_1;
}
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) :: t_1
real(8) :: tmp
t_0 = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
t_1 = x / tan(b)
if (f <= (-1.42d+20)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-6.2d-126)) then
tmp = t_0
else if (f <= 3.8d-123) then
tmp = ((f * f) / sin(b)) - t_1
else if (f <= 430000.0d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -1.42e+20) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -6.2e-126) {
tmp = t_0;
} else if (F <= 3.8e-123) {
tmp = ((F * F) / Math.sin(B)) - t_1;
} else if (F <= 430000.0) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) t_1 = x / math.tan(B) tmp = 0 if F <= -1.42e+20: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -6.2e-126: tmp = t_0 elif F <= 3.8e-123: tmp = ((F * F) / math.sin(B)) - t_1 elif F <= 430000.0: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.42e+20) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -6.2e-126) tmp = t_0; elseif (F <= 3.8e-123) tmp = Float64(Float64(Float64(F * F) / sin(B)) - t_1); elseif (F <= 430000.0) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); t_1 = x / tan(B); tmp = 0.0; if (F <= -1.42e+20) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -6.2e-126) tmp = t_0; elseif (F <= 3.8e-123) tmp = ((F * F) / sin(B)) - t_1; elseif (F <= 430000.0) tmp = t_0; else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.42e+20], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -6.2e-126], t$95$0, If[LessEqual[F, 3.8e-123], N[(N[(N[(F * F), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 430000.0], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.42 \cdot 10^{+20}:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq -6.2 \cdot 10^{-126}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 3.8 \cdot 10^{-123}:\\
\;\;\;\;\frac{F \cdot F}{\sin B} - t_1\\
\mathbf{elif}\;F \leq 430000:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_1\\
\end{array}
\end{array}
if F < -1.42e20Initial program 73.3%
distribute-lft-neg-in73.3%
+-commutative73.3%
cancel-sign-sub-inv73.3%
Simplified81.7%
Taylor expanded in x around 0 81.8%
associate-*l/81.7%
*-lft-identity81.7%
unpow281.7%
fma-udef81.7%
Simplified81.7%
Taylor expanded in F around -inf 99.8%
if -1.42e20 < F < -6.2000000000000003e-126 or 3.79999999999999996e-123 < F < 4.3e5Initial program 99.6%
Taylor expanded in B around 0 90.7%
if -6.2000000000000003e-126 < F < 3.79999999999999996e-123Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
associate-*r/99.8%
sqrt-div99.7%
metadata-eval99.7%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in F around inf 86.8%
Taylor expanded in F around 0 86.8%
unpow286.8%
Simplified86.8%
if 4.3e5 < F Initial program 61.8%
distribute-lft-neg-in61.8%
+-commutative61.8%
cancel-sign-sub-inv61.8%
Simplified75.4%
Taylor expanded in x around 0 75.4%
associate-*l/75.4%
*-lft-identity75.4%
unpow275.4%
fma-udef75.4%
Simplified75.4%
Taylor expanded in F around inf 99.8%
Final simplification94.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (t_1 (/ x (tan B))))
(if (<= F -1.42e+20)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -4.3e-124)
(- (* (/ F (sin B)) t_0) (/ x B))
(if (<= F 3.15e-27)
(- (* t_0 (/ F B)) t_1)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_1))))))
double code(double F, double B, double x) {
double t_0 = pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_1 = x / tan(B);
double tmp;
if (F <= -1.42e+20) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -4.3e-124) {
tmp = ((F / sin(B)) * t_0) - (x / B);
} else if (F <= 3.15e-27) {
tmp = (t_0 * (F / B)) - t_1;
} else {
tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_1;
}
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) :: t_1
real(8) :: tmp
t_0 = ((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)
t_1 = x / tan(b)
if (f <= (-1.42d+20)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-4.3d-124)) then
tmp = ((f / sin(b)) * t_0) - (x / b)
else if (f <= 3.15d-27) then
tmp = (t_0 * (f / b)) - t_1
else
tmp = ((f / (f + (1.0d0 / f))) / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -1.42e+20) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -4.3e-124) {
tmp = ((F / Math.sin(B)) * t_0) - (x / B);
} else if (F <= 3.15e-27) {
tmp = (t_0 * (F / B)) - t_1;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) t_1 = x / math.tan(B) tmp = 0 if F <= -1.42e+20: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -4.3e-124: tmp = ((F / math.sin(B)) * t_0) - (x / B) elif F <= 3.15e-27: tmp = (t_0 * (F / B)) - t_1 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5 t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.42e+20) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -4.3e-124) tmp = Float64(Float64(Float64(F / sin(B)) * t_0) - Float64(x / B)); elseif (F <= 3.15e-27) tmp = Float64(Float64(t_0 * Float64(F / B)) - t_1); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((2.0 + (F * F)) + (x * 2.0)) ^ -0.5; t_1 = x / tan(B); tmp = 0.0; if (F <= -1.42e+20) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -4.3e-124) tmp = ((F / sin(B)) * t_0) - (x / B); elseif (F <= 3.15e-27) tmp = (t_0 * (F / B)) - t_1; else tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.42e+20], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -4.3e-124], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.15e-27], N[(N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.42 \cdot 10^{+20}:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq -4.3 \cdot 10^{-124}:\\
\;\;\;\;\frac{F}{\sin B} \cdot t_0 - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.15 \cdot 10^{-27}:\\
\;\;\;\;t_0 \cdot \frac{F}{B} - t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_1\\
\end{array}
\end{array}
if F < -1.42e20Initial program 73.3%
distribute-lft-neg-in73.3%
+-commutative73.3%
cancel-sign-sub-inv73.3%
Simplified81.7%
Taylor expanded in x around 0 81.8%
associate-*l/81.7%
*-lft-identity81.7%
unpow281.7%
fma-udef81.7%
Simplified81.7%
Taylor expanded in F around -inf 99.8%
if -1.42e20 < F < -4.3e-124Initial program 99.6%
Taylor expanded in B around 0 95.2%
if -4.3e-124 < F < 3.15000000000000005e-27Initial program 99.5%
Taylor expanded in B around 0 92.8%
div-inv93.0%
expm1-log1p-u68.1%
expm1-udef35.4%
Applied egg-rr35.4%
expm1-def68.1%
expm1-log1p93.0%
Simplified93.0%
if 3.15000000000000005e-27 < F Initial program 63.3%
distribute-lft-neg-in63.3%
+-commutative63.3%
cancel-sign-sub-inv63.3%
Simplified76.4%
Taylor expanded in x around 0 76.4%
associate-*l/76.4%
*-lft-identity76.4%
unpow276.4%
fma-udef76.4%
Simplified76.4%
associate-*r/76.4%
sqrt-div76.4%
metadata-eval76.4%
un-div-inv76.4%
Applied egg-rr76.4%
Taylor expanded in F around inf 98.0%
Final simplification96.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.0016)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -7.5e-121)
(+
(* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B))
(* x (- (/ -1.0 B) (* B -0.3333333333333333))))
(if (<= F 1.9e-106)
(- (/ (* F F) (sin B)) t_0)
(if (<= F 6.3e-28)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.0016) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -7.5e-121) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333)));
} else if (F <= 1.9e-106) {
tmp = ((F * F) / sin(B)) - t_0;
} else if (F <= 6.3e-28) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else {
tmp = ((F / (F + (1.0 / F))) / 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.0016d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-7.5d-121)) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) + (x * (((-1.0d0) / b) - (b * (-0.3333333333333333d0))))
else if (f <= 1.9d-106) then
tmp = ((f * f) / sin(b)) - t_0
else if (f <= 6.3d-28) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
else
tmp = ((f / (f + (1.0d0 / f))) / 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.0016) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -7.5e-121) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333)));
} else if (F <= 1.9e-106) {
tmp = ((F * F) / Math.sin(B)) - t_0;
} else if (F <= 6.3e-28) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.0016: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -7.5e-121: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333))) elif F <= 1.9e-106: tmp = ((F * F) / math.sin(B)) - t_0 elif F <= 6.3e-28: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.0016) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -7.5e-121) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) + Float64(x * Float64(Float64(-1.0 / B) - Float64(B * -0.3333333333333333)))); elseif (F <= 1.9e-106) tmp = Float64(Float64(Float64(F * F) / sin(B)) - t_0); elseif (F <= 6.3e-28) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / 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.0016) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -7.5e-121) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333))); elseif (F <= 1.9e-106) tmp = ((F * F) / sin(B)) - t_0; elseif (F <= 6.3e-28) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; else tmp = ((F / (F + (1.0 / F))) / 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.0016], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -7.5e-121], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[(-1.0 / B), $MachinePrecision] - N[(B * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.9e-106], N[(N[(N[(F * F), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 6.3e-28], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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.0016:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -7.5 \cdot 10^{-121}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} + x \cdot \left(\frac{-1}{B} - B \cdot -0.3333333333333333\right)\\
\mathbf{elif}\;F \leq 1.9 \cdot 10^{-106}:\\
\;\;\;\;\frac{F \cdot F}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 6.3 \cdot 10^{-28}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.00160000000000000008Initial program 74.9%
distribute-lft-neg-in74.9%
+-commutative74.9%
cancel-sign-sub-inv74.9%
Simplified82.8%
Taylor expanded in x around 0 82.9%
associate-*l/82.9%
*-lft-identity82.9%
unpow282.9%
fma-udef82.9%
Simplified82.9%
Taylor expanded in F around -inf 99.8%
if -0.00160000000000000008 < F < -7.50000000000000027e-121Initial program 99.6%
Taylor expanded in B around 0 57.2%
Taylor expanded in B around 0 52.6%
if -7.50000000000000027e-121 < F < 1.9e-106Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
associate-*r/99.7%
sqrt-div99.7%
metadata-eval99.7%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in F around inf 84.5%
Taylor expanded in F around 0 84.5%
unpow284.5%
Simplified84.5%
if 1.9e-106 < F < 6.2999999999999997e-28Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.5%
*-rgt-identity99.5%
Simplified99.5%
Taylor expanded in B around 0 77.3%
Taylor expanded in F around 0 77.3%
if 6.2999999999999997e-28 < F Initial program 63.3%
distribute-lft-neg-in63.3%
+-commutative63.3%
cancel-sign-sub-inv63.3%
Simplified76.4%
Taylor expanded in x around 0 76.4%
associate-*l/76.4%
*-lft-identity76.4%
unpow276.4%
fma-udef76.4%
Simplified76.4%
associate-*r/76.4%
sqrt-div76.4%
metadata-eval76.4%
un-div-inv76.4%
Applied egg-rr76.4%
Taylor expanded in F around inf 98.0%
Final simplification89.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1500.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -5.5e-123)
(+
(* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B))
(* x (- (/ -1.0 B) (* B -0.3333333333333333))))
(if (<= F 8.6e-107)
(- (/ (/ F (+ F (/ 1.0 F))) B) t_0)
(if (<= F 4.1e-28)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) 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 <= -1500.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -5.5e-123) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333)));
} else if (F <= 8.6e-107) {
tmp = ((F / (F + (1.0 / F))) / B) - t_0;
} else if (F <= 4.1e-28) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / 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 <= (-1500.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-5.5d-123)) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) + (x * (((-1.0d0) / b) - (b * (-0.3333333333333333d0))))
else if (f <= 8.6d-107) then
tmp = ((f / (f + (1.0d0 / f))) / b) - t_0
else if (f <= 4.1d-28) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / 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 <= -1500.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -5.5e-123) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333)));
} else if (F <= 8.6e-107) {
tmp = ((F / (F + (1.0 / F))) / B) - t_0;
} else if (F <= 4.1e-28) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / 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 <= -1500.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -5.5e-123: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333))) elif F <= 8.6e-107: tmp = ((F / (F + (1.0 / F))) / B) - t_0 elif F <= 4.1e-28: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / 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 <= -1500.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -5.5e-123) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) + Float64(x * Float64(Float64(-1.0 / B) - Float64(B * -0.3333333333333333)))); elseif (F <= 8.6e-107) tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / B) - t_0); elseif (F <= 4.1e-28) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / 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 <= -1500.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -5.5e-123) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333))); elseif (F <= 8.6e-107) tmp = ((F / (F + (1.0 / F))) / B) - t_0; elseif (F <= 4.1e-28) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / 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, -1500.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -5.5e-123], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[(-1.0 / B), $MachinePrecision] - N[(B * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.6e-107], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 4.1e-28], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $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 -1500:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -5.5 \cdot 10^{-123}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} + x \cdot \left(\frac{-1}{B} - B \cdot -0.3333333333333333\right)\\
\mathbf{elif}\;F \leq 8.6 \cdot 10^{-107}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{B} - t_0\\
\mathbf{elif}\;F \leq 4.1 \cdot 10^{-28}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1500Initial program 74.9%
distribute-lft-neg-in74.9%
+-commutative74.9%
cancel-sign-sub-inv74.9%
Simplified82.8%
Taylor expanded in x around 0 82.9%
associate-*l/82.9%
*-lft-identity82.9%
unpow282.9%
fma-udef82.9%
Simplified82.9%
Taylor expanded in F around -inf 99.8%
if -1500 < F < -5.5e-123Initial program 99.6%
Taylor expanded in B around 0 57.2%
Taylor expanded in B around 0 52.6%
if -5.5e-123 < F < 8.5999999999999995e-107Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
associate-*r/99.7%
sqrt-div99.7%
metadata-eval99.7%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in F around inf 84.5%
Taylor expanded in B around 0 84.5%
associate-/r*84.5%
Simplified84.5%
if 8.5999999999999995e-107 < F < 4.1000000000000002e-28Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.5%
*-rgt-identity99.5%
Simplified99.5%
Taylor expanded in B around 0 77.3%
Taylor expanded in F around 0 77.3%
if 4.1000000000000002e-28 < F Initial program 63.3%
distribute-lft-neg-in63.3%
+-commutative63.3%
cancel-sign-sub-inv63.3%
Simplified76.4%
Taylor expanded in x around 0 76.4%
associate-*l/76.4%
*-lft-identity76.4%
unpow276.4%
fma-udef76.4%
Simplified76.4%
Taylor expanded in F around inf 97.8%
Final simplification89.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1500.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -3.6e-122)
(+
(* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B))
(* x (- (/ -1.0 B) (* B -0.3333333333333333))))
(if (<= F 5.8e-106)
(- (/ (* F F) (sin B)) t_0)
(if (<= F 1.5e-27)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) 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 <= -1500.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -3.6e-122) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333)));
} else if (F <= 5.8e-106) {
tmp = ((F * F) / sin(B)) - t_0;
} else if (F <= 1.5e-27) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / 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 <= (-1500.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-3.6d-122)) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) + (x * (((-1.0d0) / b) - (b * (-0.3333333333333333d0))))
else if (f <= 5.8d-106) then
tmp = ((f * f) / sin(b)) - t_0
else if (f <= 1.5d-27) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / 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 <= -1500.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -3.6e-122) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333)));
} else if (F <= 5.8e-106) {
tmp = ((F * F) / Math.sin(B)) - t_0;
} else if (F <= 1.5e-27) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / 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 <= -1500.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -3.6e-122: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333))) elif F <= 5.8e-106: tmp = ((F * F) / math.sin(B)) - t_0 elif F <= 1.5e-27: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / 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 <= -1500.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -3.6e-122) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) + Float64(x * Float64(Float64(-1.0 / B) - Float64(B * -0.3333333333333333)))); elseif (F <= 5.8e-106) tmp = Float64(Float64(Float64(F * F) / sin(B)) - t_0); elseif (F <= 1.5e-27) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / 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 <= -1500.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -3.6e-122) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333))); elseif (F <= 5.8e-106) tmp = ((F * F) / sin(B)) - t_0; elseif (F <= 1.5e-27) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / 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, -1500.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -3.6e-122], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[(-1.0 / B), $MachinePrecision] - N[(B * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.8e-106], N[(N[(N[(F * F), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.5e-27], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $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 -1500:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -3.6 \cdot 10^{-122}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} + x \cdot \left(\frac{-1}{B} - B \cdot -0.3333333333333333\right)\\
\mathbf{elif}\;F \leq 5.8 \cdot 10^{-106}:\\
\;\;\;\;\frac{F \cdot F}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.5 \cdot 10^{-27}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1500Initial program 74.9%
distribute-lft-neg-in74.9%
+-commutative74.9%
cancel-sign-sub-inv74.9%
Simplified82.8%
Taylor expanded in x around 0 82.9%
associate-*l/82.9%
*-lft-identity82.9%
unpow282.9%
fma-udef82.9%
Simplified82.9%
Taylor expanded in F around -inf 99.8%
if -1500 < F < -3.59999999999999994e-122Initial program 99.6%
Taylor expanded in B around 0 57.2%
Taylor expanded in B around 0 52.6%
if -3.59999999999999994e-122 < F < 5.8000000000000001e-106Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
associate-*r/99.7%
sqrt-div99.7%
metadata-eval99.7%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in F around inf 84.5%
Taylor expanded in F around 0 84.5%
unpow284.5%
Simplified84.5%
if 5.8000000000000001e-106 < F < 1.5000000000000001e-27Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.5%
*-rgt-identity99.5%
Simplified99.5%
Taylor expanded in B around 0 77.3%
Taylor expanded in F around 0 77.3%
if 1.5000000000000001e-27 < F Initial program 63.3%
distribute-lft-neg-in63.3%
+-commutative63.3%
cancel-sign-sub-inv63.3%
Simplified76.4%
Taylor expanded in x around 0 76.4%
associate-*l/76.4%
*-lft-identity76.4%
unpow276.4%
fma-udef76.4%
Simplified76.4%
Taylor expanded in F around inf 97.8%
Final simplification89.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.12e-10)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -4.8e-121)
(+
(* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B))
(* x (- (/ -1.0 B) (* B -0.3333333333333333))))
(if (or (<= F 3.9e-107) (not (<= F 3.15e-27)))
(- (/ (/ F (+ F (/ 1.0 F))) B) t_0)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.12e-10) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -4.8e-121) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333)));
} else if ((F <= 3.9e-107) || !(F <= 3.15e-27)) {
tmp = ((F / (F + (1.0 / F))) / B) - t_0;
} else {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.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 = x / tan(b)
if (f <= (-1.12d-10)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-4.8d-121)) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) + (x * (((-1.0d0) / b) - (b * (-0.3333333333333333d0))))
else if ((f <= 3.9d-107) .or. (.not. (f <= 3.15d-27))) then
tmp = ((f / (f + (1.0d0 / f))) / b) - t_0
else
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
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 <= -1.12e-10) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -4.8e-121) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333)));
} else if ((F <= 3.9e-107) || !(F <= 3.15e-27)) {
tmp = ((F / (F + (1.0 / F))) / B) - t_0;
} else {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.12e-10: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -4.8e-121: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333))) elif (F <= 3.9e-107) or not (F <= 3.15e-27): tmp = ((F / (F + (1.0 / F))) / B) - t_0 else: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.12e-10) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -4.8e-121) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) + Float64(x * Float64(Float64(-1.0 / B) - Float64(B * -0.3333333333333333)))); elseif ((F <= 3.9e-107) || !(F <= 3.15e-27)) tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / B) - t_0); else tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.12e-10) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -4.8e-121) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333))); elseif ((F <= 3.9e-107) || ~((F <= 3.15e-27))) tmp = ((F / (F + (1.0 / F))) / B) - t_0; else tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.12e-10], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -4.8e-121], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[(-1.0 / B), $MachinePrecision] - N[(B * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 3.9e-107], N[Not[LessEqual[F, 3.15e-27]], $MachinePrecision]], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.12 \cdot 10^{-10}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -4.8 \cdot 10^{-121}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} + x \cdot \left(\frac{-1}{B} - B \cdot -0.3333333333333333\right)\\
\mathbf{elif}\;F \leq 3.9 \cdot 10^{-107} \lor \neg \left(F \leq 3.15 \cdot 10^{-27}\right):\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\end{array}
\end{array}
if F < -1.12e-10Initial program 74.9%
distribute-lft-neg-in74.9%
+-commutative74.9%
cancel-sign-sub-inv74.9%
Simplified82.8%
Taylor expanded in x around 0 82.9%
associate-*l/82.9%
*-lft-identity82.9%
unpow282.9%
fma-udef82.9%
Simplified82.9%
Taylor expanded in F around -inf 99.8%
if -1.12e-10 < F < -4.80000000000000007e-121Initial program 99.6%
Taylor expanded in B around 0 57.2%
Taylor expanded in B around 0 52.6%
if -4.80000000000000007e-121 < F < 3.9000000000000001e-107 or 3.15000000000000005e-27 < F Initial program 82.1%
distribute-lft-neg-in82.1%
+-commutative82.1%
cancel-sign-sub-inv82.1%
Simplified88.5%
Taylor expanded in x around 0 88.5%
associate-*l/88.5%
*-lft-identity88.5%
unpow288.5%
fma-udef88.5%
Simplified88.5%
associate-*r/88.5%
sqrt-div88.5%
metadata-eval88.5%
un-div-inv88.5%
Applied egg-rr88.5%
Taylor expanded in F around inf 91.0%
Taylor expanded in B around 0 78.0%
associate-/r*78.0%
Simplified78.0%
if 3.9000000000000001e-107 < F < 3.15000000000000005e-27Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.5%
*-rgt-identity99.5%
Simplified99.5%
Taylor expanded in B around 0 77.3%
Taylor expanded in F around 0 77.3%
Final simplification81.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.3)
(- (/ -1.0 B) t_0)
(if (<= F -1.62e-124)
(+
(* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B))
(* x (- (/ -1.0 B) (* B -0.3333333333333333))))
(if (or (<= F 3.1e-106) (not (<= F 4.3e-29)))
(- (/ (/ F (+ F (/ 1.0 F))) B) t_0)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.3) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -1.62e-124) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333)));
} else if ((F <= 3.1e-106) || !(F <= 4.3e-29)) {
tmp = ((F / (F + (1.0 / F))) / B) - t_0;
} else {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.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 = x / tan(b)
if (f <= (-2.3d0)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-1.62d-124)) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) + (x * (((-1.0d0) / b) - (b * (-0.3333333333333333d0))))
else if ((f <= 3.1d-106) .or. (.not. (f <= 4.3d-29))) then
tmp = ((f / (f + (1.0d0 / f))) / b) - t_0
else
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
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 <= -2.3) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -1.62e-124) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333)));
} else if ((F <= 3.1e-106) || !(F <= 4.3e-29)) {
tmp = ((F / (F + (1.0 / F))) / B) - t_0;
} else {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -2.3: tmp = (-1.0 / B) - t_0 elif F <= -1.62e-124: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333))) elif (F <= 3.1e-106) or not (F <= 4.3e-29): tmp = ((F / (F + (1.0 / F))) / B) - t_0 else: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.3) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -1.62e-124) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) + Float64(x * Float64(Float64(-1.0 / B) - Float64(B * -0.3333333333333333)))); elseif ((F <= 3.1e-106) || !(F <= 4.3e-29)) tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / B) - t_0); else tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -2.3) tmp = (-1.0 / B) - t_0; elseif (F <= -1.62e-124) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333))); elseif ((F <= 3.1e-106) || ~((F <= 4.3e-29))) tmp = ((F / (F + (1.0 / F))) / B) - t_0; else tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.3], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -1.62e-124], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[(-1.0 / B), $MachinePrecision] - N[(B * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 3.1e-106], N[Not[LessEqual[F, 4.3e-29]], $MachinePrecision]], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.3:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq -1.62 \cdot 10^{-124}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} + x \cdot \left(\frac{-1}{B} - B \cdot -0.3333333333333333\right)\\
\mathbf{elif}\;F \leq 3.1 \cdot 10^{-106} \lor \neg \left(F \leq 4.3 \cdot 10^{-29}\right):\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\end{array}
\end{array}
if F < -2.2999999999999998Initial program 74.9%
distribute-lft-neg-in74.9%
+-commutative74.9%
cancel-sign-sub-inv74.9%
Simplified82.8%
Taylor expanded in x around 0 82.9%
associate-*l/82.9%
*-lft-identity82.9%
unpow282.9%
fma-udef82.9%
Simplified82.9%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 75.6%
if -2.2999999999999998 < F < -1.62000000000000006e-124Initial program 99.6%
Taylor expanded in B around 0 57.2%
Taylor expanded in B around 0 52.6%
if -1.62000000000000006e-124 < F < 3.09999999999999985e-106 or 4.2999999999999998e-29 < F Initial program 82.1%
distribute-lft-neg-in82.1%
+-commutative82.1%
cancel-sign-sub-inv82.1%
Simplified88.5%
Taylor expanded in x around 0 88.5%
associate-*l/88.5%
*-lft-identity88.5%
unpow288.5%
fma-udef88.5%
Simplified88.5%
associate-*r/88.5%
sqrt-div88.5%
metadata-eval88.5%
un-div-inv88.5%
Applied egg-rr88.5%
Taylor expanded in F around inf 91.0%
Taylor expanded in B around 0 78.0%
associate-/r*78.0%
Simplified78.0%
if 3.09999999999999985e-106 < F < 4.2999999999999998e-29Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.5%
*-rgt-identity99.5%
Simplified99.5%
Taylor expanded in B around 0 77.3%
Taylor expanded in F around 0 77.3%
Final simplification75.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.42e+20)
(- (/ -1.0 B) t_0)
(if (<= F -3.4e-77)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (or (<= F 1.25e-106) (not (<= F 6.6e-30)))
(- (/ (/ F (+ F (/ 1.0 F))) B) t_0)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.42e+20) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -3.4e-77) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if ((F <= 1.25e-106) || !(F <= 6.6e-30)) {
tmp = ((F / (F + (1.0 / F))) / B) - t_0;
} else {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.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 = x / tan(b)
if (f <= (-1.42d+20)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-3.4d-77)) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if ((f <= 1.25d-106) .or. (.not. (f <= 6.6d-30))) then
tmp = ((f / (f + (1.0d0 / f))) / b) - t_0
else
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
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 <= -1.42e+20) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -3.4e-77) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if ((F <= 1.25e-106) || !(F <= 6.6e-30)) {
tmp = ((F / (F + (1.0 / F))) / B) - t_0;
} else {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.42e+20: tmp = (-1.0 / B) - t_0 elif F <= -3.4e-77: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif (F <= 1.25e-106) or not (F <= 6.6e-30): tmp = ((F / (F + (1.0 / F))) / B) - t_0 else: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.42e+20) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -3.4e-77) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif ((F <= 1.25e-106) || !(F <= 6.6e-30)) tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / B) - t_0); else tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.42e+20) tmp = (-1.0 / B) - t_0; elseif (F <= -3.4e-77) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif ((F <= 1.25e-106) || ~((F <= 6.6e-30))) tmp = ((F / (F + (1.0 / F))) / B) - t_0; else tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.42e+20], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -3.4e-77], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 1.25e-106], N[Not[LessEqual[F, 6.6e-30]], $MachinePrecision]], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.42 \cdot 10^{+20}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq -3.4 \cdot 10^{-77}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.25 \cdot 10^{-106} \lor \neg \left(F \leq 6.6 \cdot 10^{-30}\right):\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\end{array}
\end{array}
if F < -1.42e20Initial program 73.3%
distribute-lft-neg-in73.3%
+-commutative73.3%
cancel-sign-sub-inv73.3%
Simplified81.7%
Taylor expanded in x around 0 81.8%
associate-*l/81.7%
*-lft-identity81.7%
unpow281.7%
fma-udef81.7%
Simplified81.7%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 75.5%
if -1.42e20 < F < -3.39999999999999983e-77Initial program 99.6%
Taylor expanded in B around 0 66.0%
Taylor expanded in B around 0 66.1%
if -3.39999999999999983e-77 < F < 1.24999999999999996e-106 or 6.6000000000000006e-30 < F Initial program 82.6%
distribute-lft-neg-in82.6%
+-commutative82.6%
cancel-sign-sub-inv82.6%
Simplified88.8%
Taylor expanded in x around 0 88.8%
associate-*l/88.8%
*-lft-identity88.8%
unpow288.8%
fma-udef88.8%
Simplified88.8%
associate-*r/88.8%
sqrt-div88.8%
metadata-eval88.8%
un-div-inv88.8%
Applied egg-rr88.8%
Taylor expanded in F around inf 88.9%
Taylor expanded in B around 0 76.3%
associate-/r*76.3%
Simplified76.3%
if 1.24999999999999996e-106 < F < 6.6000000000000006e-30Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.5%
*-rgt-identity99.5%
Simplified99.5%
Taylor expanded in B around 0 77.3%
Taylor expanded in F around 0 77.3%
Final simplification75.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -600000.0)
(- (/ -1.0 B) t_0)
(if (or (<= F -2.6e-83) (and (not (<= F 3.7e-106)) (<= F 3.1e-27)))
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(- (/ (/ F (+ F (/ 1.0 F))) B) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -600000.0) {
tmp = (-1.0 / B) - t_0;
} else if ((F <= -2.6e-83) || (!(F <= 3.7e-106) && (F <= 3.1e-27))) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else {
tmp = ((F / (F + (1.0 / F))) / 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 <= (-600000.0d0)) then
tmp = ((-1.0d0) / b) - t_0
else if ((f <= (-2.6d-83)) .or. (.not. (f <= 3.7d-106)) .and. (f <= 3.1d-27)) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
else
tmp = ((f / (f + (1.0d0 / f))) / 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 <= -600000.0) {
tmp = (-1.0 / B) - t_0;
} else if ((F <= -2.6e-83) || (!(F <= 3.7e-106) && (F <= 3.1e-27))) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else {
tmp = ((F / (F + (1.0 / F))) / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -600000.0: tmp = (-1.0 / B) - t_0 elif (F <= -2.6e-83) or (not (F <= 3.7e-106) and (F <= 3.1e-27)): tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B else: tmp = ((F / (F + (1.0 / F))) / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -600000.0) tmp = Float64(Float64(-1.0 / B) - t_0); elseif ((F <= -2.6e-83) || (!(F <= 3.7e-106) && (F <= 3.1e-27))) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -600000.0) tmp = (-1.0 / B) - t_0; elseif ((F <= -2.6e-83) || (~((F <= 3.7e-106)) && (F <= 3.1e-27))) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; else tmp = ((F / (F + (1.0 / F))) / 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, -600000.0], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[Or[LessEqual[F, -2.6e-83], And[N[Not[LessEqual[F, 3.7e-106]], $MachinePrecision], LessEqual[F, 3.1e-27]]], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -600000:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq -2.6 \cdot 10^{-83} \lor \neg \left(F \leq 3.7 \cdot 10^{-106}\right) \land F \leq 3.1 \cdot 10^{-27}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{B} - t_0\\
\end{array}
\end{array}
if F < -6e5Initial program 74.5%
distribute-lft-neg-in74.5%
+-commutative74.5%
cancel-sign-sub-inv74.5%
Simplified82.6%
Taylor expanded in x around 0 82.6%
associate-*l/82.6%
*-lft-identity82.6%
unpow282.6%
fma-udef82.6%
Simplified82.6%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 75.2%
if -6e5 < F < -2.60000000000000009e-83 or 3.69999999999999979e-106 < F < 3.0999999999999998e-27Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in B around 0 71.9%
Taylor expanded in F around 0 71.9%
if -2.60000000000000009e-83 < F < 3.69999999999999979e-106 or 3.0999999999999998e-27 < F Initial program 82.6%
distribute-lft-neg-in82.6%
+-commutative82.6%
cancel-sign-sub-inv82.6%
Simplified88.8%
Taylor expanded in x around 0 88.8%
associate-*l/88.8%
*-lft-identity88.8%
unpow288.8%
fma-udef88.8%
Simplified88.8%
associate-*r/88.8%
sqrt-div88.8%
metadata-eval88.8%
un-div-inv88.8%
Applied egg-rr88.8%
Taylor expanded in F around inf 88.9%
Taylor expanded in B around 0 76.3%
associate-/r*76.3%
Simplified76.3%
Final simplification75.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (t_1 (/ x (tan B))))
(if (<= F -600000.0)
(- (/ -1.0 B) t_1)
(if (<= F -2.25e-81)
(- (* t_0 (/ F B)) (/ x B))
(if (or (<= F 1.55e-106) (not (<= F 1.4e-28)))
(- (/ (/ F (+ F (/ 1.0 F))) B) t_1)
(/ (- (* F t_0) x) B))))))
double code(double F, double B, double x) {
double t_0 = sqrt((1.0 / (2.0 + (x * 2.0))));
double t_1 = x / tan(B);
double tmp;
if (F <= -600000.0) {
tmp = (-1.0 / B) - t_1;
} else if (F <= -2.25e-81) {
tmp = (t_0 * (F / B)) - (x / B);
} else if ((F <= 1.55e-106) || !(F <= 1.4e-28)) {
tmp = ((F / (F + (1.0 / F))) / B) - t_1;
} else {
tmp = ((F * t_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) :: t_1
real(8) :: tmp
t_0 = sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))
t_1 = x / tan(b)
if (f <= (-600000.0d0)) then
tmp = ((-1.0d0) / b) - t_1
else if (f <= (-2.25d-81)) then
tmp = (t_0 * (f / b)) - (x / b)
else if ((f <= 1.55d-106) .or. (.not. (f <= 1.4d-28))) then
tmp = ((f / (f + (1.0d0 / f))) / b) - t_1
else
tmp = ((f * t_0) - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.sqrt((1.0 / (2.0 + (x * 2.0))));
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -600000.0) {
tmp = (-1.0 / B) - t_1;
} else if (F <= -2.25e-81) {
tmp = (t_0 * (F / B)) - (x / B);
} else if ((F <= 1.55e-106) || !(F <= 1.4e-28)) {
tmp = ((F / (F + (1.0 / F))) / B) - t_1;
} else {
tmp = ((F * t_0) - x) / B;
}
return tmp;
}
def code(F, B, x): t_0 = math.sqrt((1.0 / (2.0 + (x * 2.0)))) t_1 = x / math.tan(B) tmp = 0 if F <= -600000.0: tmp = (-1.0 / B) - t_1 elif F <= -2.25e-81: tmp = (t_0 * (F / B)) - (x / B) elif (F <= 1.55e-106) or not (F <= 1.4e-28): tmp = ((F / (F + (1.0 / F))) / B) - t_1 else: tmp = ((F * t_0) - x) / B return tmp
function code(F, B, x) t_0 = sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -600000.0) tmp = Float64(Float64(-1.0 / B) - t_1); elseif (F <= -2.25e-81) tmp = Float64(Float64(t_0 * Float64(F / B)) - Float64(x / B)); elseif ((F <= 1.55e-106) || !(F <= 1.4e-28)) tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / B) - t_1); else tmp = Float64(Float64(Float64(F * t_0) - x) / B); end return tmp end
function tmp_2 = code(F, B, x) t_0 = sqrt((1.0 / (2.0 + (x * 2.0)))); t_1 = x / tan(B); tmp = 0.0; if (F <= -600000.0) tmp = (-1.0 / B) - t_1; elseif (F <= -2.25e-81) tmp = (t_0 * (F / B)) - (x / B); elseif ((F <= 1.55e-106) || ~((F <= 1.4e-28))) tmp = ((F / (F + (1.0 / F))) / B) - t_1; else tmp = ((F * t_0) - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -600000.0], N[(N[(-1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -2.25e-81], N[(N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 1.55e-106], N[Not[LessEqual[F, 1.4e-28]], $MachinePrecision]], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(F * t$95$0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{2 + x \cdot 2}}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -600000:\\
\;\;\;\;\frac{-1}{B} - t_1\\
\mathbf{elif}\;F \leq -2.25 \cdot 10^{-81}:\\
\;\;\;\;t_0 \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.55 \cdot 10^{-106} \lor \neg \left(F \leq 1.4 \cdot 10^{-28}\right):\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{B} - t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{F \cdot t_0 - x}{B}\\
\end{array}
\end{array}
if F < -6e5Initial program 74.5%
distribute-lft-neg-in74.5%
+-commutative74.5%
cancel-sign-sub-inv74.5%
Simplified82.6%
Taylor expanded in x around 0 82.6%
associate-*l/82.6%
*-lft-identity82.6%
unpow282.6%
fma-udef82.6%
Simplified82.6%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 75.2%
if -6e5 < F < -2.25e-81Initial program 99.6%
distribute-lft-neg-in99.6%
+-commutative99.6%
fma-def99.6%
+-commutative99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
metadata-eval99.6%
metadata-eval99.6%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in B around 0 65.3%
Taylor expanded in F around 0 65.5%
if -2.25e-81 < F < 1.54999999999999993e-106 or 1.3999999999999999e-28 < F Initial program 82.6%
distribute-lft-neg-in82.6%
+-commutative82.6%
cancel-sign-sub-inv82.6%
Simplified88.8%
Taylor expanded in x around 0 88.8%
associate-*l/88.8%
*-lft-identity88.8%
unpow288.8%
fma-udef88.8%
Simplified88.8%
associate-*r/88.8%
sqrt-div88.8%
metadata-eval88.8%
un-div-inv88.8%
Applied egg-rr88.8%
Taylor expanded in F around inf 88.9%
Taylor expanded in B around 0 76.3%
associate-/r*76.3%
Simplified76.3%
if 1.54999999999999993e-106 < F < 1.3999999999999999e-28Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.5%
*-rgt-identity99.5%
Simplified99.5%
Taylor expanded in B around 0 77.3%
Taylor expanded in F around 0 77.3%
Final simplification75.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -5.7e-40)
(- (/ -1.0 B) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) B) t_0))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -5.7e-40) {
tmp = (-1.0 / B) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / 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 <= (-5.7d-40)) then
tmp = ((-1.0d0) / b) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / 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 <= -5.7e-40) {
tmp = (-1.0 / B) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -5.7e-40: tmp = (-1.0 / B) - t_0 else: tmp = ((F / (F + (1.0 / F))) / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -5.7e-40) tmp = Float64(Float64(-1.0 / B) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -5.7e-40) tmp = (-1.0 / B) - t_0; else tmp = ((F / (F + (1.0 / F))) / 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, -5.7e-40], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5.7 \cdot 10^{-40}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{B} - t_0\\
\end{array}
\end{array}
if F < -5.69999999999999984e-40Initial program 77.7%
distribute-lft-neg-in77.7%
+-commutative77.7%
cancel-sign-sub-inv77.7%
Simplified84.7%
Taylor expanded in x around 0 84.7%
associate-*l/84.7%
*-lft-identity84.7%
unpow284.7%
fma-udef84.7%
Simplified84.7%
Taylor expanded in F around -inf 89.6%
Taylor expanded in B around 0 67.8%
if -5.69999999999999984e-40 < F Initial program 84.6%
distribute-lft-neg-in84.6%
+-commutative84.6%
cancel-sign-sub-inv84.6%
Simplified90.1%
Taylor expanded in x around 0 90.1%
associate-*l/90.1%
*-lft-identity90.1%
unpow290.1%
fma-udef90.1%
Simplified90.1%
associate-*r/90.1%
sqrt-div90.1%
metadata-eval90.1%
un-div-inv90.1%
Applied egg-rr90.1%
Taylor expanded in F around inf 83.4%
Taylor expanded in B around 0 72.3%
associate-/r*72.3%
Simplified72.3%
Final simplification71.1%
(FPCore (F B x) :precision binary64 (if (or (<= x -104000000000.0) (not (<= x 7.5e+36))) (- (* B 0.16666666666666666) (/ x (tan B))) (/ (- (/ F (+ F (/ 1.0 F))) x) B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -104000000000.0) || !(x <= 7.5e+36)) {
tmp = (B * 0.16666666666666666) - (x / tan(B));
} else {
tmp = ((F / (F + (1.0 / F))) - 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 ((x <= (-104000000000.0d0)) .or. (.not. (x <= 7.5d+36))) then
tmp = (b * 0.16666666666666666d0) - (x / tan(b))
else
tmp = ((f / (f + (1.0d0 / f))) - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -104000000000.0) || !(x <= 7.5e+36)) {
tmp = (B * 0.16666666666666666) - (x / Math.tan(B));
} else {
tmp = ((F / (F + (1.0 / F))) - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -104000000000.0) or not (x <= 7.5e+36): tmp = (B * 0.16666666666666666) - (x / math.tan(B)) else: tmp = ((F / (F + (1.0 / F))) - x) / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -104000000000.0) || !(x <= 7.5e+36)) tmp = Float64(Float64(B * 0.16666666666666666) - Float64(x / tan(B))); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -104000000000.0) || ~((x <= 7.5e+36))) tmp = (B * 0.16666666666666666) - (x / tan(B)); else tmp = ((F / (F + (1.0 / F))) - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -104000000000.0], N[Not[LessEqual[x, 7.5e+36]], $MachinePrecision]], N[(N[(B * 0.16666666666666666), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -104000000000 \lor \neg \left(x \leq 7.5 \cdot 10^{+36}\right):\\
\;\;\;\;B \cdot 0.16666666666666666 - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}} - x}{B}\\
\end{array}
\end{array}
if x < -1.04e11 or 7.50000000000000054e36 < x Initial program 89.3%
distribute-lft-neg-in89.3%
+-commutative89.3%
cancel-sign-sub-inv89.3%
Simplified99.8%
Taylor expanded in F around inf 91.4%
Taylor expanded in B around 0 69.8%
Taylor expanded in B around inf 79.0%
*-commutative79.0%
Simplified79.0%
if -1.04e11 < x < 7.50000000000000054e36Initial program 79.3%
distribute-lft-neg-in79.3%
+-commutative79.3%
cancel-sign-sub-inv79.3%
Simplified82.8%
Taylor expanded in x around 0 82.9%
associate-*l/82.8%
*-lft-identity82.8%
unpow282.8%
fma-udef82.8%
Simplified82.8%
associate-*r/82.9%
sqrt-div82.9%
metadata-eval82.9%
un-div-inv82.9%
Applied egg-rr82.9%
Taylor expanded in F around inf 58.3%
Taylor expanded in B around 0 29.0%
Final simplification46.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ F (/ 1.0 F))))
(if (or (<= B -0.0028) (not (<= B 2.15e-11)))
(- (/ -1.0 B) (/ x (tan B)))
(-
(+
(/ F (* B t_0))
(* B (- (* x 0.3333333333333333) (* (/ F t_0) -0.16666666666666666))))
(/ x B)))))
double code(double F, double B, double x) {
double t_0 = F + (1.0 / F);
double tmp;
if ((B <= -0.0028) || !(B <= 2.15e-11)) {
tmp = (-1.0 / B) - (x / tan(B));
} else {
tmp = ((F / (B * t_0)) + (B * ((x * 0.3333333333333333) - ((F / t_0) * -0.16666666666666666)))) - (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 = f + (1.0d0 / f)
if ((b <= (-0.0028d0)) .or. (.not. (b <= 2.15d-11))) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else
tmp = ((f / (b * t_0)) + (b * ((x * 0.3333333333333333d0) - ((f / t_0) * (-0.16666666666666666d0))))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = F + (1.0 / F);
double tmp;
if ((B <= -0.0028) || !(B <= 2.15e-11)) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else {
tmp = ((F / (B * t_0)) + (B * ((x * 0.3333333333333333) - ((F / t_0) * -0.16666666666666666)))) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = F + (1.0 / F) tmp = 0 if (B <= -0.0028) or not (B <= 2.15e-11): tmp = (-1.0 / B) - (x / math.tan(B)) else: tmp = ((F / (B * t_0)) + (B * ((x * 0.3333333333333333) - ((F / t_0) * -0.16666666666666666)))) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(F + Float64(1.0 / F)) tmp = 0.0 if ((B <= -0.0028) || !(B <= 2.15e-11)) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); else tmp = Float64(Float64(Float64(F / Float64(B * t_0)) + Float64(B * Float64(Float64(x * 0.3333333333333333) - Float64(Float64(F / t_0) * -0.16666666666666666)))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = F + (1.0 / F); tmp = 0.0; if ((B <= -0.0028) || ~((B <= 2.15e-11))) tmp = (-1.0 / B) - (x / tan(B)); else tmp = ((F / (B * t_0)) + (B * ((x * 0.3333333333333333) - ((F / t_0) * -0.16666666666666666)))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[B, -0.0028], N[Not[LessEqual[B, 2.15e-11]], $MachinePrecision]], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(F / N[(B * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] - N[(N[(F / t$95$0), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := F + \frac{1}{F}\\
\mathbf{if}\;B \leq -0.0028 \lor \neg \left(B \leq 2.15 \cdot 10^{-11}\right):\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{F}{B \cdot t_0} + B \cdot \left(x \cdot 0.3333333333333333 - \frac{F}{t_0} \cdot -0.16666666666666666\right)\right) - \frac{x}{B}\\
\end{array}
\end{array}
if B < -0.00279999999999999997 or 2.15000000000000001e-11 < B Initial program 88.0%
distribute-lft-neg-in88.0%
+-commutative88.0%
cancel-sign-sub-inv88.0%
Simplified88.0%
Taylor expanded in x around 0 88.1%
associate-*l/88.0%
*-lft-identity88.0%
unpow288.0%
fma-udef88.0%
Simplified88.0%
Taylor expanded in F around -inf 51.7%
Taylor expanded in B around 0 54.0%
if -0.00279999999999999997 < B < 2.15000000000000001e-11Initial program 77.3%
distribute-lft-neg-in77.3%
+-commutative77.3%
cancel-sign-sub-inv77.3%
Simplified89.2%
Taylor expanded in x around 0 89.2%
associate-*l/89.2%
*-lft-identity89.2%
unpow289.2%
fma-udef89.2%
Simplified89.2%
associate-*r/89.2%
sqrt-div89.2%
metadata-eval89.2%
un-div-inv89.2%
Applied egg-rr89.2%
Taylor expanded in F around inf 69.3%
Taylor expanded in B around 0 69.2%
Final simplification61.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.9e-249)
(- (/ -1.0 B) t_0)
(if (<= F 5e-149) (/ (- x) B) (- (/ 1.0 B) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.9e-249) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 5e-149) {
tmp = -x / B;
} else {
tmp = (1.0 / 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 <= (-1.9d-249)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= 5d-149) then
tmp = -x / b
else
tmp = (1.0d0 / 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 <= -1.9e-249) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 5e-149) {
tmp = -x / B;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.9e-249: tmp = (-1.0 / B) - t_0 elif F <= 5e-149: tmp = -x / B else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.9e-249) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= 5e-149) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.9e-249) tmp = (-1.0 / B) - t_0; elseif (F <= 5e-149) tmp = -x / B; else tmp = (1.0 / 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, -1.9e-249], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 5e-149], N[((-x) / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.9 \cdot 10^{-249}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq 5 \cdot 10^{-149}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -1.9e-249Initial program 85.7%
distribute-lft-neg-in85.7%
+-commutative85.7%
cancel-sign-sub-inv85.7%
Simplified90.1%
Taylor expanded in x around 0 90.2%
associate-*l/90.1%
*-lft-identity90.1%
unpow290.1%
fma-udef90.1%
Simplified90.1%
Taylor expanded in F around -inf 71.2%
Taylor expanded in B around 0 61.6%
if -1.9e-249 < F < 4.99999999999999968e-149Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.8%
*-rgt-identity99.8%
Simplified99.8%
Taylor expanded in F around 0 90.8%
mul-1-neg90.8%
*-commutative90.8%
associate-*l/90.8%
*-commutative90.8%
Simplified90.8%
Taylor expanded in B around 0 56.9%
if 4.99999999999999968e-149 < F Initial program 72.5%
distribute-lft-neg-in72.5%
+-commutative72.5%
cancel-sign-sub-inv72.5%
Simplified82.3%
Taylor expanded in F around inf 80.2%
Taylor expanded in B around 0 65.1%
Final simplification62.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ F (/ 1.0 F))))
(if (<= F -7e-52)
(- (/ -1.0 B) (/ x B))
(-
(+
(/ F (* B t_0))
(* B (- (* x 0.3333333333333333) (* (/ F t_0) -0.16666666666666666))))
(/ x B)))))
double code(double F, double B, double x) {
double t_0 = F + (1.0 / F);
double tmp;
if (F <= -7e-52) {
tmp = (-1.0 / B) - (x / B);
} else {
tmp = ((F / (B * t_0)) + (B * ((x * 0.3333333333333333) - ((F / t_0) * -0.16666666666666666)))) - (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 = f + (1.0d0 / f)
if (f <= (-7d-52)) then
tmp = ((-1.0d0) / b) - (x / b)
else
tmp = ((f / (b * t_0)) + (b * ((x * 0.3333333333333333d0) - ((f / t_0) * (-0.16666666666666666d0))))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = F + (1.0 / F);
double tmp;
if (F <= -7e-52) {
tmp = (-1.0 / B) - (x / B);
} else {
tmp = ((F / (B * t_0)) + (B * ((x * 0.3333333333333333) - ((F / t_0) * -0.16666666666666666)))) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = F + (1.0 / F) tmp = 0 if F <= -7e-52: tmp = (-1.0 / B) - (x / B) else: tmp = ((F / (B * t_0)) + (B * ((x * 0.3333333333333333) - ((F / t_0) * -0.16666666666666666)))) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(F + Float64(1.0 / F)) tmp = 0.0 if (F <= -7e-52) tmp = Float64(Float64(-1.0 / B) - Float64(x / B)); else tmp = Float64(Float64(Float64(F / Float64(B * t_0)) + Float64(B * Float64(Float64(x * 0.3333333333333333) - Float64(Float64(F / t_0) * -0.16666666666666666)))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = F + (1.0 / F); tmp = 0.0; if (F <= -7e-52) tmp = (-1.0 / B) - (x / B); else tmp = ((F / (B * t_0)) + (B * ((x * 0.3333333333333333) - ((F / t_0) * -0.16666666666666666)))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7e-52], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(N[(F / N[(B * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] - N[(N[(F / t$95$0), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := F + \frac{1}{F}\\
\mathbf{if}\;F \leq -7 \cdot 10^{-52}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{F}{B \cdot t_0} + B \cdot \left(x \cdot 0.3333333333333333 - \frac{F}{t_0} \cdot -0.16666666666666666\right)\right) - \frac{x}{B}\\
\end{array}
\end{array}
if F < -7.0000000000000001e-52Initial program 77.7%
Taylor expanded in B around 0 56.1%
Taylor expanded in F around -inf 67.8%
Taylor expanded in B around 0 43.7%
if -7.0000000000000001e-52 < F Initial program 84.6%
distribute-lft-neg-in84.6%
+-commutative84.6%
cancel-sign-sub-inv84.6%
Simplified90.1%
Taylor expanded in x around 0 90.1%
associate-*l/90.1%
*-lft-identity90.1%
unpow290.1%
fma-udef90.1%
Simplified90.1%
associate-*r/90.1%
sqrt-div90.1%
metadata-eval90.1%
un-div-inv90.1%
Applied egg-rr90.1%
Taylor expanded in F around inf 83.4%
Taylor expanded in B around 0 44.0%
Final simplification43.9%
(FPCore (F B x)
:precision binary64
(if (<= F -4.5e-49)
(- (/ -1.0 B) (/ x B))
(if (<= F 1.7e-6)
(- (/ (- x) B) (* B (* x -0.3333333333333333)))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.5e-49) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 1.7e-6) {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
} 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 <= (-4.5d-49)) then
tmp = ((-1.0d0) / b) - (x / b)
else if (f <= 1.7d-6) then
tmp = (-x / b) - (b * (x * (-0.3333333333333333d0)))
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 <= -4.5e-49) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 1.7e-6) {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.5e-49: tmp = (-1.0 / B) - (x / B) elif F <= 1.7e-6: tmp = (-x / B) - (B * (x * -0.3333333333333333)) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.5e-49) tmp = Float64(Float64(-1.0 / B) - Float64(x / B)); elseif (F <= 1.7e-6) tmp = Float64(Float64(Float64(-x) / B) - Float64(B * Float64(x * -0.3333333333333333))); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4.5e-49) tmp = (-1.0 / B) - (x / B); elseif (F <= 1.7e-6) tmp = (-x / B) - (B * (x * -0.3333333333333333)); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.5e-49], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.7e-6], N[(N[((-x) / B), $MachinePrecision] - N[(B * N[(x * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.5 \cdot 10^{-49}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.7 \cdot 10^{-6}:\\
\;\;\;\;\frac{-x}{B} - B \cdot \left(x \cdot -0.3333333333333333\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -4.5000000000000002e-49Initial program 77.7%
Taylor expanded in B around 0 56.1%
Taylor expanded in F around -inf 67.8%
Taylor expanded in B around 0 43.7%
if -4.5000000000000002e-49 < F < 1.70000000000000003e-6Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 72.5%
mul-1-neg72.5%
*-commutative72.5%
associate-*l/72.5%
*-commutative72.5%
Simplified72.5%
Taylor expanded in B around 0 42.2%
*-commutative42.2%
distribute-rgt-out--42.2%
metadata-eval42.2%
Simplified42.2%
if 1.70000000000000003e-6 < F Initial program 62.3%
distribute-lft-neg-in62.3%
+-commutative62.3%
fma-def62.3%
+-commutative62.3%
*-commutative62.3%
fma-def62.3%
fma-def62.3%
metadata-eval62.3%
metadata-eval62.3%
associate-*r/62.4%
*-rgt-identity62.4%
Simplified62.4%
Taylor expanded in B around 0 37.8%
Taylor expanded in F around inf 46.3%
neg-mul-146.3%
unsub-neg46.3%
Simplified46.3%
Final simplification43.8%
(FPCore (F B x) :precision binary64 (if (<= F -4.1e-50) (- (/ -1.0 B) (/ x B)) (/ (- (/ F (+ F (/ 1.0 F))) x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.1e-50) {
tmp = (-1.0 / B) - (x / B);
} else {
tmp = ((F / (F + (1.0 / F))) - 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.1d-50)) then
tmp = ((-1.0d0) / b) - (x / b)
else
tmp = ((f / (f + (1.0d0 / f))) - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4.1e-50) {
tmp = (-1.0 / B) - (x / B);
} else {
tmp = ((F / (F + (1.0 / F))) - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.1e-50: tmp = (-1.0 / B) - (x / B) else: tmp = ((F / (F + (1.0 / F))) - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.1e-50) tmp = Float64(Float64(-1.0 / B) - Float64(x / B)); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4.1e-50) tmp = (-1.0 / B) - (x / B); else tmp = ((F / (F + (1.0 / F))) - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.1e-50], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.1 \cdot 10^{-50}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}} - x}{B}\\
\end{array}
\end{array}
if F < -4.09999999999999985e-50Initial program 77.7%
Taylor expanded in B around 0 56.1%
Taylor expanded in F around -inf 67.8%
Taylor expanded in B around 0 43.7%
if -4.09999999999999985e-50 < F Initial program 84.6%
distribute-lft-neg-in84.6%
+-commutative84.6%
cancel-sign-sub-inv84.6%
Simplified90.1%
Taylor expanded in x around 0 90.1%
associate-*l/90.1%
*-lft-identity90.1%
unpow290.1%
fma-udef90.1%
Simplified90.1%
associate-*r/90.1%
sqrt-div90.1%
metadata-eval90.1%
un-div-inv90.1%
Applied egg-rr90.1%
Taylor expanded in F around inf 83.4%
Taylor expanded in B around 0 43.8%
Final simplification43.8%
(FPCore (F B x) :precision binary64 (if (<= F -185000000.0) (/ -1.0 B) (if (<= F 1.65e-71) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -185000000.0) {
tmp = -1.0 / B;
} else if (F <= 1.65e-71) {
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 <= (-185000000.0d0)) then
tmp = (-1.0d0) / b
else if (f <= 1.65d-71) 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 <= -185000000.0) {
tmp = -1.0 / B;
} else if (F <= 1.65e-71) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -185000000.0: tmp = -1.0 / B elif F <= 1.65e-71: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -185000000.0) tmp = Float64(-1.0 / B); elseif (F <= 1.65e-71) tmp = Float64(Float64(-x) / 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 <= -185000000.0) tmp = -1.0 / B; elseif (F <= 1.65e-71) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -185000000.0], N[(-1.0 / B), $MachinePrecision], If[LessEqual[F, 1.65e-71], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -185000000:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{elif}\;F \leq 1.65 \cdot 10^{-71}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.85e8Initial program 74.5%
Taylor expanded in B around 0 56.0%
Taylor expanded in F around -inf 75.2%
Taylor expanded in x around 0 28.0%
if -1.85e8 < F < 1.6500000000000001e-71Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 70.8%
mul-1-neg70.8%
*-commutative70.8%
associate-*l/70.8%
*-commutative70.8%
Simplified70.8%
Taylor expanded in B around 0 40.8%
if 1.6500000000000001e-71 < F Initial program 66.3%
distribute-lft-neg-in66.3%
+-commutative66.3%
fma-def66.3%
+-commutative66.3%
*-commutative66.3%
fma-def66.3%
fma-def66.3%
metadata-eval66.3%
metadata-eval66.3%
associate-*r/66.4%
*-rgt-identity66.4%
Simplified66.4%
Taylor expanded in B around 0 40.4%
Taylor expanded in F around inf 44.7%
neg-mul-144.7%
unsub-neg44.7%
Simplified44.7%
Final simplification38.9%
(FPCore (F B x) :precision binary64 (if (<= F -7.2e-40) (/ (- -1.0 x) B) (if (<= F 8.5e-71) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.2e-40) {
tmp = (-1.0 - x) / B;
} else if (F <= 8.5e-71) {
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 <= (-7.2d-40)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 8.5d-71) 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 <= -7.2e-40) {
tmp = (-1.0 - x) / B;
} else if (F <= 8.5e-71) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.2e-40: tmp = (-1.0 - x) / B elif F <= 8.5e-71: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.2e-40) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 8.5e-71) tmp = Float64(Float64(-x) / 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 <= -7.2e-40) tmp = (-1.0 - x) / B; elseif (F <= 8.5e-71) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.2e-40], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 8.5e-71], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.2 \cdot 10^{-40}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{-71}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -7.2e-40Initial program 77.7%
distribute-lft-neg-in77.7%
+-commutative77.7%
cancel-sign-sub-inv77.7%
Simplified84.7%
Taylor expanded in x around 0 84.7%
associate-*l/84.7%
*-lft-identity84.7%
unpow284.7%
fma-udef84.7%
Simplified84.7%
Taylor expanded in F around -inf 89.6%
Taylor expanded in B around 0 43.7%
mul-1-neg43.7%
Simplified43.7%
if -7.2e-40 < F < 8.49999999999999988e-71Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 75.7%
mul-1-neg75.7%
*-commutative75.7%
associate-*l/75.7%
*-commutative75.7%
Simplified75.7%
Taylor expanded in B around 0 43.1%
if 8.49999999999999988e-71 < F Initial program 66.3%
distribute-lft-neg-in66.3%
+-commutative66.3%
fma-def66.3%
+-commutative66.3%
*-commutative66.3%
fma-def66.3%
fma-def66.3%
metadata-eval66.3%
metadata-eval66.3%
associate-*r/66.4%
*-rgt-identity66.4%
Simplified66.4%
Taylor expanded in B around 0 40.4%
Taylor expanded in F around inf 44.7%
neg-mul-144.7%
unsub-neg44.7%
Simplified44.7%
Final simplification43.8%
(FPCore (F B x) :precision binary64 (if (<= F -2e-42) (- (/ -1.0 B) (/ x B)) (if (<= F 1.28e-70) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2e-42) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 1.28e-70) {
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 <= (-2d-42)) then
tmp = ((-1.0d0) / b) - (x / b)
else if (f <= 1.28d-70) 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 <= -2e-42) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 1.28e-70) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2e-42: tmp = (-1.0 / B) - (x / B) elif F <= 1.28e-70: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2e-42) tmp = Float64(Float64(-1.0 / B) - Float64(x / B)); elseif (F <= 1.28e-70) tmp = Float64(Float64(-x) / 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 <= -2e-42) tmp = (-1.0 / B) - (x / B); elseif (F <= 1.28e-70) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2e-42], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.28e-70], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2 \cdot 10^{-42}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.28 \cdot 10^{-70}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.00000000000000008e-42Initial program 77.7%
Taylor expanded in B around 0 56.1%
Taylor expanded in F around -inf 67.8%
Taylor expanded in B around 0 43.7%
if -2.00000000000000008e-42 < F < 1.28e-70Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 75.7%
mul-1-neg75.7%
*-commutative75.7%
associate-*l/75.7%
*-commutative75.7%
Simplified75.7%
Taylor expanded in B around 0 43.1%
if 1.28e-70 < F Initial program 66.3%
distribute-lft-neg-in66.3%
+-commutative66.3%
fma-def66.3%
+-commutative66.3%
*-commutative66.3%
fma-def66.3%
fma-def66.3%
metadata-eval66.3%
metadata-eval66.3%
associate-*r/66.4%
*-rgt-identity66.4%
Simplified66.4%
Taylor expanded in B around 0 40.4%
Taylor expanded in F around inf 44.7%
neg-mul-144.7%
unsub-neg44.7%
Simplified44.7%
Final simplification43.8%
(FPCore (F B x) :precision binary64 (if (<= F 4.8e+27) (/ -1.0 B) (/ 1.0 B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 4.8e+27) {
tmp = -1.0 / 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 (f <= 4.8d+27) then
tmp = (-1.0d0) / 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 (F <= 4.8e+27) {
tmp = -1.0 / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 4.8e+27: tmp = -1.0 / B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 4.8e+27) tmp = Float64(-1.0 / B); else tmp = Float64(1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= 4.8e+27) tmp = -1.0 / B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 4.8e+27], N[(-1.0 / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 4.8 \cdot 10^{+27}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < 4.79999999999999995e27Initial program 91.1%
Taylor expanded in B around 0 76.1%
Taylor expanded in F around -inf 53.1%
Taylor expanded in x around 0 12.4%
if 4.79999999999999995e27 < F Initial program 61.2%
distribute-lft-neg-in61.2%
+-commutative61.2%
fma-def61.3%
+-commutative61.3%
*-commutative61.3%
fma-def61.3%
fma-def61.3%
metadata-eval61.3%
metadata-eval61.3%
associate-*r/61.3%
*-rgt-identity61.3%
Simplified61.3%
Taylor expanded in B around 0 37.4%
Taylor expanded in F around inf 46.2%
neg-mul-146.2%
unsub-neg46.2%
Simplified46.2%
Taylor expanded in x around 0 22.7%
Final simplification15.3%
(FPCore (F B x) :precision binary64 (/ (- x) B))
double code(double F, double B, double x) {
return -x / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -x / b
end function
public static double code(double F, double B, double x) {
return -x / B;
}
def code(F, B, x): return -x / B
function code(F, B, x) return Float64(Float64(-x) / B) end
function tmp = code(F, B, x) tmp = -x / B; end
code[F_, B_, x_] := N[((-x) / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-x}{B}
\end{array}
Initial program 82.7%
distribute-lft-neg-in82.7%
+-commutative82.7%
fma-def82.7%
+-commutative82.7%
*-commutative82.7%
fma-def82.7%
fma-def82.7%
metadata-eval82.7%
metadata-eval82.7%
associate-*r/82.8%
*-rgt-identity82.8%
Simplified82.8%
Taylor expanded in F around 0 58.7%
mul-1-neg58.7%
*-commutative58.7%
associate-*l/58.7%
*-commutative58.7%
Simplified58.7%
Taylor expanded in B around 0 31.5%
Final simplification31.5%
(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 82.7%
Taylor expanded in B around 0 68.6%
Taylor expanded in F around -inf 52.8%
Taylor expanded in x around 0 9.6%
Final simplification9.6%
herbie shell --seed 2023272
(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))))))