
(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 26 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 -2.35e+43)
(- (/ -1.0 (sin B)) (* (cos B) (/ x (sin B))))
(if (<= F 20000.0)
(- (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 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 <= -2.35e+43) {
tmp = (-1.0 / sin(B)) - (cos(B) * (x / sin(B)));
} else if (F <= 20000.0) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-2.35d+43)) then
tmp = ((-1.0d0) / sin(b)) - (cos(b) * (x / sin(b)))
else if (f <= 20000.0d0) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -2.35e+43) {
tmp = (-1.0 / Math.sin(B)) - (Math.cos(B) * (x / Math.sin(B)));
} else if (F <= 20000.0) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -2.35e+43: tmp = (-1.0 / math.sin(B)) - (math.cos(B) * (x / math.sin(B))) elif F <= 20000.0: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.35e+43) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(cos(B) * Float64(x / sin(B)))); elseif (F <= 20000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -2.35e+43) tmp = (-1.0 / sin(B)) - (cos(B) * (x / sin(B))); elseif (F <= 20000.0) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.35e+43], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[Cos[B], $MachinePrecision] * N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 20000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $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 -2.35 \cdot 10^{+43}:\\
\;\;\;\;\frac{-1}{\sin B} - \cos B \cdot \frac{x}{\sin B}\\
\mathbf{elif}\;F \leq 20000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -2.34999999999999999e43Initial program 60.7%
Taylor expanded in F around -inf 99.7%
Taylor expanded in x around 0 99.8%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
if -2.34999999999999999e43 < F < 2e4Initial program 99.5%
div-inv99.6%
expm1-log1p-u73.7%
expm1-udef59.3%
Applied egg-rr59.3%
expm1-def73.7%
expm1-log1p99.6%
Simplified99.6%
if 2e4 < F Initial program 63.1%
Taylor expanded in F around -inf 54.0%
neg-sub054.0%
associate-+l-54.0%
add-sqr-sqrt23.9%
sqrt-unprod12.1%
sqr-neg12.1%
sqrt-unprod0.4%
add-sqr-sqrt0.7%
div-inv0.7%
cancel-sign-sub-inv0.7%
metadata-eval0.7%
*-un-lft-identity0.7%
add-sqr-sqrt0.4%
sqrt-unprod18.5%
frac-times18.5%
metadata-eval18.5%
metadata-eval18.5%
frac-times18.5%
Applied egg-rr99.8%
associate--r+99.8%
neg-sub099.8%
distribute-neg-frac99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(if (<= F -1.98)
(- (/ -1.0 (sin B)) (* (cos B) (/ x (sin B))))
(if (<= F 3.4e-6)
(+
(* x (/ -1.0 (tan B)))
(* (/ F (sin B)) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))))
(- (/ 1.0 (sin B)) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.98) {
tmp = (-1.0 / sin(B)) - (cos(B) * (x / sin(B)));
} else if (F <= 3.4e-6) {
tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0)))));
} else {
tmp = (1.0 / sin(B)) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.98d0)) then
tmp = ((-1.0d0) / sin(b)) - (cos(b) * (x / sin(b)))
else if (f <= 3.4d-6) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f / sin(b)) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))
else
tmp = (1.0d0 / sin(b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.98) {
tmp = (-1.0 / Math.sin(B)) - (Math.cos(B) * (x / Math.sin(B)));
} else if (F <= 3.4e-6) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.sqrt((1.0 / (2.0 + (x * 2.0)))));
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.98: tmp = (-1.0 / math.sin(B)) - (math.cos(B) * (x / math.sin(B))) elif F <= 3.4e-6: tmp = (x * (-1.0 / math.tan(B))) + ((F / math.sin(B)) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.98) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(cos(B) * Float64(x / sin(B)))); elseif (F <= 3.4e-6) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.98) tmp = (-1.0 / sin(B)) - (cos(B) * (x / sin(B))); elseif (F <= 3.4e-6) tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.98], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[Cos[B], $MachinePrecision] * N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.4e-6], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.98:\\
\;\;\;\;\frac{-1}{\sin B} - \cos B \cdot \frac{x}{\sin B}\\
\mathbf{elif}\;F \leq 3.4 \cdot 10^{-6}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.98Initial program 66.5%
Taylor expanded in F around -inf 98.7%
Taylor expanded in x around 0 98.7%
associate-*l/98.7%
*-commutative98.7%
Simplified98.7%
if -1.98 < F < 3.40000000000000006e-6Initial program 99.5%
Taylor expanded in F around 0 98.8%
if 3.40000000000000006e-6 < F Initial program 64.1%
Taylor expanded in F around -inf 53.9%
neg-sub053.9%
associate-+l-53.9%
add-sqr-sqrt24.7%
sqrt-unprod13.2%
sqr-neg13.2%
sqrt-unprod0.4%
add-sqr-sqrt0.8%
div-inv0.8%
cancel-sign-sub-inv0.8%
metadata-eval0.8%
*-un-lft-identity0.8%
add-sqr-sqrt0.4%
sqrt-unprod18.3%
frac-times18.3%
metadata-eval18.3%
metadata-eval18.3%
frac-times18.3%
Applied egg-rr98.7%
associate--r+98.7%
neg-sub098.7%
distribute-neg-frac98.7%
metadata-eval98.7%
Simplified98.7%
Final simplification98.7%
(FPCore (F B x)
:precision binary64
(if (<= F -1.32)
(- (/ -1.0 (sin B)) (* (cos B) (/ x (sin B))))
(if (<= F 3.4e-6)
(- (/ F (/ (sin B) (sqrt 0.5))) (* x (/ 1.0 (tan B))))
(- (/ 1.0 (sin B)) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.32) {
tmp = (-1.0 / sin(B)) - (cos(B) * (x / sin(B)));
} else if (F <= 3.4e-6) {
tmp = (F / (sin(B) / sqrt(0.5))) - (x * (1.0 / tan(B)));
} else {
tmp = (1.0 / sin(B)) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.32d0)) then
tmp = ((-1.0d0) / sin(b)) - (cos(b) * (x / sin(b)))
else if (f <= 3.4d-6) then
tmp = (f / (sin(b) / sqrt(0.5d0))) - (x * (1.0d0 / tan(b)))
else
tmp = (1.0d0 / sin(b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.32) {
tmp = (-1.0 / Math.sin(B)) - (Math.cos(B) * (x / Math.sin(B)));
} else if (F <= 3.4e-6) {
tmp = (F / (Math.sin(B) / Math.sqrt(0.5))) - (x * (1.0 / Math.tan(B)));
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.32: tmp = (-1.0 / math.sin(B)) - (math.cos(B) * (x / math.sin(B))) elif F <= 3.4e-6: tmp = (F / (math.sin(B) / math.sqrt(0.5))) - (x * (1.0 / math.tan(B))) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.32) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(cos(B) * Float64(x / sin(B)))); elseif (F <= 3.4e-6) tmp = Float64(Float64(F / Float64(sin(B) / sqrt(0.5))) - Float64(x * Float64(1.0 / tan(B)))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.32) tmp = (-1.0 / sin(B)) - (cos(B) * (x / sin(B))); elseif (F <= 3.4e-6) tmp = (F / (sin(B) / sqrt(0.5))) - (x * (1.0 / tan(B))); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.32], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[Cos[B], $MachinePrecision] * N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.4e-6], N[(N[(F / N[(N[Sin[B], $MachinePrecision] / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.32:\\
\;\;\;\;\frac{-1}{\sin B} - \cos B \cdot \frac{x}{\sin B}\\
\mathbf{elif}\;F \leq 3.4 \cdot 10^{-6}:\\
\;\;\;\;\frac{F}{\frac{\sin B}{\sqrt{0.5}}} - x \cdot \frac{1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.32000000000000006Initial program 66.5%
Taylor expanded in F around -inf 98.7%
Taylor expanded in x around 0 98.7%
associate-*l/98.7%
*-commutative98.7%
Simplified98.7%
if -1.32000000000000006 < F < 3.40000000000000006e-6Initial program 99.5%
associate-*l/99.4%
+-commutative99.4%
*-commutative99.4%
fma-udef99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
fma-def99.4%
fma-udef99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
Applied egg-rr99.4%
Taylor expanded in F around 0 98.7%
Taylor expanded in x around 0 98.7%
associate-/l*98.7%
Simplified98.7%
if 3.40000000000000006e-6 < F Initial program 64.1%
Taylor expanded in F around -inf 53.9%
neg-sub053.9%
associate-+l-53.9%
add-sqr-sqrt24.7%
sqrt-unprod13.2%
sqr-neg13.2%
sqrt-unprod0.4%
add-sqr-sqrt0.8%
div-inv0.8%
cancel-sign-sub-inv0.8%
metadata-eval0.8%
*-un-lft-identity0.8%
add-sqr-sqrt0.4%
sqrt-unprod18.3%
frac-times18.3%
metadata-eval18.3%
metadata-eval18.3%
frac-times18.3%
Applied egg-rr98.7%
associate--r+98.7%
neg-sub098.7%
distribute-neg-frac98.7%
metadata-eval98.7%
Simplified98.7%
Final simplification98.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)))
(if (<= F -700.0)
(- (/ -1.0 (sin B)) (* (cos B) (/ x (sin B))))
(if (<= F -7e-120)
(- (* (/ F (sin B)) t_0) (/ x B))
(if (<= F 3.4e-6)
(+ (* x (/ -1.0 (tan B))) (* t_0 (/ F B)))
(- (/ 1.0 (sin B)) (/ x (tan B))))))))
double code(double F, double B, double x) {
double t_0 = pow((((F * F) + 2.0) + (x * 2.0)), -0.5);
double tmp;
if (F <= -700.0) {
tmp = (-1.0 / sin(B)) - (cos(B) * (x / sin(B)));
} else if (F <= -7e-120) {
tmp = ((F / sin(B)) * t_0) - (x / B);
} else if (F <= 3.4e-6) {
tmp = (x * (-1.0 / tan(B))) + (t_0 * (F / B));
} else {
tmp = (1.0 / sin(B)) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = (((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)
if (f <= (-700.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (cos(b) * (x / sin(b)))
else if (f <= (-7d-120)) then
tmp = ((f / sin(b)) * t_0) - (x / b)
else if (f <= 3.4d-6) then
tmp = (x * ((-1.0d0) / tan(b))) + (t_0 * (f / b))
else
tmp = (1.0d0 / sin(b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5);
double tmp;
if (F <= -700.0) {
tmp = (-1.0 / Math.sin(B)) - (Math.cos(B) * (x / Math.sin(B)));
} else if (F <= -7e-120) {
tmp = ((F / Math.sin(B)) * t_0) - (x / B);
} else if (F <= 3.4e-6) {
tmp = (x * (-1.0 / Math.tan(B))) + (t_0 * (F / B));
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) tmp = 0 if F <= -700.0: tmp = (-1.0 / math.sin(B)) - (math.cos(B) * (x / math.sin(B))) elif F <= -7e-120: tmp = ((F / math.sin(B)) * t_0) - (x / B) elif F <= 3.4e-6: tmp = (x * (-1.0 / math.tan(B))) + (t_0 * (F / B)) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5 tmp = 0.0 if (F <= -700.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(cos(B) * Float64(x / sin(B)))); elseif (F <= -7e-120) tmp = Float64(Float64(Float64(F / sin(B)) * t_0) - Float64(x / B)); elseif (F <= 3.4e-6) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(t_0 * Float64(F / B))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (((F * F) + 2.0) + (x * 2.0)) ^ -0.5; tmp = 0.0; if (F <= -700.0) tmp = (-1.0 / sin(B)) - (cos(B) * (x / sin(B))); elseif (F <= -7e-120) tmp = ((F / sin(B)) * t_0) - (x / B); elseif (F <= 3.4e-6) tmp = (x * (-1.0 / tan(B))) + (t_0 * (F / B)); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, If[LessEqual[F, -700.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[Cos[B], $MachinePrecision] * N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7e-120], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.4e-6], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{if}\;F \leq -700:\\
\;\;\;\;\frac{-1}{\sin B} - \cos B \cdot \frac{x}{\sin B}\\
\mathbf{elif}\;F \leq -7 \cdot 10^{-120}:\\
\;\;\;\;\frac{F}{\sin B} \cdot t_0 - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.4 \cdot 10^{-6}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + t_0 \cdot \frac{F}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -700Initial program 66.0%
Taylor expanded in F around -inf 99.7%
Taylor expanded in x around 0 99.8%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
if -700 < F < -7e-120Initial program 99.4%
Taylor expanded in B around 0 99.0%
if -7e-120 < F < 3.40000000000000006e-6Initial program 99.5%
Taylor expanded in B around 0 79.1%
if 3.40000000000000006e-6 < F Initial program 64.1%
Taylor expanded in F around -inf 53.9%
neg-sub053.9%
associate-+l-53.9%
add-sqr-sqrt24.7%
sqrt-unprod13.2%
sqr-neg13.2%
sqrt-unprod0.4%
add-sqr-sqrt0.8%
div-inv0.8%
cancel-sign-sub-inv0.8%
metadata-eval0.8%
*-un-lft-identity0.8%
add-sqr-sqrt0.4%
sqrt-unprod18.3%
frac-times18.3%
metadata-eval18.3%
metadata-eval18.3%
frac-times18.3%
Applied egg-rr98.7%
associate--r+98.7%
neg-sub098.7%
distribute-neg-frac98.7%
metadata-eval98.7%
Simplified98.7%
Final simplification91.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)) (t_1 (/ x (tan B))))
(if (<= F -600.0)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -6.2e-120)
(- (* (/ F (sin B)) t_0) (/ x B))
(if (<= F 3.4e-6)
(+ (* x (/ -1.0 (tan B))) (* t_0 (/ F B)))
(- (/ 1.0 (sin B)) t_1))))))
double code(double F, double B, double x) {
double t_0 = pow((((F * F) + 2.0) + (x * 2.0)), -0.5);
double t_1 = x / tan(B);
double tmp;
if (F <= -600.0) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -6.2e-120) {
tmp = ((F / sin(B)) * t_0) - (x / B);
} else if (F <= 3.4e-6) {
tmp = (x * (-1.0 / tan(B))) + (t_0 * (F / B));
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)
t_1 = x / tan(b)
if (f <= (-600.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-6.2d-120)) then
tmp = ((f / sin(b)) * t_0) - (x / b)
else if (f <= 3.4d-6) then
tmp = (x * ((-1.0d0) / tan(b))) + (t_0 * (f / b))
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -600.0) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -6.2e-120) {
tmp = ((F / Math.sin(B)) * t_0) - (x / B);
} else if (F <= 3.4e-6) {
tmp = (x * (-1.0 / Math.tan(B))) + (t_0 * (F / B));
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) t_1 = x / math.tan(B) tmp = 0 if F <= -600.0: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -6.2e-120: tmp = ((F / math.sin(B)) * t_0) - (x / B) elif F <= 3.4e-6: tmp = (x * (-1.0 / math.tan(B))) + (t_0 * (F / B)) else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5 t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -600.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -6.2e-120) tmp = Float64(Float64(Float64(F / sin(B)) * t_0) - Float64(x / B)); elseif (F <= 3.4e-6) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(t_0 * Float64(F / B))); else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (((F * F) + 2.0) + (x * 2.0)) ^ -0.5; t_1 = x / tan(B); tmp = 0.0; if (F <= -600.0) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -6.2e-120) tmp = ((F / sin(B)) * t_0) - (x / B); elseif (F <= 3.4e-6) tmp = (x * (-1.0 / tan(B))) + (t_0 * (F / B)); else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -600.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -6.2e-120], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.4e-6], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -600:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq -6.2 \cdot 10^{-120}:\\
\;\;\;\;\frac{F}{\sin B} \cdot t_0 - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.4 \cdot 10^{-6}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + t_0 \cdot \frac{F}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_1\\
\end{array}
\end{array}
if F < -600Initial program 66.0%
Taylor expanded in F around -inf 99.7%
+-commutative99.7%
unsub-neg99.7%
un-div-inv99.8%
Applied egg-rr99.8%
if -600 < F < -6.20000000000000038e-120Initial program 99.4%
Taylor expanded in B around 0 99.0%
if -6.20000000000000038e-120 < F < 3.40000000000000006e-6Initial program 99.5%
Taylor expanded in B around 0 79.1%
if 3.40000000000000006e-6 < F Initial program 64.1%
Taylor expanded in F around -inf 53.9%
neg-sub053.9%
associate-+l-53.9%
add-sqr-sqrt24.7%
sqrt-unprod13.2%
sqr-neg13.2%
sqrt-unprod0.4%
add-sqr-sqrt0.8%
div-inv0.8%
cancel-sign-sub-inv0.8%
metadata-eval0.8%
*-un-lft-identity0.8%
add-sqr-sqrt0.4%
sqrt-unprod18.3%
frac-times18.3%
metadata-eval18.3%
metadata-eval18.3%
frac-times18.3%
Applied egg-rr98.7%
associate--r+98.7%
neg-sub098.7%
distribute-neg-frac98.7%
metadata-eval98.7%
Simplified98.7%
Final simplification91.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (sin B)) (/ x B)))
(t_1 (/ x (tan B))))
(if (<= F -0.034)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -7.2e-175)
t_0
(if (<= F 2.85e-196)
(/ (- x) (/ (sin B) (cos B)))
(if (<= F 3.4e-6) t_0 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) / sin(B)) - (x / B);
double t_1 = x / tan(B);
double tmp;
if (F <= -0.034) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -7.2e-175) {
tmp = t_0;
} else if (F <= 2.85e-196) {
tmp = -x / (sin(B) / cos(B));
} else if (F <= 3.4e-6) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) / sin(b)) - (x / b)
t_1 = x / tan(b)
if (f <= (-0.034d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-7.2d-175)) then
tmp = t_0
else if (f <= 2.85d-196) then
tmp = -x / (sin(b) / cos(b))
else if (f <= 3.4d-6) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) / Math.sin(B)) - (x / B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -0.034) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -7.2e-175) {
tmp = t_0;
} else if (F <= 2.85e-196) {
tmp = -x / (Math.sin(B) / Math.cos(B));
} else if (F <= 3.4e-6) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) / math.sin(B)) - (x / B) t_1 = x / math.tan(B) tmp = 0 if F <= -0.034: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -7.2e-175: tmp = t_0 elif F <= 2.85e-196: tmp = -x / (math.sin(B) / math.cos(B)) elif F <= 3.4e-6: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) / sin(B)) - Float64(x / B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.034) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -7.2e-175) tmp = t_0; elseif (F <= 2.85e-196) tmp = Float64(Float64(-x) / Float64(sin(B) / cos(B))); elseif (F <= 3.4e-6) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) / sin(B)) - (x / B); t_1 = x / tan(B); tmp = 0.0; if (F <= -0.034) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -7.2e-175) tmp = t_0; elseif (F <= 2.85e-196) tmp = -x / (sin(B) / cos(B)); elseif (F <= 3.4e-6) tmp = t_0; else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.034], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -7.2e-175], t$95$0, If[LessEqual[F, 2.85e-196], N[((-x) / N[(N[Sin[B], $MachinePrecision] / N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.4e-6], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}}}{\sin B} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.034:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq -7.2 \cdot 10^{-175}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 2.85 \cdot 10^{-196}:\\
\;\;\;\;\frac{-x}{\frac{\sin B}{\cos B}}\\
\mathbf{elif}\;F \leq 3.4 \cdot 10^{-6}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_1\\
\end{array}
\end{array}
if F < -0.034000000000000002Initial program 66.5%
Taylor expanded in F around -inf 98.7%
+-commutative98.7%
unsub-neg98.7%
un-div-inv98.7%
Applied egg-rr98.7%
if -0.034000000000000002 < F < -7.2e-175 or 2.8500000000000001e-196 < F < 3.40000000000000006e-6Initial program 99.4%
associate-*l/99.3%
+-commutative99.3%
*-commutative99.3%
fma-udef99.3%
fma-def99.3%
metadata-eval99.3%
metadata-eval99.3%
fma-def99.3%
fma-udef99.3%
*-commutative99.3%
fma-def99.3%
fma-def99.3%
Applied egg-rr99.3%
Taylor expanded in F around 0 98.2%
Taylor expanded in B around 0 80.7%
if -7.2e-175 < F < 2.8500000000000001e-196Initial program 99.7%
Taylor expanded in F around -inf 41.9%
Taylor expanded in x around inf 86.6%
mul-1-neg86.6%
associate-/l*86.8%
distribute-neg-frac86.8%
Simplified86.8%
if 3.40000000000000006e-6 < F Initial program 64.1%
Taylor expanded in F around -inf 53.9%
neg-sub053.9%
associate-+l-53.9%
add-sqr-sqrt24.7%
sqrt-unprod13.2%
sqr-neg13.2%
sqrt-unprod0.4%
add-sqr-sqrt0.8%
div-inv0.8%
cancel-sign-sub-inv0.8%
metadata-eval0.8%
*-un-lft-identity0.8%
add-sqr-sqrt0.4%
sqrt-unprod18.3%
frac-times18.3%
metadata-eval18.3%
metadata-eval18.3%
frac-times18.3%
Applied egg-rr98.7%
associate--r+98.7%
neg-sub098.7%
distribute-neg-frac98.7%
metadata-eval98.7%
Simplified98.7%
Final simplification91.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (t_1 (/ x (tan B))))
(if (<= F -0.18)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -7.6e-120)
(- (/ (* F t_0) (sin B)) (/ x B))
(if (<= F 3.4e-6)
(+ (* x (/ -1.0 (tan B))) (* t_0 (/ F B)))
(- (/ 1.0 (sin B)) t_1))))))
double code(double F, double B, double x) {
double t_0 = sqrt((1.0 / (2.0 + (x * 2.0))));
double t_1 = x / tan(B);
double tmp;
if (F <= -0.18) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -7.6e-120) {
tmp = ((F * t_0) / sin(B)) - (x / B);
} else if (F <= 3.4e-6) {
tmp = (x * (-1.0 / tan(B))) + (t_0 * (F / B));
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))
t_1 = x / tan(b)
if (f <= (-0.18d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-7.6d-120)) then
tmp = ((f * t_0) / sin(b)) - (x / b)
else if (f <= 3.4d-6) then
tmp = (x * ((-1.0d0) / tan(b))) + (t_0 * (f / b))
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.sqrt((1.0 / (2.0 + (x * 2.0))));
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -0.18) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -7.6e-120) {
tmp = ((F * t_0) / Math.sin(B)) - (x / B);
} else if (F <= 3.4e-6) {
tmp = (x * (-1.0 / Math.tan(B))) + (t_0 * (F / B));
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = math.sqrt((1.0 / (2.0 + (x * 2.0)))) t_1 = x / math.tan(B) tmp = 0 if F <= -0.18: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -7.6e-120: tmp = ((F * t_0) / math.sin(B)) - (x / B) elif F <= 3.4e-6: tmp = (x * (-1.0 / math.tan(B))) + (t_0 * (F / B)) else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.18) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -7.6e-120) tmp = Float64(Float64(Float64(F * t_0) / sin(B)) - Float64(x / B)); elseif (F <= 3.4e-6) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(t_0 * Float64(F / B))); else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = sqrt((1.0 / (2.0 + (x * 2.0)))); t_1 = x / tan(B); tmp = 0.0; if (F <= -0.18) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -7.6e-120) tmp = ((F * t_0) / sin(B)) - (x / B); elseif (F <= 3.4e-6) tmp = (x * (-1.0 / tan(B))) + (t_0 * (F / B)); else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.18], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -7.6e-120], N[(N[(N[(F * t$95$0), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.4e-6], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{2 + x \cdot 2}}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.18:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq -7.6 \cdot 10^{-120}:\\
\;\;\;\;\frac{F \cdot t_0}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.4 \cdot 10^{-6}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + t_0 \cdot \frac{F}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_1\\
\end{array}
\end{array}
if F < -0.17999999999999999Initial program 66.5%
Taylor expanded in F around -inf 98.7%
+-commutative98.7%
unsub-neg98.7%
un-div-inv98.7%
Applied egg-rr98.7%
if -0.17999999999999999 < F < -7.5999999999999995e-120Initial program 99.4%
associate-*l/99.2%
+-commutative99.2%
*-commutative99.2%
fma-udef99.2%
fma-def99.2%
metadata-eval99.2%
metadata-eval99.2%
fma-def99.2%
fma-udef99.2%
*-commutative99.2%
fma-def99.2%
fma-def99.2%
Applied egg-rr99.2%
Taylor expanded in F around 0 96.1%
Taylor expanded in B around 0 95.8%
if -7.5999999999999995e-120 < F < 3.40000000000000006e-6Initial program 99.5%
Taylor expanded in B around 0 79.1%
Taylor expanded in F around 0 79.1%
if 3.40000000000000006e-6 < F Initial program 64.1%
Taylor expanded in F around -inf 53.9%
neg-sub053.9%
associate-+l-53.9%
add-sqr-sqrt24.7%
sqrt-unprod13.2%
sqr-neg13.2%
sqrt-unprod0.4%
add-sqr-sqrt0.8%
div-inv0.8%
cancel-sign-sub-inv0.8%
metadata-eval0.8%
*-un-lft-identity0.8%
add-sqr-sqrt0.4%
sqrt-unprod18.3%
frac-times18.3%
metadata-eval18.3%
metadata-eval18.3%
frac-times18.3%
Applied egg-rr98.7%
associate--r+98.7%
neg-sub098.7%
distribute-neg-frac98.7%
metadata-eval98.7%
Simplified98.7%
Final simplification91.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -720.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -7e-120)
(- (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)) (/ x B))
(if (<= F 3.4e-6)
(+
(* x (/ -1.0 (tan B)))
(* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F 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 <= -720.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -7e-120) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 3.4e-6) {
tmp = (x * (-1.0 / tan(B))) + (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-720.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-7d-120)) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
else if (f <= 3.4d-6) then
tmp = (x * ((-1.0d0) / tan(b))) + (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -720.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -7e-120) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 3.4e-6) {
tmp = (x * (-1.0 / Math.tan(B))) + (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -720.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -7e-120: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B) elif F <= 3.4e-6: tmp = (x * (-1.0 / math.tan(B))) + (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -720.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -7e-120) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)); elseif (F <= 3.4e-6) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -720.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -7e-120) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - (x / B); elseif (F <= 3.4e-6) tmp = (x * (-1.0 / tan(B))) + (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -720.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -7e-120], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.4e-6], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / 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 -720:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -7 \cdot 10^{-120}:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.4 \cdot 10^{-6}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -720Initial program 66.0%
Taylor expanded in F around -inf 99.7%
+-commutative99.7%
unsub-neg99.7%
un-div-inv99.8%
Applied egg-rr99.8%
if -720 < F < -7e-120Initial program 99.4%
Taylor expanded in B around 0 99.0%
if -7e-120 < F < 3.40000000000000006e-6Initial program 99.5%
Taylor expanded in B around 0 79.1%
Taylor expanded in F around 0 79.1%
if 3.40000000000000006e-6 < F Initial program 64.1%
Taylor expanded in F around -inf 53.9%
neg-sub053.9%
associate-+l-53.9%
add-sqr-sqrt24.7%
sqrt-unprod13.2%
sqr-neg13.2%
sqrt-unprod0.4%
add-sqr-sqrt0.8%
div-inv0.8%
cancel-sign-sub-inv0.8%
metadata-eval0.8%
*-un-lft-identity0.8%
add-sqr-sqrt0.4%
sqrt-unprod18.3%
frac-times18.3%
metadata-eval18.3%
metadata-eval18.3%
frac-times18.3%
Applied egg-rr98.7%
associate--r+98.7%
neg-sub098.7%
distribute-neg-frac98.7%
metadata-eval98.7%
Simplified98.7%
Final simplification91.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))) (t_1 (- (/ -1.0 (sin B)) (/ x B))))
(if (<= F -2.8e+237)
t_1
(if (<= F -2.2e+130)
t_0
(if (<= F -1.22e+27)
t_1
(if (<= F -8.5)
t_0
(if (<= F -5.2e-125)
(+
(* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B))
(* x (- (/ -1.0 B) (* B -0.3333333333333333))))
(if (<= F 4.6e-69)
(- (/ (* (cos B) x) (sin B)))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B))))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double t_1 = (-1.0 / sin(B)) - (x / B);
double tmp;
if (F <= -2.8e+237) {
tmp = t_1;
} else if (F <= -2.2e+130) {
tmp = t_0;
} else if (F <= -1.22e+27) {
tmp = t_1;
} else if (F <= -8.5) {
tmp = t_0;
} else if (F <= -5.2e-125) {
tmp = (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333)));
} else if (F <= 4.6e-69) {
tmp = -((cos(B) * x) / sin(B));
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((-1.0d0) / b) - (x / tan(b))
t_1 = ((-1.0d0) / sin(b)) - (x / b)
if (f <= (-2.8d+237)) then
tmp = t_1
else if (f <= (-2.2d+130)) then
tmp = t_0
else if (f <= (-1.22d+27)) then
tmp = t_1
else if (f <= (-8.5d0)) then
tmp = t_0
else if (f <= (-5.2d-125)) then
tmp = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) + (x * (((-1.0d0) / b) - (b * (-0.3333333333333333d0))))
else if (f <= 4.6d-69) then
tmp = -((cos(b) * x) / sin(b))
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / b)
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 = (-1.0 / Math.sin(B)) - (x / B);
double tmp;
if (F <= -2.8e+237) {
tmp = t_1;
} else if (F <= -2.2e+130) {
tmp = t_0;
} else if (F <= -1.22e+27) {
tmp = t_1;
} else if (F <= -8.5) {
tmp = t_0;
} else if (F <= -5.2e-125) {
tmp = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333)));
} else if (F <= 4.6e-69) {
tmp = -((Math.cos(B) * x) / Math.sin(B));
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x / math.tan(B)) t_1 = (-1.0 / math.sin(B)) - (x / B) tmp = 0 if F <= -2.8e+237: tmp = t_1 elif F <= -2.2e+130: tmp = t_0 elif F <= -1.22e+27: tmp = t_1 elif F <= -8.5: tmp = t_0 elif F <= -5.2e-125: tmp = (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333))) elif F <= 4.6e-69: tmp = -((math.cos(B) * x) / math.sin(B)) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) t_1 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) tmp = 0.0 if (F <= -2.8e+237) tmp = t_1; elseif (F <= -2.2e+130) tmp = t_0; elseif (F <= -1.22e+27) tmp = t_1; elseif (F <= -8.5) tmp = t_0; elseif (F <= -5.2e-125) tmp = Float64(Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) + Float64(x * Float64(Float64(-1.0 / B) - Float64(B * -0.3333333333333333)))); elseif (F <= 4.6e-69) tmp = Float64(-Float64(Float64(cos(B) * x) / sin(B))); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x / tan(B)); t_1 = (-1.0 / sin(B)) - (x / B); tmp = 0.0; if (F <= -2.8e+237) tmp = t_1; elseif (F <= -2.2e+130) tmp = t_0; elseif (F <= -1.22e+27) tmp = t_1; elseif (F <= -8.5) tmp = t_0; elseif (F <= -5.2e-125) tmp = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333))); elseif (F <= 4.6e-69) tmp = -((cos(B) * x) / sin(B)); else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); 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[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.8e+237], t$95$1, If[LessEqual[F, -2.2e+130], t$95$0, If[LessEqual[F, -1.22e+27], t$95$1, If[LessEqual[F, -8.5], t$95$0, If[LessEqual[F, -5.2e-125], N[(N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[(-1.0 / B), $MachinePrecision] - N[(B * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.6e-69], (-N[(N[(N[Cos[B], $MachinePrecision] * x), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
t_1 := \frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -2.8 \cdot 10^{+237}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -2.2 \cdot 10^{+130}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -1.22 \cdot 10^{+27}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -8.5:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -5.2 \cdot 10^{-125}:\\
\;\;\;\;{\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} + x \cdot \left(\frac{-1}{B} - B \cdot -0.3333333333333333\right)\\
\mathbf{elif}\;F \leq 4.6 \cdot 10^{-69}:\\
\;\;\;\;-\frac{\cos B \cdot x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -2.79999999999999983e237 or -2.19999999999999993e130 < F < -1.2200000000000001e27Initial program 64.0%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 83.7%
if -2.79999999999999983e237 < F < -2.19999999999999993e130 or -1.2200000000000001e27 < F < -8.5Initial program 68.7%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 80.9%
+-commutative80.9%
unsub-neg80.9%
un-div-inv80.9%
Applied egg-rr80.9%
if -8.5 < F < -5.20000000000000011e-125Initial program 99.4%
Taylor expanded in B around 0 54.5%
Taylor expanded in B around 0 55.1%
if -5.20000000000000011e-125 < F < 4.6000000000000001e-69Initial program 99.5%
Taylor expanded in F around -inf 35.6%
Taylor expanded in B around 0 47.6%
Taylor expanded in x around inf 74.2%
mul-1-neg74.2%
Simplified74.2%
if 4.6000000000000001e-69 < F Initial program 69.0%
Taylor expanded in B around 0 53.1%
Taylor expanded in F around inf 72.2%
Final simplification73.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))) (t_1 (- (/ -1.0 (sin B)) (/ x B))))
(if (<= F -2.8e+237)
t_1
(if (<= F -4.9e+129)
t_0
(if (<= F -1.25e+27)
t_1
(if (<= F -340.0)
t_0
(if (<= F -2.9e-121)
(+
(* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B))
(* x (- (/ -1.0 B) (* B -0.3333333333333333))))
(if (<= F 3.95e-69)
(/ (- x) (/ (sin B) (cos B)))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B))))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double t_1 = (-1.0 / sin(B)) - (x / B);
double tmp;
if (F <= -2.8e+237) {
tmp = t_1;
} else if (F <= -4.9e+129) {
tmp = t_0;
} else if (F <= -1.25e+27) {
tmp = t_1;
} else if (F <= -340.0) {
tmp = t_0;
} else if (F <= -2.9e-121) {
tmp = (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333)));
} else if (F <= 3.95e-69) {
tmp = -x / (sin(B) / cos(B));
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((-1.0d0) / b) - (x / tan(b))
t_1 = ((-1.0d0) / sin(b)) - (x / b)
if (f <= (-2.8d+237)) then
tmp = t_1
else if (f <= (-4.9d+129)) then
tmp = t_0
else if (f <= (-1.25d+27)) then
tmp = t_1
else if (f <= (-340.0d0)) then
tmp = t_0
else if (f <= (-2.9d-121)) then
tmp = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) + (x * (((-1.0d0) / b) - (b * (-0.3333333333333333d0))))
else if (f <= 3.95d-69) then
tmp = -x / (sin(b) / cos(b))
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / b)
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 = (-1.0 / Math.sin(B)) - (x / B);
double tmp;
if (F <= -2.8e+237) {
tmp = t_1;
} else if (F <= -4.9e+129) {
tmp = t_0;
} else if (F <= -1.25e+27) {
tmp = t_1;
} else if (F <= -340.0) {
tmp = t_0;
} else if (F <= -2.9e-121) {
tmp = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333)));
} else if (F <= 3.95e-69) {
tmp = -x / (Math.sin(B) / Math.cos(B));
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x / math.tan(B)) t_1 = (-1.0 / math.sin(B)) - (x / B) tmp = 0 if F <= -2.8e+237: tmp = t_1 elif F <= -4.9e+129: tmp = t_0 elif F <= -1.25e+27: tmp = t_1 elif F <= -340.0: tmp = t_0 elif F <= -2.9e-121: tmp = (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333))) elif F <= 3.95e-69: tmp = -x / (math.sin(B) / math.cos(B)) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) t_1 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) tmp = 0.0 if (F <= -2.8e+237) tmp = t_1; elseif (F <= -4.9e+129) tmp = t_0; elseif (F <= -1.25e+27) tmp = t_1; elseif (F <= -340.0) tmp = t_0; elseif (F <= -2.9e-121) tmp = Float64(Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) + Float64(x * Float64(Float64(-1.0 / B) - Float64(B * -0.3333333333333333)))); elseif (F <= 3.95e-69) tmp = Float64(Float64(-x) / Float64(sin(B) / cos(B))); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x / tan(B)); t_1 = (-1.0 / sin(B)) - (x / B); tmp = 0.0; if (F <= -2.8e+237) tmp = t_1; elseif (F <= -4.9e+129) tmp = t_0; elseif (F <= -1.25e+27) tmp = t_1; elseif (F <= -340.0) tmp = t_0; elseif (F <= -2.9e-121) tmp = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333))); elseif (F <= 3.95e-69) tmp = -x / (sin(B) / cos(B)); else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); 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[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.8e+237], t$95$1, If[LessEqual[F, -4.9e+129], t$95$0, If[LessEqual[F, -1.25e+27], t$95$1, If[LessEqual[F, -340.0], t$95$0, If[LessEqual[F, -2.9e-121], N[(N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[(-1.0 / B), $MachinePrecision] - N[(B * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.95e-69], N[((-x) / N[(N[Sin[B], $MachinePrecision] / N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
t_1 := \frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -2.8 \cdot 10^{+237}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -4.9 \cdot 10^{+129}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -1.25 \cdot 10^{+27}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -340:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -2.9 \cdot 10^{-121}:\\
\;\;\;\;{\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} + x \cdot \left(\frac{-1}{B} - B \cdot -0.3333333333333333\right)\\
\mathbf{elif}\;F \leq 3.95 \cdot 10^{-69}:\\
\;\;\;\;\frac{-x}{\frac{\sin B}{\cos B}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -2.79999999999999983e237 or -4.9e129 < F < -1.24999999999999995e27Initial program 64.0%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 83.7%
if -2.79999999999999983e237 < F < -4.9e129 or -1.24999999999999995e27 < F < -340Initial program 68.7%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 80.9%
+-commutative80.9%
unsub-neg80.9%
un-div-inv80.9%
Applied egg-rr80.9%
if -340 < F < -2.9e-121Initial program 99.4%
Taylor expanded in B around 0 54.5%
Taylor expanded in B around 0 55.1%
if -2.9e-121 < F < 3.9500000000000001e-69Initial program 99.5%
Taylor expanded in F around -inf 35.6%
Taylor expanded in x around inf 74.2%
mul-1-neg74.2%
associate-/l*74.3%
distribute-neg-frac74.3%
Simplified74.3%
if 3.9500000000000001e-69 < F Initial program 69.0%
Taylor expanded in B around 0 53.1%
Taylor expanded in F around inf 72.2%
Final simplification73.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.058)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -5.6e-122)
(+
(* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B))
(* x (- (/ -1.0 B) (* B -0.3333333333333333))))
(if (<= F 4.8e-66)
(/ (- x) (/ (sin B) (cos 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 <= -0.058) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -5.6e-122) {
tmp = (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333)));
} else if (F <= 4.8e-66) {
tmp = -x / (sin(B) / cos(B));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.058d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-5.6d-122)) then
tmp = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) + (x * (((-1.0d0) / b) - (b * (-0.3333333333333333d0))))
else if (f <= 4.8d-66) then
tmp = -x / (sin(b) / cos(b))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.058) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -5.6e-122) {
tmp = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333)));
} else if (F <= 4.8e-66) {
tmp = -x / (Math.sin(B) / Math.cos(B));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.058: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -5.6e-122: tmp = (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333))) elif F <= 4.8e-66: tmp = -x / (math.sin(B) / math.cos(B)) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.058) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -5.6e-122) tmp = Float64(Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) + Float64(x * Float64(Float64(-1.0 / B) - Float64(B * -0.3333333333333333)))); elseif (F <= 4.8e-66) tmp = Float64(Float64(-x) / Float64(sin(B) / cos(B))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.058) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -5.6e-122) tmp = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333))); elseif (F <= 4.8e-66) tmp = -x / (sin(B) / cos(B)); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.058], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -5.6e-122], N[(N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[(-1.0 / B), $MachinePrecision] - N[(B * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.8e-66], N[((-x) / N[(N[Sin[B], $MachinePrecision] / N[Cos[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 -0.058:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -5.6 \cdot 10^{-122}:\\
\;\;\;\;{\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} + x \cdot \left(\frac{-1}{B} - B \cdot -0.3333333333333333\right)\\
\mathbf{elif}\;F \leq 4.8 \cdot 10^{-66}:\\
\;\;\;\;\frac{-x}{\frac{\sin B}{\cos B}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.0580000000000000029Initial program 66.5%
Taylor expanded in F around -inf 98.7%
+-commutative98.7%
unsub-neg98.7%
un-div-inv98.7%
Applied egg-rr98.7%
if -0.0580000000000000029 < F < -5.5999999999999998e-122Initial program 99.4%
Taylor expanded in B around 0 56.3%
Taylor expanded in B around 0 56.9%
if -5.5999999999999998e-122 < F < 4.80000000000000052e-66Initial program 99.5%
Taylor expanded in F around -inf 36.0%
Taylor expanded in x around inf 74.6%
mul-1-neg74.6%
associate-/l*74.6%
distribute-neg-frac74.6%
Simplified74.6%
if 4.80000000000000052e-66 < F Initial program 68.2%
Taylor expanded in F around -inf 50.4%
neg-sub050.4%
associate-+l-50.4%
add-sqr-sqrt21.9%
sqrt-unprod11.8%
sqr-neg11.8%
sqrt-unprod0.4%
add-sqr-sqrt0.8%
div-inv0.8%
cancel-sign-sub-inv0.8%
metadata-eval0.8%
*-un-lft-identity0.8%
add-sqr-sqrt0.4%
sqrt-unprod16.6%
frac-times16.6%
metadata-eval16.6%
metadata-eval16.6%
frac-times16.6%
Applied egg-rr90.6%
associate--r+90.6%
neg-sub090.6%
distribute-neg-frac90.6%
metadata-eval90.6%
Simplified90.6%
Final simplification84.0%
(FPCore (F B x)
:precision binary64
(if (<= F -0.49)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -1.7e-123)
(+
(* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B))
(* x (- (/ -1.0 B) (* B -0.3333333333333333))))
(if (<= F 4.2e-67)
(/ (- x) (/ (sin B) (cos B)))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.49) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -1.7e-123) {
tmp = (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333)));
} else if (F <= 4.2e-67) {
tmp = -x / (sin(B) / cos(B));
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.49d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-1.7d-123)) then
tmp = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) + (x * (((-1.0d0) / b) - (b * (-0.3333333333333333d0))))
else if (f <= 4.2d-67) then
tmp = -x / (sin(b) / cos(b))
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.49) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -1.7e-123) {
tmp = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333)));
} else if (F <= 4.2e-67) {
tmp = -x / (Math.sin(B) / Math.cos(B));
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.49: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -1.7e-123: tmp = (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333))) elif F <= 4.2e-67: tmp = -x / (math.sin(B) / math.cos(B)) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.49) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -1.7e-123) tmp = Float64(Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) + Float64(x * Float64(Float64(-1.0 / B) - Float64(B * -0.3333333333333333)))); elseif (F <= 4.2e-67) tmp = Float64(Float64(-x) / Float64(sin(B) / cos(B))); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.49) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -1.7e-123) tmp = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333))); elseif (F <= 4.2e-67) tmp = -x / (sin(B) / cos(B)); else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.49], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.7e-123], N[(N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[(-1.0 / B), $MachinePrecision] - N[(B * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.2e-67], N[((-x) / N[(N[Sin[B], $MachinePrecision] / N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.49:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -1.7 \cdot 10^{-123}:\\
\;\;\;\;{\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} + x \cdot \left(\frac{-1}{B} - B \cdot -0.3333333333333333\right)\\
\mathbf{elif}\;F \leq 4.2 \cdot 10^{-67}:\\
\;\;\;\;\frac{-x}{\frac{\sin B}{\cos B}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -0.48999999999999999Initial program 66.5%
Taylor expanded in F around -inf 98.7%
+-commutative98.7%
unsub-neg98.7%
un-div-inv98.7%
Applied egg-rr98.7%
if -0.48999999999999999 < F < -1.7e-123Initial program 99.4%
Taylor expanded in B around 0 56.3%
Taylor expanded in B around 0 56.9%
if -1.7e-123 < F < 4.2000000000000003e-67Initial program 99.5%
Taylor expanded in F around -inf 35.6%
Taylor expanded in x around inf 74.2%
mul-1-neg74.2%
associate-/l*74.3%
distribute-neg-frac74.3%
Simplified74.3%
if 4.2000000000000003e-67 < F Initial program 69.0%
Taylor expanded in B around 0 53.1%
Taylor expanded in F around inf 72.2%
Final simplification78.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B))))
(t_1 (- (/ -1.0 B) (/ x (tan B))))
(t_2 (- (/ -1.0 (sin B)) (/ x B))))
(if (<= F -4e+237)
t_2
(if (<= F -1.36e+130)
t_1
(if (<= F -1.08e+27)
t_2
(if (<= F -270.0)
t_1
(if (<= F -1.6e-174)
(+
(* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B))
(* x (- (/ -1.0 B) (* B -0.3333333333333333))))
(if (<= F 8.8e-195)
(+ t_0 (/ (/ -1.0 F) (/ B F)))
(if (<= F 5.8e-71)
(- (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)) (/ x B))
(+ t_0 (/ 1.0 B)))))))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double t_1 = (-1.0 / B) - (x / tan(B));
double t_2 = (-1.0 / sin(B)) - (x / B);
double tmp;
if (F <= -4e+237) {
tmp = t_2;
} else if (F <= -1.36e+130) {
tmp = t_1;
} else if (F <= -1.08e+27) {
tmp = t_2;
} else if (F <= -270.0) {
tmp = t_1;
} else if (F <= -1.6e-174) {
tmp = (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333)));
} else if (F <= 8.8e-195) {
tmp = t_0 + ((-1.0 / F) / (B / F));
} else if (F <= 5.8e-71) {
tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B);
} else {
tmp = t_0 + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
t_1 = ((-1.0d0) / b) - (x / tan(b))
t_2 = ((-1.0d0) / sin(b)) - (x / b)
if (f <= (-4d+237)) then
tmp = t_2
else if (f <= (-1.36d+130)) then
tmp = t_1
else if (f <= (-1.08d+27)) then
tmp = t_2
else if (f <= (-270.0d0)) then
tmp = t_1
else if (f <= (-1.6d-174)) then
tmp = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) + (x * (((-1.0d0) / b) - (b * (-0.3333333333333333d0))))
else if (f <= 8.8d-195) then
tmp = t_0 + (((-1.0d0) / f) / (b / f))
else if (f <= 5.8d-71) then
tmp = (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) - (x / b)
else
tmp = t_0 + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double t_1 = (-1.0 / B) - (x / Math.tan(B));
double t_2 = (-1.0 / Math.sin(B)) - (x / B);
double tmp;
if (F <= -4e+237) {
tmp = t_2;
} else if (F <= -1.36e+130) {
tmp = t_1;
} else if (F <= -1.08e+27) {
tmp = t_2;
} else if (F <= -270.0) {
tmp = t_1;
} else if (F <= -1.6e-174) {
tmp = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333)));
} else if (F <= 8.8e-195) {
tmp = t_0 + ((-1.0 / F) / (B / F));
} else if (F <= 5.8e-71) {
tmp = (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B);
} else {
tmp = t_0 + (1.0 / B);
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) t_1 = (-1.0 / B) - (x / math.tan(B)) t_2 = (-1.0 / math.sin(B)) - (x / B) tmp = 0 if F <= -4e+237: tmp = t_2 elif F <= -1.36e+130: tmp = t_1 elif F <= -1.08e+27: tmp = t_2 elif F <= -270.0: tmp = t_1 elif F <= -1.6e-174: tmp = (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333))) elif F <= 8.8e-195: tmp = t_0 + ((-1.0 / F) / (B / F)) elif F <= 5.8e-71: tmp = (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B) else: tmp = t_0 + (1.0 / B) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) t_1 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) t_2 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) tmp = 0.0 if (F <= -4e+237) tmp = t_2; elseif (F <= -1.36e+130) tmp = t_1; elseif (F <= -1.08e+27) tmp = t_2; elseif (F <= -270.0) tmp = t_1; elseif (F <= -1.6e-174) tmp = Float64(Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) + Float64(x * Float64(Float64(-1.0 / B) - Float64(B * -0.3333333333333333)))); elseif (F <= 8.8e-195) tmp = Float64(t_0 + Float64(Float64(-1.0 / F) / Float64(B / F))); elseif (F <= 5.8e-71) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) - Float64(x / B)); else tmp = Float64(t_0 + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); t_1 = (-1.0 / B) - (x / tan(B)); t_2 = (-1.0 / sin(B)) - (x / B); tmp = 0.0; if (F <= -4e+237) tmp = t_2; elseif (F <= -1.36e+130) tmp = t_1; elseif (F <= -1.08e+27) tmp = t_2; elseif (F <= -270.0) tmp = t_1; elseif (F <= -1.6e-174) tmp = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333))); elseif (F <= 8.8e-195) tmp = t_0 + ((-1.0 / F) / (B / F)); elseif (F <= 5.8e-71) tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B); else tmp = t_0 + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4e+237], t$95$2, If[LessEqual[F, -1.36e+130], t$95$1, If[LessEqual[F, -1.08e+27], t$95$2, If[LessEqual[F, -270.0], t$95$1, If[LessEqual[F, -1.6e-174], N[(N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[(-1.0 / B), $MachinePrecision] - N[(B * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.8e-195], N[(t$95$0 + N[(N[(-1.0 / F), $MachinePrecision] / N[(B / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.8e-71], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
t_1 := \frac{-1}{B} - \frac{x}{\tan B}\\
t_2 := \frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -4 \cdot 10^{+237}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;F \leq -1.36 \cdot 10^{+130}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -1.08 \cdot 10^{+27}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;F \leq -270:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -1.6 \cdot 10^{-174}:\\
\;\;\;\;{\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} + x \cdot \left(\frac{-1}{B} - B \cdot -0.3333333333333333\right)\\
\mathbf{elif}\;F \leq 8.8 \cdot 10^{-195}:\\
\;\;\;\;t_0 + \frac{\frac{-1}{F}}{\frac{B}{F}}\\
\mathbf{elif}\;F \leq 5.8 \cdot 10^{-71}:\\
\;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{B}\\
\end{array}
\end{array}
if F < -3.99999999999999976e237 or -1.36000000000000007e130 < F < -1.08e27Initial program 64.0%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 83.7%
if -3.99999999999999976e237 < F < -1.36000000000000007e130 or -1.08e27 < F < -270Initial program 68.7%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 80.9%
+-commutative80.9%
unsub-neg80.9%
un-div-inv80.9%
Applied egg-rr80.9%
if -270 < F < -1.6e-174Initial program 99.4%
Taylor expanded in B around 0 57.6%
Taylor expanded in B around 0 50.4%
if -1.6e-174 < F < 8.80000000000000022e-195Initial program 99.7%
clear-num99.7%
associate-*l/99.7%
*-un-lft-identity99.7%
+-commutative99.7%
fma-def99.7%
fma-def99.7%
metadata-eval99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in F around -inf 41.0%
Taylor expanded in B around 0 67.8%
if 8.80000000000000022e-195 < F < 5.7999999999999997e-71Initial program 99.2%
Taylor expanded in B around 0 75.1%
Taylor expanded in B around 0 55.1%
Taylor expanded in F around 0 55.1%
if 5.7999999999999997e-71 < F Initial program 69.0%
Taylor expanded in B around 0 53.1%
Taylor expanded in F around inf 72.2%
Final simplification69.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 (sin B)) (/ x B)))
(t_1 (* x (/ -1.0 (tan B))))
(t_2 (- (/ -1.0 B) (/ x (tan B))))
(t_3 (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))))
(if (<= F -2.7e+237)
t_0
(if (<= F -7.5e+129)
t_2
(if (<= F -1.08e+27)
t_0
(if (<= F -6.0)
t_2
(if (<= F -4.3e-213)
(/ (- (* F t_3) x) B)
(if (<= F 2.5e-194)
(+ t_1 (/ (/ -1.0 F) (/ B F)))
(if (<= F 1.6e-68)
(- (* t_3 (/ F B)) (/ x B))
(+ t_1 (/ 1.0 B)))))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / sin(B)) - (x / B);
double t_1 = x * (-1.0 / tan(B));
double t_2 = (-1.0 / B) - (x / tan(B));
double t_3 = sqrt((1.0 / (2.0 + (x * 2.0))));
double tmp;
if (F <= -2.7e+237) {
tmp = t_0;
} else if (F <= -7.5e+129) {
tmp = t_2;
} else if (F <= -1.08e+27) {
tmp = t_0;
} else if (F <= -6.0) {
tmp = t_2;
} else if (F <= -4.3e-213) {
tmp = ((F * t_3) - x) / B;
} else if (F <= 2.5e-194) {
tmp = t_1 + ((-1.0 / F) / (B / F));
} else if (F <= 1.6e-68) {
tmp = (t_3 * (F / B)) - (x / B);
} else {
tmp = t_1 + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = ((-1.0d0) / sin(b)) - (x / b)
t_1 = x * ((-1.0d0) / tan(b))
t_2 = ((-1.0d0) / b) - (x / tan(b))
t_3 = sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))
if (f <= (-2.7d+237)) then
tmp = t_0
else if (f <= (-7.5d+129)) then
tmp = t_2
else if (f <= (-1.08d+27)) then
tmp = t_0
else if (f <= (-6.0d0)) then
tmp = t_2
else if (f <= (-4.3d-213)) then
tmp = ((f * t_3) - x) / b
else if (f <= 2.5d-194) then
tmp = t_1 + (((-1.0d0) / f) / (b / f))
else if (f <= 1.6d-68) then
tmp = (t_3 * (f / b)) - (x / b)
else
tmp = t_1 + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / Math.sin(B)) - (x / B);
double t_1 = x * (-1.0 / Math.tan(B));
double t_2 = (-1.0 / B) - (x / Math.tan(B));
double t_3 = Math.sqrt((1.0 / (2.0 + (x * 2.0))));
double tmp;
if (F <= -2.7e+237) {
tmp = t_0;
} else if (F <= -7.5e+129) {
tmp = t_2;
} else if (F <= -1.08e+27) {
tmp = t_0;
} else if (F <= -6.0) {
tmp = t_2;
} else if (F <= -4.3e-213) {
tmp = ((F * t_3) - x) / B;
} else if (F <= 2.5e-194) {
tmp = t_1 + ((-1.0 / F) / (B / F));
} else if (F <= 1.6e-68) {
tmp = (t_3 * (F / B)) - (x / B);
} else {
tmp = t_1 + (1.0 / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / math.sin(B)) - (x / B) t_1 = x * (-1.0 / math.tan(B)) t_2 = (-1.0 / B) - (x / math.tan(B)) t_3 = math.sqrt((1.0 / (2.0 + (x * 2.0)))) tmp = 0 if F <= -2.7e+237: tmp = t_0 elif F <= -7.5e+129: tmp = t_2 elif F <= -1.08e+27: tmp = t_0 elif F <= -6.0: tmp = t_2 elif F <= -4.3e-213: tmp = ((F * t_3) - x) / B elif F <= 2.5e-194: tmp = t_1 + ((-1.0 / F) / (B / F)) elif F <= 1.6e-68: tmp = (t_3 * (F / B)) - (x / B) else: tmp = t_1 + (1.0 / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) t_1 = Float64(x * Float64(-1.0 / tan(B))) t_2 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) t_3 = sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) tmp = 0.0 if (F <= -2.7e+237) tmp = t_0; elseif (F <= -7.5e+129) tmp = t_2; elseif (F <= -1.08e+27) tmp = t_0; elseif (F <= -6.0) tmp = t_2; elseif (F <= -4.3e-213) tmp = Float64(Float64(Float64(F * t_3) - x) / B); elseif (F <= 2.5e-194) tmp = Float64(t_1 + Float64(Float64(-1.0 / F) / Float64(B / F))); elseif (F <= 1.6e-68) tmp = Float64(Float64(t_3 * Float64(F / B)) - Float64(x / B)); else tmp = Float64(t_1 + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / sin(B)) - (x / B); t_1 = x * (-1.0 / tan(B)); t_2 = (-1.0 / B) - (x / tan(B)); t_3 = sqrt((1.0 / (2.0 + (x * 2.0)))); tmp = 0.0; if (F <= -2.7e+237) tmp = t_0; elseif (F <= -7.5e+129) tmp = t_2; elseif (F <= -1.08e+27) tmp = t_0; elseif (F <= -6.0) tmp = t_2; elseif (F <= -4.3e-213) tmp = ((F * t_3) - x) / B; elseif (F <= 2.5e-194) tmp = t_1 + ((-1.0 / F) / (B / F)); elseif (F <= 1.6e-68) tmp = (t_3 * (F / B)) - (x / B); else tmp = t_1 + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[F, -2.7e+237], t$95$0, If[LessEqual[F, -7.5e+129], t$95$2, If[LessEqual[F, -1.08e+27], t$95$0, If[LessEqual[F, -6.0], t$95$2, If[LessEqual[F, -4.3e-213], N[(N[(N[(F * t$95$3), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.5e-194], N[(t$95$1 + N[(N[(-1.0 / F), $MachinePrecision] / N[(B / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.6e-68], N[(N[(t$95$3 * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\sin B} - \frac{x}{B}\\
t_1 := x \cdot \frac{-1}{\tan B}\\
t_2 := \frac{-1}{B} - \frac{x}{\tan B}\\
t_3 := \sqrt{\frac{1}{2 + x \cdot 2}}\\
\mathbf{if}\;F \leq -2.7 \cdot 10^{+237}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -7.5 \cdot 10^{+129}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;F \leq -1.08 \cdot 10^{+27}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -6:\\
\;\;\;\;t_2\\
\mathbf{elif}\;F \leq -4.3 \cdot 10^{-213}:\\
\;\;\;\;\frac{F \cdot t_3 - x}{B}\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{-194}:\\
\;\;\;\;t_1 + \frac{\frac{-1}{F}}{\frac{B}{F}}\\
\mathbf{elif}\;F \leq 1.6 \cdot 10^{-68}:\\
\;\;\;\;t_3 \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t_1 + \frac{1}{B}\\
\end{array}
\end{array}
if F < -2.6999999999999999e237 or -7.4999999999999998e129 < F < -1.08e27Initial program 64.0%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 83.7%
if -2.6999999999999999e237 < F < -7.4999999999999998e129 or -1.08e27 < F < -6Initial program 68.7%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 80.9%
+-commutative80.9%
unsub-neg80.9%
un-div-inv80.9%
Applied egg-rr80.9%
if -6 < F < -4.3000000000000003e-213Initial program 99.5%
associate-*l/99.4%
+-commutative99.4%
*-commutative99.4%
fma-udef99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
fma-def99.4%
fma-udef99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
Applied egg-rr99.4%
Taylor expanded in F around 0 95.8%
Taylor expanded in B around 0 48.1%
if -4.3000000000000003e-213 < F < 2.5000000000000001e-194Initial program 99.7%
clear-num99.7%
associate-*l/99.7%
*-un-lft-identity99.7%
+-commutative99.7%
fma-def99.7%
fma-def99.7%
metadata-eval99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in F around -inf 44.8%
Taylor expanded in B around 0 73.1%
if 2.5000000000000001e-194 < F < 1.5999999999999999e-68Initial program 99.2%
Taylor expanded in B around 0 75.1%
Taylor expanded in B around 0 55.1%
Taylor expanded in F around 0 55.1%
if 1.5999999999999999e-68 < F Initial program 69.0%
Taylor expanded in B around 0 53.1%
Taylor expanded in F around inf 72.2%
Final simplification68.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B))))
(t_1 (- (/ -1.0 (sin B)) (/ x B)))
(t_2 (* x (/ -1.0 (tan B)))))
(if (<= F -2.9e+237)
t_1
(if (<= F -3.05e+130)
t_0
(if (<= F -1.2e+27)
t_1
(if (<= F -0.63)
t_0
(if (<= F -4.7e-213)
(- (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= F 1.8e-194)
(+ t_2 (/ (/ -1.0 F) (/ B F)))
(if (<= F 1.8e-71)
(- (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)) (/ x B))
(+ t_2 (/ 1.0 B)))))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double t_1 = (-1.0 / sin(B)) - (x / B);
double t_2 = x * (-1.0 / tan(B));
double tmp;
if (F <= -2.9e+237) {
tmp = t_1;
} else if (F <= -3.05e+130) {
tmp = t_0;
} else if (F <= -1.2e+27) {
tmp = t_1;
} else if (F <= -0.63) {
tmp = t_0;
} else if (F <= -4.7e-213) {
tmp = (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 1.8e-194) {
tmp = t_2 + ((-1.0 / F) / (B / F));
} else if (F <= 1.8e-71) {
tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B);
} else {
tmp = t_2 + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = ((-1.0d0) / b) - (x / tan(b))
t_1 = ((-1.0d0) / sin(b)) - (x / b)
t_2 = x * ((-1.0d0) / tan(b))
if (f <= (-2.9d+237)) then
tmp = t_1
else if (f <= (-3.05d+130)) then
tmp = t_0
else if (f <= (-1.2d+27)) then
tmp = t_1
else if (f <= (-0.63d0)) then
tmp = t_0
else if (f <= (-4.7d-213)) then
tmp = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (f <= 1.8d-194) then
tmp = t_2 + (((-1.0d0) / f) / (b / f))
else if (f <= 1.8d-71) then
tmp = (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) - (x / b)
else
tmp = t_2 + (1.0d0 / b)
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 = (-1.0 / Math.sin(B)) - (x / B);
double t_2 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -2.9e+237) {
tmp = t_1;
} else if (F <= -3.05e+130) {
tmp = t_0;
} else if (F <= -1.2e+27) {
tmp = t_1;
} else if (F <= -0.63) {
tmp = t_0;
} else if (F <= -4.7e-213) {
tmp = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 1.8e-194) {
tmp = t_2 + ((-1.0 / F) / (B / F));
} else if (F <= 1.8e-71) {
tmp = (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B);
} else {
tmp = t_2 + (1.0 / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x / math.tan(B)) t_1 = (-1.0 / math.sin(B)) - (x / B) t_2 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -2.9e+237: tmp = t_1 elif F <= -3.05e+130: tmp = t_0 elif F <= -1.2e+27: tmp = t_1 elif F <= -0.63: tmp = t_0 elif F <= -4.7e-213: tmp = (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif F <= 1.8e-194: tmp = t_2 + ((-1.0 / F) / (B / F)) elif F <= 1.8e-71: tmp = (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B) else: tmp = t_2 + (1.0 / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) t_1 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) t_2 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -2.9e+237) tmp = t_1; elseif (F <= -3.05e+130) tmp = t_0; elseif (F <= -1.2e+27) tmp = t_1; elseif (F <= -0.63) tmp = t_0; elseif (F <= -4.7e-213) tmp = Float64(Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 1.8e-194) tmp = Float64(t_2 + Float64(Float64(-1.0 / F) / Float64(B / F))); elseif (F <= 1.8e-71) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) - Float64(x / B)); else tmp = Float64(t_2 + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x / tan(B)); t_1 = (-1.0 / sin(B)) - (x / B); t_2 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -2.9e+237) tmp = t_1; elseif (F <= -3.05e+130) tmp = t_0; elseif (F <= -1.2e+27) tmp = t_1; elseif (F <= -0.63) tmp = t_0; elseif (F <= -4.7e-213) tmp = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (F <= 1.8e-194) tmp = t_2 + ((-1.0 / F) / (B / F)); elseif (F <= 1.8e-71) tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B); else tmp = t_2 + (1.0 / B); 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[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.9e+237], t$95$1, If[LessEqual[F, -3.05e+130], t$95$0, If[LessEqual[F, -1.2e+27], t$95$1, If[LessEqual[F, -0.63], t$95$0, If[LessEqual[F, -4.7e-213], N[(N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.8e-194], N[(t$95$2 + N[(N[(-1.0 / F), $MachinePrecision] / N[(B / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.8e-71], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(t$95$2 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
t_1 := \frac{-1}{\sin B} - \frac{x}{B}\\
t_2 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -2.9 \cdot 10^{+237}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -3.05 \cdot 10^{+130}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -1.2 \cdot 10^{+27}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -0.63:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -4.7 \cdot 10^{-213}:\\
\;\;\;\;{\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.8 \cdot 10^{-194}:\\
\;\;\;\;t_2 + \frac{\frac{-1}{F}}{\frac{B}{F}}\\
\mathbf{elif}\;F \leq 1.8 \cdot 10^{-71}:\\
\;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t_2 + \frac{1}{B}\\
\end{array}
\end{array}
if F < -2.9000000000000001e237 or -3.0499999999999999e130 < F < -1.19999999999999999e27Initial program 64.0%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 83.7%
if -2.9000000000000001e237 < F < -3.0499999999999999e130 or -1.19999999999999999e27 < F < -0.630000000000000004Initial program 69.7%
Taylor expanded in F around -inf 97.2%
Taylor expanded in B around 0 78.4%
+-commutative78.4%
unsub-neg78.4%
un-div-inv78.4%
Applied egg-rr78.4%
if -0.630000000000000004 < F < -4.7e-213Initial program 99.5%
Taylor expanded in B around 0 63.1%
Taylor expanded in B around 0 50.0%
if -4.7e-213 < F < 1.8e-194Initial program 99.7%
clear-num99.7%
associate-*l/99.7%
*-un-lft-identity99.7%
+-commutative99.7%
fma-def99.7%
fma-def99.7%
metadata-eval99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in F around -inf 44.8%
Taylor expanded in B around 0 73.1%
if 1.8e-194 < F < 1.8e-71Initial program 99.2%
Taylor expanded in B around 0 75.1%
Taylor expanded in B around 0 55.1%
Taylor expanded in F around 0 55.1%
if 1.8e-71 < F Initial program 69.0%
Taylor expanded in B around 0 53.1%
Taylor expanded in F around inf 72.2%
Final simplification69.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B))))
(t_1 (- (/ -1.0 (sin B)) (/ x B)))
(t_2 (* x (/ -1.0 (tan B))))
(t_3 (/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)))
(if (<= F -3e+237)
t_1
(if (<= F -2.5e+130)
t_0
(if (<= F -1.08e+27)
t_1
(if (<= F -6.0)
t_0
(if (<= F -1.7e-213)
t_3
(if (<= F 1.8e-193)
(+ t_2 (/ -1.0 B))
(if (<= F 2.6e-72) t_3 (+ t_2 (/ 1.0 B)))))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double t_1 = (-1.0 / sin(B)) - (x / B);
double t_2 = x * (-1.0 / tan(B));
double t_3 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double tmp;
if (F <= -3e+237) {
tmp = t_1;
} else if (F <= -2.5e+130) {
tmp = t_0;
} else if (F <= -1.08e+27) {
tmp = t_1;
} else if (F <= -6.0) {
tmp = t_0;
} else if (F <= -1.7e-213) {
tmp = t_3;
} else if (F <= 1.8e-193) {
tmp = t_2 + (-1.0 / B);
} else if (F <= 2.6e-72) {
tmp = t_3;
} else {
tmp = t_2 + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = ((-1.0d0) / b) - (x / tan(b))
t_1 = ((-1.0d0) / sin(b)) - (x / b)
t_2 = x * ((-1.0d0) / tan(b))
t_3 = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
if (f <= (-3d+237)) then
tmp = t_1
else if (f <= (-2.5d+130)) then
tmp = t_0
else if (f <= (-1.08d+27)) then
tmp = t_1
else if (f <= (-6.0d0)) then
tmp = t_0
else if (f <= (-1.7d-213)) then
tmp = t_3
else if (f <= 1.8d-193) then
tmp = t_2 + ((-1.0d0) / b)
else if (f <= 2.6d-72) then
tmp = t_3
else
tmp = t_2 + (1.0d0 / b)
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 = (-1.0 / Math.sin(B)) - (x / B);
double t_2 = x * (-1.0 / Math.tan(B));
double t_3 = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double tmp;
if (F <= -3e+237) {
tmp = t_1;
} else if (F <= -2.5e+130) {
tmp = t_0;
} else if (F <= -1.08e+27) {
tmp = t_1;
} else if (F <= -6.0) {
tmp = t_0;
} else if (F <= -1.7e-213) {
tmp = t_3;
} else if (F <= 1.8e-193) {
tmp = t_2 + (-1.0 / B);
} else if (F <= 2.6e-72) {
tmp = t_3;
} else {
tmp = t_2 + (1.0 / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x / math.tan(B)) t_1 = (-1.0 / math.sin(B)) - (x / B) t_2 = x * (-1.0 / math.tan(B)) t_3 = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B tmp = 0 if F <= -3e+237: tmp = t_1 elif F <= -2.5e+130: tmp = t_0 elif F <= -1.08e+27: tmp = t_1 elif F <= -6.0: tmp = t_0 elif F <= -1.7e-213: tmp = t_3 elif F <= 1.8e-193: tmp = t_2 + (-1.0 / B) elif F <= 2.6e-72: tmp = t_3 else: tmp = t_2 + (1.0 / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) t_1 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) t_2 = Float64(x * Float64(-1.0 / tan(B))) t_3 = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B) tmp = 0.0 if (F <= -3e+237) tmp = t_1; elseif (F <= -2.5e+130) tmp = t_0; elseif (F <= -1.08e+27) tmp = t_1; elseif (F <= -6.0) tmp = t_0; elseif (F <= -1.7e-213) tmp = t_3; elseif (F <= 1.8e-193) tmp = Float64(t_2 + Float64(-1.0 / B)); elseif (F <= 2.6e-72) tmp = t_3; else tmp = Float64(t_2 + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x / tan(B)); t_1 = (-1.0 / sin(B)) - (x / B); t_2 = x * (-1.0 / tan(B)); t_3 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; tmp = 0.0; if (F <= -3e+237) tmp = t_1; elseif (F <= -2.5e+130) tmp = t_0; elseif (F <= -1.08e+27) tmp = t_1; elseif (F <= -6.0) tmp = t_0; elseif (F <= -1.7e-213) tmp = t_3; elseif (F <= 1.8e-193) tmp = t_2 + (-1.0 / B); elseif (F <= 2.6e-72) tmp = t_3; else tmp = t_2 + (1.0 / B); 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[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = 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[LessEqual[F, -3e+237], t$95$1, If[LessEqual[F, -2.5e+130], t$95$0, If[LessEqual[F, -1.08e+27], t$95$1, If[LessEqual[F, -6.0], t$95$0, If[LessEqual[F, -1.7e-213], t$95$3, If[LessEqual[F, 1.8e-193], N[(t$95$2 + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.6e-72], t$95$3, N[(t$95$2 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
t_1 := \frac{-1}{\sin B} - \frac{x}{B}\\
t_2 := x \cdot \frac{-1}{\tan B}\\
t_3 := \frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{if}\;F \leq -3 \cdot 10^{+237}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -2.5 \cdot 10^{+130}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -1.08 \cdot 10^{+27}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -6:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -1.7 \cdot 10^{-213}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;F \leq 1.8 \cdot 10^{-193}:\\
\;\;\;\;t_2 + \frac{-1}{B}\\
\mathbf{elif}\;F \leq 2.6 \cdot 10^{-72}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2 + \frac{1}{B}\\
\end{array}
\end{array}
if F < -3e237 or -2.4999999999999998e130 < F < -1.08e27Initial program 64.0%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 83.7%
if -3e237 < F < -2.4999999999999998e130 or -1.08e27 < F < -6Initial program 68.7%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 80.9%
+-commutative80.9%
unsub-neg80.9%
un-div-inv80.9%
Applied egg-rr80.9%
if -6 < F < -1.7000000000000001e-213 or 1.7999999999999999e-193 < F < 2.59999999999999996e-72Initial program 99.4%
associate-*l/99.3%
+-commutative99.3%
*-commutative99.3%
fma-udef99.3%
fma-def99.3%
metadata-eval99.3%
metadata-eval99.3%
fma-def99.3%
fma-udef99.3%
*-commutative99.3%
fma-def99.3%
fma-def99.3%
Applied egg-rr99.3%
Taylor expanded in F around 0 97.0%
Taylor expanded in B around 0 50.6%
if -1.7000000000000001e-213 < F < 1.7999999999999999e-193Initial program 99.7%
Taylor expanded in F around -inf 44.8%
Taylor expanded in B around 0 62.0%
if 2.59999999999999996e-72 < F Initial program 69.0%
Taylor expanded in B around 0 53.1%
Taylor expanded in F around inf 72.2%
Final simplification67.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B))))
(t_1 (- (/ -1.0 (sin B)) (/ x B)))
(t_2 (* x (/ -1.0 (tan B))))
(t_3 (/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)))
(if (<= F -3.1e+237)
t_1
(if (<= F -6e+129)
t_0
(if (<= F -1.2e+27)
t_1
(if (<= F -6.0)
t_0
(if (<= F -3.5e-213)
t_3
(if (<= F 6.5e-194)
(+ t_2 (* (/ F B) (/ -1.0 F)))
(if (<= F 1.62e-69) t_3 (+ t_2 (/ 1.0 B)))))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double t_1 = (-1.0 / sin(B)) - (x / B);
double t_2 = x * (-1.0 / tan(B));
double t_3 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double tmp;
if (F <= -3.1e+237) {
tmp = t_1;
} else if (F <= -6e+129) {
tmp = t_0;
} else if (F <= -1.2e+27) {
tmp = t_1;
} else if (F <= -6.0) {
tmp = t_0;
} else if (F <= -3.5e-213) {
tmp = t_3;
} else if (F <= 6.5e-194) {
tmp = t_2 + ((F / B) * (-1.0 / F));
} else if (F <= 1.62e-69) {
tmp = t_3;
} else {
tmp = t_2 + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = ((-1.0d0) / b) - (x / tan(b))
t_1 = ((-1.0d0) / sin(b)) - (x / b)
t_2 = x * ((-1.0d0) / tan(b))
t_3 = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
if (f <= (-3.1d+237)) then
tmp = t_1
else if (f <= (-6d+129)) then
tmp = t_0
else if (f <= (-1.2d+27)) then
tmp = t_1
else if (f <= (-6.0d0)) then
tmp = t_0
else if (f <= (-3.5d-213)) then
tmp = t_3
else if (f <= 6.5d-194) then
tmp = t_2 + ((f / b) * ((-1.0d0) / f))
else if (f <= 1.62d-69) then
tmp = t_3
else
tmp = t_2 + (1.0d0 / b)
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 = (-1.0 / Math.sin(B)) - (x / B);
double t_2 = x * (-1.0 / Math.tan(B));
double t_3 = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double tmp;
if (F <= -3.1e+237) {
tmp = t_1;
} else if (F <= -6e+129) {
tmp = t_0;
} else if (F <= -1.2e+27) {
tmp = t_1;
} else if (F <= -6.0) {
tmp = t_0;
} else if (F <= -3.5e-213) {
tmp = t_3;
} else if (F <= 6.5e-194) {
tmp = t_2 + ((F / B) * (-1.0 / F));
} else if (F <= 1.62e-69) {
tmp = t_3;
} else {
tmp = t_2 + (1.0 / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x / math.tan(B)) t_1 = (-1.0 / math.sin(B)) - (x / B) t_2 = x * (-1.0 / math.tan(B)) t_3 = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B tmp = 0 if F <= -3.1e+237: tmp = t_1 elif F <= -6e+129: tmp = t_0 elif F <= -1.2e+27: tmp = t_1 elif F <= -6.0: tmp = t_0 elif F <= -3.5e-213: tmp = t_3 elif F <= 6.5e-194: tmp = t_2 + ((F / B) * (-1.0 / F)) elif F <= 1.62e-69: tmp = t_3 else: tmp = t_2 + (1.0 / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) t_1 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) t_2 = Float64(x * Float64(-1.0 / tan(B))) t_3 = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B) tmp = 0.0 if (F <= -3.1e+237) tmp = t_1; elseif (F <= -6e+129) tmp = t_0; elseif (F <= -1.2e+27) tmp = t_1; elseif (F <= -6.0) tmp = t_0; elseif (F <= -3.5e-213) tmp = t_3; elseif (F <= 6.5e-194) tmp = Float64(t_2 + Float64(Float64(F / B) * Float64(-1.0 / F))); elseif (F <= 1.62e-69) tmp = t_3; else tmp = Float64(t_2 + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x / tan(B)); t_1 = (-1.0 / sin(B)) - (x / B); t_2 = x * (-1.0 / tan(B)); t_3 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; tmp = 0.0; if (F <= -3.1e+237) tmp = t_1; elseif (F <= -6e+129) tmp = t_0; elseif (F <= -1.2e+27) tmp = t_1; elseif (F <= -6.0) tmp = t_0; elseif (F <= -3.5e-213) tmp = t_3; elseif (F <= 6.5e-194) tmp = t_2 + ((F / B) * (-1.0 / F)); elseif (F <= 1.62e-69) tmp = t_3; else tmp = t_2 + (1.0 / B); 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[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = 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[LessEqual[F, -3.1e+237], t$95$1, If[LessEqual[F, -6e+129], t$95$0, If[LessEqual[F, -1.2e+27], t$95$1, If[LessEqual[F, -6.0], t$95$0, If[LessEqual[F, -3.5e-213], t$95$3, If[LessEqual[F, 6.5e-194], N[(t$95$2 + N[(N[(F / B), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.62e-69], t$95$3, N[(t$95$2 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
t_1 := \frac{-1}{\sin B} - \frac{x}{B}\\
t_2 := x \cdot \frac{-1}{\tan B}\\
t_3 := \frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{if}\;F \leq -3.1 \cdot 10^{+237}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -6 \cdot 10^{+129}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -1.2 \cdot 10^{+27}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -6:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -3.5 \cdot 10^{-213}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;F \leq 6.5 \cdot 10^{-194}:\\
\;\;\;\;t_2 + \frac{F}{B} \cdot \frac{-1}{F}\\
\mathbf{elif}\;F \leq 1.62 \cdot 10^{-69}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2 + \frac{1}{B}\\
\end{array}
\end{array}
if F < -3.09999999999999991e237 or -6.0000000000000006e129 < F < -1.19999999999999999e27Initial program 64.0%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 83.7%
if -3.09999999999999991e237 < F < -6.0000000000000006e129 or -1.19999999999999999e27 < F < -6Initial program 68.7%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 80.9%
+-commutative80.9%
unsub-neg80.9%
un-div-inv80.9%
Applied egg-rr80.9%
if -6 < F < -3.50000000000000017e-213 or 6.50000000000000019e-194 < F < 1.62e-69Initial program 99.4%
associate-*l/99.3%
+-commutative99.3%
*-commutative99.3%
fma-udef99.3%
fma-def99.3%
metadata-eval99.3%
metadata-eval99.3%
fma-def99.3%
fma-udef99.3%
*-commutative99.3%
fma-def99.3%
fma-def99.3%
Applied egg-rr99.3%
Taylor expanded in F around 0 97.0%
Taylor expanded in B around 0 50.6%
if -3.50000000000000017e-213 < F < 6.50000000000000019e-194Initial program 99.7%
Taylor expanded in B around 0 89.1%
Taylor expanded in F around -inf 70.5%
if 1.62e-69 < F Initial program 69.0%
Taylor expanded in B around 0 53.1%
Taylor expanded in F around inf 72.2%
Final simplification68.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B))))
(t_1 (- (/ -1.0 (sin B)) (/ x B)))
(t_2 (* x (/ -1.0 (tan B))))
(t_3 (/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)))
(if (<= F -3.5e+237)
t_1
(if (<= F -1.48e+130)
t_0
(if (<= F -1.55e+28)
t_1
(if (<= F -6.0)
t_0
(if (<= F -3.7e-213)
t_3
(if (<= F 3.2e-194)
(+ t_2 (/ (/ -1.0 F) (/ B F)))
(if (<= F 1.85e-68) t_3 (+ t_2 (/ 1.0 B)))))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double t_1 = (-1.0 / sin(B)) - (x / B);
double t_2 = x * (-1.0 / tan(B));
double t_3 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double tmp;
if (F <= -3.5e+237) {
tmp = t_1;
} else if (F <= -1.48e+130) {
tmp = t_0;
} else if (F <= -1.55e+28) {
tmp = t_1;
} else if (F <= -6.0) {
tmp = t_0;
} else if (F <= -3.7e-213) {
tmp = t_3;
} else if (F <= 3.2e-194) {
tmp = t_2 + ((-1.0 / F) / (B / F));
} else if (F <= 1.85e-68) {
tmp = t_3;
} else {
tmp = t_2 + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = ((-1.0d0) / b) - (x / tan(b))
t_1 = ((-1.0d0) / sin(b)) - (x / b)
t_2 = x * ((-1.0d0) / tan(b))
t_3 = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
if (f <= (-3.5d+237)) then
tmp = t_1
else if (f <= (-1.48d+130)) then
tmp = t_0
else if (f <= (-1.55d+28)) then
tmp = t_1
else if (f <= (-6.0d0)) then
tmp = t_0
else if (f <= (-3.7d-213)) then
tmp = t_3
else if (f <= 3.2d-194) then
tmp = t_2 + (((-1.0d0) / f) / (b / f))
else if (f <= 1.85d-68) then
tmp = t_3
else
tmp = t_2 + (1.0d0 / b)
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 = (-1.0 / Math.sin(B)) - (x / B);
double t_2 = x * (-1.0 / Math.tan(B));
double t_3 = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double tmp;
if (F <= -3.5e+237) {
tmp = t_1;
} else if (F <= -1.48e+130) {
tmp = t_0;
} else if (F <= -1.55e+28) {
tmp = t_1;
} else if (F <= -6.0) {
tmp = t_0;
} else if (F <= -3.7e-213) {
tmp = t_3;
} else if (F <= 3.2e-194) {
tmp = t_2 + ((-1.0 / F) / (B / F));
} else if (F <= 1.85e-68) {
tmp = t_3;
} else {
tmp = t_2 + (1.0 / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x / math.tan(B)) t_1 = (-1.0 / math.sin(B)) - (x / B) t_2 = x * (-1.0 / math.tan(B)) t_3 = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B tmp = 0 if F <= -3.5e+237: tmp = t_1 elif F <= -1.48e+130: tmp = t_0 elif F <= -1.55e+28: tmp = t_1 elif F <= -6.0: tmp = t_0 elif F <= -3.7e-213: tmp = t_3 elif F <= 3.2e-194: tmp = t_2 + ((-1.0 / F) / (B / F)) elif F <= 1.85e-68: tmp = t_3 else: tmp = t_2 + (1.0 / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) t_1 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) t_2 = Float64(x * Float64(-1.0 / tan(B))) t_3 = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B) tmp = 0.0 if (F <= -3.5e+237) tmp = t_1; elseif (F <= -1.48e+130) tmp = t_0; elseif (F <= -1.55e+28) tmp = t_1; elseif (F <= -6.0) tmp = t_0; elseif (F <= -3.7e-213) tmp = t_3; elseif (F <= 3.2e-194) tmp = Float64(t_2 + Float64(Float64(-1.0 / F) / Float64(B / F))); elseif (F <= 1.85e-68) tmp = t_3; else tmp = Float64(t_2 + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x / tan(B)); t_1 = (-1.0 / sin(B)) - (x / B); t_2 = x * (-1.0 / tan(B)); t_3 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; tmp = 0.0; if (F <= -3.5e+237) tmp = t_1; elseif (F <= -1.48e+130) tmp = t_0; elseif (F <= -1.55e+28) tmp = t_1; elseif (F <= -6.0) tmp = t_0; elseif (F <= -3.7e-213) tmp = t_3; elseif (F <= 3.2e-194) tmp = t_2 + ((-1.0 / F) / (B / F)); elseif (F <= 1.85e-68) tmp = t_3; else tmp = t_2 + (1.0 / B); 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[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = 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[LessEqual[F, -3.5e+237], t$95$1, If[LessEqual[F, -1.48e+130], t$95$0, If[LessEqual[F, -1.55e+28], t$95$1, If[LessEqual[F, -6.0], t$95$0, If[LessEqual[F, -3.7e-213], t$95$3, If[LessEqual[F, 3.2e-194], N[(t$95$2 + N[(N[(-1.0 / F), $MachinePrecision] / N[(B / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.85e-68], t$95$3, N[(t$95$2 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
t_1 := \frac{-1}{\sin B} - \frac{x}{B}\\
t_2 := x \cdot \frac{-1}{\tan B}\\
t_3 := \frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{if}\;F \leq -3.5 \cdot 10^{+237}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -1.48 \cdot 10^{+130}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -1.55 \cdot 10^{+28}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -6:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -3.7 \cdot 10^{-213}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;F \leq 3.2 \cdot 10^{-194}:\\
\;\;\;\;t_2 + \frac{\frac{-1}{F}}{\frac{B}{F}}\\
\mathbf{elif}\;F \leq 1.85 \cdot 10^{-68}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2 + \frac{1}{B}\\
\end{array}
\end{array}
if F < -3.49999999999999988e237 or -1.47999999999999991e130 < F < -1.55e28Initial program 64.0%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 83.7%
if -3.49999999999999988e237 < F < -1.47999999999999991e130 or -1.55e28 < F < -6Initial program 68.7%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 80.9%
+-commutative80.9%
unsub-neg80.9%
un-div-inv80.9%
Applied egg-rr80.9%
if -6 < F < -3.70000000000000003e-213 or 3.2000000000000003e-194 < F < 1.85000000000000001e-68Initial program 99.4%
associate-*l/99.3%
+-commutative99.3%
*-commutative99.3%
fma-udef99.3%
fma-def99.3%
metadata-eval99.3%
metadata-eval99.3%
fma-def99.3%
fma-udef99.3%
*-commutative99.3%
fma-def99.3%
fma-def99.3%
Applied egg-rr99.3%
Taylor expanded in F around 0 97.0%
Taylor expanded in B around 0 50.6%
if -3.70000000000000003e-213 < F < 3.2000000000000003e-194Initial program 99.7%
clear-num99.7%
associate-*l/99.7%
*-un-lft-identity99.7%
+-commutative99.7%
fma-def99.7%
fma-def99.7%
metadata-eval99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in F around -inf 44.8%
Taylor expanded in B around 0 73.1%
if 1.85000000000000001e-68 < F Initial program 69.0%
Taylor expanded in B around 0 53.1%
Taylor expanded in F around inf 72.2%
Final simplification68.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ 1.0 B) (/ x B)))
(t_1 (- (/ -1.0 B) (/ x (tan B))))
(t_2 (- (/ -1.0 (sin B)) (/ x B))))
(if (<= x -1.05e+50)
t_1
(if (<= x -7.2e-101)
(/ (- x) B)
(if (<= x -3.3e-125)
t_0
(if (<= x 2.1e-211)
t_2
(if (<= x 4.8e-87) t_0 (if (<= x 5e-23) t_2 t_1))))))))
double code(double F, double B, double x) {
double t_0 = (1.0 / B) - (x / B);
double t_1 = (-1.0 / B) - (x / tan(B));
double t_2 = (-1.0 / sin(B)) - (x / B);
double tmp;
if (x <= -1.05e+50) {
tmp = t_1;
} else if (x <= -7.2e-101) {
tmp = -x / B;
} else if (x <= -3.3e-125) {
tmp = t_0;
} else if (x <= 2.1e-211) {
tmp = t_2;
} else if (x <= 4.8e-87) {
tmp = t_0;
} else if (x <= 5e-23) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = (1.0d0 / b) - (x / b)
t_1 = ((-1.0d0) / b) - (x / tan(b))
t_2 = ((-1.0d0) / sin(b)) - (x / b)
if (x <= (-1.05d+50)) then
tmp = t_1
else if (x <= (-7.2d-101)) then
tmp = -x / b
else if (x <= (-3.3d-125)) then
tmp = t_0
else if (x <= 2.1d-211) then
tmp = t_2
else if (x <= 4.8d-87) then
tmp = t_0
else if (x <= 5d-23) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (1.0 / B) - (x / B);
double t_1 = (-1.0 / B) - (x / Math.tan(B));
double t_2 = (-1.0 / Math.sin(B)) - (x / B);
double tmp;
if (x <= -1.05e+50) {
tmp = t_1;
} else if (x <= -7.2e-101) {
tmp = -x / B;
} else if (x <= -3.3e-125) {
tmp = t_0;
} else if (x <= 2.1e-211) {
tmp = t_2;
} else if (x <= 4.8e-87) {
tmp = t_0;
} else if (x <= 5e-23) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(F, B, x): t_0 = (1.0 / B) - (x / B) t_1 = (-1.0 / B) - (x / math.tan(B)) t_2 = (-1.0 / math.sin(B)) - (x / B) tmp = 0 if x <= -1.05e+50: tmp = t_1 elif x <= -7.2e-101: tmp = -x / B elif x <= -3.3e-125: tmp = t_0 elif x <= 2.1e-211: tmp = t_2 elif x <= 4.8e-87: tmp = t_0 elif x <= 5e-23: tmp = t_2 else: tmp = t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(1.0 / B) - Float64(x / B)) t_1 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) t_2 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) tmp = 0.0 if (x <= -1.05e+50) tmp = t_1; elseif (x <= -7.2e-101) tmp = Float64(Float64(-x) / B); elseif (x <= -3.3e-125) tmp = t_0; elseif (x <= 2.1e-211) tmp = t_2; elseif (x <= 4.8e-87) tmp = t_0; elseif (x <= 5e-23) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(F, B, x) t_0 = (1.0 / B) - (x / B); t_1 = (-1.0 / B) - (x / tan(B)); t_2 = (-1.0 / sin(B)) - (x / B); tmp = 0.0; if (x <= -1.05e+50) tmp = t_1; elseif (x <= -7.2e-101) tmp = -x / B; elseif (x <= -3.3e-125) tmp = t_0; elseif (x <= 2.1e-211) tmp = t_2; elseif (x <= 4.8e-87) tmp = t_0; elseif (x <= 5e-23) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.05e+50], t$95$1, If[LessEqual[x, -7.2e-101], N[((-x) / B), $MachinePrecision], If[LessEqual[x, -3.3e-125], t$95$0, If[LessEqual[x, 2.1e-211], t$95$2, If[LessEqual[x, 4.8e-87], t$95$0, If[LessEqual[x, 5e-23], t$95$2, t$95$1]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} - \frac{x}{B}\\
t_1 := \frac{-1}{B} - \frac{x}{\tan B}\\
t_2 := \frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{if}\;x \leq -1.05 \cdot 10^{+50}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -7.2 \cdot 10^{-101}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{elif}\;x \leq -3.3 \cdot 10^{-125}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 2.1 \cdot 10^{-211}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{-87}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 5 \cdot 10^{-23}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -1.05e50 or 5.0000000000000002e-23 < x Initial program 89.7%
Taylor expanded in F around -inf 94.5%
Taylor expanded in B around 0 94.4%
+-commutative94.4%
unsub-neg94.4%
un-div-inv94.5%
Applied egg-rr94.5%
if -1.05e50 < x < -7.19999999999999999e-101Initial program 81.3%
Taylor expanded in F around -inf 27.0%
Taylor expanded in B around 0 21.9%
associate-*r/21.9%
distribute-lft-in21.9%
metadata-eval21.9%
neg-mul-121.9%
Simplified21.9%
Taylor expanded in x around inf 57.9%
mul-1-neg57.9%
distribute-frac-neg57.9%
Simplified57.9%
if -7.19999999999999999e-101 < x < -3.3000000000000001e-125 or 2.10000000000000008e-211 < x < 4.7999999999999999e-87Initial program 78.7%
Taylor expanded in B around 0 54.2%
Taylor expanded in B around 0 37.3%
Taylor expanded in F around inf 24.8%
if -3.3000000000000001e-125 < x < 2.10000000000000008e-211 or 4.7999999999999999e-87 < x < 5.0000000000000002e-23Initial program 70.8%
Taylor expanded in F around -inf 32.4%
Taylor expanded in B around 0 32.4%
Final simplification60.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))) (t_1 (- (/ -1.0 (sin B)) (/ x B))))
(if (<= F -5.1e+237)
t_1
(if (<= F -7.3e+129)
t_0
(if (<= F -3e+27)
t_1
(if (<= F 2.5e-32) t_0 (+ (* x (/ -1.0 (tan B))) (/ 1.0 B))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double t_1 = (-1.0 / sin(B)) - (x / B);
double tmp;
if (F <= -5.1e+237) {
tmp = t_1;
} else if (F <= -7.3e+129) {
tmp = t_0;
} else if (F <= -3e+27) {
tmp = t_1;
} else if (F <= 2.5e-32) {
tmp = t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((-1.0d0) / b) - (x / tan(b))
t_1 = ((-1.0d0) / sin(b)) - (x / b)
if (f <= (-5.1d+237)) then
tmp = t_1
else if (f <= (-7.3d+129)) then
tmp = t_0
else if (f <= (-3d+27)) then
tmp = t_1
else if (f <= 2.5d-32) then
tmp = t_0
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / b)
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 = (-1.0 / Math.sin(B)) - (x / B);
double tmp;
if (F <= -5.1e+237) {
tmp = t_1;
} else if (F <= -7.3e+129) {
tmp = t_0;
} else if (F <= -3e+27) {
tmp = t_1;
} else if (F <= 2.5e-32) {
tmp = t_0;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x / math.tan(B)) t_1 = (-1.0 / math.sin(B)) - (x / B) tmp = 0 if F <= -5.1e+237: tmp = t_1 elif F <= -7.3e+129: tmp = t_0 elif F <= -3e+27: tmp = t_1 elif F <= 2.5e-32: tmp = t_0 else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) t_1 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) tmp = 0.0 if (F <= -5.1e+237) tmp = t_1; elseif (F <= -7.3e+129) tmp = t_0; elseif (F <= -3e+27) tmp = t_1; elseif (F <= 2.5e-32) tmp = t_0; else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x / tan(B)); t_1 = (-1.0 / sin(B)) - (x / B); tmp = 0.0; if (F <= -5.1e+237) tmp = t_1; elseif (F <= -7.3e+129) tmp = t_0; elseif (F <= -3e+27) tmp = t_1; elseif (F <= 2.5e-32) tmp = t_0; else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); 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[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.1e+237], t$95$1, If[LessEqual[F, -7.3e+129], t$95$0, If[LessEqual[F, -3e+27], t$95$1, If[LessEqual[F, 2.5e-32], t$95$0, N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
t_1 := \frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -5.1 \cdot 10^{+237}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -7.3 \cdot 10^{+129}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -3 \cdot 10^{+27}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{-32}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -5.09999999999999979e237 or -7.30000000000000051e129 < F < -2.99999999999999976e27Initial program 64.0%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 83.7%
if -5.09999999999999979e237 < F < -7.30000000000000051e129 or -2.99999999999999976e27 < F < 2.5e-32Initial program 93.3%
Taylor expanded in F around -inf 45.5%
Taylor expanded in B around 0 48.7%
+-commutative48.7%
unsub-neg48.7%
un-div-inv48.8%
Applied egg-rr48.8%
if 2.5e-32 < F Initial program 66.0%
Taylor expanded in B around 0 52.9%
Taylor expanded in F around inf 75.0%
Final simplification61.4%
(FPCore (F B x) :precision binary64 (if (or (<= F 165000000.0) (not (<= F 2e+140))) (- (/ -1.0 B) (/ x (tan B))) (- (/ 1.0 B) (/ x B))))
double code(double F, double B, double x) {
double tmp;
if ((F <= 165000000.0) || !(F <= 2e+140)) {
tmp = (-1.0 / B) - (x / tan(B));
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((f <= 165000000.0d0) .or. (.not. (f <= 2d+140))) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else
tmp = (1.0d0 / b) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((F <= 165000000.0) || !(F <= 2e+140)) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if (F <= 165000000.0) or not (F <= 2e+140): tmp = (-1.0 / B) - (x / math.tan(B)) else: tmp = (1.0 / B) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if ((F <= 165000000.0) || !(F <= 2e+140)) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); else tmp = Float64(Float64(1.0 / B) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((F <= 165000000.0) || ~((F <= 2e+140))) tmp = (-1.0 / B) - (x / tan(B)); else tmp = (1.0 / B) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[F, 165000000.0], N[Not[LessEqual[F, 2e+140]], $MachinePrecision]], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 165000000 \lor \neg \left(F \leq 2 \cdot 10^{+140}\right):\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < 1.65e8 or 2.00000000000000012e140 < F Initial program 80.5%
Taylor expanded in F around -inf 58.1%
Taylor expanded in B around 0 53.5%
+-commutative53.5%
unsub-neg53.5%
un-div-inv53.6%
Applied egg-rr53.6%
if 1.65e8 < F < 2.00000000000000012e140Initial program 86.6%
Taylor expanded in B around 0 59.9%
Taylor expanded in B around 0 50.2%
Taylor expanded in F around inf 63.4%
Final simplification54.7%
(FPCore (F B x) :precision binary64 (if (<= F -8.4e-48) (+ (/ (- -1.0 x) B) (* 0.3333333333333333 (* B x))) (if (<= F 5.6e-67) (/ (- x) B) (- (/ 1.0 B) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8.4e-48) {
tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x));
} else if (F <= 5.6e-67) {
tmp = -x / B;
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-8.4d-48)) then
tmp = (((-1.0d0) - x) / b) + (0.3333333333333333d0 * (b * x))
else if (f <= 5.6d-67) then
tmp = -x / b
else
tmp = (1.0d0 / b) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -8.4e-48) {
tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x));
} else if (F <= 5.6e-67) {
tmp = -x / B;
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -8.4e-48: tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x)) elif F <= 5.6e-67: tmp = -x / B else: tmp = (1.0 / B) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -8.4e-48) tmp = Float64(Float64(Float64(-1.0 - x) / B) + Float64(0.3333333333333333 * Float64(B * x))); elseif (F <= 5.6e-67) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 / B) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -8.4e-48) tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x)); elseif (F <= 5.6e-67) tmp = -x / B; else tmp = (1.0 / B) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -8.4e-48], N[(N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision] + N[(0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.6e-67], N[((-x) / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -8.4 \cdot 10^{-48}:\\
\;\;\;\;\frac{-1 - x}{B} + 0.3333333333333333 \cdot \left(B \cdot x\right)\\
\mathbf{elif}\;F \leq 5.6 \cdot 10^{-67}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -8.39999999999999954e-48Initial program 71.4%
Taylor expanded in F around -inf 86.5%
Taylor expanded in B around 0 60.0%
Taylor expanded in B around 0 31.7%
if -8.39999999999999954e-48 < F < 5.60000000000000021e-67Initial program 99.6%
Taylor expanded in F around -inf 33.9%
Taylor expanded in B around 0 16.2%
associate-*r/16.2%
distribute-lft-in16.2%
metadata-eval16.2%
neg-mul-116.2%
Simplified16.2%
Taylor expanded in x around inf 33.8%
mul-1-neg33.8%
distribute-frac-neg33.8%
Simplified33.8%
if 5.60000000000000021e-67 < F Initial program 69.0%
Taylor expanded in B around 0 53.1%
Taylor expanded in B around 0 26.9%
Taylor expanded in F around inf 45.9%
Final simplification36.9%
(FPCore (F B x) :precision binary64 (if (<= F -2.3e-53) (/ (- -1.0 x) B) (if (<= F 6.5e-68) (/ (- x) B) (- (/ 1.0 B) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.3e-53) {
tmp = (-1.0 - x) / B;
} else if (F <= 6.5e-68) {
tmp = -x / B;
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.3d-53)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 6.5d-68) then
tmp = -x / b
else
tmp = (1.0d0 / b) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.3e-53) {
tmp = (-1.0 - x) / B;
} else if (F <= 6.5e-68) {
tmp = -x / B;
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.3e-53: tmp = (-1.0 - x) / B elif F <= 6.5e-68: tmp = -x / B else: tmp = (1.0 / B) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.3e-53) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 6.5e-68) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 / B) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.3e-53) tmp = (-1.0 - x) / B; elseif (F <= 6.5e-68) tmp = -x / B; else tmp = (1.0 / B) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.3e-53], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 6.5e-68], N[((-x) / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.3 \cdot 10^{-53}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 6.5 \cdot 10^{-68}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.3000000000000001e-53Initial program 71.7%
Taylor expanded in F around -inf 85.5%
Taylor expanded in B around 0 31.0%
associate-*r/31.0%
distribute-lft-in31.0%
metadata-eval31.0%
neg-mul-131.0%
Simplified31.0%
Taylor expanded in x around 0 31.0%
sub-neg31.0%
mul-1-neg31.0%
distribute-neg-in31.0%
+-commutative31.0%
distribute-neg-in31.0%
distribute-neg-frac31.0%
metadata-eval31.0%
sub-neg31.0%
div-sub31.0%
Simplified31.0%
if -2.3000000000000001e-53 < F < 6.4999999999999997e-68Initial program 99.6%
Taylor expanded in F around -inf 34.2%
Taylor expanded in B around 0 16.3%
associate-*r/16.3%
distribute-lft-in16.3%
metadata-eval16.3%
neg-mul-116.3%
Simplified16.3%
Taylor expanded in x around inf 34.1%
mul-1-neg34.1%
distribute-frac-neg34.1%
Simplified34.1%
if 6.4999999999999997e-68 < F Initial program 69.0%
Taylor expanded in B around 0 53.1%
Taylor expanded in B around 0 26.9%
Taylor expanded in F around inf 45.9%
Final simplification36.8%
(FPCore (F B x) :precision binary64 (if (<= F -1.3e-52) (/ (- -1.0 x) B) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.3e-52) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.3d-52)) then
tmp = ((-1.0d0) - x) / b
else
tmp = -x / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.3e-52) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.3e-52: tmp = (-1.0 - x) / B else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.3e-52) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(Float64(-x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.3e-52) tmp = (-1.0 - x) / B; else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.3e-52], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.3 \cdot 10^{-52}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -1.2999999999999999e-52Initial program 71.7%
Taylor expanded in F around -inf 85.5%
Taylor expanded in B around 0 31.0%
associate-*r/31.0%
distribute-lft-in31.0%
metadata-eval31.0%
neg-mul-131.0%
Simplified31.0%
Taylor expanded in x around 0 31.0%
sub-neg31.0%
mul-1-neg31.0%
distribute-neg-in31.0%
+-commutative31.0%
distribute-neg-in31.0%
distribute-neg-frac31.0%
metadata-eval31.0%
sub-neg31.0%
div-sub31.0%
Simplified31.0%
if -1.2999999999999999e-52 < F Initial program 85.6%
Taylor expanded in F around -inf 41.6%
Taylor expanded in B around 0 20.7%
associate-*r/20.7%
distribute-lft-in20.7%
metadata-eval20.7%
neg-mul-120.7%
Simplified20.7%
Taylor expanded in x around inf 30.4%
mul-1-neg30.4%
distribute-frac-neg30.4%
Simplified30.4%
Final simplification30.6%
(FPCore (F B x) :precision binary64 (if (<= F -1.15e+237) (/ -1.0 B) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.15e+237) {
tmp = -1.0 / B;
} else {
tmp = -x / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.15d+237)) then
tmp = (-1.0d0) / b
else
tmp = -x / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.15e+237) {
tmp = -1.0 / B;
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.15e+237: tmp = -1.0 / B else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.15e+237) tmp = Float64(-1.0 / B); else tmp = Float64(Float64(-x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.15e+237) tmp = -1.0 / B; else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.15e+237], N[(-1.0 / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.15 \cdot 10^{+237}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -1.14999999999999998e237Initial program 23.1%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 34.8%
associate-*r/34.8%
distribute-lft-in34.8%
metadata-eval34.8%
neg-mul-134.8%
Simplified34.8%
Taylor expanded in x around 0 33.6%
if -1.14999999999999998e237 < F Initial program 85.8%
Taylor expanded in F around -inf 52.0%
Taylor expanded in B around 0 23.1%
associate-*r/23.1%
distribute-lft-in23.1%
metadata-eval23.1%
neg-mul-123.1%
Simplified23.1%
Taylor expanded in x around inf 28.4%
mul-1-neg28.4%
distribute-frac-neg28.4%
Simplified28.4%
Final simplification28.8%
(FPCore (F B x) :precision binary64 (/ -1.0 B))
double code(double F, double B, double x) {
return -1.0 / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = (-1.0d0) / b
end function
public static double code(double F, double B, double x) {
return -1.0 / B;
}
def code(F, B, x): return -1.0 / B
function code(F, B, x) return Float64(-1.0 / B) end
function tmp = code(F, B, x) tmp = -1.0 / B; end
code[F_, B_, x_] := N[(-1.0 / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{B}
\end{array}
Initial program 81.2%
Taylor expanded in F around -inf 55.5%
Taylor expanded in B around 0 24.0%
associate-*r/24.0%
distribute-lft-in24.0%
metadata-eval24.0%
neg-mul-124.0%
Simplified24.0%
Taylor expanded in x around 0 7.3%
Final simplification7.3%
herbie shell --seed 2023298
(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))))))