
(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 27 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
(if (<= F -2.6e+90)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 95000000.0)
(fma (/ F (sin B)) (pow (fma x 2.0 (fma F F 2.0)) -0.5) (/ (- x) (tan B)))
(/ (- 1.0 (* x (cos B))) (sin B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.6e+90) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 95000000.0) {
tmp = fma((F / sin(B)), pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5), (-x / tan(B)));
} else {
tmp = (1.0 - (x * cos(B))) / sin(B);
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -2.6e+90) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 95000000.0) tmp = fma(Float64(F / sin(B)), (fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5), Float64(Float64(-x) / tan(B))); else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -2.6e+90], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 95000000.0], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] + N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.6 \cdot 10^{+90}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 95000000:\\
\;\;\;\;\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{-x}{\tan B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -2.5999999999999998e90Initial program 55.0%
div-inv55.1%
clear-num55.0%
Applied egg-rr55.0%
Taylor expanded in F around -inf 99.8%
if -2.5999999999999998e90 < F < 9.5e7Initial program 98.7%
+-commutative98.7%
fma-def98.7%
+-commutative98.7%
*-commutative98.7%
fma-def98.7%
fma-def98.7%
metadata-eval98.7%
metadata-eval98.7%
distribute-lft-neg-in98.7%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
if 9.5e7 < F Initial program 50.2%
+-commutative50.2%
fma-def50.2%
+-commutative50.2%
*-commutative50.2%
fma-def50.2%
fma-def50.2%
metadata-eval50.2%
metadata-eval50.2%
distribute-lft-neg-in50.2%
associate-*r/50.3%
*-rgt-identity50.3%
Simplified50.3%
Taylor expanded in F around inf 99.8%
mul-1-neg99.8%
unsub-neg99.8%
*-commutative99.8%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
associate-*r/99.8%
sub-div99.9%
Applied egg-rr99.9%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(if (<= F -2.6e+90)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 100000000.0)
(- (* (/ F (sin B)) (pow (fma x 2.0 (fma F F 2.0)) -0.5)) (/ x (tan B)))
(/ (- 1.0 (* x (cos B))) (sin B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.6e+90) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 100000000.0) {
tmp = ((F / sin(B)) * pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5)) - (x / tan(B));
} else {
tmp = (1.0 - (x * cos(B))) / sin(B);
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -2.6e+90) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 100000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5)) - Float64(x / tan(B))); else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -2.6e+90], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 100000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.6 \cdot 10^{+90}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 100000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -2.5999999999999998e90Initial program 55.0%
div-inv55.1%
clear-num55.0%
Applied egg-rr55.0%
Taylor expanded in F around -inf 99.8%
if -2.5999999999999998e90 < F < 1e8Initial program 98.7%
+-commutative98.7%
fma-def98.7%
remove-double-neg98.7%
fma-neg98.7%
remove-double-neg98.7%
+-commutative98.7%
*-commutative98.7%
fma-def98.7%
fma-def98.7%
metadata-eval98.7%
metadata-eval98.7%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
if 1e8 < F Initial program 50.2%
+-commutative50.2%
fma-def50.2%
+-commutative50.2%
*-commutative50.2%
fma-def50.2%
fma-def50.2%
metadata-eval50.2%
metadata-eval50.2%
distribute-lft-neg-in50.2%
associate-*r/50.3%
*-rgt-identity50.3%
Simplified50.3%
Taylor expanded in F around inf 99.8%
mul-1-neg99.8%
unsub-neg99.8%
*-commutative99.8%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
associate-*r/99.8%
sub-div99.9%
Applied egg-rr99.9%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(if (<= F -2.6e+90)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 100000000.0)
(+
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(* x (/ -1.0 (tan B))))
(/ (- 1.0 (* x (cos B))) (sin B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.6e+90) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 100000000.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / tan(B)));
} else {
tmp = (1.0 - (x * cos(B))) / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.6d+90)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
else if (f <= 100000000.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) + (x * ((-1.0d0) / tan(b)))
else
tmp = (1.0d0 - (x * cos(b))) / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.6e+90) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
} else if (F <= 100000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / Math.tan(B)));
} else {
tmp = (1.0 - (x * Math.cos(B))) / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.6e+90: tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B)) elif F <= 100000000.0: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / math.tan(B))) else: tmp = (1.0 - (x * math.cos(B))) / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.6e+90) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 100000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) + Float64(x * Float64(-1.0 / tan(B)))); else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.6e+90) tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B)); elseif (F <= 100000000.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) + (x * (-1.0 / tan(B))); else tmp = (1.0 - (x * cos(B))) / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.6e+90], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 100000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.6 \cdot 10^{+90}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 100000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} + x \cdot \frac{-1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -2.5999999999999998e90Initial program 55.0%
div-inv55.1%
clear-num55.0%
Applied egg-rr55.0%
Taylor expanded in F around -inf 99.8%
if -2.5999999999999998e90 < F < 1e8Initial program 98.7%
if 1e8 < F Initial program 50.2%
+-commutative50.2%
fma-def50.2%
+-commutative50.2%
*-commutative50.2%
fma-def50.2%
fma-def50.2%
metadata-eval50.2%
metadata-eval50.2%
distribute-lft-neg-in50.2%
associate-*r/50.3%
*-rgt-identity50.3%
Simplified50.3%
Taylor expanded in F around inf 99.8%
mul-1-neg99.8%
unsub-neg99.8%
*-commutative99.8%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
associate-*r/99.8%
sub-div99.9%
Applied egg-rr99.9%
Final simplification99.3%
(FPCore (F B x)
:precision binary64
(if (<= F -6e+58)
(- (* F (/ -1.0 (* F (sin B)))) (/ x (tan B)))
(if (<= F 100000000.0)
(+
(/ -1.0 (/ (tan B) x))
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(/ (- 1.0 (* x (cos B))) (sin B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6e+58) {
tmp = (F * (-1.0 / (F * sin(B)))) - (x / tan(B));
} else if (F <= 100000000.0) {
tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 - (x * cos(B))) / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-6d+58)) then
tmp = (f * ((-1.0d0) / (f * sin(b)))) - (x / tan(b))
else if (f <= 100000000.0d0) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = (1.0d0 - (x * cos(b))) / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -6e+58) {
tmp = (F * (-1.0 / (F * Math.sin(B)))) - (x / Math.tan(B));
} else if (F <= 100000000.0) {
tmp = (-1.0 / (Math.tan(B) / x)) + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 - (x * Math.cos(B))) / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6e+58: tmp = (F * (-1.0 / (F * math.sin(B)))) - (x / math.tan(B)) elif F <= 100000000.0: tmp = (-1.0 / (math.tan(B) / x)) + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = (1.0 - (x * math.cos(B))) / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6e+58) tmp = Float64(Float64(F * Float64(-1.0 / Float64(F * sin(B)))) - Float64(x / tan(B))); elseif (F <= 100000000.0) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5))); else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -6e+58) tmp = (F * (-1.0 / (F * sin(B)))) - (x / tan(B)); elseif (F <= 100000000.0) tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = (1.0 - (x * cos(B))) / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6e+58], N[(N[(F * N[(-1.0 / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 100000000.0], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6 \cdot 10^{+58}:\\
\;\;\;\;F \cdot \frac{-1}{F \cdot \sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 100000000:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -6.0000000000000005e58Initial program 62.5%
+-commutative62.5%
unsub-neg62.5%
associate-*l/81.7%
associate-*r/81.7%
*-commutative81.7%
Simplified81.8%
Taylor expanded in F around -inf 99.8%
if -6.0000000000000005e58 < F < 1e8Initial program 98.7%
div-inv99.6%
clear-num99.5%
Applied egg-rr99.5%
if 1e8 < F Initial program 50.2%
+-commutative50.2%
fma-def50.2%
+-commutative50.2%
*-commutative50.2%
fma-def50.2%
fma-def50.2%
metadata-eval50.2%
metadata-eval50.2%
distribute-lft-neg-in50.2%
associate-*r/50.3%
*-rgt-identity50.3%
Simplified50.3%
Taylor expanded in F around inf 99.8%
mul-1-neg99.8%
unsub-neg99.8%
*-commutative99.8%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
associate-*r/99.8%
sub-div99.9%
Applied egg-rr99.9%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(if (<= F -12.8)
(- (* F (/ -1.0 (* F (sin B)))) (/ x (tan B)))
(if (<= F 1.8)
(-
(* (/ 1.0 (/ (sin B) F)) (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))))
(/ 1.0 (/ (tan B) x)))
(/ (- 1.0 (* x (cos B))) (sin B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -12.8) {
tmp = (F * (-1.0 / (F * sin(B)))) - (x / tan(B));
} else if (F <= 1.8) {
tmp = ((1.0 / (sin(B) / F)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (1.0 / (tan(B) / x));
} else {
tmp = (1.0 - (x * cos(B))) / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-12.8d0)) then
tmp = (f * ((-1.0d0) / (f * sin(b)))) - (x / tan(b))
else if (f <= 1.8d0) then
tmp = ((1.0d0 / (sin(b) / f)) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (1.0d0 / (tan(b) / x))
else
tmp = (1.0d0 - (x * cos(b))) / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -12.8) {
tmp = (F * (-1.0 / (F * Math.sin(B)))) - (x / Math.tan(B));
} else if (F <= 1.8) {
tmp = ((1.0 / (Math.sin(B) / F)) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (1.0 / (Math.tan(B) / x));
} else {
tmp = (1.0 - (x * Math.cos(B))) / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -12.8: tmp = (F * (-1.0 / (F * math.sin(B)))) - (x / math.tan(B)) elif F <= 1.8: tmp = ((1.0 / (math.sin(B) / F)) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (1.0 / (math.tan(B) / x)) else: tmp = (1.0 - (x * math.cos(B))) / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -12.8) tmp = Float64(Float64(F * Float64(-1.0 / Float64(F * sin(B)))) - Float64(x / tan(B))); elseif (F <= 1.8) tmp = Float64(Float64(Float64(1.0 / Float64(sin(B) / F)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(1.0 / Float64(tan(B) / x))); else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -12.8) tmp = (F * (-1.0 / (F * sin(B)))) - (x / tan(B)); elseif (F <= 1.8) tmp = ((1.0 / (sin(B) / F)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (1.0 / (tan(B) / x)); else tmp = (1.0 - (x * cos(B))) / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -12.8], N[(N[(F * N[(-1.0 / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.8], N[(N[(N[(1.0 / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -12.8:\\
\;\;\;\;F \cdot \frac{-1}{F \cdot \sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 1.8:\\
\;\;\;\;\frac{1}{\frac{\sin B}{F}} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{1}{\frac{\tan B}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -12.800000000000001Initial program 68.4%
+-commutative68.4%
unsub-neg68.4%
associate-*l/84.6%
associate-*r/84.5%
*-commutative84.5%
Simplified84.6%
Taylor expanded in F around -inf 98.8%
if -12.800000000000001 < F < 1.80000000000000004Initial program 98.6%
div-inv99.6%
clear-num99.4%
Applied egg-rr99.4%
clear-num99.4%
inv-pow99.4%
Applied egg-rr99.4%
unpow-199.4%
Simplified99.4%
Taylor expanded in F around 0 98.6%
if 1.80000000000000004 < F Initial program 51.4%
+-commutative51.4%
fma-def51.4%
+-commutative51.4%
*-commutative51.4%
fma-def51.4%
fma-def51.4%
metadata-eval51.4%
metadata-eval51.4%
distribute-lft-neg-in51.4%
associate-*r/51.4%
*-rgt-identity51.4%
Simplified51.4%
Taylor expanded in F around inf 99.7%
mul-1-neg99.7%
unsub-neg99.7%
*-commutative99.7%
associate-*l/99.7%
*-commutative99.7%
Simplified99.7%
associate-*r/99.7%
sub-div99.8%
Applied egg-rr99.8%
Final simplification99.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -12.8)
(- (* F (/ -1.0 (* F (sin B)))) t_0)
(if (<= F 1.8)
(- (* F (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ 1.0 (sin B)))) t_0)
(/ (- 1.0 (* x (cos B))) (sin B))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -12.8) {
tmp = (F * (-1.0 / (F * sin(B)))) - t_0;
} else if (F <= 1.8) {
tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) * (1.0 / sin(B)))) - t_0;
} else {
tmp = (1.0 - (x * cos(B))) / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-12.8d0)) then
tmp = (f * ((-1.0d0) / (f * sin(b)))) - t_0
else if (f <= 1.8d0) then
tmp = (f * (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (1.0d0 / sin(b)))) - t_0
else
tmp = (1.0d0 - (x * cos(b))) / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -12.8) {
tmp = (F * (-1.0 / (F * Math.sin(B)))) - t_0;
} else if (F <= 1.8) {
tmp = (F * (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (1.0 / Math.sin(B)))) - t_0;
} else {
tmp = (1.0 - (x * Math.cos(B))) / Math.sin(B);
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -12.8: tmp = (F * (-1.0 / (F * math.sin(B)))) - t_0 elif F <= 1.8: tmp = (F * (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (1.0 / math.sin(B)))) - t_0 else: tmp = (1.0 - (x * math.cos(B))) / math.sin(B) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -12.8) tmp = Float64(Float64(F * Float64(-1.0 / Float64(F * sin(B)))) - t_0); elseif (F <= 1.8) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(1.0 / sin(B)))) - t_0); else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -12.8) tmp = (F * (-1.0 / (F * sin(B)))) - t_0; elseif (F <= 1.8) tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) * (1.0 / sin(B)))) - t_0; else tmp = (1.0 - (x * cos(B))) / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -12.8], N[(N[(F * N[(-1.0 / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.8], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -12.8:\\
\;\;\;\;F \cdot \frac{-1}{F \cdot \sin B} - t_0\\
\mathbf{elif}\;F \leq 1.8:\\
\;\;\;\;F \cdot \left(\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{1}{\sin B}\right) - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -12.800000000000001Initial program 68.4%
+-commutative68.4%
unsub-neg68.4%
associate-*l/84.6%
associate-*r/84.5%
*-commutative84.5%
Simplified84.6%
Taylor expanded in F around -inf 98.8%
if -12.800000000000001 < F < 1.80000000000000004Initial program 98.6%
+-commutative98.6%
unsub-neg98.6%
associate-*l/98.5%
associate-*r/98.5%
*-commutative98.5%
Simplified98.7%
Taylor expanded in F around 0 97.9%
if 1.80000000000000004 < F Initial program 51.4%
+-commutative51.4%
fma-def51.4%
+-commutative51.4%
*-commutative51.4%
fma-def51.4%
fma-def51.4%
metadata-eval51.4%
metadata-eval51.4%
distribute-lft-neg-in51.4%
associate-*r/51.4%
*-rgt-identity51.4%
Simplified51.4%
Taylor expanded in F around inf 99.7%
mul-1-neg99.7%
unsub-neg99.7%
*-commutative99.7%
associate-*l/99.7%
*-commutative99.7%
Simplified99.7%
associate-*r/99.7%
sub-div99.8%
Applied egg-rr99.8%
Final simplification98.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -12.8)
(- (* F (/ -1.0 (* F (sin B)))) t_0)
(if (<= F 1.4)
(- (* F (/ (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (sin B))) t_0)
(/ (- 1.0 (* x (cos B))) (sin B))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -12.8) {
tmp = (F * (-1.0 / (F * sin(B)))) - t_0;
} else if (F <= 1.4) {
tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) / sin(B))) - t_0;
} else {
tmp = (1.0 - (x * cos(B))) / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-12.8d0)) then
tmp = (f * ((-1.0d0) / (f * sin(b)))) - t_0
else if (f <= 1.4d0) then
tmp = (f * (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) / sin(b))) - t_0
else
tmp = (1.0d0 - (x * cos(b))) / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -12.8) {
tmp = (F * (-1.0 / (F * Math.sin(B)))) - t_0;
} else if (F <= 1.4) {
tmp = (F * (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) / Math.sin(B))) - t_0;
} else {
tmp = (1.0 - (x * Math.cos(B))) / Math.sin(B);
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -12.8: tmp = (F * (-1.0 / (F * math.sin(B)))) - t_0 elif F <= 1.4: tmp = (F * (math.sqrt((1.0 / (2.0 + (x * 2.0)))) / math.sin(B))) - t_0 else: tmp = (1.0 - (x * math.cos(B))) / math.sin(B) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -12.8) tmp = Float64(Float64(F * Float64(-1.0 / Float64(F * sin(B)))) - t_0); elseif (F <= 1.4) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -12.8) tmp = (F * (-1.0 / (F * sin(B)))) - t_0; elseif (F <= 1.4) tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) / sin(B))) - t_0; else tmp = (1.0 - (x * cos(B))) / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -12.8], N[(N[(F * N[(-1.0 / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -12.8:\\
\;\;\;\;F \cdot \frac{-1}{F \cdot \sin B} - t_0\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{2 + x \cdot 2}}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -12.800000000000001Initial program 68.4%
+-commutative68.4%
unsub-neg68.4%
associate-*l/84.6%
associate-*r/84.5%
*-commutative84.5%
Simplified84.6%
Taylor expanded in F around -inf 98.8%
if -12.800000000000001 < F < 1.3999999999999999Initial program 98.6%
+-commutative98.6%
unsub-neg98.6%
associate-*l/98.5%
associate-*r/98.5%
*-commutative98.5%
Simplified98.7%
Taylor expanded in F around 0 97.9%
if 1.3999999999999999 < F Initial program 51.4%
+-commutative51.4%
fma-def51.4%
+-commutative51.4%
*-commutative51.4%
fma-def51.4%
fma-def51.4%
metadata-eval51.4%
metadata-eval51.4%
distribute-lft-neg-in51.4%
associate-*r/51.4%
*-rgt-identity51.4%
Simplified51.4%
Taylor expanded in F around inf 99.7%
mul-1-neg99.7%
unsub-neg99.7%
*-commutative99.7%
associate-*l/99.7%
*-commutative99.7%
Simplified99.7%
associate-*r/99.7%
sub-div99.8%
Applied egg-rr99.8%
Final simplification98.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0
(-
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(/ x B))))
(if (<= F -1.8e+27)
(- (* F (/ -1.0 (* F (sin B)))) (/ x (tan B)))
(if (<= F -1.12e-110)
t_0
(if (<= F 1.5e-180)
(* (cos B) (/ (- x) (sin B)))
(if (<= F 114000.0) t_0 (/ (- 1.0 (* x (cos B))) (sin B))))))))
double code(double F, double B, double x) {
double t_0 = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
double tmp;
if (F <= -1.8e+27) {
tmp = (F * (-1.0 / (F * sin(B)))) - (x / tan(B));
} else if (F <= -1.12e-110) {
tmp = t_0;
} else if (F <= 1.5e-180) {
tmp = cos(B) * (-x / sin(B));
} else if (F <= 114000.0) {
tmp = t_0;
} else {
tmp = (1.0 - (x * cos(B))) / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
if (f <= (-1.8d+27)) then
tmp = (f * ((-1.0d0) / (f * sin(b)))) - (x / tan(b))
else if (f <= (-1.12d-110)) then
tmp = t_0
else if (f <= 1.5d-180) then
tmp = cos(b) * (-x / sin(b))
else if (f <= 114000.0d0) then
tmp = t_0
else
tmp = (1.0d0 - (x * cos(b))) / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
double tmp;
if (F <= -1.8e+27) {
tmp = (F * (-1.0 / (F * Math.sin(B)))) - (x / Math.tan(B));
} else if (F <= -1.12e-110) {
tmp = t_0;
} else if (F <= 1.5e-180) {
tmp = Math.cos(B) * (-x / Math.sin(B));
} else if (F <= 114000.0) {
tmp = t_0;
} else {
tmp = (1.0 - (x * Math.cos(B))) / Math.sin(B);
}
return tmp;
}
def code(F, B, x): t_0 = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) tmp = 0 if F <= -1.8e+27: tmp = (F * (-1.0 / (F * math.sin(B)))) - (x / math.tan(B)) elif F <= -1.12e-110: tmp = t_0 elif F <= 1.5e-180: tmp = math.cos(B) * (-x / math.sin(B)) elif F <= 114000.0: tmp = t_0 else: tmp = (1.0 - (x * math.cos(B))) / math.sin(B) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)) tmp = 0.0 if (F <= -1.8e+27) tmp = Float64(Float64(F * Float64(-1.0 / Float64(F * sin(B)))) - Float64(x / tan(B))); elseif (F <= -1.12e-110) tmp = t_0; elseif (F <= 1.5e-180) tmp = Float64(cos(B) * Float64(Float64(-x) / sin(B))); elseif (F <= 114000.0) tmp = t_0; else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); tmp = 0.0; if (F <= -1.8e+27) tmp = (F * (-1.0 / (F * sin(B)))) - (x / tan(B)); elseif (F <= -1.12e-110) tmp = t_0; elseif (F <= 1.5e-180) tmp = cos(B) * (-x / sin(B)); elseif (F <= 114000.0) tmp = t_0; else tmp = (1.0 - (x * cos(B))) / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.8e+27], N[(N[(F * N[(-1.0 / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.12e-110], t$95$0, If[LessEqual[F, 1.5e-180], N[(N[Cos[B], $MachinePrecision] * N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 114000.0], t$95$0, N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{if}\;F \leq -1.8 \cdot 10^{+27}:\\
\;\;\;\;F \cdot \frac{-1}{F \cdot \sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -1.12 \cdot 10^{-110}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.5 \cdot 10^{-180}:\\
\;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\
\mathbf{elif}\;F \leq 114000:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -1.79999999999999991e27Initial program 65.3%
+-commutative65.3%
unsub-neg65.3%
associate-*l/83.1%
associate-*r/83.0%
*-commutative83.0%
Simplified83.1%
Taylor expanded in F around -inf 99.7%
if -1.79999999999999991e27 < F < -1.11999999999999998e-110 or 1.5e-180 < F < 114000Initial program 98.0%
Taylor expanded in B around 0 82.6%
if -1.11999999999999998e-110 < F < 1.5e-180Initial program 99.2%
+-commutative99.2%
fma-def99.2%
+-commutative99.2%
*-commutative99.2%
fma-def99.2%
fma-def99.2%
metadata-eval99.2%
metadata-eval99.2%
distribute-lft-neg-in99.2%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 79.2%
mul-1-neg79.2%
*-commutative79.2%
associate-*l/79.3%
*-commutative79.3%
Simplified79.3%
if 114000 < F Initial program 51.4%
+-commutative51.4%
fma-def51.4%
+-commutative51.4%
*-commutative51.4%
fma-def51.4%
fma-def51.4%
metadata-eval51.4%
metadata-eval51.4%
distribute-lft-neg-in51.4%
associate-*r/51.4%
*-rgt-identity51.4%
Simplified51.4%
Taylor expanded in F around inf 99.7%
mul-1-neg99.7%
unsub-neg99.7%
*-commutative99.7%
associate-*l/99.7%
*-commutative99.7%
Simplified99.7%
associate-*r/99.7%
sub-div99.8%
Applied egg-rr99.8%
Final simplification90.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(if (<= F -1.1e+21)
(- (* F (/ -1.0 (* F (sin B)))) (/ x (tan B)))
(if (<= F 4.8e-179)
(+ (* x (/ -1.0 (tan B))) (* t_0 (/ F B)))
(if (<= F 50000.0)
(- (* (/ F (sin B)) t_0) (/ x B))
(/ (- 1.0 (* x (cos B))) (sin B)))))))
double code(double F, double B, double x) {
double t_0 = pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double tmp;
if (F <= -1.1e+21) {
tmp = (F * (-1.0 / (F * sin(B)))) - (x / tan(B));
} else if (F <= 4.8e-179) {
tmp = (x * (-1.0 / tan(B))) + (t_0 * (F / B));
} else if (F <= 50000.0) {
tmp = ((F / sin(B)) * t_0) - (x / B);
} else {
tmp = (1.0 - (x * cos(B))) / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)
if (f <= (-1.1d+21)) then
tmp = (f * ((-1.0d0) / (f * sin(b)))) - (x / tan(b))
else if (f <= 4.8d-179) then
tmp = (x * ((-1.0d0) / tan(b))) + (t_0 * (f / b))
else if (f <= 50000.0d0) then
tmp = ((f / sin(b)) * t_0) - (x / b)
else
tmp = (1.0d0 - (x * cos(b))) / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double tmp;
if (F <= -1.1e+21) {
tmp = (F * (-1.0 / (F * Math.sin(B)))) - (x / Math.tan(B));
} else if (F <= 4.8e-179) {
tmp = (x * (-1.0 / Math.tan(B))) + (t_0 * (F / B));
} else if (F <= 50000.0) {
tmp = ((F / Math.sin(B)) * t_0) - (x / B);
} else {
tmp = (1.0 - (x * Math.cos(B))) / Math.sin(B);
}
return tmp;
}
def code(F, B, x): t_0 = math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) tmp = 0 if F <= -1.1e+21: tmp = (F * (-1.0 / (F * math.sin(B)))) - (x / math.tan(B)) elif F <= 4.8e-179: tmp = (x * (-1.0 / math.tan(B))) + (t_0 * (F / B)) elif F <= 50000.0: tmp = ((F / math.sin(B)) * t_0) - (x / B) else: tmp = (1.0 - (x * math.cos(B))) / math.sin(B) return tmp
function code(F, B, x) t_0 = Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5 tmp = 0.0 if (F <= -1.1e+21) tmp = Float64(Float64(F * Float64(-1.0 / Float64(F * sin(B)))) - Float64(x / tan(B))); elseif (F <= 4.8e-179) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(t_0 * Float64(F / B))); elseif (F <= 50000.0) tmp = Float64(Float64(Float64(F / sin(B)) * t_0) - Float64(x / B)); else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((2.0 + (F * F)) + (x * 2.0)) ^ -0.5; tmp = 0.0; if (F <= -1.1e+21) tmp = (F * (-1.0 / (F * sin(B)))) - (x / tan(B)); elseif (F <= 4.8e-179) tmp = (x * (-1.0 / tan(B))) + (t_0 * (F / B)); elseif (F <= 50000.0) tmp = ((F / sin(B)) * t_0) - (x / B); else tmp = (1.0 - (x * cos(B))) / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, If[LessEqual[F, -1.1e+21], N[(N[(F * N[(-1.0 / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.8e-179], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 50000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{if}\;F \leq -1.1 \cdot 10^{+21}:\\
\;\;\;\;F \cdot \frac{-1}{F \cdot \sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 4.8 \cdot 10^{-179}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + t_0 \cdot \frac{F}{B}\\
\mathbf{elif}\;F \leq 50000:\\
\;\;\;\;\frac{F}{\sin B} \cdot t_0 - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -1.1e21Initial program 66.0%
+-commutative66.0%
unsub-neg66.0%
associate-*l/83.4%
associate-*r/83.4%
*-commutative83.4%
Simplified83.4%
Taylor expanded in F around -inf 99.7%
if -1.1e21 < F < 4.8000000000000001e-179Initial program 99.3%
Taylor expanded in B around 0 88.3%
if 4.8000000000000001e-179 < F < 5e4Initial program 96.4%
Taylor expanded in B around 0 88.4%
if 5e4 < F Initial program 51.4%
+-commutative51.4%
fma-def51.4%
+-commutative51.4%
*-commutative51.4%
fma-def51.4%
fma-def51.4%
metadata-eval51.4%
metadata-eval51.4%
distribute-lft-neg-in51.4%
associate-*r/51.4%
*-rgt-identity51.4%
Simplified51.4%
Taylor expanded in F around inf 99.7%
mul-1-neg99.7%
unsub-neg99.7%
*-commutative99.7%
associate-*l/99.7%
*-commutative99.7%
Simplified99.7%
associate-*r/99.7%
sub-div99.8%
Applied egg-rr99.8%
Final simplification94.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(if (<= F -1.1e+21)
(- (* F (/ -1.0 (* F (sin B)))) (/ x (tan B)))
(if (<= F 4.8e-179)
(+ (/ -1.0 (/ (tan B) x)) (* t_0 (/ F B)))
(if (<= F 136000.0)
(- (* (/ F (sin B)) t_0) (/ x B))
(/ (- 1.0 (* x (cos B))) (sin B)))))))
double code(double F, double B, double x) {
double t_0 = pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double tmp;
if (F <= -1.1e+21) {
tmp = (F * (-1.0 / (F * sin(B)))) - (x / tan(B));
} else if (F <= 4.8e-179) {
tmp = (-1.0 / (tan(B) / x)) + (t_0 * (F / B));
} else if (F <= 136000.0) {
tmp = ((F / sin(B)) * t_0) - (x / B);
} else {
tmp = (1.0 - (x * cos(B))) / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)
if (f <= (-1.1d+21)) then
tmp = (f * ((-1.0d0) / (f * sin(b)))) - (x / tan(b))
else if (f <= 4.8d-179) then
tmp = ((-1.0d0) / (tan(b) / x)) + (t_0 * (f / b))
else if (f <= 136000.0d0) then
tmp = ((f / sin(b)) * t_0) - (x / b)
else
tmp = (1.0d0 - (x * cos(b))) / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double tmp;
if (F <= -1.1e+21) {
tmp = (F * (-1.0 / (F * Math.sin(B)))) - (x / Math.tan(B));
} else if (F <= 4.8e-179) {
tmp = (-1.0 / (Math.tan(B) / x)) + (t_0 * (F / B));
} else if (F <= 136000.0) {
tmp = ((F / Math.sin(B)) * t_0) - (x / B);
} else {
tmp = (1.0 - (x * Math.cos(B))) / Math.sin(B);
}
return tmp;
}
def code(F, B, x): t_0 = math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) tmp = 0 if F <= -1.1e+21: tmp = (F * (-1.0 / (F * math.sin(B)))) - (x / math.tan(B)) elif F <= 4.8e-179: tmp = (-1.0 / (math.tan(B) / x)) + (t_0 * (F / B)) elif F <= 136000.0: tmp = ((F / math.sin(B)) * t_0) - (x / B) else: tmp = (1.0 - (x * math.cos(B))) / math.sin(B) return tmp
function code(F, B, x) t_0 = Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5 tmp = 0.0 if (F <= -1.1e+21) tmp = Float64(Float64(F * Float64(-1.0 / Float64(F * sin(B)))) - Float64(x / tan(B))); elseif (F <= 4.8e-179) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(t_0 * Float64(F / B))); elseif (F <= 136000.0) tmp = Float64(Float64(Float64(F / sin(B)) * t_0) - Float64(x / B)); else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((2.0 + (F * F)) + (x * 2.0)) ^ -0.5; tmp = 0.0; if (F <= -1.1e+21) tmp = (F * (-1.0 / (F * sin(B)))) - (x / tan(B)); elseif (F <= 4.8e-179) tmp = (-1.0 / (tan(B) / x)) + (t_0 * (F / B)); elseif (F <= 136000.0) tmp = ((F / sin(B)) * t_0) - (x / B); else tmp = (1.0 - (x * cos(B))) / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, If[LessEqual[F, -1.1e+21], N[(N[(F * N[(-1.0 / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.8e-179], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 136000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{if}\;F \leq -1.1 \cdot 10^{+21}:\\
\;\;\;\;F \cdot \frac{-1}{F \cdot \sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 4.8 \cdot 10^{-179}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + t_0 \cdot \frac{F}{B}\\
\mathbf{elif}\;F \leq 136000:\\
\;\;\;\;\frac{F}{\sin B} \cdot t_0 - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -1.1e21Initial program 66.0%
+-commutative66.0%
unsub-neg66.0%
associate-*l/83.4%
associate-*r/83.4%
*-commutative83.4%
Simplified83.4%
Taylor expanded in F around -inf 99.7%
if -1.1e21 < F < 4.8000000000000001e-179Initial program 99.3%
div-inv99.6%
clear-num99.4%
Applied egg-rr99.4%
Taylor expanded in B around 0 88.4%
if 4.8000000000000001e-179 < F < 136000Initial program 96.4%
Taylor expanded in B around 0 88.4%
if 136000 < F Initial program 51.4%
+-commutative51.4%
fma-def51.4%
+-commutative51.4%
*-commutative51.4%
fma-def51.4%
fma-def51.4%
metadata-eval51.4%
metadata-eval51.4%
distribute-lft-neg-in51.4%
associate-*r/51.4%
*-rgt-identity51.4%
Simplified51.4%
Taylor expanded in F around inf 99.7%
mul-1-neg99.7%
unsub-neg99.7%
*-commutative99.7%
associate-*l/99.7%
*-commutative99.7%
Simplified99.7%
associate-*r/99.7%
sub-div99.8%
Applied egg-rr99.8%
Final simplification94.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (sqrt 0.5) (/ (sin B) F))))
(if (<= F -1.35e-39)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 5.6e-170)
(* (cos B) (/ (- x) (sin B)))
(if (<= F 4.5e-150)
t_0
(if (<= F 1.75e-77)
(-
(*
(pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)
(+ (/ F B) (* 0.16666666666666666 (* F B))))
(/ x B))
(if (<= F 4.4e-5) t_0 (/ (- 1.0 (* x (cos B))) (sin B)))))))))
double code(double F, double B, double x) {
double t_0 = sqrt(0.5) / (sin(B) / F);
double tmp;
if (F <= -1.35e-39) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 5.6e-170) {
tmp = cos(B) * (-x / sin(B));
} else if (F <= 4.5e-150) {
tmp = t_0;
} else if (F <= 1.75e-77) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
} else if (F <= 4.4e-5) {
tmp = t_0;
} else {
tmp = (1.0 - (x * cos(B))) / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = sqrt(0.5d0) / (sin(b) / f)
if (f <= (-1.35d-39)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 5.6d-170) then
tmp = cos(b) * (-x / sin(b))
else if (f <= 4.5d-150) then
tmp = t_0
else if (f <= 1.75d-77) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * ((f / b) + (0.16666666666666666d0 * (f * b)))) - (x / b)
else if (f <= 4.4d-5) then
tmp = t_0
else
tmp = (1.0d0 - (x * cos(b))) / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.sqrt(0.5) / (Math.sin(B) / F);
double tmp;
if (F <= -1.35e-39) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 5.6e-170) {
tmp = Math.cos(B) * (-x / Math.sin(B));
} else if (F <= 4.5e-150) {
tmp = t_0;
} else if (F <= 1.75e-77) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
} else if (F <= 4.4e-5) {
tmp = t_0;
} else {
tmp = (1.0 - (x * Math.cos(B))) / Math.sin(B);
}
return tmp;
}
def code(F, B, x): t_0 = math.sqrt(0.5) / (math.sin(B) / F) tmp = 0 if F <= -1.35e-39: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 5.6e-170: tmp = math.cos(B) * (-x / math.sin(B)) elif F <= 4.5e-150: tmp = t_0 elif F <= 1.75e-77: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B) elif F <= 4.4e-5: tmp = t_0 else: tmp = (1.0 - (x * math.cos(B))) / math.sin(B) return tmp
function code(F, B, x) t_0 = Float64(sqrt(0.5) / Float64(sin(B) / F)) tmp = 0.0 if (F <= -1.35e-39) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 5.6e-170) tmp = Float64(cos(B) * Float64(Float64(-x) / sin(B))); elseif (F <= 4.5e-150) tmp = t_0; elseif (F <= 1.75e-77) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(Float64(F / B) + Float64(0.16666666666666666 * Float64(F * B)))) - Float64(x / B)); elseif (F <= 4.4e-5) tmp = t_0; else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = sqrt(0.5) / (sin(B) / F); tmp = 0.0; if (F <= -1.35e-39) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 5.6e-170) tmp = cos(B) * (-x / sin(B)); elseif (F <= 4.5e-150) tmp = t_0; elseif (F <= 1.75e-77) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B); elseif (F <= 4.4e-5) tmp = t_0; else tmp = (1.0 - (x * cos(B))) / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[Sqrt[0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.35e-39], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.6e-170], N[(N[Cos[B], $MachinePrecision] * N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.5e-150], t$95$0, If[LessEqual[F, 1.75e-77], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(N[(F / B), $MachinePrecision] + N[(0.16666666666666666 * N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.4e-5], t$95$0, N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sqrt{0.5}}{\frac{\sin B}{F}}\\
\mathbf{if}\;F \leq -1.35 \cdot 10^{-39}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 5.6 \cdot 10^{-170}:\\
\;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\
\mathbf{elif}\;F \leq 4.5 \cdot 10^{-150}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.75 \cdot 10^{-77}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \left(\frac{F}{B} + 0.16666666666666666 \cdot \left(F \cdot B\right)\right) - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.4 \cdot 10^{-5}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -1.35e-39Initial program 72.6%
Taylor expanded in B around 0 49.2%
Taylor expanded in F around -inf 68.3%
if -1.35e-39 < F < 5.59999999999999991e-170Initial program 99.3%
+-commutative99.3%
fma-def99.3%
+-commutative99.3%
*-commutative99.3%
fma-def99.3%
fma-def99.3%
metadata-eval99.3%
metadata-eval99.3%
distribute-lft-neg-in99.3%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 73.9%
mul-1-neg73.9%
*-commutative73.9%
associate-*l/74.0%
*-commutative74.0%
Simplified74.0%
if 5.59999999999999991e-170 < F < 4.5000000000000002e-150 or 1.75000000000000006e-77 < F < 4.3999999999999999e-5Initial program 99.5%
+-commutative99.5%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
distribute-lft-neg-in99.5%
associate-*r/99.5%
*-rgt-identity99.5%
Simplified99.5%
Taylor expanded in F around 0 97.7%
Taylor expanded in x around 0 86.8%
associate-/l*87.0%
Simplified87.0%
if 4.5000000000000002e-150 < F < 1.75000000000000006e-77Initial program 90.5%
Taylor expanded in B around 0 81.0%
Taylor expanded in B around 0 81.5%
if 4.3999999999999999e-5 < F Initial program 51.4%
+-commutative51.4%
fma-def51.4%
+-commutative51.4%
*-commutative51.4%
fma-def51.4%
fma-def51.4%
metadata-eval51.4%
metadata-eval51.4%
distribute-lft-neg-in51.4%
associate-*r/51.4%
*-rgt-identity51.4%
Simplified51.4%
Taylor expanded in F around inf 99.7%
mul-1-neg99.7%
unsub-neg99.7%
*-commutative99.7%
associate-*l/99.7%
*-commutative99.7%
Simplified99.7%
associate-*r/99.7%
sub-div99.8%
Applied egg-rr99.8%
Final simplification82.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (sqrt 0.5) (/ (sin B) F))))
(if (<= F -6.8e-40)
(+ (/ -1.0 (sin B)) (* x (/ -1.0 (tan B))))
(if (<= F 5.6e-170)
(* (cos B) (/ (- x) (sin B)))
(if (<= F 3.8e-152)
t_0
(if (<= F 1.16e-77)
(-
(*
(pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)
(+ (/ F B) (* 0.16666666666666666 (* F B))))
(/ x B))
(if (<= F 4.4e-5) t_0 (/ (- 1.0 (* x (cos B))) (sin B)))))))))
double code(double F, double B, double x) {
double t_0 = sqrt(0.5) / (sin(B) / F);
double tmp;
if (F <= -6.8e-40) {
tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B)));
} else if (F <= 5.6e-170) {
tmp = cos(B) * (-x / sin(B));
} else if (F <= 3.8e-152) {
tmp = t_0;
} else if (F <= 1.16e-77) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
} else if (F <= 4.4e-5) {
tmp = t_0;
} else {
tmp = (1.0 - (x * cos(B))) / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = sqrt(0.5d0) / (sin(b) / f)
if (f <= (-6.8d-40)) then
tmp = ((-1.0d0) / sin(b)) + (x * ((-1.0d0) / tan(b)))
else if (f <= 5.6d-170) then
tmp = cos(b) * (-x / sin(b))
else if (f <= 3.8d-152) then
tmp = t_0
else if (f <= 1.16d-77) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * ((f / b) + (0.16666666666666666d0 * (f * b)))) - (x / b)
else if (f <= 4.4d-5) then
tmp = t_0
else
tmp = (1.0d0 - (x * cos(b))) / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.sqrt(0.5) / (Math.sin(B) / F);
double tmp;
if (F <= -6.8e-40) {
tmp = (-1.0 / Math.sin(B)) + (x * (-1.0 / Math.tan(B)));
} else if (F <= 5.6e-170) {
tmp = Math.cos(B) * (-x / Math.sin(B));
} else if (F <= 3.8e-152) {
tmp = t_0;
} else if (F <= 1.16e-77) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
} else if (F <= 4.4e-5) {
tmp = t_0;
} else {
tmp = (1.0 - (x * Math.cos(B))) / Math.sin(B);
}
return tmp;
}
def code(F, B, x): t_0 = math.sqrt(0.5) / (math.sin(B) / F) tmp = 0 if F <= -6.8e-40: tmp = (-1.0 / math.sin(B)) + (x * (-1.0 / math.tan(B))) elif F <= 5.6e-170: tmp = math.cos(B) * (-x / math.sin(B)) elif F <= 3.8e-152: tmp = t_0 elif F <= 1.16e-77: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B) elif F <= 4.4e-5: tmp = t_0 else: tmp = (1.0 - (x * math.cos(B))) / math.sin(B) return tmp
function code(F, B, x) t_0 = Float64(sqrt(0.5) / Float64(sin(B) / F)) tmp = 0.0 if (F <= -6.8e-40) tmp = Float64(Float64(-1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B)))); elseif (F <= 5.6e-170) tmp = Float64(cos(B) * Float64(Float64(-x) / sin(B))); elseif (F <= 3.8e-152) tmp = t_0; elseif (F <= 1.16e-77) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(Float64(F / B) + Float64(0.16666666666666666 * Float64(F * B)))) - Float64(x / B)); elseif (F <= 4.4e-5) tmp = t_0; else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = sqrt(0.5) / (sin(B) / F); tmp = 0.0; if (F <= -6.8e-40) tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B))); elseif (F <= 5.6e-170) tmp = cos(B) * (-x / sin(B)); elseif (F <= 3.8e-152) tmp = t_0; elseif (F <= 1.16e-77) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B); elseif (F <= 4.4e-5) tmp = t_0; else tmp = (1.0 - (x * cos(B))) / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[Sqrt[0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6.8e-40], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.6e-170], N[(N[Cos[B], $MachinePrecision] * N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.8e-152], t$95$0, If[LessEqual[F, 1.16e-77], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(N[(F / B), $MachinePrecision] + N[(0.16666666666666666 * N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.4e-5], t$95$0, N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sqrt{0.5}}{\frac{\sin B}{F}}\\
\mathbf{if}\;F \leq -6.8 \cdot 10^{-40}:\\
\;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\
\mathbf{elif}\;F \leq 5.6 \cdot 10^{-170}:\\
\;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\
\mathbf{elif}\;F \leq 3.8 \cdot 10^{-152}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.16 \cdot 10^{-77}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \left(\frac{F}{B} + 0.16666666666666666 \cdot \left(F \cdot B\right)\right) - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.4 \cdot 10^{-5}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -6.79999999999999968e-40Initial program 72.6%
Taylor expanded in F around -inf 92.2%
if -6.79999999999999968e-40 < F < 5.59999999999999991e-170Initial program 99.3%
+-commutative99.3%
fma-def99.3%
+-commutative99.3%
*-commutative99.3%
fma-def99.3%
fma-def99.3%
metadata-eval99.3%
metadata-eval99.3%
distribute-lft-neg-in99.3%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 73.9%
mul-1-neg73.9%
*-commutative73.9%
associate-*l/74.0%
*-commutative74.0%
Simplified74.0%
if 5.59999999999999991e-170 < F < 3.80000000000000012e-152 or 1.16e-77 < F < 4.3999999999999999e-5Initial program 99.5%
+-commutative99.5%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
distribute-lft-neg-in99.5%
associate-*r/99.5%
*-rgt-identity99.5%
Simplified99.5%
Taylor expanded in F around 0 97.7%
Taylor expanded in x around 0 86.8%
associate-/l*87.0%
Simplified87.0%
if 3.80000000000000012e-152 < F < 1.16e-77Initial program 90.5%
Taylor expanded in B around 0 81.0%
Taylor expanded in B around 0 81.5%
if 4.3999999999999999e-5 < F Initial program 51.4%
+-commutative51.4%
fma-def51.4%
+-commutative51.4%
*-commutative51.4%
fma-def51.4%
fma-def51.4%
metadata-eval51.4%
metadata-eval51.4%
distribute-lft-neg-in51.4%
associate-*r/51.4%
*-rgt-identity51.4%
Simplified51.4%
Taylor expanded in F around inf 99.7%
mul-1-neg99.7%
unsub-neg99.7%
*-commutative99.7%
associate-*l/99.7%
*-commutative99.7%
Simplified99.7%
associate-*r/99.7%
sub-div99.8%
Applied egg-rr99.8%
Final simplification88.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (sqrt 0.5) (/ (sin B) F))))
(if (<= F -1.35e-41)
(- (* F (/ -1.0 (* F (sin B)))) (/ x (tan B)))
(if (<= F 5.6e-170)
(* (cos B) (/ (- x) (sin B)))
(if (<= F 2.7e-150)
t_0
(if (<= F 1.26e-77)
(-
(*
(pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)
(+ (/ F B) (* 0.16666666666666666 (* F B))))
(/ x B))
(if (<= F 3.9e-5) t_0 (/ (- 1.0 (* x (cos B))) (sin B)))))))))
double code(double F, double B, double x) {
double t_0 = sqrt(0.5) / (sin(B) / F);
double tmp;
if (F <= -1.35e-41) {
tmp = (F * (-1.0 / (F * sin(B)))) - (x / tan(B));
} else if (F <= 5.6e-170) {
tmp = cos(B) * (-x / sin(B));
} else if (F <= 2.7e-150) {
tmp = t_0;
} else if (F <= 1.26e-77) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
} else if (F <= 3.9e-5) {
tmp = t_0;
} else {
tmp = (1.0 - (x * cos(B))) / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = sqrt(0.5d0) / (sin(b) / f)
if (f <= (-1.35d-41)) then
tmp = (f * ((-1.0d0) / (f * sin(b)))) - (x / tan(b))
else if (f <= 5.6d-170) then
tmp = cos(b) * (-x / sin(b))
else if (f <= 2.7d-150) then
tmp = t_0
else if (f <= 1.26d-77) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * ((f / b) + (0.16666666666666666d0 * (f * b)))) - (x / b)
else if (f <= 3.9d-5) then
tmp = t_0
else
tmp = (1.0d0 - (x * cos(b))) / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.sqrt(0.5) / (Math.sin(B) / F);
double tmp;
if (F <= -1.35e-41) {
tmp = (F * (-1.0 / (F * Math.sin(B)))) - (x / Math.tan(B));
} else if (F <= 5.6e-170) {
tmp = Math.cos(B) * (-x / Math.sin(B));
} else if (F <= 2.7e-150) {
tmp = t_0;
} else if (F <= 1.26e-77) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
} else if (F <= 3.9e-5) {
tmp = t_0;
} else {
tmp = (1.0 - (x * Math.cos(B))) / Math.sin(B);
}
return tmp;
}
def code(F, B, x): t_0 = math.sqrt(0.5) / (math.sin(B) / F) tmp = 0 if F <= -1.35e-41: tmp = (F * (-1.0 / (F * math.sin(B)))) - (x / math.tan(B)) elif F <= 5.6e-170: tmp = math.cos(B) * (-x / math.sin(B)) elif F <= 2.7e-150: tmp = t_0 elif F <= 1.26e-77: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B) elif F <= 3.9e-5: tmp = t_0 else: tmp = (1.0 - (x * math.cos(B))) / math.sin(B) return tmp
function code(F, B, x) t_0 = Float64(sqrt(0.5) / Float64(sin(B) / F)) tmp = 0.0 if (F <= -1.35e-41) tmp = Float64(Float64(F * Float64(-1.0 / Float64(F * sin(B)))) - Float64(x / tan(B))); elseif (F <= 5.6e-170) tmp = Float64(cos(B) * Float64(Float64(-x) / sin(B))); elseif (F <= 2.7e-150) tmp = t_0; elseif (F <= 1.26e-77) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(Float64(F / B) + Float64(0.16666666666666666 * Float64(F * B)))) - Float64(x / B)); elseif (F <= 3.9e-5) tmp = t_0; else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = sqrt(0.5) / (sin(B) / F); tmp = 0.0; if (F <= -1.35e-41) tmp = (F * (-1.0 / (F * sin(B)))) - (x / tan(B)); elseif (F <= 5.6e-170) tmp = cos(B) * (-x / sin(B)); elseif (F <= 2.7e-150) tmp = t_0; elseif (F <= 1.26e-77) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B); elseif (F <= 3.9e-5) tmp = t_0; else tmp = (1.0 - (x * cos(B))) / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[Sqrt[0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.35e-41], N[(N[(F * N[(-1.0 / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.6e-170], N[(N[Cos[B], $MachinePrecision] * N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.7e-150], t$95$0, If[LessEqual[F, 1.26e-77], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(N[(F / B), $MachinePrecision] + N[(0.16666666666666666 * N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.9e-5], t$95$0, N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sqrt{0.5}}{\frac{\sin B}{F}}\\
\mathbf{if}\;F \leq -1.35 \cdot 10^{-41}:\\
\;\;\;\;F \cdot \frac{-1}{F \cdot \sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 5.6 \cdot 10^{-170}:\\
\;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\
\mathbf{elif}\;F \leq 2.7 \cdot 10^{-150}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.26 \cdot 10^{-77}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \left(\frac{F}{B} + 0.16666666666666666 \cdot \left(F \cdot B\right)\right) - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.9 \cdot 10^{-5}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -1.35e-41Initial program 72.6%
+-commutative72.6%
unsub-neg72.6%
associate-*l/86.5%
associate-*r/86.6%
*-commutative86.6%
Simplified86.7%
Taylor expanded in F around -inf 92.2%
if -1.35e-41 < F < 5.59999999999999991e-170Initial program 99.3%
+-commutative99.3%
fma-def99.3%
+-commutative99.3%
*-commutative99.3%
fma-def99.3%
fma-def99.3%
metadata-eval99.3%
metadata-eval99.3%
distribute-lft-neg-in99.3%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 73.9%
mul-1-neg73.9%
*-commutative73.9%
associate-*l/74.0%
*-commutative74.0%
Simplified74.0%
if 5.59999999999999991e-170 < F < 2.7000000000000001e-150 or 1.2599999999999999e-77 < F < 3.8999999999999999e-5Initial program 99.5%
+-commutative99.5%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
distribute-lft-neg-in99.5%
associate-*r/99.5%
*-rgt-identity99.5%
Simplified99.5%
Taylor expanded in F around 0 97.7%
Taylor expanded in x around 0 86.8%
associate-/l*87.0%
Simplified87.0%
if 2.7000000000000001e-150 < F < 1.2599999999999999e-77Initial program 90.5%
Taylor expanded in B around 0 81.0%
Taylor expanded in B around 0 81.5%
if 3.8999999999999999e-5 < F Initial program 51.4%
+-commutative51.4%
fma-def51.4%
+-commutative51.4%
*-commutative51.4%
fma-def51.4%
fma-def51.4%
metadata-eval51.4%
metadata-eval51.4%
distribute-lft-neg-in51.4%
associate-*r/51.4%
*-rgt-identity51.4%
Simplified51.4%
Taylor expanded in F around inf 99.7%
mul-1-neg99.7%
unsub-neg99.7%
*-commutative99.7%
associate-*l/99.7%
*-commutative99.7%
Simplified99.7%
associate-*r/99.7%
sub-div99.8%
Applied egg-rr99.8%
Final simplification88.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (sqrt 0.5) (/ (sin B) F))))
(if (<= F -1.35e-39)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 5.6e-170)
(* (cos B) (/ (- x) (sin B)))
(if (<= F 5.3e-152)
t_0
(if (<= F 9e-78)
(-
(*
(pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)
(+ (/ F B) (* 0.16666666666666666 (* F B))))
(/ x B))
(if (<= F 175000.0) t_0 (- (/ 1.0 (sin B)) (/ x B)))))))))
double code(double F, double B, double x) {
double t_0 = sqrt(0.5) / (sin(B) / F);
double tmp;
if (F <= -1.35e-39) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 5.6e-170) {
tmp = cos(B) * (-x / sin(B));
} else if (F <= 5.3e-152) {
tmp = t_0;
} else if (F <= 9e-78) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
} else if (F <= 175000.0) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = sqrt(0.5d0) / (sin(b) / f)
if (f <= (-1.35d-39)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 5.6d-170) then
tmp = cos(b) * (-x / sin(b))
else if (f <= 5.3d-152) then
tmp = t_0
else if (f <= 9d-78) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * ((f / b) + (0.16666666666666666d0 * (f * b)))) - (x / b)
else if (f <= 175000.0d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.sqrt(0.5) / (Math.sin(B) / F);
double tmp;
if (F <= -1.35e-39) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 5.6e-170) {
tmp = Math.cos(B) * (-x / Math.sin(B));
} else if (F <= 5.3e-152) {
tmp = t_0;
} else if (F <= 9e-78) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
} else if (F <= 175000.0) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = math.sqrt(0.5) / (math.sin(B) / F) tmp = 0 if F <= -1.35e-39: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 5.6e-170: tmp = math.cos(B) * (-x / math.sin(B)) elif F <= 5.3e-152: tmp = t_0 elif F <= 9e-78: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B) elif F <= 175000.0: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(sqrt(0.5) / Float64(sin(B) / F)) tmp = 0.0 if (F <= -1.35e-39) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 5.6e-170) tmp = Float64(cos(B) * Float64(Float64(-x) / sin(B))); elseif (F <= 5.3e-152) tmp = t_0; elseif (F <= 9e-78) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(Float64(F / B) + Float64(0.16666666666666666 * Float64(F * B)))) - Float64(x / B)); elseif (F <= 175000.0) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = sqrt(0.5) / (sin(B) / F); tmp = 0.0; if (F <= -1.35e-39) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 5.6e-170) tmp = cos(B) * (-x / sin(B)); elseif (F <= 5.3e-152) tmp = t_0; elseif (F <= 9e-78) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B); elseif (F <= 175000.0) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[Sqrt[0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.35e-39], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.6e-170], N[(N[Cos[B], $MachinePrecision] * N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.3e-152], t$95$0, If[LessEqual[F, 9e-78], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(N[(F / B), $MachinePrecision] + N[(0.16666666666666666 * N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 175000.0], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sqrt{0.5}}{\frac{\sin B}{F}}\\
\mathbf{if}\;F \leq -1.35 \cdot 10^{-39}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 5.6 \cdot 10^{-170}:\\
\;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\
\mathbf{elif}\;F \leq 5.3 \cdot 10^{-152}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 9 \cdot 10^{-78}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \left(\frac{F}{B} + 0.16666666666666666 \cdot \left(F \cdot B\right)\right) - \frac{x}{B}\\
\mathbf{elif}\;F \leq 175000:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.35e-39Initial program 72.6%
Taylor expanded in B around 0 49.2%
Taylor expanded in F around -inf 68.3%
if -1.35e-39 < F < 5.59999999999999991e-170Initial program 99.3%
+-commutative99.3%
fma-def99.3%
+-commutative99.3%
*-commutative99.3%
fma-def99.3%
fma-def99.3%
metadata-eval99.3%
metadata-eval99.3%
distribute-lft-neg-in99.3%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 73.9%
mul-1-neg73.9%
*-commutative73.9%
associate-*l/74.0%
*-commutative74.0%
Simplified74.0%
if 5.59999999999999991e-170 < F < 5.3000000000000001e-152 or 9e-78 < F < 175000Initial program 99.6%
+-commutative99.6%
fma-def99.6%
+-commutative99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
metadata-eval99.6%
metadata-eval99.6%
distribute-lft-neg-in99.6%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 97.8%
Taylor expanded in x around 0 82.2%
associate-/l*82.4%
Simplified82.4%
if 5.3000000000000001e-152 < F < 9e-78Initial program 90.5%
Taylor expanded in B around 0 81.0%
Taylor expanded in B around 0 81.5%
if 175000 < F Initial program 50.8%
+-commutative50.8%
fma-def50.8%
+-commutative50.8%
*-commutative50.8%
fma-def50.8%
fma-def50.8%
metadata-eval50.8%
metadata-eval50.8%
distribute-lft-neg-in50.8%
associate-*r/50.8%
*-rgt-identity50.8%
Simplified50.8%
Taylor expanded in F around inf 99.7%
mul-1-neg99.7%
unsub-neg99.7%
*-commutative99.7%
associate-*l/99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in B around 0 82.7%
Final simplification76.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ 1.0 B) (/ x (tan B)))))
(if (<= x -9.2e-110)
t_0
(if (<= x 1.9e-196)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= x 1.6e-79) (- (/ 1.0 (sin B)) (/ x B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = (1.0 / B) - (x / tan(B));
double tmp;
if (x <= -9.2e-110) {
tmp = t_0;
} else if (x <= 1.9e-196) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (x <= 1.6e-79) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = (1.0d0 / b) - (x / tan(b))
if (x <= (-9.2d-110)) then
tmp = t_0
else if (x <= 1.9d-196) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (x <= 1.6d-79) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (1.0 / B) - (x / Math.tan(B));
double tmp;
if (x <= -9.2e-110) {
tmp = t_0;
} else if (x <= 1.9e-196) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (x <= 1.6e-79) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = (1.0 / B) - (x / math.tan(B)) tmp = 0 if x <= -9.2e-110: tmp = t_0 elif x <= 1.9e-196: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif x <= 1.6e-79: tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(Float64(1.0 / B) - Float64(x / tan(B))) tmp = 0.0 if (x <= -9.2e-110) tmp = t_0; elseif (x <= 1.9e-196) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (x <= 1.6e-79) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = t_0; end return tmp end
function tmp_2 = code(F, B, x) t_0 = (1.0 / B) - (x / tan(B)); tmp = 0.0; if (x <= -9.2e-110) tmp = t_0; elseif (x <= 1.9e-196) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (x <= 1.6e-79) tmp = (1.0 / sin(B)) - (x / B); else tmp = t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -9.2e-110], t$95$0, If[LessEqual[x, 1.9e-196], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.6e-79], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;x \leq -9.2 \cdot 10^{-110}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 1.9 \cdot 10^{-196}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{-79}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x < -9.2000000000000006e-110 or 1.59999999999999994e-79 < x Initial program 76.8%
+-commutative76.8%
unsub-neg76.8%
associate-*l/90.3%
associate-*r/90.3%
*-commutative90.3%
Simplified90.5%
Taylor expanded in F around inf 71.7%
Taylor expanded in B around 0 80.2%
if -9.2000000000000006e-110 < x < 1.9000000000000001e-196Initial program 81.0%
Taylor expanded in B around 0 74.3%
Taylor expanded in B around 0 51.6%
if 1.9000000000000001e-196 < x < 1.59999999999999994e-79Initial program 61.9%
+-commutative61.9%
fma-def62.0%
+-commutative62.0%
*-commutative62.0%
fma-def62.0%
fma-def62.0%
metadata-eval62.0%
metadata-eval62.0%
distribute-lft-neg-in62.0%
associate-*r/62.1%
*-rgt-identity62.1%
Simplified62.1%
Taylor expanded in F around inf 50.9%
mul-1-neg50.9%
unsub-neg50.9%
*-commutative50.9%
associate-*l/50.9%
*-commutative50.9%
Simplified50.9%
Taylor expanded in B around 0 50.9%
Final simplification68.8%
(FPCore (F B x)
:precision binary64
(if (<= F -0.115)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.35e-298)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(if (<= F 4.8e-274)
(- (/ 1.0 B) (/ x (tan B)))
(if (<= F 0.066)
(/ (- (* F (sqrt 0.5)) x) B)
(- (/ 1.0 (sin B)) (/ x B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.115) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.35e-298) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 4.8e-274) {
tmp = (1.0 / B) - (x / tan(B));
} else if (F <= 0.066) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.115d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.35d-298)) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
else if (f <= 4.8d-274) then
tmp = (1.0d0 / b) - (x / tan(b))
else if (f <= 0.066d0) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.115) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.35e-298) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 4.8e-274) {
tmp = (1.0 / B) - (x / Math.tan(B));
} else if (F <= 0.066) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.115: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.35e-298: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B elif F <= 4.8e-274: tmp = (1.0 / B) - (x / math.tan(B)) elif F <= 0.066: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.115) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.35e-298) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B); elseif (F <= 4.8e-274) tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); elseif (F <= 0.066) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.115) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.35e-298) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; elseif (F <= 4.8e-274) tmp = (1.0 / B) - (x / tan(B)); elseif (F <= 0.066) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.115], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.35e-298], 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, 4.8e-274], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.066], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.115:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.35 \cdot 10^{-298}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{elif}\;F \leq 4.8 \cdot 10^{-274}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 0.066:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -0.115000000000000005Initial program 69.4%
Taylor expanded in B around 0 43.3%
Taylor expanded in F around -inf 70.6%
if -0.115000000000000005 < F < -1.3500000000000001e-298Initial program 99.3%
+-commutative99.3%
fma-def99.3%
+-commutative99.3%
*-commutative99.3%
fma-def99.3%
fma-def99.3%
metadata-eval99.3%
metadata-eval99.3%
distribute-lft-neg-in99.3%
associate-*r/99.5%
*-rgt-identity99.5%
Simplified99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 57.7%
if -1.3500000000000001e-298 < F < 4.8e-274Initial program 99.1%
+-commutative99.1%
unsub-neg99.1%
associate-*l/99.1%
associate-*r/99.1%
*-commutative99.1%
Simplified99.9%
Taylor expanded in F around inf 47.3%
Taylor expanded in B around 0 65.0%
if 4.8e-274 < F < 0.066000000000000003Initial program 97.5%
+-commutative97.5%
fma-def97.5%
+-commutative97.5%
*-commutative97.5%
fma-def97.5%
fma-def97.5%
metadata-eval97.5%
metadata-eval97.5%
distribute-lft-neg-in97.5%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 98.9%
Taylor expanded in B around 0 57.1%
Taylor expanded in x around 0 57.1%
if 0.066000000000000003 < F Initial program 51.4%
+-commutative51.4%
fma-def51.4%
+-commutative51.4%
*-commutative51.4%
fma-def51.4%
fma-def51.4%
metadata-eval51.4%
metadata-eval51.4%
distribute-lft-neg-in51.4%
associate-*r/51.4%
*-rgt-identity51.4%
Simplified51.4%
Taylor expanded in F around inf 99.7%
mul-1-neg99.7%
unsub-neg99.7%
*-commutative99.7%
associate-*l/99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in B around 0 81.7%
Final simplification68.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ 1.0 B) (/ x (tan B)))))
(if (<= F -1.2e-39)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 4.1e-112)
t_0
(if (<= F 0.0005)
(/ (sqrt 0.5) (/ B F))
(if (<= F 9.5e+92) t_0 (- (/ 1.0 (sin B)) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = (1.0 / B) - (x / tan(B));
double tmp;
if (F <= -1.2e-39) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 4.1e-112) {
tmp = t_0;
} else if (F <= 0.0005) {
tmp = sqrt(0.5) / (B / F);
} else if (F <= 9.5e+92) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = (1.0d0 / b) - (x / tan(b))
if (f <= (-1.2d-39)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 4.1d-112) then
tmp = t_0
else if (f <= 0.0005d0) then
tmp = sqrt(0.5d0) / (b / f)
else if (f <= 9.5d+92) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (1.0 / B) - (x / Math.tan(B));
double tmp;
if (F <= -1.2e-39) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 4.1e-112) {
tmp = t_0;
} else if (F <= 0.0005) {
tmp = Math.sqrt(0.5) / (B / F);
} else if (F <= 9.5e+92) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (1.0 / B) - (x / math.tan(B)) tmp = 0 if F <= -1.2e-39: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 4.1e-112: tmp = t_0 elif F <= 0.0005: tmp = math.sqrt(0.5) / (B / F) elif F <= 9.5e+92: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(1.0 / B) - Float64(x / tan(B))) tmp = 0.0 if (F <= -1.2e-39) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 4.1e-112) tmp = t_0; elseif (F <= 0.0005) tmp = Float64(sqrt(0.5) / Float64(B / F)); elseif (F <= 9.5e+92) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (1.0 / B) - (x / tan(B)); tmp = 0.0; if (F <= -1.2e-39) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 4.1e-112) tmp = t_0; elseif (F <= 0.0005) tmp = sqrt(0.5) / (B / F); elseif (F <= 9.5e+92) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / 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]}, If[LessEqual[F, -1.2e-39], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.1e-112], t$95$0, If[LessEqual[F, 0.0005], N[(N[Sqrt[0.5], $MachinePrecision] / N[(B / F), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9.5e+92], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.2 \cdot 10^{-39}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.1 \cdot 10^{-112}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 0.0005:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{B}{F}}\\
\mathbf{elif}\;F \leq 9.5 \cdot 10^{+92}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.20000000000000008e-39Initial program 72.6%
Taylor expanded in B around 0 49.2%
Taylor expanded in F around -inf 68.3%
if -1.20000000000000008e-39 < F < 4.09999999999999996e-112 or 5.0000000000000001e-4 < F < 9.4999999999999995e92Initial program 96.2%
+-commutative96.2%
unsub-neg96.2%
associate-*l/98.6%
associate-*r/98.5%
*-commutative98.5%
Simplified98.7%
Taylor expanded in F around inf 40.4%
Taylor expanded in B around 0 55.3%
if 4.09999999999999996e-112 < F < 5.0000000000000001e-4Initial program 99.6%
+-commutative99.6%
fma-def99.6%
+-commutative99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
metadata-eval99.6%
metadata-eval99.6%
distribute-lft-neg-in99.6%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 97.5%
Taylor expanded in B around 0 65.7%
Taylor expanded in x around 0 52.4%
associate-/l*52.5%
Simplified52.5%
if 9.4999999999999995e92 < F Initial program 36.6%
+-commutative36.6%
fma-def36.6%
+-commutative36.6%
*-commutative36.6%
fma-def36.6%
fma-def36.6%
metadata-eval36.6%
metadata-eval36.6%
distribute-lft-neg-in36.6%
associate-*r/36.6%
*-rgt-identity36.6%
Simplified36.6%
Taylor expanded in F around inf 99.8%
mul-1-neg99.8%
unsub-neg99.8%
*-commutative99.8%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in B around 0 84.2%
Final simplification65.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- (* F (sqrt 0.5)) x) B)))
(if (<= F -0.07)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -4.8e-291)
t_0
(if (<= F 1.7e-274)
(- (/ 1.0 B) (/ x (tan B)))
(if (<= F 0.56) t_0 (- (/ 1.0 (sin B)) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = ((F * sqrt(0.5)) - x) / B;
double tmp;
if (F <= -0.07) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -4.8e-291) {
tmp = t_0;
} else if (F <= 1.7e-274) {
tmp = (1.0 / B) - (x / tan(B));
} else if (F <= 0.56) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((f * sqrt(0.5d0)) - x) / b
if (f <= (-0.07d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-4.8d-291)) then
tmp = t_0
else if (f <= 1.7d-274) then
tmp = (1.0d0 / b) - (x / tan(b))
else if (f <= 0.56d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F * Math.sqrt(0.5)) - x) / B;
double tmp;
if (F <= -0.07) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -4.8e-291) {
tmp = t_0;
} else if (F <= 1.7e-274) {
tmp = (1.0 / B) - (x / Math.tan(B));
} else if (F <= 0.56) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = ((F * math.sqrt(0.5)) - x) / B tmp = 0 if F <= -0.07: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -4.8e-291: tmp = t_0 elif F <= 1.7e-274: tmp = (1.0 / B) - (x / math.tan(B)) elif F <= 0.56: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B) tmp = 0.0 if (F <= -0.07) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -4.8e-291) tmp = t_0; elseif (F <= 1.7e-274) tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); elseif (F <= 0.56) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F * sqrt(0.5)) - x) / B; tmp = 0.0; if (F <= -0.07) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -4.8e-291) tmp = t_0; elseif (F <= 1.7e-274) tmp = (1.0 / B) - (x / tan(B)); elseif (F <= 0.56) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[F, -0.07], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.8e-291], t$95$0, If[LessEqual[F, 1.7e-274], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.56], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{if}\;F \leq -0.07:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -4.8 \cdot 10^{-291}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.7 \cdot 10^{-274}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 0.56:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -0.070000000000000007Initial program 69.4%
Taylor expanded in B around 0 43.3%
Taylor expanded in F around -inf 70.6%
if -0.070000000000000007 < F < -4.80000000000000025e-291 or 1.6999999999999999e-274 < F < 0.56000000000000005Initial program 98.5%
+-commutative98.5%
fma-def98.5%
+-commutative98.5%
*-commutative98.5%
fma-def98.5%
fma-def98.5%
metadata-eval98.5%
metadata-eval98.5%
distribute-lft-neg-in98.5%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 99.2%
Taylor expanded in B around 0 57.4%
Taylor expanded in x around 0 57.4%
if -4.80000000000000025e-291 < F < 1.6999999999999999e-274Initial program 99.1%
+-commutative99.1%
unsub-neg99.1%
associate-*l/99.1%
associate-*r/99.1%
*-commutative99.1%
Simplified99.9%
Taylor expanded in F around inf 47.3%
Taylor expanded in B around 0 65.0%
if 0.56000000000000005 < F Initial program 51.4%
+-commutative51.4%
fma-def51.4%
+-commutative51.4%
*-commutative51.4%
fma-def51.4%
fma-def51.4%
metadata-eval51.4%
metadata-eval51.4%
distribute-lft-neg-in51.4%
associate-*r/51.4%
*-rgt-identity51.4%
Simplified51.4%
Taylor expanded in F around inf 99.7%
mul-1-neg99.7%
unsub-neg99.7%
*-commutative99.7%
associate-*l/99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in B around 0 81.7%
Final simplification68.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ 1.0 B) (/ x (tan B)))))
(if (<= F 4.1e-112)
t_0
(if (<= F 0.0005)
(/ (sqrt 0.5) (/ B F))
(if (<= F 6.5e+92) t_0 (- (/ 1.0 (sin B)) (/ x B)))))))
double code(double F, double B, double x) {
double t_0 = (1.0 / B) - (x / tan(B));
double tmp;
if (F <= 4.1e-112) {
tmp = t_0;
} else if (F <= 0.0005) {
tmp = sqrt(0.5) / (B / F);
} else if (F <= 6.5e+92) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = (1.0d0 / b) - (x / tan(b))
if (f <= 4.1d-112) then
tmp = t_0
else if (f <= 0.0005d0) then
tmp = sqrt(0.5d0) / (b / f)
else if (f <= 6.5d+92) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (1.0 / B) - (x / Math.tan(B));
double tmp;
if (F <= 4.1e-112) {
tmp = t_0;
} else if (F <= 0.0005) {
tmp = Math.sqrt(0.5) / (B / F);
} else if (F <= 6.5e+92) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (1.0 / B) - (x / math.tan(B)) tmp = 0 if F <= 4.1e-112: tmp = t_0 elif F <= 0.0005: tmp = math.sqrt(0.5) / (B / F) elif F <= 6.5e+92: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(1.0 / B) - Float64(x / tan(B))) tmp = 0.0 if (F <= 4.1e-112) tmp = t_0; elseif (F <= 0.0005) tmp = Float64(sqrt(0.5) / Float64(B / F)); elseif (F <= 6.5e+92) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (1.0 / B) - (x / tan(B)); tmp = 0.0; if (F <= 4.1e-112) tmp = t_0; elseif (F <= 0.0005) tmp = sqrt(0.5) / (B / F); elseif (F <= 6.5e+92) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / 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]}, If[LessEqual[F, 4.1e-112], t$95$0, If[LessEqual[F, 0.0005], N[(N[Sqrt[0.5], $MachinePrecision] / N[(B / F), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.5e+92], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;F \leq 4.1 \cdot 10^{-112}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 0.0005:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{B}{F}}\\
\mathbf{elif}\;F \leq 6.5 \cdot 10^{+92}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < 4.09999999999999996e-112 or 5.0000000000000001e-4 < F < 6.49999999999999999e92Initial program 87.6%
+-commutative87.6%
unsub-neg87.6%
associate-*l/94.2%
associate-*r/94.1%
*-commutative94.1%
Simplified94.3%
Taylor expanded in F around inf 47.6%
Taylor expanded in B around 0 57.3%
if 4.09999999999999996e-112 < F < 5.0000000000000001e-4Initial program 99.6%
+-commutative99.6%
fma-def99.6%
+-commutative99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
metadata-eval99.6%
metadata-eval99.6%
distribute-lft-neg-in99.6%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 97.5%
Taylor expanded in B around 0 65.7%
Taylor expanded in x around 0 52.4%
associate-/l*52.5%
Simplified52.5%
if 6.49999999999999999e92 < F Initial program 36.6%
+-commutative36.6%
fma-def36.6%
+-commutative36.6%
*-commutative36.6%
fma-def36.6%
fma-def36.6%
metadata-eval36.6%
metadata-eval36.6%
distribute-lft-neg-in36.6%
associate-*r/36.6%
*-rgt-identity36.6%
Simplified36.6%
Taylor expanded in F around inf 99.8%
mul-1-neg99.8%
unsub-neg99.8%
*-commutative99.8%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in B around 0 84.2%
Final simplification63.3%
(FPCore (F B x)
:precision binary64
(if (<= F -2.1e-46)
(/ (- -1.0 x) B)
(if (<= F 1.12e-119)
(- (/ (- x) B) (* B (* x -0.3333333333333333)))
(if (<= F 0.00049)
(/ (sqrt 0.5) (/ B F))
(+ (/ (- -1.0 x) (* F (* F B))) (/ (- 1.0 x) B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.1e-46) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.12e-119) {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
} else if (F <= 0.00049) {
tmp = sqrt(0.5) / (B / F);
} else {
tmp = ((-1.0 - x) / (F * (F * B))) + ((1.0 - x) / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.1d-46)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.12d-119) then
tmp = (-x / b) - (b * (x * (-0.3333333333333333d0)))
else if (f <= 0.00049d0) then
tmp = sqrt(0.5d0) / (b / f)
else
tmp = (((-1.0d0) - x) / (f * (f * b))) + ((1.0d0 - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.1e-46) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.12e-119) {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
} else if (F <= 0.00049) {
tmp = Math.sqrt(0.5) / (B / F);
} else {
tmp = ((-1.0 - x) / (F * (F * B))) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.1e-46: tmp = (-1.0 - x) / B elif F <= 1.12e-119: tmp = (-x / B) - (B * (x * -0.3333333333333333)) elif F <= 0.00049: tmp = math.sqrt(0.5) / (B / F) else: tmp = ((-1.0 - x) / (F * (F * B))) + ((1.0 - x) / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.1e-46) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.12e-119) tmp = Float64(Float64(Float64(-x) / B) - Float64(B * Float64(x * -0.3333333333333333))); elseif (F <= 0.00049) tmp = Float64(sqrt(0.5) / Float64(B / F)); else tmp = Float64(Float64(Float64(-1.0 - x) / Float64(F * Float64(F * B))) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.1e-46) tmp = (-1.0 - x) / B; elseif (F <= 1.12e-119) tmp = (-x / B) - (B * (x * -0.3333333333333333)); elseif (F <= 0.00049) tmp = sqrt(0.5) / (B / F); else tmp = ((-1.0 - x) / (F * (F * B))) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.1e-46], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.12e-119], N[(N[((-x) / B), $MachinePrecision] - N[(B * N[(x * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.00049], N[(N[Sqrt[0.5], $MachinePrecision] / N[(B / F), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-1.0 - x), $MachinePrecision] / N[(F * N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.1 \cdot 10^{-46}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.12 \cdot 10^{-119}:\\
\;\;\;\;\frac{-x}{B} - B \cdot \left(x \cdot -0.3333333333333333\right)\\
\mathbf{elif}\;F \leq 0.00049:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{B}{F}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1 - x}{F \cdot \left(F \cdot B\right)} + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.09999999999999987e-46Initial program 73.0%
Taylor expanded in B around 0 48.5%
Taylor expanded in B around 0 51.4%
Taylor expanded in F around -inf 53.2%
if -2.09999999999999987e-46 < F < 1.11999999999999998e-119Initial program 98.3%
+-commutative98.3%
fma-def98.3%
+-commutative98.3%
*-commutative98.3%
fma-def98.3%
fma-def98.3%
metadata-eval98.3%
metadata-eval98.3%
distribute-lft-neg-in98.3%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 71.2%
mul-1-neg71.2%
*-commutative71.2%
associate-*l/71.3%
*-commutative71.3%
Simplified71.3%
Taylor expanded in B around 0 36.0%
*-commutative36.0%
distribute-rgt-out--36.0%
metadata-eval36.0%
Simplified36.0%
if 1.11999999999999998e-119 < F < 4.8999999999999998e-4Initial program 99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
distribute-lft-neg-in99.4%
associate-*r/99.5%
*-rgt-identity99.5%
Simplified99.5%
Taylor expanded in F around 0 97.7%
Taylor expanded in B around 0 63.9%
Taylor expanded in x around 0 52.3%
associate-/l*52.5%
Simplified52.5%
if 4.8999999999999998e-4 < F Initial program 51.4%
Taylor expanded in B around 0 34.3%
Taylor expanded in B around 0 42.7%
Taylor expanded in F around inf 54.4%
associate--l+54.4%
associate-*r/54.4%
distribute-lft-in54.4%
metadata-eval54.4%
associate-*r*54.4%
metadata-eval54.4%
metadata-eval54.4%
distribute-lft-in54.4%
+-commutative54.4%
mul-1-neg54.4%
unpow254.4%
associate-*l*54.4%
div-sub54.4%
Simplified54.4%
Final simplification47.6%
(FPCore (F B x) :precision binary64 (if (or (<= x -3.5e-110) (not (<= x 1.3e-225))) (- (/ 1.0 B) (/ x (tan B))) (/ (sqrt 0.5) (/ B F))))
double code(double F, double B, double x) {
double tmp;
if ((x <= -3.5e-110) || !(x <= 1.3e-225)) {
tmp = (1.0 / B) - (x / tan(B));
} else {
tmp = sqrt(0.5) / (B / F);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-3.5d-110)) .or. (.not. (x <= 1.3d-225))) then
tmp = (1.0d0 / b) - (x / tan(b))
else
tmp = sqrt(0.5d0) / (b / f)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -3.5e-110) || !(x <= 1.3e-225)) {
tmp = (1.0 / B) - (x / Math.tan(B));
} else {
tmp = Math.sqrt(0.5) / (B / F);
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -3.5e-110) or not (x <= 1.3e-225): tmp = (1.0 / B) - (x / math.tan(B)) else: tmp = math.sqrt(0.5) / (B / F) return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -3.5e-110) || !(x <= 1.3e-225)) tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); else tmp = Float64(sqrt(0.5) / Float64(B / F)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -3.5e-110) || ~((x <= 1.3e-225))) tmp = (1.0 / B) - (x / tan(B)); else tmp = sqrt(0.5) / (B / F); end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -3.5e-110], N[Not[LessEqual[x, 1.3e-225]], $MachinePrecision]], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[0.5], $MachinePrecision] / N[(B / F), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.5 \cdot 10^{-110} \lor \neg \left(x \leq 1.3 \cdot 10^{-225}\right):\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{B}{F}}\\
\end{array}
\end{array}
if x < -3.49999999999999974e-110 or 1.30000000000000007e-225 < x Initial program 75.1%
+-commutative75.1%
unsub-neg75.1%
associate-*l/87.5%
associate-*r/87.5%
*-commutative87.5%
Simplified87.7%
Taylor expanded in F around inf 66.7%
Taylor expanded in B around 0 70.5%
if -3.49999999999999974e-110 < x < 1.30000000000000007e-225Initial program 80.0%
+-commutative80.0%
fma-def80.0%
+-commutative80.0%
*-commutative80.0%
fma-def80.0%
fma-def80.0%
metadata-eval80.0%
metadata-eval80.0%
distribute-lft-neg-in80.0%
associate-*r/80.0%
*-rgt-identity80.0%
Simplified80.0%
Taylor expanded in F around 0 63.3%
Taylor expanded in B around 0 41.3%
Taylor expanded in x around 0 34.5%
associate-/l*34.5%
Simplified34.5%
Final simplification61.3%
(FPCore (F B x)
:precision binary64
(if (<= F -2.1e-47)
(/ (- -1.0 x) B)
(if (<= F 3.6e-59)
(- (/ (- x) B) (* B (* x -0.3333333333333333)))
(+
(/ (- 1.0 x) B)
(*
B
(+ 0.16666666666666666 (- (* x -0.16666666666666666) (* x -0.5))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.1e-47) {
tmp = (-1.0 - x) / B;
} else if (F <= 3.6e-59) {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
} else {
tmp = ((1.0 - x) / B) + (B * (0.16666666666666666 + ((x * -0.16666666666666666) - (x * -0.5))));
}
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.1d-47)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 3.6d-59) then
tmp = (-x / b) - (b * (x * (-0.3333333333333333d0)))
else
tmp = ((1.0d0 - x) / b) + (b * (0.16666666666666666d0 + ((x * (-0.16666666666666666d0)) - (x * (-0.5d0)))))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.1e-47) {
tmp = (-1.0 - x) / B;
} else if (F <= 3.6e-59) {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
} else {
tmp = ((1.0 - x) / B) + (B * (0.16666666666666666 + ((x * -0.16666666666666666) - (x * -0.5))));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.1e-47: tmp = (-1.0 - x) / B elif F <= 3.6e-59: tmp = (-x / B) - (B * (x * -0.3333333333333333)) else: tmp = ((1.0 - x) / B) + (B * (0.16666666666666666 + ((x * -0.16666666666666666) - (x * -0.5)))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.1e-47) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 3.6e-59) tmp = Float64(Float64(Float64(-x) / B) - Float64(B * Float64(x * -0.3333333333333333))); else tmp = Float64(Float64(Float64(1.0 - x) / B) + Float64(B * Float64(0.16666666666666666 + Float64(Float64(x * -0.16666666666666666) - Float64(x * -0.5))))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.1e-47) tmp = (-1.0 - x) / B; elseif (F <= 3.6e-59) tmp = (-x / B) - (B * (x * -0.3333333333333333)); else tmp = ((1.0 - x) / B) + (B * (0.16666666666666666 + ((x * -0.16666666666666666) - (x * -0.5)))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.1e-47], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3.6e-59], N[(N[((-x) / B), $MachinePrecision] - N[(B * N[(x * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision] + N[(B * N[(0.16666666666666666 + N[(N[(x * -0.16666666666666666), $MachinePrecision] - N[(x * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.1 \cdot 10^{-47}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 3.6 \cdot 10^{-59}:\\
\;\;\;\;\frac{-x}{B} - B \cdot \left(x \cdot -0.3333333333333333\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B} + B \cdot \left(0.16666666666666666 + \left(x \cdot -0.16666666666666666 - x \cdot -0.5\right)\right)\\
\end{array}
\end{array}
if F < -2.1000000000000001e-47Initial program 73.0%
Taylor expanded in B around 0 48.5%
Taylor expanded in B around 0 51.4%
Taylor expanded in F around -inf 53.2%
if -2.1000000000000001e-47 < F < 3.6e-59Initial program 98.4%
+-commutative98.4%
fma-def98.4%
+-commutative98.4%
*-commutative98.4%
fma-def98.4%
fma-def98.4%
metadata-eval98.4%
metadata-eval98.4%
distribute-lft-neg-in98.4%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 68.6%
mul-1-neg68.6%
*-commutative68.6%
associate-*l/68.7%
*-commutative68.7%
Simplified68.7%
Taylor expanded in B around 0 34.7%
*-commutative34.7%
distribute-rgt-out--34.7%
metadata-eval34.7%
Simplified34.7%
if 3.6e-59 < F Initial program 56.5%
+-commutative56.5%
fma-def56.5%
+-commutative56.5%
*-commutative56.5%
fma-def56.5%
fma-def56.5%
metadata-eval56.5%
metadata-eval56.5%
distribute-lft-neg-in56.5%
associate-*r/56.5%
*-rgt-identity56.5%
Simplified56.5%
Taylor expanded in F around inf 91.0%
mul-1-neg91.0%
unsub-neg91.0%
*-commutative91.0%
associate-*l/91.0%
*-commutative91.0%
Simplified91.0%
Taylor expanded in B around 0 50.3%
associate--l+50.3%
*-commutative50.3%
associate--l+50.3%
*-commutative50.3%
*-commutative50.3%
div-sub50.3%
Simplified50.3%
Final simplification45.3%
(FPCore (F B x)
:precision binary64
(if (<= F -4.3e-47)
(/ (- -1.0 x) B)
(if (<= F 1e-59)
(- (/ (- x) B) (* B (* x -0.3333333333333333)))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.3e-47) {
tmp = (-1.0 - x) / B;
} else if (F <= 1e-59) {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-4.3d-47)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1d-59) then
tmp = (-x / b) - (b * (x * (-0.3333333333333333d0)))
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4.3e-47) {
tmp = (-1.0 - x) / B;
} else if (F <= 1e-59) {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.3e-47: tmp = (-1.0 - x) / B elif F <= 1e-59: tmp = (-x / B) - (B * (x * -0.3333333333333333)) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.3e-47) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1e-59) tmp = Float64(Float64(Float64(-x) / B) - Float64(B * Float64(x * -0.3333333333333333))); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4.3e-47) tmp = (-1.0 - x) / B; elseif (F <= 1e-59) tmp = (-x / B) - (B * (x * -0.3333333333333333)); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.3e-47], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1e-59], N[(N[((-x) / B), $MachinePrecision] - N[(B * N[(x * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.3 \cdot 10^{-47}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 10^{-59}:\\
\;\;\;\;\frac{-x}{B} - B \cdot \left(x \cdot -0.3333333333333333\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -4.2999999999999998e-47Initial program 73.0%
Taylor expanded in B around 0 48.5%
Taylor expanded in B around 0 51.4%
Taylor expanded in F around -inf 53.2%
if -4.2999999999999998e-47 < F < 1e-59Initial program 98.4%
+-commutative98.4%
fma-def98.4%
+-commutative98.4%
*-commutative98.4%
fma-def98.4%
fma-def98.4%
metadata-eval98.4%
metadata-eval98.4%
distribute-lft-neg-in98.4%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 68.6%
mul-1-neg68.6%
*-commutative68.6%
associate-*l/68.7%
*-commutative68.7%
Simplified68.7%
Taylor expanded in B around 0 34.7%
*-commutative34.7%
distribute-rgt-out--34.7%
metadata-eval34.7%
Simplified34.7%
if 1e-59 < F Initial program 56.5%
+-commutative56.5%
fma-def56.5%
+-commutative56.5%
*-commutative56.5%
fma-def56.5%
fma-def56.5%
metadata-eval56.5%
metadata-eval56.5%
distribute-lft-neg-in56.5%
associate-*r/56.5%
*-rgt-identity56.5%
Simplified56.5%
Taylor expanded in F around inf 91.0%
mul-1-neg91.0%
unsub-neg91.0%
*-commutative91.0%
associate-*l/91.0%
*-commutative91.0%
Simplified91.0%
Taylor expanded in B around 0 50.3%
Final simplification45.3%
(FPCore (F B x) :precision binary64 (if (<= F -8.2e-49) (/ (- -1.0 x) B) (if (or (<= F 6.6e-11) (not (<= F 5.1e+183))) (/ (- x) B) (/ 1.0 B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8.2e-49) {
tmp = (-1.0 - x) / B;
} else if ((F <= 6.6e-11) || !(F <= 5.1e+183)) {
tmp = -x / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-8.2d-49)) then
tmp = ((-1.0d0) - x) / b
else if ((f <= 6.6d-11) .or. (.not. (f <= 5.1d+183))) then
tmp = -x / b
else
tmp = 1.0d0 / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -8.2e-49) {
tmp = (-1.0 - x) / B;
} else if ((F <= 6.6e-11) || !(F <= 5.1e+183)) {
tmp = -x / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -8.2e-49: tmp = (-1.0 - x) / B elif (F <= 6.6e-11) or not (F <= 5.1e+183): tmp = -x / B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -8.2e-49) tmp = Float64(Float64(-1.0 - x) / B); elseif ((F <= 6.6e-11) || !(F <= 5.1e+183)) tmp = Float64(Float64(-x) / B); else tmp = Float64(1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -8.2e-49) tmp = (-1.0 - x) / B; elseif ((F <= 6.6e-11) || ~((F <= 5.1e+183))) tmp = -x / B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -8.2e-49], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[Or[LessEqual[F, 6.6e-11], N[Not[LessEqual[F, 5.1e+183]], $MachinePrecision]], N[((-x) / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -8.2 \cdot 10^{-49}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 6.6 \cdot 10^{-11} \lor \neg \left(F \leq 5.1 \cdot 10^{+183}\right):\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < -8.2000000000000003e-49Initial program 73.3%
Taylor expanded in B around 0 47.8%
Taylor expanded in B around 0 50.7%
Taylor expanded in F around -inf 52.4%
if -8.2000000000000003e-49 < F < 6.6000000000000005e-11 or 5.10000000000000045e183 < F Initial program 78.7%
+-commutative78.7%
fma-def78.7%
+-commutative78.7%
*-commutative78.7%
fma-def78.7%
fma-def78.7%
metadata-eval78.7%
metadata-eval78.7%
distribute-lft-neg-in78.7%
associate-*r/79.5%
*-rgt-identity79.5%
Simplified79.5%
Taylor expanded in F around 0 61.4%
mul-1-neg61.4%
*-commutative61.4%
associate-*l/61.5%
*-commutative61.5%
Simplified61.5%
Taylor expanded in B around 0 32.8%
if 6.6000000000000005e-11 < F < 5.10000000000000045e183Initial program 73.8%
+-commutative73.8%
unsub-neg73.8%
associate-*l/85.8%
associate-*r/85.5%
*-commutative85.5%
Simplified85.5%
Taylor expanded in F around inf 93.8%
Taylor expanded in B around 0 68.6%
Taylor expanded in x around 0 37.6%
Final simplification38.9%
(FPCore (F B x) :precision binary64 (if (<= F -4e-44) (/ (- -1.0 x) B) (if (<= F 9.2e-113) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4e-44) {
tmp = (-1.0 - x) / B;
} else if (F <= 9.2e-113) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-4d-44)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 9.2d-113) then
tmp = -x / b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4e-44) {
tmp = (-1.0 - x) / B;
} else if (F <= 9.2e-113) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4e-44: tmp = (-1.0 - x) / B elif F <= 9.2e-113: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4e-44) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 9.2e-113) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4e-44) tmp = (-1.0 - x) / B; elseif (F <= 9.2e-113) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4e-44], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 9.2e-113], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4 \cdot 10^{-44}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 9.2 \cdot 10^{-113}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -3.99999999999999981e-44Initial program 73.0%
Taylor expanded in B around 0 48.5%
Taylor expanded in B around 0 51.4%
Taylor expanded in F around -inf 53.2%
if -3.99999999999999981e-44 < F < 9.20000000000000032e-113Initial program 98.3%
+-commutative98.3%
fma-def98.3%
+-commutative98.3%
*-commutative98.3%
fma-def98.3%
fma-def98.3%
metadata-eval98.3%
metadata-eval98.3%
distribute-lft-neg-in98.3%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 70.4%
mul-1-neg70.4%
*-commutative70.4%
associate-*l/70.6%
*-commutative70.6%
Simplified70.6%
Taylor expanded in B around 0 35.4%
if 9.20000000000000032e-113 < F Initial program 59.1%
+-commutative59.1%
fma-def59.1%
+-commutative59.1%
*-commutative59.1%
fma-def59.1%
fma-def59.1%
metadata-eval59.1%
metadata-eval59.1%
distribute-lft-neg-in59.1%
associate-*r/59.1%
*-rgt-identity59.1%
Simplified59.1%
Taylor expanded in F around inf 86.8%
mul-1-neg86.8%
unsub-neg86.8%
*-commutative86.8%
associate-*l/86.8%
*-commutative86.8%
Simplified86.8%
Taylor expanded in B around 0 48.6%
Final simplification45.2%
(FPCore (F B x) :precision binary64 (if (or (<= x -2.3e-42) (not (<= x 8.2e-50))) (/ (- x) B) (/ 1.0 B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -2.3e-42) || !(x <= 8.2e-50)) {
tmp = -x / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-2.3d-42)) .or. (.not. (x <= 8.2d-50))) then
tmp = -x / b
else
tmp = 1.0d0 / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -2.3e-42) || !(x <= 8.2e-50)) {
tmp = -x / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -2.3e-42) or not (x <= 8.2e-50): tmp = -x / B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -2.3e-42) || !(x <= 8.2e-50)) tmp = Float64(Float64(-x) / B); else tmp = Float64(1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -2.3e-42) || ~((x <= 8.2e-50))) tmp = -x / B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -2.3e-42], N[Not[LessEqual[x, 8.2e-50]], $MachinePrecision]], N[((-x) / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.3 \cdot 10^{-42} \lor \neg \left(x \leq 8.2 \cdot 10^{-50}\right):\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if x < -2.30000000000000004e-42 or 8.19999999999999971e-50 < x Initial program 78.7%
+-commutative78.7%
fma-def78.7%
+-commutative78.7%
*-commutative78.7%
fma-def78.7%
fma-def78.7%
metadata-eval78.7%
metadata-eval78.7%
distribute-lft-neg-in78.7%
associate-*r/79.6%
*-rgt-identity79.6%
Simplified79.6%
Taylor expanded in F around 0 90.4%
mul-1-neg90.4%
*-commutative90.4%
associate-*l/90.5%
*-commutative90.5%
Simplified90.5%
Taylor expanded in B around 0 51.5%
if -2.30000000000000004e-42 < x < 8.19999999999999971e-50Initial program 73.8%
+-commutative73.8%
unsub-neg73.8%
associate-*l/77.7%
associate-*r/77.6%
*-commutative77.6%
Simplified77.6%
Taylor expanded in F around inf 37.2%
Taylor expanded in B around 0 26.5%
Taylor expanded in x around 0 20.6%
Final simplification36.5%
(FPCore (F B x) :precision binary64 (/ 1.0 B))
double code(double F, double B, double x) {
return 1.0 / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = 1.0d0 / b
end function
public static double code(double F, double B, double x) {
return 1.0 / B;
}
def code(F, B, x): return 1.0 / B
function code(F, B, x) return Float64(1.0 / B) end
function tmp = code(F, B, x) tmp = 1.0 / B; end
code[F_, B_, x_] := N[(1.0 / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{B}
\end{array}
Initial program 76.3%
+-commutative76.3%
unsub-neg76.3%
associate-*l/86.0%
associate-*r/86.0%
*-commutative86.0%
Simplified86.1%
Taylor expanded in F around inf 57.7%
Taylor expanded in B around 0 57.3%
Taylor expanded in x around 0 12.1%
Final simplification12.1%
herbie shell --seed 2023243
(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))))))