
(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 21 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%
clear-num72.6%
inv-pow72.6%
fma-def72.6%
fma-udef72.6%
*-commutative72.6%
fma-def72.6%
fma-def72.6%
Applied egg-rr72.6%
unpow-172.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%
clear-num75.4%
inv-pow75.4%
fma-def75.4%
fma-udef75.4%
*-commutative75.4%
fma-def75.4%
fma-def75.4%
Applied egg-rr75.4%
unpow-175.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 -104000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 115000000.0)
(- (* F (/ 1.0 (/ (sin B) (pow (fma 2.0 x (fma F F 2.0)) -0.5)))) 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 <= -104000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 115000000.0) {
tmp = (F * (1.0 / (sin(B) / pow(fma(2.0, x, fma(F, F, 2.0)), -0.5)))) - 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 <= -104000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 115000000.0) tmp = Float64(Float64(F * Float64(1.0 / Float64(sin(B) / (fma(2.0, x, fma(F, F, 2.0)) ^ -0.5)))) - 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, -104000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 115000000.0], N[(N[(F * N[(1.0 / N[(N[Sin[B], $MachinePrecision] / N[Power[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -104000000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 115000000:\\
\;\;\;\;F \cdot \frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.04e8Initial program 74.5%
distribute-lft-neg-in74.5%
+-commutative74.5%
cancel-sign-sub-inv74.5%
Simplified82.6%
clear-num82.5%
inv-pow82.5%
fma-def82.5%
fma-udef82.5%
*-commutative82.5%
fma-def82.5%
fma-def82.5%
Applied egg-rr82.5%
unpow-182.5%
Simplified82.5%
Taylor expanded in F around -inf 99.8%
if -1.04e8 < F < 1.15e8Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.6%
clear-num99.6%
inv-pow99.6%
fma-def99.6%
fma-udef99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
Applied egg-rr99.6%
unpow-199.6%
Simplified99.6%
if 1.15e8 < F Initial program 61.8%
distribute-lft-neg-in61.8%
+-commutative61.8%
cancel-sign-sub-inv61.8%
Simplified75.4%
clear-num75.4%
inv-pow75.4%
fma-def75.4%
fma-udef75.4%
*-commutative75.4%
fma-def75.4%
fma-def75.4%
Applied egg-rr75.4%
unpow-175.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 -7e+15)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 200000000.0)
(- (* F (/ (pow (fma x 2.0 (fma F F 2.0)) -0.5) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -7e+15) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 200000000.0) {
tmp = (F * (pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) / 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 <= -7e+15) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 200000000.0) tmp = Float64(Float64(F * Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) / 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, -7e+15], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 200000000.0], N[(N[(F * N[(N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -7 \cdot 10^{+15}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 200000000:\\
\;\;\;\;F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -7e15Initial program 73.7%
distribute-lft-neg-in73.7%
+-commutative73.7%
cancel-sign-sub-inv73.7%
Simplified82.0%
clear-num81.9%
inv-pow81.9%
fma-def81.9%
fma-udef81.9%
*-commutative81.9%
fma-def81.9%
fma-def81.9%
Applied egg-rr81.9%
unpow-181.9%
Simplified81.9%
Taylor expanded in F around -inf 99.8%
if -7e15 < F < 2e8Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.6%
if 2e8 < F Initial program 61.8%
distribute-lft-neg-in61.8%
+-commutative61.8%
cancel-sign-sub-inv61.8%
Simplified75.4%
clear-num75.4%
inv-pow75.4%
fma-def75.4%
fma-udef75.4%
*-commutative75.4%
fma-def75.4%
fma-def75.4%
Applied egg-rr75.4%
unpow-175.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 -1.7e+110)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 50.0)
(- (/ (/ F (sin B)) (sqrt (fma 2.0 x (fma F F 2.0)))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.7e+110) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 50.0) {
tmp = ((F / sin(B)) / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.7e+110) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 50.0) tmp = Float64(Float64(Float64(F / sin(B)) / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.7e+110], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 50.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.7 \cdot 10^{+110}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 50:\\
\;\;\;\;\frac{\frac{F}{\sin B}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - t_0\\
\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%
clear-num72.6%
inv-pow72.6%
fma-def72.6%
fma-udef72.6%
*-commutative72.6%
fma-def72.6%
fma-def72.6%
Applied egg-rr72.6%
unpow-172.6%
Simplified72.6%
Taylor expanded in F around -inf 99.9%
if -1.7000000000000001e110 < F < 50Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.6%
clear-num99.5%
inv-pow99.5%
fma-def99.5%
fma-udef99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
Applied egg-rr99.5%
unpow-199.5%
Simplified99.5%
expm1-log1p-u81.6%
expm1-udef66.4%
un-div-inv66.4%
div-inv66.4%
pow-flip66.4%
metadata-eval66.4%
pow1/266.4%
Applied egg-rr66.4%
expm1-def81.6%
expm1-log1p99.6%
associate-/r*99.6%
Simplified99.6%
if 50 < F Initial program 61.8%
distribute-lft-neg-in61.8%
+-commutative61.8%
cancel-sign-sub-inv61.8%
Simplified75.4%
clear-num75.4%
inv-pow75.4%
fma-def75.4%
fma-udef75.4%
*-commutative75.4%
fma-def75.4%
fma-def75.4%
Applied egg-rr75.4%
unpow-175.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 4.6e+14)
(+
(* 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 <= 4.6e+14) {
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 <= 4.6d+14) 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 <= 4.6e+14) {
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 <= 4.6e+14: 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 <= 4.6e+14) 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 <= 4.6e+14) 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, 4.6e+14], 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 4.6 \cdot 10^{+14}:\\
\;\;\;\;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%
clear-num82.7%
inv-pow82.7%
fma-def82.7%
fma-udef82.7%
*-commutative82.7%
fma-def82.7%
fma-def82.7%
Applied egg-rr82.7%
unpow-182.7%
Simplified82.7%
Taylor expanded in F around -inf 99.8%
if -5.9e5 < F < 4.6e14Initial program 99.5%
if 4.6e14 < F Initial program 61.8%
distribute-lft-neg-in61.8%
+-commutative61.8%
cancel-sign-sub-inv61.8%
Simplified75.4%
clear-num75.4%
inv-pow75.4%
fma-def75.4%
fma-udef75.4%
*-commutative75.4%
fma-def75.4%
fma-def75.4%
Applied egg-rr75.4%
unpow-175.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.9)
(- (* F (* (/ 1.0 (sin B)) (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))))) t_0)
(- (/ F (* (sin B) (+ F (/ 1.0 F)))) 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 * ((1.0 / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_0;
} else {
tmp = (F / (sin(B) * (F + (1.0 / F)))) - 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 * ((1.0d0 / sin(b)) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))) - t_0
else
tmp = (f / (sin(b) * (f + (1.0d0 / f)))) - 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 * ((1.0 / Math.sin(B)) * Math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_0;
} else {
tmp = (F / (Math.sin(B) * (F + (1.0 / F)))) - 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 * ((1.0 / math.sin(B)) * math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_0 else: tmp = (F / (math.sin(B) * (F + (1.0 / F)))) - 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(Float64(1.0 / sin(B)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))))) - t_0); else tmp = Float64(Float64(F / Float64(sin(B) * Float64(F + Float64(1.0 / F)))) - 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 * ((1.0 / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_0; else tmp = (F / (sin(B) * (F + (1.0 / F)))) - 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[(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[(F / N[(N[Sin[B], $MachinePrecision] * N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $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 \left(\frac{1}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\right) - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{\sin B \cdot \left(F + \frac{1}{F}\right)} - 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%
clear-num82.5%
inv-pow82.5%
fma-def82.5%
fma-udef82.5%
*-commutative82.5%
fma-def82.5%
fma-def82.5%
Applied egg-rr82.5%
unpow-182.5%
Simplified82.5%
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 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%
clear-num75.7%
inv-pow75.7%
fma-def75.7%
fma-udef75.7%
*-commutative75.7%
fma-def75.7%
fma-def75.7%
Applied egg-rr75.7%
unpow-175.7%
Simplified75.7%
expm1-log1p-u63.1%
expm1-udef63.1%
un-div-inv63.1%
div-inv63.1%
pow-flip63.1%
metadata-eval63.1%
pow1/263.1%
Applied egg-rr63.1%
expm1-def63.2%
expm1-log1p75.8%
associate-/r*62.4%
Simplified62.4%
Taylor expanded in F around inf 86.1%
Taylor expanded in x around 0 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 1.3)
(- (/ (/ F (sin B)) (sqrt (+ 2.0 (* x 2.0)))) t_0)
(- (/ F (* (sin B) (+ F (/ 1.0 F)))) 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 <= 1.3) {
tmp = ((F / sin(B)) / sqrt((2.0 + (x * 2.0)))) - t_0;
} else {
tmp = (F / (sin(B) * (F + (1.0 / F)))) - 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 <= 1.3d0) then
tmp = ((f / sin(b)) / sqrt((2.0d0 + (x * 2.0d0)))) - t_0
else
tmp = (f / (sin(b) * (f + (1.0d0 / f)))) - 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 <= 1.3) {
tmp = ((F / Math.sin(B)) / Math.sqrt((2.0 + (x * 2.0)))) - t_0;
} else {
tmp = (F / (Math.sin(B) * (F + (1.0 / F)))) - 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 <= 1.3: tmp = ((F / math.sin(B)) / math.sqrt((2.0 + (x * 2.0)))) - t_0 else: tmp = (F / (math.sin(B) * (F + (1.0 / F)))) - 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 <= 1.3) tmp = Float64(Float64(Float64(F / sin(B)) / sqrt(Float64(2.0 + Float64(x * 2.0)))) - t_0); else tmp = Float64(Float64(F / Float64(sin(B) * Float64(F + Float64(1.0 / F)))) - 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 <= 1.3) tmp = ((F / sin(B)) / sqrt((2.0 + (x * 2.0)))) - t_0; else tmp = (F / (sin(B) * (F + (1.0 / F)))) - 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, 1.3], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $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 1.3:\\
\;\;\;\;\frac{\frac{F}{\sin B}}{\sqrt{2 + x \cdot 2}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{\sin B \cdot \left(F + \frac{1}{F}\right)} - 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%
clear-num82.5%
inv-pow82.5%
fma-def82.5%
fma-udef82.5%
*-commutative82.5%
fma-def82.5%
fma-def82.5%
Applied egg-rr82.5%
unpow-182.5%
Simplified82.5%
Taylor expanded in F around -inf 99.8%
if -6e5 < F < 1.30000000000000004Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.6%
clear-num99.6%
inv-pow99.6%
fma-def99.6%
fma-udef99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
Applied egg-rr99.6%
unpow-199.6%
Simplified99.6%
expm1-log1p-u89.0%
expm1-udef70.7%
un-div-inv70.7%
div-inv70.7%
pow-flip70.7%
metadata-eval70.7%
pow1/270.7%
Applied egg-rr70.7%
expm1-def89.0%
expm1-log1p99.6%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in F around 0 99.4%
if 1.30000000000000004 < F Initial program 62.3%
distribute-lft-neg-in62.3%
+-commutative62.3%
cancel-sign-sub-inv62.3%
Simplified75.7%
clear-num75.7%
inv-pow75.7%
fma-def75.7%
fma-udef75.7%
*-commutative75.7%
fma-def75.7%
fma-def75.7%
Applied egg-rr75.7%
unpow-175.7%
Simplified75.7%
expm1-log1p-u63.1%
expm1-udef63.1%
un-div-inv63.1%
div-inv63.1%
pow-flip63.1%
metadata-eval63.1%
pow1/263.1%
Applied egg-rr63.1%
expm1-def63.2%
expm1-log1p75.8%
associate-/r*62.4%
Simplified62.4%
Taylor expanded in F around inf 86.1%
Taylor expanded in x around 0 99.2%
Final simplification99.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.42e+20)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -2.9e-121)
(- (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (/ x B))
(if (<= F 3.15e-27)
(- (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)) t_0)
(- (/ F (* (sin B) (+ F (/ 1.0 F)))) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.42e+20) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -2.9e-121) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 3.15e-27) {
tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0;
} else {
tmp = (F / (sin(B) * (F + (1.0 / F)))) - 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.42d+20)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-2.9d-121)) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
else if (f <= 3.15d-27) then
tmp = (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) - t_0
else
tmp = (f / (sin(b) * (f + (1.0d0 / f)))) - 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.42e+20) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -2.9e-121) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 3.15e-27) {
tmp = (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0;
} else {
tmp = (F / (Math.sin(B) * (F + (1.0 / F)))) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.42e+20: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -2.9e-121: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) elif F <= 3.15e-27: tmp = (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0 else: tmp = (F / (math.sin(B) * (F + (1.0 / F)))) - t_0 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 / sin(B)) - t_0); elseif (F <= -2.9e-121) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)); elseif (F <= 3.15e-27) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) - t_0); else tmp = Float64(Float64(F / Float64(sin(B) * Float64(F + Float64(1.0 / F)))) - t_0); 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 / sin(B)) - t_0; elseif (F <= -2.9e-121) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); elseif (F <= 3.15e-27) tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0; else tmp = (F / (sin(B) * (F + (1.0 / F)))) - 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.42e+20], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -2.9e-121], 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], If[LessEqual[F, 3.15e-27], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.42 \cdot 10^{+20}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -2.9 \cdot 10^{-121}:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.15 \cdot 10^{-27}:\\
\;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{\sin B \cdot \left(F + \frac{1}{F}\right)} - t_0\\
\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%
clear-num81.6%
inv-pow81.6%
fma-def81.6%
fma-udef81.6%
*-commutative81.6%
fma-def81.6%
fma-def81.6%
Applied egg-rr81.6%
unpow-181.6%
Simplified81.6%
Taylor expanded in F around -inf 99.8%
if -1.42e20 < F < -2.9e-121Initial program 99.6%
Taylor expanded in B around 0 95.2%
if -2.9e-121 < F < 3.15000000000000005e-27Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 93.0%
if 3.15000000000000005e-27 < F Initial program 63.3%
distribute-lft-neg-in63.3%
+-commutative63.3%
cancel-sign-sub-inv63.3%
Simplified76.4%
clear-num76.3%
inv-pow76.3%
fma-def76.3%
fma-udef76.3%
*-commutative76.3%
fma-def76.3%
fma-def76.3%
Applied egg-rr76.3%
unpow-176.3%
Simplified76.3%
expm1-log1p-u64.1%
expm1-udef63.8%
un-div-inv63.8%
div-inv63.8%
pow-flip63.8%
metadata-eval63.8%
pow1/263.8%
Applied egg-rr63.8%
expm1-def64.1%
expm1-log1p76.4%
associate-/r*63.4%
Simplified63.4%
Taylor expanded in F around inf 85.4%
Taylor expanded in x around 0 98.0%
Final simplification96.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))) (t_1 (+ 2.0 (* x 2.0))))
(if (<= F -0.00055)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -2.1e-120)
(* (/ F (sin B)) (sqrt 0.5))
(if (<= F 9.5e-107)
(- (/ (/ F B) (+ F (/ (* 0.5 t_1) F))) t_0)
(if (<= F 2.8e-27)
(/ (- (* F (sqrt (/ 1.0 t_1))) x) B)
(- (/ F (* (sin B) (+ F (/ 1.0 F)))) t_0)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = 2.0 + (x * 2.0);
double tmp;
if (F <= -0.00055) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -2.1e-120) {
tmp = (F / sin(B)) * sqrt(0.5);
} else if (F <= 9.5e-107) {
tmp = ((F / B) / (F + ((0.5 * t_1) / F))) - t_0;
} else if (F <= 2.8e-27) {
tmp = ((F * sqrt((1.0 / t_1))) - x) / B;
} else {
tmp = (F / (sin(B) * (F + (1.0 / F)))) - 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) :: t_1
real(8) :: tmp
t_0 = x / tan(b)
t_1 = 2.0d0 + (x * 2.0d0)
if (f <= (-0.00055d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-2.1d-120)) then
tmp = (f / sin(b)) * sqrt(0.5d0)
else if (f <= 9.5d-107) then
tmp = ((f / b) / (f + ((0.5d0 * t_1) / f))) - t_0
else if (f <= 2.8d-27) then
tmp = ((f * sqrt((1.0d0 / t_1))) - x) / b
else
tmp = (f / (sin(b) * (f + (1.0d0 / f)))) - 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 t_1 = 2.0 + (x * 2.0);
double tmp;
if (F <= -0.00055) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -2.1e-120) {
tmp = (F / Math.sin(B)) * Math.sqrt(0.5);
} else if (F <= 9.5e-107) {
tmp = ((F / B) / (F + ((0.5 * t_1) / F))) - t_0;
} else if (F <= 2.8e-27) {
tmp = ((F * Math.sqrt((1.0 / t_1))) - x) / B;
} else {
tmp = (F / (Math.sin(B) * (F + (1.0 / F)))) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) t_1 = 2.0 + (x * 2.0) tmp = 0 if F <= -0.00055: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -2.1e-120: tmp = (F / math.sin(B)) * math.sqrt(0.5) elif F <= 9.5e-107: tmp = ((F / B) / (F + ((0.5 * t_1) / F))) - t_0 elif F <= 2.8e-27: tmp = ((F * math.sqrt((1.0 / t_1))) - x) / B else: tmp = (F / (math.sin(B) * (F + (1.0 / F)))) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(2.0 + Float64(x * 2.0)) tmp = 0.0 if (F <= -0.00055) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -2.1e-120) tmp = Float64(Float64(F / sin(B)) * sqrt(0.5)); elseif (F <= 9.5e-107) tmp = Float64(Float64(Float64(F / B) / Float64(F + Float64(Float64(0.5 * t_1) / F))) - t_0); elseif (F <= 2.8e-27) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / t_1))) - x) / B); else tmp = Float64(Float64(F / Float64(sin(B) * Float64(F + Float64(1.0 / F)))) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); t_1 = 2.0 + (x * 2.0); tmp = 0.0; if (F <= -0.00055) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -2.1e-120) tmp = (F / sin(B)) * sqrt(0.5); elseif (F <= 9.5e-107) tmp = ((F / B) / (F + ((0.5 * t_1) / F))) - t_0; elseif (F <= 2.8e-27) tmp = ((F * sqrt((1.0 / t_1))) - x) / B; else tmp = (F / (sin(B) * (F + (1.0 / F)))) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.00055], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -2.1e-120], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9.5e-107], N[(N[(N[(F / B), $MachinePrecision] / N[(F + N[(N[(0.5 * t$95$1), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2.8e-27], N[(N[(N[(F * N[Sqrt[N[(1.0 / t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := 2 + x \cdot 2\\
\mathbf{if}\;F \leq -0.00055:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -2.1 \cdot 10^{-120}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\
\mathbf{elif}\;F \leq 9.5 \cdot 10^{-107}:\\
\;\;\;\;\frac{\frac{F}{B}}{F + \frac{0.5 \cdot t_1}{F}} - t_0\\
\mathbf{elif}\;F \leq 2.8 \cdot 10^{-27}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{t_1}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{\sin B \cdot \left(F + \frac{1}{F}\right)} - t_0\\
\end{array}
\end{array}
if F < -5.50000000000000033e-4Initial program 74.9%
distribute-lft-neg-in74.9%
+-commutative74.9%
cancel-sign-sub-inv74.9%
Simplified82.8%
clear-num82.7%
inv-pow82.7%
fma-def82.7%
fma-udef82.7%
*-commutative82.7%
fma-def82.7%
fma-def82.7%
Applied egg-rr82.7%
unpow-182.7%
Simplified82.7%
Taylor expanded in F around -inf 99.8%
if -5.50000000000000033e-4 < F < -2.1e-120Initial program 99.6%
distribute-lft-neg-in99.6%
+-commutative99.6%
cancel-sign-sub-inv99.6%
Simplified99.4%
Taylor expanded in F around 0 99.4%
Taylor expanded in x around 0 83.9%
div-inv83.8%
*-commutative83.8%
associate-*l*83.9%
div-inv84.2%
Applied egg-rr84.2%
if -2.1e-120 < F < 9.4999999999999999e-107Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.7%
clear-num99.7%
inv-pow99.7%
fma-def99.7%
fma-udef99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
Applied egg-rr99.7%
unpow-199.7%
Simplified99.7%
expm1-log1p-u90.9%
expm1-udef81.3%
un-div-inv81.3%
div-inv81.3%
pow-flip81.3%
metadata-eval81.3%
pow1/281.3%
Applied egg-rr81.3%
expm1-def90.8%
expm1-log1p99.7%
associate-/r*99.7%
Simplified99.7%
Taylor expanded in F around inf 84.5%
Taylor expanded in B around 0 84.5%
associate-/r*84.5%
associate-*r/84.5%
Simplified84.5%
if 9.4999999999999999e-107 < F < 2.8e-27Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
cancel-sign-sub-inv99.4%
Simplified99.4%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 77.3%
if 2.8e-27 < F Initial program 63.3%
distribute-lft-neg-in63.3%
+-commutative63.3%
cancel-sign-sub-inv63.3%
Simplified76.4%
clear-num76.3%
inv-pow76.3%
fma-def76.3%
fma-udef76.3%
*-commutative76.3%
fma-def76.3%
fma-def76.3%
Applied egg-rr76.3%
unpow-176.3%
Simplified76.3%
expm1-log1p-u64.1%
expm1-udef63.8%
un-div-inv63.8%
div-inv63.8%
pow-flip63.8%
metadata-eval63.8%
pow1/263.8%
Applied egg-rr63.8%
expm1-def64.1%
expm1-log1p76.4%
associate-/r*63.4%
Simplified63.4%
Taylor expanded in F around inf 85.4%
Taylor expanded in x around 0 98.0%
Final simplification91.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.0044)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -2.1e-120)
(* (/ F (sin B)) (sqrt 0.5))
(if (<= F 3.15e-27)
(- (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)) t_0)
(- (/ F (* (sin B) (+ F (/ 1.0 F)))) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.0044) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -2.1e-120) {
tmp = (F / sin(B)) * sqrt(0.5);
} else if (F <= 3.15e-27) {
tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0;
} else {
tmp = (F / (sin(B) * (F + (1.0 / F)))) - 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.0044d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-2.1d-120)) then
tmp = (f / sin(b)) * sqrt(0.5d0)
else if (f <= 3.15d-27) then
tmp = (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) - t_0
else
tmp = (f / (sin(b) * (f + (1.0d0 / f)))) - 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.0044) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -2.1e-120) {
tmp = (F / Math.sin(B)) * Math.sqrt(0.5);
} else if (F <= 3.15e-27) {
tmp = (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0;
} else {
tmp = (F / (Math.sin(B) * (F + (1.0 / F)))) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.0044: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -2.1e-120: tmp = (F / math.sin(B)) * math.sqrt(0.5) elif F <= 3.15e-27: tmp = (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0 else: tmp = (F / (math.sin(B) * (F + (1.0 / F)))) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.0044) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -2.1e-120) tmp = Float64(Float64(F / sin(B)) * sqrt(0.5)); elseif (F <= 3.15e-27) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) - t_0); else tmp = Float64(Float64(F / Float64(sin(B) * Float64(F + Float64(1.0 / F)))) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.0044) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -2.1e-120) tmp = (F / sin(B)) * sqrt(0.5); elseif (F <= 3.15e-27) tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0; else tmp = (F / (sin(B) * (F + (1.0 / F)))) - 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.0044], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -2.1e-120], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.15e-27], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.0044:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -2.1 \cdot 10^{-120}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\
\mathbf{elif}\;F \leq 3.15 \cdot 10^{-27}:\\
\;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{\sin B \cdot \left(F + \frac{1}{F}\right)} - t_0\\
\end{array}
\end{array}
if F < -0.00440000000000000027Initial program 74.9%
distribute-lft-neg-in74.9%
+-commutative74.9%
cancel-sign-sub-inv74.9%
Simplified82.8%
clear-num82.7%
inv-pow82.7%
fma-def82.7%
fma-udef82.7%
*-commutative82.7%
fma-def82.7%
fma-def82.7%
Applied egg-rr82.7%
unpow-182.7%
Simplified82.7%
Taylor expanded in F around -inf 99.8%
if -0.00440000000000000027 < F < -2.1e-120Initial program 99.6%
distribute-lft-neg-in99.6%
+-commutative99.6%
cancel-sign-sub-inv99.6%
Simplified99.4%
Taylor expanded in F around 0 99.4%
Taylor expanded in x around 0 83.9%
div-inv83.8%
*-commutative83.8%
associate-*l*83.9%
div-inv84.2%
Applied egg-rr84.2%
if -2.1e-120 < F < 3.15000000000000005e-27Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 93.0%
if 3.15000000000000005e-27 < F Initial program 63.3%
distribute-lft-neg-in63.3%
+-commutative63.3%
cancel-sign-sub-inv63.3%
Simplified76.4%
clear-num76.3%
inv-pow76.3%
fma-def76.3%
fma-udef76.3%
*-commutative76.3%
fma-def76.3%
fma-def76.3%
Applied egg-rr76.3%
unpow-176.3%
Simplified76.3%
expm1-log1p-u64.1%
expm1-udef63.8%
un-div-inv63.8%
div-inv63.8%
pow-flip63.8%
metadata-eval63.8%
pow1/263.8%
Applied egg-rr63.8%
expm1-def64.1%
expm1-log1p76.4%
associate-/r*63.4%
Simplified63.4%
Taylor expanded in F around inf 85.4%
Taylor expanded in x around 0 98.0%
Final simplification95.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))) (t_1 (+ 2.0 (* x 2.0))))
(if (<= F -9.5e-6)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -8e-121)
(* (/ F (sin B)) (sqrt 0.5))
(if (<= F 1.05e-106)
(- (/ (/ F B) (+ F (/ (* 0.5 t_1) F))) t_0)
(if (<= F 3.5e-28)
(/ (- (* F (sqrt (/ 1.0 t_1))) x) B)
(- (/ 1.0 (sin B)) t_0)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = 2.0 + (x * 2.0);
double tmp;
if (F <= -9.5e-6) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -8e-121) {
tmp = (F / sin(B)) * sqrt(0.5);
} else if (F <= 1.05e-106) {
tmp = ((F / B) / (F + ((0.5 * t_1) / F))) - t_0;
} else if (F <= 3.5e-28) {
tmp = ((F * sqrt((1.0 / t_1))) - 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) :: t_1
real(8) :: tmp
t_0 = x / tan(b)
t_1 = 2.0d0 + (x * 2.0d0)
if (f <= (-9.5d-6)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-8d-121)) then
tmp = (f / sin(b)) * sqrt(0.5d0)
else if (f <= 1.05d-106) then
tmp = ((f / b) / (f + ((0.5d0 * t_1) / f))) - t_0
else if (f <= 3.5d-28) then
tmp = ((f * sqrt((1.0d0 / t_1))) - 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 t_1 = 2.0 + (x * 2.0);
double tmp;
if (F <= -9.5e-6) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -8e-121) {
tmp = (F / Math.sin(B)) * Math.sqrt(0.5);
} else if (F <= 1.05e-106) {
tmp = ((F / B) / (F + ((0.5 * t_1) / F))) - t_0;
} else if (F <= 3.5e-28) {
tmp = ((F * Math.sqrt((1.0 / t_1))) - x) / B;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) t_1 = 2.0 + (x * 2.0) tmp = 0 if F <= -9.5e-6: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -8e-121: tmp = (F / math.sin(B)) * math.sqrt(0.5) elif F <= 1.05e-106: tmp = ((F / B) / (F + ((0.5 * t_1) / F))) - t_0 elif F <= 3.5e-28: tmp = ((F * math.sqrt((1.0 / t_1))) - x) / B else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(2.0 + Float64(x * 2.0)) tmp = 0.0 if (F <= -9.5e-6) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -8e-121) tmp = Float64(Float64(F / sin(B)) * sqrt(0.5)); elseif (F <= 1.05e-106) tmp = Float64(Float64(Float64(F / B) / Float64(F + Float64(Float64(0.5 * t_1) / F))) - t_0); elseif (F <= 3.5e-28) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / t_1))) - 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); t_1 = 2.0 + (x * 2.0); tmp = 0.0; if (F <= -9.5e-6) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -8e-121) tmp = (F / sin(B)) * sqrt(0.5); elseif (F <= 1.05e-106) tmp = ((F / B) / (F + ((0.5 * t_1) / F))) - t_0; elseif (F <= 3.5e-28) tmp = ((F * sqrt((1.0 / t_1))) - 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]}, Block[{t$95$1 = N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -9.5e-6], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -8e-121], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.05e-106], N[(N[(N[(F / B), $MachinePrecision] / N[(F + N[(N[(0.5 * t$95$1), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 3.5e-28], N[(N[(N[(F * N[Sqrt[N[(1.0 / t$95$1), $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}\\
t_1 := 2 + x \cdot 2\\
\mathbf{if}\;F \leq -9.5 \cdot 10^{-6}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -8 \cdot 10^{-121}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\
\mathbf{elif}\;F \leq 1.05 \cdot 10^{-106}:\\
\;\;\;\;\frac{\frac{F}{B}}{F + \frac{0.5 \cdot t_1}{F}} - t_0\\
\mathbf{elif}\;F \leq 3.5 \cdot 10^{-28}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{t_1}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -9.5000000000000005e-6Initial program 74.9%
distribute-lft-neg-in74.9%
+-commutative74.9%
cancel-sign-sub-inv74.9%
Simplified82.8%
clear-num82.7%
inv-pow82.7%
fma-def82.7%
fma-udef82.7%
*-commutative82.7%
fma-def82.7%
fma-def82.7%
Applied egg-rr82.7%
unpow-182.7%
Simplified82.7%
Taylor expanded in F around -inf 99.8%
if -9.5000000000000005e-6 < F < -7.9999999999999998e-121Initial program 99.6%
distribute-lft-neg-in99.6%
+-commutative99.6%
cancel-sign-sub-inv99.6%
Simplified99.4%
Taylor expanded in F around 0 99.4%
Taylor expanded in x around 0 83.9%
div-inv83.8%
*-commutative83.8%
associate-*l*83.9%
div-inv84.2%
Applied egg-rr84.2%
if -7.9999999999999998e-121 < F < 1.05000000000000002e-106Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.7%
clear-num99.7%
inv-pow99.7%
fma-def99.7%
fma-udef99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
Applied egg-rr99.7%
unpow-199.7%
Simplified99.7%
expm1-log1p-u90.9%
expm1-udef81.3%
un-div-inv81.3%
div-inv81.3%
pow-flip81.3%
metadata-eval81.3%
pow1/281.3%
Applied egg-rr81.3%
expm1-def90.8%
expm1-log1p99.7%
associate-/r*99.7%
Simplified99.7%
Taylor expanded in F around inf 84.5%
Taylor expanded in B around 0 84.5%
associate-/r*84.5%
associate-*r/84.5%
Simplified84.5%
if 1.05000000000000002e-106 < F < 3.5e-28Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
cancel-sign-sub-inv99.4%
Simplified99.4%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 77.3%
if 3.5e-28 < F Initial program 63.3%
distribute-lft-neg-in63.3%
+-commutative63.3%
cancel-sign-sub-inv63.3%
Simplified76.4%
clear-num76.3%
inv-pow76.3%
fma-def76.3%
fma-udef76.3%
*-commutative76.3%
fma-def76.3%
fma-def76.3%
Applied egg-rr76.3%
unpow-176.3%
Simplified76.3%
Taylor expanded in F around inf 97.8%
Final simplification91.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ F (sin B)))
(t_1 (+ 2.0 (* x 2.0)))
(t_2 (/ x (tan B)))
(t_3 (- (/ -1.0 B) t_2)))
(if (<= F -2.7e+107)
t_3
(if (<= F -1.45e+84)
(- (* t_0 (/ -1.0 F)) (/ x B))
(if (<= F -9.2e-7)
t_3
(if (<= F -3.2e-121)
(* F (/ (sqrt 0.5) (sin B)))
(if (<= F 2.1e-106)
(- (/ (/ F B) (+ F (/ (* 0.5 t_1) F))) t_2)
(if (<= F 1.65e-6)
(/ (- (* F (sqrt (/ 1.0 t_1))) x) B)
(if (or (<= F 7.4e+77) (and (not (<= F 8e+163)) (<= F 2e+206)))
(- (* t_0 (/ 1.0 F)) (/ x B))
(- (/ 1.0 B) (* x (/ 1.0 (tan B)))))))))))))
double code(double F, double B, double x) {
double t_0 = F / sin(B);
double t_1 = 2.0 + (x * 2.0);
double t_2 = x / tan(B);
double t_3 = (-1.0 / B) - t_2;
double tmp;
if (F <= -2.7e+107) {
tmp = t_3;
} else if (F <= -1.45e+84) {
tmp = (t_0 * (-1.0 / F)) - (x / B);
} else if (F <= -9.2e-7) {
tmp = t_3;
} else if (F <= -3.2e-121) {
tmp = F * (sqrt(0.5) / sin(B));
} else if (F <= 2.1e-106) {
tmp = ((F / B) / (F + ((0.5 * t_1) / F))) - t_2;
} else if (F <= 1.65e-6) {
tmp = ((F * sqrt((1.0 / t_1))) - x) / B;
} else if ((F <= 7.4e+77) || (!(F <= 8e+163) && (F <= 2e+206))) {
tmp = (t_0 * (1.0 / F)) - (x / B);
} else {
tmp = (1.0 / B) - (x * (1.0 / tan(B)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = f / sin(b)
t_1 = 2.0d0 + (x * 2.0d0)
t_2 = x / tan(b)
t_3 = ((-1.0d0) / b) - t_2
if (f <= (-2.7d+107)) then
tmp = t_3
else if (f <= (-1.45d+84)) then
tmp = (t_0 * ((-1.0d0) / f)) - (x / b)
else if (f <= (-9.2d-7)) then
tmp = t_3
else if (f <= (-3.2d-121)) then
tmp = f * (sqrt(0.5d0) / sin(b))
else if (f <= 2.1d-106) then
tmp = ((f / b) / (f + ((0.5d0 * t_1) / f))) - t_2
else if (f <= 1.65d-6) then
tmp = ((f * sqrt((1.0d0 / t_1))) - x) / b
else if ((f <= 7.4d+77) .or. (.not. (f <= 8d+163)) .and. (f <= 2d+206)) then
tmp = (t_0 * (1.0d0 / f)) - (x / b)
else
tmp = (1.0d0 / b) - (x * (1.0d0 / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = F / Math.sin(B);
double t_1 = 2.0 + (x * 2.0);
double t_2 = x / Math.tan(B);
double t_3 = (-1.0 / B) - t_2;
double tmp;
if (F <= -2.7e+107) {
tmp = t_3;
} else if (F <= -1.45e+84) {
tmp = (t_0 * (-1.0 / F)) - (x / B);
} else if (F <= -9.2e-7) {
tmp = t_3;
} else if (F <= -3.2e-121) {
tmp = F * (Math.sqrt(0.5) / Math.sin(B));
} else if (F <= 2.1e-106) {
tmp = ((F / B) / (F + ((0.5 * t_1) / F))) - t_2;
} else if (F <= 1.65e-6) {
tmp = ((F * Math.sqrt((1.0 / t_1))) - x) / B;
} else if ((F <= 7.4e+77) || (!(F <= 8e+163) && (F <= 2e+206))) {
tmp = (t_0 * (1.0 / F)) - (x / B);
} else {
tmp = (1.0 / B) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): t_0 = F / math.sin(B) t_1 = 2.0 + (x * 2.0) t_2 = x / math.tan(B) t_3 = (-1.0 / B) - t_2 tmp = 0 if F <= -2.7e+107: tmp = t_3 elif F <= -1.45e+84: tmp = (t_0 * (-1.0 / F)) - (x / B) elif F <= -9.2e-7: tmp = t_3 elif F <= -3.2e-121: tmp = F * (math.sqrt(0.5) / math.sin(B)) elif F <= 2.1e-106: tmp = ((F / B) / (F + ((0.5 * t_1) / F))) - t_2 elif F <= 1.65e-6: tmp = ((F * math.sqrt((1.0 / t_1))) - x) / B elif (F <= 7.4e+77) or (not (F <= 8e+163) and (F <= 2e+206)): tmp = (t_0 * (1.0 / F)) - (x / B) else: tmp = (1.0 / B) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) t_0 = Float64(F / sin(B)) t_1 = Float64(2.0 + Float64(x * 2.0)) t_2 = Float64(x / tan(B)) t_3 = Float64(Float64(-1.0 / B) - t_2) tmp = 0.0 if (F <= -2.7e+107) tmp = t_3; elseif (F <= -1.45e+84) tmp = Float64(Float64(t_0 * Float64(-1.0 / F)) - Float64(x / B)); elseif (F <= -9.2e-7) tmp = t_3; elseif (F <= -3.2e-121) tmp = Float64(F * Float64(sqrt(0.5) / sin(B))); elseif (F <= 2.1e-106) tmp = Float64(Float64(Float64(F / B) / Float64(F + Float64(Float64(0.5 * t_1) / F))) - t_2); elseif (F <= 1.65e-6) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / t_1))) - x) / B); elseif ((F <= 7.4e+77) || (!(F <= 8e+163) && (F <= 2e+206))) tmp = Float64(Float64(t_0 * Float64(1.0 / F)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = F / sin(B); t_1 = 2.0 + (x * 2.0); t_2 = x / tan(B); t_3 = (-1.0 / B) - t_2; tmp = 0.0; if (F <= -2.7e+107) tmp = t_3; elseif (F <= -1.45e+84) tmp = (t_0 * (-1.0 / F)) - (x / B); elseif (F <= -9.2e-7) tmp = t_3; elseif (F <= -3.2e-121) tmp = F * (sqrt(0.5) / sin(B)); elseif (F <= 2.1e-106) tmp = ((F / B) / (F + ((0.5 * t_1) / F))) - t_2; elseif (F <= 1.65e-6) tmp = ((F * sqrt((1.0 / t_1))) - x) / B; elseif ((F <= 7.4e+77) || (~((F <= 8e+163)) && (F <= 2e+206))) tmp = (t_0 * (1.0 / F)) - (x / B); else tmp = (1.0 / B) - (x * (1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(-1.0 / B), $MachinePrecision] - t$95$2), $MachinePrecision]}, If[LessEqual[F, -2.7e+107], t$95$3, If[LessEqual[F, -1.45e+84], N[(N[(t$95$0 * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -9.2e-7], t$95$3, If[LessEqual[F, -3.2e-121], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.1e-106], N[(N[(N[(F / B), $MachinePrecision] / N[(F + N[(N[(0.5 * t$95$1), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[F, 1.65e-6], N[(N[(N[(F * N[Sqrt[N[(1.0 / t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[Or[LessEqual[F, 7.4e+77], And[N[Not[LessEqual[F, 8e+163]], $MachinePrecision], LessEqual[F, 2e+206]]], N[(N[(t$95$0 * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B}\\
t_1 := 2 + x \cdot 2\\
t_2 := \frac{x}{\tan B}\\
t_3 := \frac{-1}{B} - t_2\\
\mathbf{if}\;F \leq -2.7 \cdot 10^{+107}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;F \leq -1.45 \cdot 10^{+84}:\\
\;\;\;\;t_0 \cdot \frac{-1}{F} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -9.2 \cdot 10^{-7}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;F \leq -3.2 \cdot 10^{-121}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq 2.1 \cdot 10^{-106}:\\
\;\;\;\;\frac{\frac{F}{B}}{F + \frac{0.5 \cdot t_1}{F}} - t_2\\
\mathbf{elif}\;F \leq 1.65 \cdot 10^{-6}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{t_1}} - x}{B}\\
\mathbf{elif}\;F \leq 7.4 \cdot 10^{+77} \lor \neg \left(F \leq 8 \cdot 10^{+163}\right) \land F \leq 2 \cdot 10^{+206}:\\
\;\;\;\;t_0 \cdot \frac{1}{F} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -2.7000000000000001e107 or -1.44999999999999994e84 < F < -9.1999999999999998e-7Initial program 71.3%
distribute-lft-neg-in71.3%
+-commutative71.3%
cancel-sign-sub-inv71.3%
Simplified80.4%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 82.2%
if -2.7000000000000001e107 < F < -1.44999999999999994e84Initial program 99.6%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 87.8%
if -9.1999999999999998e-7 < F < -3.20000000000000019e-121Initial program 99.6%
distribute-lft-neg-in99.6%
+-commutative99.6%
cancel-sign-sub-inv99.6%
Simplified99.4%
Taylor expanded in F around 0 99.4%
Taylor expanded in x around 0 83.9%
expm1-log1p-u66.3%
expm1-udef18.4%
associate-/l*18.4%
Applied egg-rr18.4%
expm1-def66.4%
expm1-log1p84.0%
associate-/r/84.2%
*-commutative84.2%
associate-*r/83.9%
*-commutative83.9%
associate-*r/84.0%
Simplified84.0%
if -3.20000000000000019e-121 < F < 2.10000000000000003e-106Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.7%
clear-num99.7%
inv-pow99.7%
fma-def99.7%
fma-udef99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
Applied egg-rr99.7%
unpow-199.7%
Simplified99.7%
expm1-log1p-u90.9%
expm1-udef81.3%
un-div-inv81.3%
div-inv81.3%
pow-flip81.3%
metadata-eval81.3%
pow1/281.3%
Applied egg-rr81.3%
expm1-def90.8%
expm1-log1p99.7%
associate-/r*99.7%
Simplified99.7%
Taylor expanded in F around inf 84.5%
Taylor expanded in B around 0 84.5%
associate-/r*84.5%
associate-*r/84.5%
Simplified84.5%
if 2.10000000000000003e-106 < F < 1.65000000000000008e-6Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.5%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 75.6%
if 1.65000000000000008e-6 < F < 7.3999999999999999e77 or 7.9999999999999995e163 < F < 2.0000000000000001e206Initial program 61.8%
Taylor expanded in F around inf 88.7%
Taylor expanded in B around 0 84.4%
if 7.3999999999999999e77 < F < 7.9999999999999995e163 or 2.0000000000000001e206 < F Initial program 63.2%
Taylor expanded in F around inf 83.0%
Taylor expanded in B around 0 85.2%
Final simplification83.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ F (sin B)))
(t_1 (+ 2.0 (* x 2.0)))
(t_2 (/ x (tan B)))
(t_3 (- (/ -1.0 B) t_2)))
(if (<= F -2.1e+103)
t_3
(if (<= F -2e+82)
(- (* t_0 (/ -1.0 F)) (/ x B))
(if (<= F -0.175)
t_3
(if (<= F -2.1e-123)
(* t_0 (sqrt 0.5))
(if (<= F 3.5e-106)
(- (/ (/ F B) (+ F (/ (* 0.5 t_1) F))) t_2)
(if (<= F 1.6e-6)
(/ (- (* F (sqrt (/ 1.0 t_1))) x) B)
(if (or (<= F 7.4e+81)
(and (not (<= F 9e+163)) (<= F 3.9e+206)))
(- (* t_0 (/ 1.0 F)) (/ x B))
(- (/ 1.0 B) (* x (/ 1.0 (tan B)))))))))))))
double code(double F, double B, double x) {
double t_0 = F / sin(B);
double t_1 = 2.0 + (x * 2.0);
double t_2 = x / tan(B);
double t_3 = (-1.0 / B) - t_2;
double tmp;
if (F <= -2.1e+103) {
tmp = t_3;
} else if (F <= -2e+82) {
tmp = (t_0 * (-1.0 / F)) - (x / B);
} else if (F <= -0.175) {
tmp = t_3;
} else if (F <= -2.1e-123) {
tmp = t_0 * sqrt(0.5);
} else if (F <= 3.5e-106) {
tmp = ((F / B) / (F + ((0.5 * t_1) / F))) - t_2;
} else if (F <= 1.6e-6) {
tmp = ((F * sqrt((1.0 / t_1))) - x) / B;
} else if ((F <= 7.4e+81) || (!(F <= 9e+163) && (F <= 3.9e+206))) {
tmp = (t_0 * (1.0 / F)) - (x / B);
} else {
tmp = (1.0 / B) - (x * (1.0 / tan(B)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = f / sin(b)
t_1 = 2.0d0 + (x * 2.0d0)
t_2 = x / tan(b)
t_3 = ((-1.0d0) / b) - t_2
if (f <= (-2.1d+103)) then
tmp = t_3
else if (f <= (-2d+82)) then
tmp = (t_0 * ((-1.0d0) / f)) - (x / b)
else if (f <= (-0.175d0)) then
tmp = t_3
else if (f <= (-2.1d-123)) then
tmp = t_0 * sqrt(0.5d0)
else if (f <= 3.5d-106) then
tmp = ((f / b) / (f + ((0.5d0 * t_1) / f))) - t_2
else if (f <= 1.6d-6) then
tmp = ((f * sqrt((1.0d0 / t_1))) - x) / b
else if ((f <= 7.4d+81) .or. (.not. (f <= 9d+163)) .and. (f <= 3.9d+206)) then
tmp = (t_0 * (1.0d0 / f)) - (x / b)
else
tmp = (1.0d0 / b) - (x * (1.0d0 / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = F / Math.sin(B);
double t_1 = 2.0 + (x * 2.0);
double t_2 = x / Math.tan(B);
double t_3 = (-1.0 / B) - t_2;
double tmp;
if (F <= -2.1e+103) {
tmp = t_3;
} else if (F <= -2e+82) {
tmp = (t_0 * (-1.0 / F)) - (x / B);
} else if (F <= -0.175) {
tmp = t_3;
} else if (F <= -2.1e-123) {
tmp = t_0 * Math.sqrt(0.5);
} else if (F <= 3.5e-106) {
tmp = ((F / B) / (F + ((0.5 * t_1) / F))) - t_2;
} else if (F <= 1.6e-6) {
tmp = ((F * Math.sqrt((1.0 / t_1))) - x) / B;
} else if ((F <= 7.4e+81) || (!(F <= 9e+163) && (F <= 3.9e+206))) {
tmp = (t_0 * (1.0 / F)) - (x / B);
} else {
tmp = (1.0 / B) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): t_0 = F / math.sin(B) t_1 = 2.0 + (x * 2.0) t_2 = x / math.tan(B) t_3 = (-1.0 / B) - t_2 tmp = 0 if F <= -2.1e+103: tmp = t_3 elif F <= -2e+82: tmp = (t_0 * (-1.0 / F)) - (x / B) elif F <= -0.175: tmp = t_3 elif F <= -2.1e-123: tmp = t_0 * math.sqrt(0.5) elif F <= 3.5e-106: tmp = ((F / B) / (F + ((0.5 * t_1) / F))) - t_2 elif F <= 1.6e-6: tmp = ((F * math.sqrt((1.0 / t_1))) - x) / B elif (F <= 7.4e+81) or (not (F <= 9e+163) and (F <= 3.9e+206)): tmp = (t_0 * (1.0 / F)) - (x / B) else: tmp = (1.0 / B) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) t_0 = Float64(F / sin(B)) t_1 = Float64(2.0 + Float64(x * 2.0)) t_2 = Float64(x / tan(B)) t_3 = Float64(Float64(-1.0 / B) - t_2) tmp = 0.0 if (F <= -2.1e+103) tmp = t_3; elseif (F <= -2e+82) tmp = Float64(Float64(t_0 * Float64(-1.0 / F)) - Float64(x / B)); elseif (F <= -0.175) tmp = t_3; elseif (F <= -2.1e-123) tmp = Float64(t_0 * sqrt(0.5)); elseif (F <= 3.5e-106) tmp = Float64(Float64(Float64(F / B) / Float64(F + Float64(Float64(0.5 * t_1) / F))) - t_2); elseif (F <= 1.6e-6) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / t_1))) - x) / B); elseif ((F <= 7.4e+81) || (!(F <= 9e+163) && (F <= 3.9e+206))) tmp = Float64(Float64(t_0 * Float64(1.0 / F)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = F / sin(B); t_1 = 2.0 + (x * 2.0); t_2 = x / tan(B); t_3 = (-1.0 / B) - t_2; tmp = 0.0; if (F <= -2.1e+103) tmp = t_3; elseif (F <= -2e+82) tmp = (t_0 * (-1.0 / F)) - (x / B); elseif (F <= -0.175) tmp = t_3; elseif (F <= -2.1e-123) tmp = t_0 * sqrt(0.5); elseif (F <= 3.5e-106) tmp = ((F / B) / (F + ((0.5 * t_1) / F))) - t_2; elseif (F <= 1.6e-6) tmp = ((F * sqrt((1.0 / t_1))) - x) / B; elseif ((F <= 7.4e+81) || (~((F <= 9e+163)) && (F <= 3.9e+206))) tmp = (t_0 * (1.0 / F)) - (x / B); else tmp = (1.0 / B) - (x * (1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(-1.0 / B), $MachinePrecision] - t$95$2), $MachinePrecision]}, If[LessEqual[F, -2.1e+103], t$95$3, If[LessEqual[F, -2e+82], N[(N[(t$95$0 * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -0.175], t$95$3, If[LessEqual[F, -2.1e-123], N[(t$95$0 * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.5e-106], N[(N[(N[(F / B), $MachinePrecision] / N[(F + N[(N[(0.5 * t$95$1), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[F, 1.6e-6], N[(N[(N[(F * N[Sqrt[N[(1.0 / t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[Or[LessEqual[F, 7.4e+81], And[N[Not[LessEqual[F, 9e+163]], $MachinePrecision], LessEqual[F, 3.9e+206]]], N[(N[(t$95$0 * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B}\\
t_1 := 2 + x \cdot 2\\
t_2 := \frac{x}{\tan B}\\
t_3 := \frac{-1}{B} - t_2\\
\mathbf{if}\;F \leq -2.1 \cdot 10^{+103}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;F \leq -2 \cdot 10^{+82}:\\
\;\;\;\;t_0 \cdot \frac{-1}{F} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -0.175:\\
\;\;\;\;t_3\\
\mathbf{elif}\;F \leq -2.1 \cdot 10^{-123}:\\
\;\;\;\;t_0 \cdot \sqrt{0.5}\\
\mathbf{elif}\;F \leq 3.5 \cdot 10^{-106}:\\
\;\;\;\;\frac{\frac{F}{B}}{F + \frac{0.5 \cdot t_1}{F}} - t_2\\
\mathbf{elif}\;F \leq 1.6 \cdot 10^{-6}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{t_1}} - x}{B}\\
\mathbf{elif}\;F \leq 7.4 \cdot 10^{+81} \lor \neg \left(F \leq 9 \cdot 10^{+163}\right) \land F \leq 3.9 \cdot 10^{+206}:\\
\;\;\;\;t_0 \cdot \frac{1}{F} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -2.1000000000000002e103 or -1.9999999999999999e82 < F < -0.17499999999999999Initial program 71.3%
distribute-lft-neg-in71.3%
+-commutative71.3%
cancel-sign-sub-inv71.3%
Simplified80.4%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 82.2%
if -2.1000000000000002e103 < F < -1.9999999999999999e82Initial program 99.6%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 87.8%
if -0.17499999999999999 < F < -2.0999999999999999e-123Initial program 99.6%
distribute-lft-neg-in99.6%
+-commutative99.6%
cancel-sign-sub-inv99.6%
Simplified99.4%
Taylor expanded in F around 0 99.4%
Taylor expanded in x around 0 83.9%
div-inv83.8%
*-commutative83.8%
associate-*l*83.9%
div-inv84.2%
Applied egg-rr84.2%
if -2.0999999999999999e-123 < F < 3.5e-106Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.7%
clear-num99.7%
inv-pow99.7%
fma-def99.7%
fma-udef99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
Applied egg-rr99.7%
unpow-199.7%
Simplified99.7%
expm1-log1p-u90.9%
expm1-udef81.3%
un-div-inv81.3%
div-inv81.3%
pow-flip81.3%
metadata-eval81.3%
pow1/281.3%
Applied egg-rr81.3%
expm1-def90.8%
expm1-log1p99.7%
associate-/r*99.7%
Simplified99.7%
Taylor expanded in F around inf 84.5%
Taylor expanded in B around 0 84.5%
associate-/r*84.5%
associate-*r/84.5%
Simplified84.5%
if 3.5e-106 < F < 1.5999999999999999e-6Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.5%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 75.6%
if 1.5999999999999999e-6 < F < 7.4000000000000001e81 or 8.99999999999999976e163 < F < 3.9e206Initial program 61.8%
Taylor expanded in F around inf 88.7%
Taylor expanded in B around 0 84.4%
if 7.4000000000000001e81 < F < 8.99999999999999976e163 or 3.9e206 < F Initial program 63.2%
Taylor expanded in F around inf 83.0%
Taylor expanded in B around 0 85.2%
Final simplification83.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ F (sin B))) (t_1 (/ x (tan B))) (t_2 (+ 2.0 (* x 2.0))))
(if (<= F -0.00041)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -1.45e-125)
(* t_0 (sqrt 0.5))
(if (<= F 5.8e-106)
(- (/ (/ F B) (+ F (/ (* 0.5 t_2) F))) t_1)
(if (<= F 1.65e-6)
(/ (- (* F (sqrt (/ 1.0 t_2))) x) B)
(if (or (<= F 1.32e+80) (and (not (<= F 6.5e+163)) (<= F 2.6e+206)))
(- (* t_0 (/ 1.0 F)) (/ x B))
(- (/ 1.0 B) (* x (/ 1.0 (tan B)))))))))))
double code(double F, double B, double x) {
double t_0 = F / sin(B);
double t_1 = x / tan(B);
double t_2 = 2.0 + (x * 2.0);
double tmp;
if (F <= -0.00041) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -1.45e-125) {
tmp = t_0 * sqrt(0.5);
} else if (F <= 5.8e-106) {
tmp = ((F / B) / (F + ((0.5 * t_2) / F))) - t_1;
} else if (F <= 1.65e-6) {
tmp = ((F * sqrt((1.0 / t_2))) - x) / B;
} else if ((F <= 1.32e+80) || (!(F <= 6.5e+163) && (F <= 2.6e+206))) {
tmp = (t_0 * (1.0 / F)) - (x / B);
} else {
tmp = (1.0 / B) - (x * (1.0 / tan(B)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = f / sin(b)
t_1 = x / tan(b)
t_2 = 2.0d0 + (x * 2.0d0)
if (f <= (-0.00041d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-1.45d-125)) then
tmp = t_0 * sqrt(0.5d0)
else if (f <= 5.8d-106) then
tmp = ((f / b) / (f + ((0.5d0 * t_2) / f))) - t_1
else if (f <= 1.65d-6) then
tmp = ((f * sqrt((1.0d0 / t_2))) - x) / b
else if ((f <= 1.32d+80) .or. (.not. (f <= 6.5d+163)) .and. (f <= 2.6d+206)) then
tmp = (t_0 * (1.0d0 / f)) - (x / b)
else
tmp = (1.0d0 / b) - (x * (1.0d0 / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = F / Math.sin(B);
double t_1 = x / Math.tan(B);
double t_2 = 2.0 + (x * 2.0);
double tmp;
if (F <= -0.00041) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -1.45e-125) {
tmp = t_0 * Math.sqrt(0.5);
} else if (F <= 5.8e-106) {
tmp = ((F / B) / (F + ((0.5 * t_2) / F))) - t_1;
} else if (F <= 1.65e-6) {
tmp = ((F * Math.sqrt((1.0 / t_2))) - x) / B;
} else if ((F <= 1.32e+80) || (!(F <= 6.5e+163) && (F <= 2.6e+206))) {
tmp = (t_0 * (1.0 / F)) - (x / B);
} else {
tmp = (1.0 / B) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): t_0 = F / math.sin(B) t_1 = x / math.tan(B) t_2 = 2.0 + (x * 2.0) tmp = 0 if F <= -0.00041: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -1.45e-125: tmp = t_0 * math.sqrt(0.5) elif F <= 5.8e-106: tmp = ((F / B) / (F + ((0.5 * t_2) / F))) - t_1 elif F <= 1.65e-6: tmp = ((F * math.sqrt((1.0 / t_2))) - x) / B elif (F <= 1.32e+80) or (not (F <= 6.5e+163) and (F <= 2.6e+206)): tmp = (t_0 * (1.0 / F)) - (x / B) else: tmp = (1.0 / B) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) t_0 = Float64(F / sin(B)) t_1 = Float64(x / tan(B)) t_2 = Float64(2.0 + Float64(x * 2.0)) tmp = 0.0 if (F <= -0.00041) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -1.45e-125) tmp = Float64(t_0 * sqrt(0.5)); elseif (F <= 5.8e-106) tmp = Float64(Float64(Float64(F / B) / Float64(F + Float64(Float64(0.5 * t_2) / F))) - t_1); elseif (F <= 1.65e-6) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / t_2))) - x) / B); elseif ((F <= 1.32e+80) || (!(F <= 6.5e+163) && (F <= 2.6e+206))) tmp = Float64(Float64(t_0 * Float64(1.0 / F)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = F / sin(B); t_1 = x / tan(B); t_2 = 2.0 + (x * 2.0); tmp = 0.0; if (F <= -0.00041) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -1.45e-125) tmp = t_0 * sqrt(0.5); elseif (F <= 5.8e-106) tmp = ((F / B) / (F + ((0.5 * t_2) / F))) - t_1; elseif (F <= 1.65e-6) tmp = ((F * sqrt((1.0 / t_2))) - x) / B; elseif ((F <= 1.32e+80) || (~((F <= 6.5e+163)) && (F <= 2.6e+206))) tmp = (t_0 * (1.0 / F)) - (x / B); else tmp = (1.0 / B) - (x * (1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.00041], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -1.45e-125], N[(t$95$0 * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.8e-106], N[(N[(N[(F / B), $MachinePrecision] / N[(F + N[(N[(0.5 * t$95$2), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 1.65e-6], N[(N[(N[(F * N[Sqrt[N[(1.0 / t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[Or[LessEqual[F, 1.32e+80], And[N[Not[LessEqual[F, 6.5e+163]], $MachinePrecision], LessEqual[F, 2.6e+206]]], N[(N[(t$95$0 * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B}\\
t_1 := \frac{x}{\tan B}\\
t_2 := 2 + x \cdot 2\\
\mathbf{if}\;F \leq -0.00041:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq -1.45 \cdot 10^{-125}:\\
\;\;\;\;t_0 \cdot \sqrt{0.5}\\
\mathbf{elif}\;F \leq 5.8 \cdot 10^{-106}:\\
\;\;\;\;\frac{\frac{F}{B}}{F + \frac{0.5 \cdot t_2}{F}} - t_1\\
\mathbf{elif}\;F \leq 1.65 \cdot 10^{-6}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{t_2}} - x}{B}\\
\mathbf{elif}\;F \leq 1.32 \cdot 10^{+80} \lor \neg \left(F \leq 6.5 \cdot 10^{+163}\right) \land F \leq 2.6 \cdot 10^{+206}:\\
\;\;\;\;t_0 \cdot \frac{1}{F} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -4.0999999999999999e-4Initial program 74.9%
distribute-lft-neg-in74.9%
+-commutative74.9%
cancel-sign-sub-inv74.9%
Simplified82.8%
clear-num82.7%
inv-pow82.7%
fma-def82.7%
fma-udef82.7%
*-commutative82.7%
fma-def82.7%
fma-def82.7%
Applied egg-rr82.7%
unpow-182.7%
Simplified82.7%
Taylor expanded in F around -inf 99.8%
if -4.0999999999999999e-4 < F < -1.4500000000000001e-125Initial program 99.6%
distribute-lft-neg-in99.6%
+-commutative99.6%
cancel-sign-sub-inv99.6%
Simplified99.4%
Taylor expanded in F around 0 99.4%
Taylor expanded in x around 0 83.9%
div-inv83.8%
*-commutative83.8%
associate-*l*83.9%
div-inv84.2%
Applied egg-rr84.2%
if -1.4500000000000001e-125 < F < 5.8000000000000001e-106Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.7%
clear-num99.7%
inv-pow99.7%
fma-def99.7%
fma-udef99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
Applied egg-rr99.7%
unpow-199.7%
Simplified99.7%
expm1-log1p-u90.9%
expm1-udef81.3%
un-div-inv81.3%
div-inv81.3%
pow-flip81.3%
metadata-eval81.3%
pow1/281.3%
Applied egg-rr81.3%
expm1-def90.8%
expm1-log1p99.7%
associate-/r*99.7%
Simplified99.7%
Taylor expanded in F around inf 84.5%
Taylor expanded in B around 0 84.5%
associate-/r*84.5%
associate-*r/84.5%
Simplified84.5%
if 5.8000000000000001e-106 < F < 1.65000000000000008e-6Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.5%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 75.6%
if 1.65000000000000008e-6 < F < 1.3200000000000001e80 or 6.4999999999999998e163 < F < 2.59999999999999989e206Initial program 61.8%
Taylor expanded in F around inf 88.7%
Taylor expanded in B around 0 84.4%
if 1.3200000000000001e80 < F < 6.4999999999999998e163 or 2.59999999999999989e206 < F Initial program 63.2%
Taylor expanded in F around inf 83.0%
Taylor expanded in B around 0 85.2%
Final simplification87.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B)))
(t_1 (- (/ -1.0 B) t_0))
(t_2 (/ F (sin B)))
(t_3 (+ 2.0 (* x 2.0)))
(t_4 (/ (- (* F (sqrt (/ 1.0 t_3))) x) B)))
(if (<= F -4.8e+105)
t_1
(if (<= F -1.65e+82)
(- (* t_2 (/ -1.0 F)) (/ x B))
(if (<= F -600000.0)
t_1
(if (<= F -3.5e-83)
t_4
(if (<= F 6.5e-107)
(- (/ (/ F B) (+ F (/ (* 0.5 t_3) F))) t_0)
(if (<= F 1.65e-6)
t_4
(if (or (<= F 2.2e+81)
(and (not (<= F 2.1e+163)) (<= F 9e+206)))
(- (* t_2 (/ 1.0 F)) (/ x B))
(- (/ 1.0 B) (* x (/ 1.0 (tan B)))))))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = (-1.0 / B) - t_0;
double t_2 = F / sin(B);
double t_3 = 2.0 + (x * 2.0);
double t_4 = ((F * sqrt((1.0 / t_3))) - x) / B;
double tmp;
if (F <= -4.8e+105) {
tmp = t_1;
} else if (F <= -1.65e+82) {
tmp = (t_2 * (-1.0 / F)) - (x / B);
} else if (F <= -600000.0) {
tmp = t_1;
} else if (F <= -3.5e-83) {
tmp = t_4;
} else if (F <= 6.5e-107) {
tmp = ((F / B) / (F + ((0.5 * t_3) / F))) - t_0;
} else if (F <= 1.65e-6) {
tmp = t_4;
} else if ((F <= 2.2e+81) || (!(F <= 2.1e+163) && (F <= 9e+206))) {
tmp = (t_2 * (1.0 / F)) - (x / B);
} else {
tmp = (1.0 / B) - (x * (1.0 / tan(B)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = x / tan(b)
t_1 = ((-1.0d0) / b) - t_0
t_2 = f / sin(b)
t_3 = 2.0d0 + (x * 2.0d0)
t_4 = ((f * sqrt((1.0d0 / t_3))) - x) / b
if (f <= (-4.8d+105)) then
tmp = t_1
else if (f <= (-1.65d+82)) then
tmp = (t_2 * ((-1.0d0) / f)) - (x / b)
else if (f <= (-600000.0d0)) then
tmp = t_1
else if (f <= (-3.5d-83)) then
tmp = t_4
else if (f <= 6.5d-107) then
tmp = ((f / b) / (f + ((0.5d0 * t_3) / f))) - t_0
else if (f <= 1.65d-6) then
tmp = t_4
else if ((f <= 2.2d+81) .or. (.not. (f <= 2.1d+163)) .and. (f <= 9d+206)) then
tmp = (t_2 * (1.0d0 / f)) - (x / b)
else
tmp = (1.0d0 / b) - (x * (1.0d0 / tan(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 t_1 = (-1.0 / B) - t_0;
double t_2 = F / Math.sin(B);
double t_3 = 2.0 + (x * 2.0);
double t_4 = ((F * Math.sqrt((1.0 / t_3))) - x) / B;
double tmp;
if (F <= -4.8e+105) {
tmp = t_1;
} else if (F <= -1.65e+82) {
tmp = (t_2 * (-1.0 / F)) - (x / B);
} else if (F <= -600000.0) {
tmp = t_1;
} else if (F <= -3.5e-83) {
tmp = t_4;
} else if (F <= 6.5e-107) {
tmp = ((F / B) / (F + ((0.5 * t_3) / F))) - t_0;
} else if (F <= 1.65e-6) {
tmp = t_4;
} else if ((F <= 2.2e+81) || (!(F <= 2.1e+163) && (F <= 9e+206))) {
tmp = (t_2 * (1.0 / F)) - (x / B);
} else {
tmp = (1.0 / B) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) t_1 = (-1.0 / B) - t_0 t_2 = F / math.sin(B) t_3 = 2.0 + (x * 2.0) t_4 = ((F * math.sqrt((1.0 / t_3))) - x) / B tmp = 0 if F <= -4.8e+105: tmp = t_1 elif F <= -1.65e+82: tmp = (t_2 * (-1.0 / F)) - (x / B) elif F <= -600000.0: tmp = t_1 elif F <= -3.5e-83: tmp = t_4 elif F <= 6.5e-107: tmp = ((F / B) / (F + ((0.5 * t_3) / F))) - t_0 elif F <= 1.65e-6: tmp = t_4 elif (F <= 2.2e+81) or (not (F <= 2.1e+163) and (F <= 9e+206)): tmp = (t_2 * (1.0 / F)) - (x / B) else: tmp = (1.0 / B) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(Float64(-1.0 / B) - t_0) t_2 = Float64(F / sin(B)) t_3 = Float64(2.0 + Float64(x * 2.0)) t_4 = Float64(Float64(Float64(F * sqrt(Float64(1.0 / t_3))) - x) / B) tmp = 0.0 if (F <= -4.8e+105) tmp = t_1; elseif (F <= -1.65e+82) tmp = Float64(Float64(t_2 * Float64(-1.0 / F)) - Float64(x / B)); elseif (F <= -600000.0) tmp = t_1; elseif (F <= -3.5e-83) tmp = t_4; elseif (F <= 6.5e-107) tmp = Float64(Float64(Float64(F / B) / Float64(F + Float64(Float64(0.5 * t_3) / F))) - t_0); elseif (F <= 1.65e-6) tmp = t_4; elseif ((F <= 2.2e+81) || (!(F <= 2.1e+163) && (F <= 9e+206))) tmp = Float64(Float64(t_2 * Float64(1.0 / F)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); t_1 = (-1.0 / B) - t_0; t_2 = F / sin(B); t_3 = 2.0 + (x * 2.0); t_4 = ((F * sqrt((1.0 / t_3))) - x) / B; tmp = 0.0; if (F <= -4.8e+105) tmp = t_1; elseif (F <= -1.65e+82) tmp = (t_2 * (-1.0 / F)) - (x / B); elseif (F <= -600000.0) tmp = t_1; elseif (F <= -3.5e-83) tmp = t_4; elseif (F <= 6.5e-107) tmp = ((F / B) / (F + ((0.5 * t_3) / F))) - t_0; elseif (F <= 1.65e-6) tmp = t_4; elseif ((F <= 2.2e+81) || (~((F <= 2.1e+163)) && (F <= 9e+206))) tmp = (t_2 * (1.0 / F)) - (x / B); else tmp = (1.0 / B) - (x * (1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(F * N[Sqrt[N[(1.0 / t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[F, -4.8e+105], t$95$1, If[LessEqual[F, -1.65e+82], N[(N[(t$95$2 * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -600000.0], t$95$1, If[LessEqual[F, -3.5e-83], t$95$4, If[LessEqual[F, 6.5e-107], N[(N[(N[(F / B), $MachinePrecision] / N[(F + N[(N[(0.5 * t$95$3), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.65e-6], t$95$4, If[Or[LessEqual[F, 2.2e+81], And[N[Not[LessEqual[F, 2.1e+163]], $MachinePrecision], LessEqual[F, 9e+206]]], N[(N[(t$95$2 * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := \frac{-1}{B} - t_0\\
t_2 := \frac{F}{\sin B}\\
t_3 := 2 + x \cdot 2\\
t_4 := \frac{F \cdot \sqrt{\frac{1}{t_3}} - x}{B}\\
\mathbf{if}\;F \leq -4.8 \cdot 10^{+105}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -1.65 \cdot 10^{+82}:\\
\;\;\;\;t_2 \cdot \frac{-1}{F} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -600000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -3.5 \cdot 10^{-83}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;F \leq 6.5 \cdot 10^{-107}:\\
\;\;\;\;\frac{\frac{F}{B}}{F + \frac{0.5 \cdot t_3}{F}} - t_0\\
\mathbf{elif}\;F \leq 1.65 \cdot 10^{-6}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;F \leq 2.2 \cdot 10^{+81} \lor \neg \left(F \leq 2.1 \cdot 10^{+163}\right) \land F \leq 9 \cdot 10^{+206}:\\
\;\;\;\;t_2 \cdot \frac{1}{F} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -4.7999999999999995e105 or -1.6499999999999999e82 < F < -6e5Initial program 70.8%
distribute-lft-neg-in70.8%
+-commutative70.8%
cancel-sign-sub-inv70.8%
Simplified80.1%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 81.8%
if -4.7999999999999995e105 < F < -1.6499999999999999e82Initial program 99.6%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 87.8%
if -6e5 < F < -3.5000000000000003e-83 or 6.5000000000000002e-107 < F < 1.65000000000000008e-6Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 71.1%
if -3.5000000000000003e-83 < F < 6.5000000000000002e-107Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.7%
clear-num99.6%
inv-pow99.6%
fma-def99.6%
fma-udef99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
Applied egg-rr99.6%
unpow-199.6%
Simplified99.6%
expm1-log1p-u90.2%
expm1-udef77.9%
un-div-inv77.9%
div-inv77.9%
pow-flip77.9%
metadata-eval77.9%
pow1/277.9%
Applied egg-rr77.9%
expm1-def90.2%
expm1-log1p99.7%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in F around inf 81.0%
Taylor expanded in B around 0 81.0%
associate-/r*81.0%
associate-*r/81.0%
Simplified81.0%
if 1.65000000000000008e-6 < F < 2.19999999999999987e81 or 2.1e163 < F < 9.00000000000000035e206Initial program 61.8%
Taylor expanded in F around inf 88.7%
Taylor expanded in B around 0 84.4%
if 2.19999999999999987e81 < F < 2.1e163 or 9.00000000000000035e206 < F Initial program 63.2%
Taylor expanded in F around inf 83.0%
Taylor expanded in B around 0 85.2%
Final simplification81.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ F (sin B))) (t_1 (- (/ -1.0 B) (/ x (tan B)))))
(if (<= F -5.5e+105)
t_1
(if (<= F -3e+82)
(- (* t_0 (/ -1.0 F)) (/ x B))
(if (<= F -600000.0)
t_1
(if (<= F 1.65e-6)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(if (or (<= F 1.4e+81) (and (not (<= F 2.85e+163)) (<= F 9e+206)))
(- (* t_0 (/ 1.0 F)) (/ x B))
(- (/ 1.0 B) (* x (/ 1.0 (tan B)))))))))))
double code(double F, double B, double x) {
double t_0 = F / sin(B);
double t_1 = (-1.0 / B) - (x / tan(B));
double tmp;
if (F <= -5.5e+105) {
tmp = t_1;
} else if (F <= -3e+82) {
tmp = (t_0 * (-1.0 / F)) - (x / B);
} else if (F <= -600000.0) {
tmp = t_1;
} else if (F <= 1.65e-6) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if ((F <= 1.4e+81) || (!(F <= 2.85e+163) && (F <= 9e+206))) {
tmp = (t_0 * (1.0 / F)) - (x / B);
} else {
tmp = (1.0 / B) - (x * (1.0 / tan(B)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = f / sin(b)
t_1 = ((-1.0d0) / b) - (x / tan(b))
if (f <= (-5.5d+105)) then
tmp = t_1
else if (f <= (-3d+82)) then
tmp = (t_0 * ((-1.0d0) / f)) - (x / b)
else if (f <= (-600000.0d0)) then
tmp = t_1
else if (f <= 1.65d-6) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
else if ((f <= 1.4d+81) .or. (.not. (f <= 2.85d+163)) .and. (f <= 9d+206)) then
tmp = (t_0 * (1.0d0 / f)) - (x / b)
else
tmp = (1.0d0 / b) - (x * (1.0d0 / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = F / Math.sin(B);
double t_1 = (-1.0 / B) - (x / Math.tan(B));
double tmp;
if (F <= -5.5e+105) {
tmp = t_1;
} else if (F <= -3e+82) {
tmp = (t_0 * (-1.0 / F)) - (x / B);
} else if (F <= -600000.0) {
tmp = t_1;
} else if (F <= 1.65e-6) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if ((F <= 1.4e+81) || (!(F <= 2.85e+163) && (F <= 9e+206))) {
tmp = (t_0 * (1.0 / F)) - (x / B);
} else {
tmp = (1.0 / B) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): t_0 = F / math.sin(B) t_1 = (-1.0 / B) - (x / math.tan(B)) tmp = 0 if F <= -5.5e+105: tmp = t_1 elif F <= -3e+82: tmp = (t_0 * (-1.0 / F)) - (x / B) elif F <= -600000.0: tmp = t_1 elif F <= 1.65e-6: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B elif (F <= 1.4e+81) or (not (F <= 2.85e+163) and (F <= 9e+206)): tmp = (t_0 * (1.0 / F)) - (x / B) else: tmp = (1.0 / B) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) t_0 = Float64(F / sin(B)) t_1 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) tmp = 0.0 if (F <= -5.5e+105) tmp = t_1; elseif (F <= -3e+82) tmp = Float64(Float64(t_0 * Float64(-1.0 / F)) - Float64(x / B)); elseif (F <= -600000.0) tmp = t_1; elseif (F <= 1.65e-6) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B); elseif ((F <= 1.4e+81) || (!(F <= 2.85e+163) && (F <= 9e+206))) tmp = Float64(Float64(t_0 * Float64(1.0 / F)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = F / sin(B); t_1 = (-1.0 / B) - (x / tan(B)); tmp = 0.0; if (F <= -5.5e+105) tmp = t_1; elseif (F <= -3e+82) tmp = (t_0 * (-1.0 / F)) - (x / B); elseif (F <= -600000.0) tmp = t_1; elseif (F <= 1.65e-6) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; elseif ((F <= 1.4e+81) || (~((F <= 2.85e+163)) && (F <= 9e+206))) tmp = (t_0 * (1.0 / F)) - (x / B); else tmp = (1.0 / B) - (x * (1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.5e+105], t$95$1, If[LessEqual[F, -3e+82], N[(N[(t$95$0 * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -600000.0], t$95$1, If[LessEqual[F, 1.65e-6], 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], If[Or[LessEqual[F, 1.4e+81], And[N[Not[LessEqual[F, 2.85e+163]], $MachinePrecision], LessEqual[F, 9e+206]]], N[(N[(t$95$0 * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B}\\
t_1 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5.5 \cdot 10^{+105}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -3 \cdot 10^{+82}:\\
\;\;\;\;t_0 \cdot \frac{-1}{F} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -600000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 1.65 \cdot 10^{-6}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{+81} \lor \neg \left(F \leq 2.85 \cdot 10^{+163}\right) \land F \leq 9 \cdot 10^{+206}:\\
\;\;\;\;t_0 \cdot \frac{1}{F} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -5.49999999999999979e105 or -2.99999999999999989e82 < F < -6e5Initial program 70.8%
distribute-lft-neg-in70.8%
+-commutative70.8%
cancel-sign-sub-inv70.8%
Simplified80.1%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 81.8%
if -5.49999999999999979e105 < F < -2.99999999999999989e82Initial program 99.6%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 87.8%
if -6e5 < F < 1.65000000000000008e-6Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.6%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 59.1%
if 1.65000000000000008e-6 < F < 1.39999999999999997e81 or 2.8499999999999999e163 < F < 9.00000000000000035e206Initial program 61.8%
Taylor expanded in F around inf 88.7%
Taylor expanded in B around 0 84.4%
if 1.39999999999999997e81 < F < 2.8499999999999999e163 or 9.00000000000000035e206 < F Initial program 63.2%
Taylor expanded in F around inf 83.0%
Taylor expanded in B around 0 85.2%
Final simplification72.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B))))
(t_1 (+ F (* 0.5 (/ (+ 2.0 (* x 2.0)) F)))))
(if (<= B -1.06e+220)
t_0
(if (<= B -1.28e+188)
(- (* (/ F (sin B)) (/ -1.0 F)) (/ x B))
(if (<= B -0.0028)
(- (/ 1.0 B) (* x (/ 1.0 (tan B))))
(if (<= B 2.15e-11)
(-
(+
(*
B
(- (* x 0.3333333333333333) (* -0.16666666666666666 (/ F t_1))))
(/ F (* B t_1)))
(/ x B))
t_0))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double t_1 = F + (0.5 * ((2.0 + (x * 2.0)) / F));
double tmp;
if (B <= -1.06e+220) {
tmp = t_0;
} else if (B <= -1.28e+188) {
tmp = ((F / sin(B)) * (-1.0 / F)) - (x / B);
} else if (B <= -0.0028) {
tmp = (1.0 / B) - (x * (1.0 / tan(B)));
} else if (B <= 2.15e-11) {
tmp = ((B * ((x * 0.3333333333333333) - (-0.16666666666666666 * (F / t_1)))) + (F / (B * t_1))) - (x / B);
} else {
tmp = 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) :: t_1
real(8) :: tmp
t_0 = ((-1.0d0) / b) - (x / tan(b))
t_1 = f + (0.5d0 * ((2.0d0 + (x * 2.0d0)) / f))
if (b <= (-1.06d+220)) then
tmp = t_0
else if (b <= (-1.28d+188)) then
tmp = ((f / sin(b)) * ((-1.0d0) / f)) - (x / b)
else if (b <= (-0.0028d0)) then
tmp = (1.0d0 / b) - (x * (1.0d0 / tan(b)))
else if (b <= 2.15d-11) then
tmp = ((b * ((x * 0.3333333333333333d0) - ((-0.16666666666666666d0) * (f / t_1)))) + (f / (b * t_1))) - (x / b)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / Math.tan(B));
double t_1 = F + (0.5 * ((2.0 + (x * 2.0)) / F));
double tmp;
if (B <= -1.06e+220) {
tmp = t_0;
} else if (B <= -1.28e+188) {
tmp = ((F / Math.sin(B)) * (-1.0 / F)) - (x / B);
} else if (B <= -0.0028) {
tmp = (1.0 / B) - (x * (1.0 / Math.tan(B)));
} else if (B <= 2.15e-11) {
tmp = ((B * ((x * 0.3333333333333333) - (-0.16666666666666666 * (F / t_1)))) + (F / (B * t_1))) - (x / B);
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x / math.tan(B)) t_1 = F + (0.5 * ((2.0 + (x * 2.0)) / F)) tmp = 0 if B <= -1.06e+220: tmp = t_0 elif B <= -1.28e+188: tmp = ((F / math.sin(B)) * (-1.0 / F)) - (x / B) elif B <= -0.0028: tmp = (1.0 / B) - (x * (1.0 / math.tan(B))) elif B <= 2.15e-11: tmp = ((B * ((x * 0.3333333333333333) - (-0.16666666666666666 * (F / t_1)))) + (F / (B * t_1))) - (x / B) else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) t_1 = Float64(F + Float64(0.5 * Float64(Float64(2.0 + Float64(x * 2.0)) / F))) tmp = 0.0 if (B <= -1.06e+220) tmp = t_0; elseif (B <= -1.28e+188) tmp = Float64(Float64(Float64(F / sin(B)) * Float64(-1.0 / F)) - Float64(x / B)); elseif (B <= -0.0028) tmp = Float64(Float64(1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); elseif (B <= 2.15e-11) tmp = Float64(Float64(Float64(B * Float64(Float64(x * 0.3333333333333333) - Float64(-0.16666666666666666 * Float64(F / t_1)))) + Float64(F / Float64(B * t_1))) - Float64(x / B)); else tmp = t_0; end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x / tan(B)); t_1 = F + (0.5 * ((2.0 + (x * 2.0)) / F)); tmp = 0.0; if (B <= -1.06e+220) tmp = t_0; elseif (B <= -1.28e+188) tmp = ((F / sin(B)) * (-1.0 / F)) - (x / B); elseif (B <= -0.0028) tmp = (1.0 / B) - (x * (1.0 / tan(B))); elseif (B <= 2.15e-11) tmp = ((B * ((x * 0.3333333333333333) - (-0.16666666666666666 * (F / t_1)))) + (F / (B * t_1))) - (x / B); else tmp = t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(F + N[(0.5 * N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.06e+220], t$95$0, If[LessEqual[B, -1.28e+188], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -0.0028], N[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.15e-11], N[(N[(N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] - N[(-0.16666666666666666 * N[(F / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F / N[(B * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
t_1 := F + 0.5 \cdot \frac{2 + x \cdot 2}{F}\\
\mathbf{if}\;B \leq -1.06 \cdot 10^{+220}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -1.28 \cdot 10^{+188}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \frac{-1}{F} - \frac{x}{B}\\
\mathbf{elif}\;B \leq -0.0028:\\
\;\;\;\;\frac{1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;B \leq 2.15 \cdot 10^{-11}:\\
\;\;\;\;\left(B \cdot \left(x \cdot 0.3333333333333333 - -0.16666666666666666 \cdot \frac{F}{t_1}\right) + \frac{F}{B \cdot t_1}\right) - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if B < -1.05999999999999997e220 or 2.15000000000000001e-11 < B Initial program 89.0%
distribute-lft-neg-in89.0%
+-commutative89.0%
cancel-sign-sub-inv89.0%
Simplified89.1%
Taylor expanded in F around -inf 49.9%
Taylor expanded in B around 0 58.9%
if -1.05999999999999997e220 < B < -1.27999999999999997e188Initial program 46.7%
Taylor expanded in F around -inf 56.6%
Taylor expanded in B around 0 52.2%
if -1.27999999999999997e188 < B < -0.00279999999999999997Initial program 95.0%
Taylor expanded in F around inf 51.6%
Taylor expanded in B around 0 55.8%
if -0.00279999999999999997 < B < 2.15000000000000001e-11Initial program 77.3%
distribute-lft-neg-in77.3%
+-commutative77.3%
cancel-sign-sub-inv77.3%
Simplified89.2%
clear-num89.1%
inv-pow89.1%
fma-def89.1%
fma-udef89.1%
*-commutative89.1%
fma-def89.1%
fma-def89.1%
Applied egg-rr89.1%
unpow-189.1%
Simplified89.1%
expm1-log1p-u66.1%
expm1-udef60.1%
un-div-inv60.1%
div-inv60.1%
pow-flip60.1%
metadata-eval60.1%
pow1/260.1%
Applied egg-rr60.1%
expm1-def66.0%
expm1-log1p89.2%
associate-/r*77.4%
Simplified77.4%
Taylor expanded in F around inf 60.2%
Taylor expanded in B around 0 69.2%
Final simplification63.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ F (* 0.5 (/ (+ 2.0 (* x 2.0)) F)))))
(if (or (<= B -0.0028) (not (<= B 1.95e-11)))
(- (/ -1.0 B) (/ x (tan B)))
(-
(+
(* B (- (* x 0.3333333333333333) (* -0.16666666666666666 (/ F t_0))))
(/ F (* B t_0)))
(/ x B)))))
double code(double F, double B, double x) {
double t_0 = F + (0.5 * ((2.0 + (x * 2.0)) / F));
double tmp;
if ((B <= -0.0028) || !(B <= 1.95e-11)) {
tmp = (-1.0 / B) - (x / tan(B));
} else {
tmp = ((B * ((x * 0.3333333333333333) - (-0.16666666666666666 * (F / t_0)))) + (F / (B * 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) :: tmp
t_0 = f + (0.5d0 * ((2.0d0 + (x * 2.0d0)) / f))
if ((b <= (-0.0028d0)) .or. (.not. (b <= 1.95d-11))) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else
tmp = ((b * ((x * 0.3333333333333333d0) - ((-0.16666666666666666d0) * (f / t_0)))) + (f / (b * t_0))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = F + (0.5 * ((2.0 + (x * 2.0)) / F));
double tmp;
if ((B <= -0.0028) || !(B <= 1.95e-11)) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else {
tmp = ((B * ((x * 0.3333333333333333) - (-0.16666666666666666 * (F / t_0)))) + (F / (B * t_0))) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = F + (0.5 * ((2.0 + (x * 2.0)) / F)) tmp = 0 if (B <= -0.0028) or not (B <= 1.95e-11): tmp = (-1.0 / B) - (x / math.tan(B)) else: tmp = ((B * ((x * 0.3333333333333333) - (-0.16666666666666666 * (F / t_0)))) + (F / (B * t_0))) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(F + Float64(0.5 * Float64(Float64(2.0 + Float64(x * 2.0)) / F))) tmp = 0.0 if ((B <= -0.0028) || !(B <= 1.95e-11)) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); else tmp = Float64(Float64(Float64(B * Float64(Float64(x * 0.3333333333333333) - Float64(-0.16666666666666666 * Float64(F / t_0)))) + Float64(F / Float64(B * t_0))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = F + (0.5 * ((2.0 + (x * 2.0)) / F)); tmp = 0.0; if ((B <= -0.0028) || ~((B <= 1.95e-11))) tmp = (-1.0 / B) - (x / tan(B)); else tmp = ((B * ((x * 0.3333333333333333) - (-0.16666666666666666 * (F / t_0)))) + (F / (B * t_0))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(F + N[(0.5 * N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[B, -0.0028], N[Not[LessEqual[B, 1.95e-11]], $MachinePrecision]], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] - N[(-0.16666666666666666 * N[(F / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F / N[(B * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := F + 0.5 \cdot \frac{2 + x \cdot 2}{F}\\
\mathbf{if}\;B \leq -0.0028 \lor \neg \left(B \leq 1.95 \cdot 10^{-11}\right):\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\left(B \cdot \left(x \cdot 0.3333333333333333 - -0.16666666666666666 \cdot \frac{F}{t_0}\right) + \frac{F}{B \cdot t_0}\right) - \frac{x}{B}\\
\end{array}
\end{array}
if B < -0.00279999999999999997 or 1.95000000000000005e-11 < B Initial program 88.0%
distribute-lft-neg-in88.0%
+-commutative88.0%
cancel-sign-sub-inv88.0%
Simplified88.0%
Taylor expanded in F around -inf 51.7%
Taylor expanded in B around 0 54.0%
if -0.00279999999999999997 < B < 1.95000000000000005e-11Initial program 77.3%
distribute-lft-neg-in77.3%
+-commutative77.3%
cancel-sign-sub-inv77.3%
Simplified89.2%
clear-num89.1%
inv-pow89.1%
fma-def89.1%
fma-udef89.1%
*-commutative89.1%
fma-def89.1%
fma-def89.1%
Applied egg-rr89.1%
unpow-189.1%
Simplified89.1%
expm1-log1p-u66.1%
expm1-udef60.1%
un-div-inv60.1%
div-inv60.1%
pow-flip60.1%
metadata-eval60.1%
pow1/260.1%
Applied egg-rr60.1%
expm1-def66.0%
expm1-log1p89.2%
associate-/r*77.4%
Simplified77.4%
Taylor expanded in F around inf 60.2%
Taylor expanded in B around 0 69.2%
Final simplification61.6%
(FPCore (F B x) :precision binary64 (/ (- (/ F (+ F (/ (* 0.5 (+ 2.0 (* x 2.0))) F))) x) B))
double code(double F, double B, double x) {
return ((F / (F + ((0.5 * (2.0 + (x * 2.0))) / F))) - 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 = ((f / (f + ((0.5d0 * (2.0d0 + (x * 2.0d0))) / f))) - x) / b
end function
public static double code(double F, double B, double x) {
return ((F / (F + ((0.5 * (2.0 + (x * 2.0))) / F))) - x) / B;
}
def code(F, B, x): return ((F / (F + ((0.5 * (2.0 + (x * 2.0))) / F))) - x) / B
function code(F, B, x) return Float64(Float64(Float64(F / Float64(F + Float64(Float64(0.5 * Float64(2.0 + Float64(x * 2.0))) / F))) - x) / B) end
function tmp = code(F, B, x) tmp = ((F / (F + ((0.5 * (2.0 + (x * 2.0))) / F))) - x) / B; end
code[F_, B_, x_] := N[(N[(N[(F / N[(F + N[(N[(0.5 * N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{F}{F + \frac{0.5 \cdot \left(2 + x \cdot 2\right)}{F}} - x}{B}
\end{array}
Initial program 82.7%
distribute-lft-neg-in82.7%
+-commutative82.7%
cancel-sign-sub-inv82.7%
Simplified88.6%
clear-num88.6%
inv-pow88.6%
fma-def88.6%
fma-udef88.6%
*-commutative88.6%
fma-def88.6%
fma-def88.6%
Applied egg-rr88.6%
unpow-188.6%
Simplified88.6%
expm1-log1p-u71.7%
expm1-udef63.1%
un-div-inv63.1%
div-inv63.1%
pow-flip63.1%
metadata-eval63.1%
pow1/263.1%
Applied egg-rr63.1%
expm1-def71.6%
expm1-log1p88.6%
associate-/r*82.8%
Simplified82.8%
Taylor expanded in F around inf 67.7%
Taylor expanded in B around 0 37.1%
associate-*r/37.1%
Simplified37.1%
Final simplification37.1%
(FPCore (F B x) :precision binary64 (- (* 0.3333333333333333 (* B x)) (/ x B)))
double code(double F, double B, double x) {
return (0.3333333333333333 * (B * x)) - (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 = (0.3333333333333333d0 * (b * x)) - (x / b)
end function
public static double code(double F, double B, double x) {
return (0.3333333333333333 * (B * x)) - (x / B);
}
def code(F, B, x): return (0.3333333333333333 * (B * x)) - (x / B)
function code(F, B, x) return Float64(Float64(0.3333333333333333 * Float64(B * x)) - Float64(x / B)) end
function tmp = code(F, B, x) tmp = (0.3333333333333333 * (B * x)) - (x / B); end
code[F_, B_, x_] := N[(N[(0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.3333333333333333 \cdot \left(B \cdot x\right) - \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%
associate-*l/58.7%
*-commutative58.7%
distribute-rgt-neg-in58.7%
Simplified58.7%
clear-num58.6%
inv-pow58.6%
Applied egg-rr58.6%
unpow-158.6%
Simplified58.6%
Taylor expanded in B around 0 31.6%
mul-1-neg31.6%
unsub-neg31.6%
distribute-rgt-out--31.6%
metadata-eval31.6%
associate-*r*31.6%
*-commutative31.6%
associate-*r*31.6%
metadata-eval31.6%
Simplified31.6%
Final simplification31.6%
(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%
associate-*l/58.7%
*-commutative58.7%
distribute-rgt-neg-in58.7%
Simplified58.7%
Taylor expanded in B around 0 31.5%
associate-*r/31.5%
neg-mul-131.5%
Simplified31.5%
Final simplification31.5%
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))))))