
(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 34 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 -4e+36)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 150000000.0)
(fma (/ F (sin B)) (pow (fma x 2.0 (fma F F 2.0)) -0.5) (/ (- x) (tan B)))
(- (/ 1.0 (sin B)) (* (cos B) (/ x (sin B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4e+36) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 150000000.0) {
tmp = fma((F / sin(B)), pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5), (-x / tan(B)));
} else {
tmp = (1.0 / sin(B)) - (cos(B) * (x / sin(B)));
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -4e+36) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 150000000.0) tmp = fma(Float64(F / sin(B)), (fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5), Float64(Float64(-x) / tan(B))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(cos(B) * Float64(x / sin(B)))); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -4e+36], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 150000000.0], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] + N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[Cos[B], $MachinePrecision] * N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4 \cdot 10^{+36}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 150000000:\\
\;\;\;\;\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{-x}{\tan B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \cos B \cdot \frac{x}{\sin B}\\
\end{array}
\end{array}
if F < -4.00000000000000017e36Initial program 64.2%
Taylor expanded in F around -inf 99.8%
div-inv99.9%
expm1-log1p-u77.8%
expm1-udef77.8%
Applied egg-rr77.8%
expm1-def77.8%
expm1-log1p99.9%
Simplified99.9%
if -4.00000000000000017e36 < F < 1.5e8Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.5%
*-rgt-identity99.5%
Simplified99.5%
if 1.5e8 < F Initial program 52.8%
distribute-lft-neg-in52.8%
+-commutative52.8%
fma-def52.7%
+-commutative52.7%
*-commutative52.7%
fma-def52.7%
fma-def52.7%
metadata-eval52.7%
metadata-eval52.7%
associate-*r/52.8%
*-rgt-identity52.8%
Simplified52.8%
Taylor expanded in F around inf 99.8%
+-commutative99.8%
mul-1-neg99.8%
unsub-neg99.8%
associate-*l/99.7%
*-commutative99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.3e+36)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 20000000.0)
(- (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) t_0)
(- (/ 1.0 (sin B)) (* (cos B) (/ x (sin B))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3.3e+36) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 20000000.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - t_0;
} else {
tmp = (1.0 / sin(B)) - (cos(B) * (x / 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 <= (-3.3d+36)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 20000000.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - t_0
else
tmp = (1.0d0 / sin(b)) - (cos(b) * (x / 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 <= -3.3e+36) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 20000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (Math.cos(B) * (x / Math.sin(B)));
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -3.3e+36: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 20000000.0: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - t_0 else: tmp = (1.0 / math.sin(B)) - (math.cos(B) * (x / math.sin(B))) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.3e+36) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 20000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(cos(B) * Float64(x / sin(B)))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -3.3e+36) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 20000000.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - t_0; else tmp = (1.0 / sin(B)) - (cos(B) * (x / 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, -3.3e+36], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 20000000.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] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[Cos[B], $MachinePrecision] * N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.3 \cdot 10^{+36}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 20000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \cos B \cdot \frac{x}{\sin B}\\
\end{array}
\end{array}
if F < -3.2999999999999999e36Initial program 64.2%
Taylor expanded in F around -inf 99.8%
div-inv99.9%
expm1-log1p-u77.8%
expm1-udef77.8%
Applied egg-rr77.8%
expm1-def77.8%
expm1-log1p99.9%
Simplified99.9%
if -3.2999999999999999e36 < F < 2e7Initial program 99.5%
div-inv43.1%
expm1-log1p-u21.9%
expm1-udef21.9%
Applied egg-rr50.5%
expm1-def21.9%
expm1-log1p43.1%
Simplified99.5%
if 2e7 < F Initial program 52.8%
distribute-lft-neg-in52.8%
+-commutative52.8%
fma-def52.7%
+-commutative52.7%
*-commutative52.7%
fma-def52.7%
fma-def52.7%
metadata-eval52.7%
metadata-eval52.7%
associate-*r/52.8%
*-rgt-identity52.8%
Simplified52.8%
Taylor expanded in F around inf 99.8%
+-commutative99.8%
mul-1-neg99.8%
unsub-neg99.8%
associate-*l/99.7%
*-commutative99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(if (<= F -1.4)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 2.25)
(+
(* x (/ -1.0 (tan B)))
(* (/ F (sin B)) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))))
(- (/ 1.0 (sin B)) (* (cos B) (/ x (sin B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 2.25) {
tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0)))));
} else {
tmp = (1.0 / sin(B)) - (cos(B) * (x / 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 <= (-1.4d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 2.25d0) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f / sin(b)) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))
else
tmp = (1.0d0 / sin(b)) - (cos(b) * (x / sin(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 2.25) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.sqrt((1.0 / (2.0 + (x * 2.0)))));
} else {
tmp = (1.0 / Math.sin(B)) - (Math.cos(B) * (x / Math.sin(B)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.4: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 2.25: tmp = (x * (-1.0 / math.tan(B))) + ((F / math.sin(B)) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) else: tmp = (1.0 / math.sin(B)) - (math.cos(B) * (x / math.sin(B))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.4) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 2.25) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(cos(B) * Float64(x / sin(B)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.4) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 2.25) tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))); else tmp = (1.0 / sin(B)) - (cos(B) * (x / sin(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.25], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[Cos[B], $MachinePrecision] * N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 2.25:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \cos B \cdot \frac{x}{\sin B}\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 67.8%
Taylor expanded in F around -inf 99.8%
div-inv99.9%
expm1-log1p-u78.5%
expm1-udef78.5%
Applied egg-rr78.5%
expm1-def78.5%
expm1-log1p99.9%
Simplified99.9%
if -1.3999999999999999 < F < 2.25Initial program 99.4%
Taylor expanded in F around 0 98.7%
if 2.25 < F Initial program 53.4%
distribute-lft-neg-in53.4%
+-commutative53.4%
fma-def53.4%
+-commutative53.4%
*-commutative53.4%
fma-def53.4%
fma-def53.4%
metadata-eval53.4%
metadata-eval53.4%
associate-*r/53.4%
*-rgt-identity53.4%
Simplified53.4%
Taylor expanded in F around inf 99.3%
+-commutative99.3%
mul-1-neg99.3%
unsub-neg99.3%
associate-*l/99.2%
*-commutative99.2%
Simplified99.2%
Final simplification99.2%
(FPCore (F B x)
:precision binary64
(if (<= F -1.45)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 1.7)
(+
(* x (/ -1.0 (tan B)))
(* (/ F (sin B)) (/ 1.0 (sqrt (+ 2.0 (* x 2.0))))))
(- (/ 1.0 (sin B)) (* (cos B) (/ x (sin B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.45) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 1.7) {
tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * (1.0 / sqrt((2.0 + (x * 2.0)))));
} else {
tmp = (1.0 / sin(B)) - (cos(B) * (x / 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 <= (-1.45d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 1.7d0) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f / sin(b)) * (1.0d0 / sqrt((2.0d0 + (x * 2.0d0)))))
else
tmp = (1.0d0 / sin(b)) - (cos(b) * (x / sin(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.45) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 1.7) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F / Math.sin(B)) * (1.0 / Math.sqrt((2.0 + (x * 2.0)))));
} else {
tmp = (1.0 / Math.sin(B)) - (Math.cos(B) * (x / Math.sin(B)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.45: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 1.7: tmp = (x * (-1.0 / math.tan(B))) + ((F / math.sin(B)) * (1.0 / math.sqrt((2.0 + (x * 2.0))))) else: tmp = (1.0 / math.sin(B)) - (math.cos(B) * (x / math.sin(B))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.45) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 1.7) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / sin(B)) * Float64(1.0 / sqrt(Float64(2.0 + Float64(x * 2.0)))))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(cos(B) * Float64(x / sin(B)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.45) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 1.7) tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * (1.0 / sqrt((2.0 + (x * 2.0))))); else tmp = (1.0 / sin(B)) - (cos(B) * (x / sin(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.45], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.7], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[Cos[B], $MachinePrecision] * N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.45:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 1.7:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\sin B} \cdot \frac{1}{\sqrt{2 + x \cdot 2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \cos B \cdot \frac{x}{\sin B}\\
\end{array}
\end{array}
if F < -1.44999999999999996Initial program 67.8%
Taylor expanded in F around -inf 99.8%
div-inv99.9%
expm1-log1p-u78.5%
expm1-udef78.5%
Applied egg-rr78.5%
expm1-def78.5%
expm1-log1p99.9%
Simplified99.9%
if -1.44999999999999996 < F < 1.69999999999999996Initial program 99.4%
add-sqr-sqrt99.5%
unpow-prod-down99.5%
+-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
+-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
Applied egg-rr99.5%
pow-sqr99.5%
metadata-eval99.5%
unpow-199.5%
Simplified99.5%
Taylor expanded in F around 0 98.8%
if 1.69999999999999996 < F Initial program 53.4%
distribute-lft-neg-in53.4%
+-commutative53.4%
fma-def53.4%
+-commutative53.4%
*-commutative53.4%
fma-def53.4%
fma-def53.4%
metadata-eval53.4%
metadata-eval53.4%
associate-*r/53.4%
*-rgt-identity53.4%
Simplified53.4%
Taylor expanded in F around inf 99.3%
+-commutative99.3%
mul-1-neg99.3%
unsub-neg99.3%
associate-*l/99.2%
*-commutative99.2%
Simplified99.2%
Final simplification99.2%
(FPCore (F B x)
:precision binary64
(if (<= F -1.4)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 1.4)
(+ (* x (/ -1.0 (tan B))) (/ F (/ (sin B) (sqrt 0.5))))
(- (/ 1.0 (sin B)) (* (cos B) (/ x (sin B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 1.4) {
tmp = (x * (-1.0 / tan(B))) + (F / (sin(B) / sqrt(0.5)));
} else {
tmp = (1.0 / sin(B)) - (cos(B) * (x / 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 <= (-1.4d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 1.4d0) then
tmp = (x * ((-1.0d0) / tan(b))) + (f / (sin(b) / sqrt(0.5d0)))
else
tmp = (1.0d0 / sin(b)) - (cos(b) * (x / sin(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 1.4) {
tmp = (x * (-1.0 / Math.tan(B))) + (F / (Math.sin(B) / Math.sqrt(0.5)));
} else {
tmp = (1.0 / Math.sin(B)) - (Math.cos(B) * (x / Math.sin(B)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.4: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 1.4: tmp = (x * (-1.0 / math.tan(B))) + (F / (math.sin(B) / math.sqrt(0.5))) else: tmp = (1.0 / math.sin(B)) - (math.cos(B) * (x / math.sin(B))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.4) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 1.4) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(F / Float64(sin(B) / sqrt(0.5)))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(cos(B) * Float64(x / sin(B)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.4) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 1.4) tmp = (x * (-1.0 / tan(B))) + (F / (sin(B) / sqrt(0.5))); else tmp = (1.0 / sin(B)) - (cos(B) * (x / sin(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F / N[(N[Sin[B], $MachinePrecision] / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[Cos[B], $MachinePrecision] * N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\frac{\sin B}{\sqrt{0.5}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \cos B \cdot \frac{x}{\sin B}\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 67.8%
Taylor expanded in F around -inf 99.8%
div-inv99.9%
expm1-log1p-u78.5%
expm1-udef78.5%
Applied egg-rr78.5%
expm1-def78.5%
expm1-log1p99.9%
Simplified99.9%
if -1.3999999999999999 < F < 1.3999999999999999Initial program 99.4%
Taylor expanded in F around 0 98.7%
Taylor expanded in x around 0 98.6%
associate-/l*98.6%
Simplified98.6%
if 1.3999999999999999 < F Initial program 53.4%
distribute-lft-neg-in53.4%
+-commutative53.4%
fma-def53.4%
+-commutative53.4%
*-commutative53.4%
fma-def53.4%
fma-def53.4%
metadata-eval53.4%
metadata-eval53.4%
associate-*r/53.4%
*-rgt-identity53.4%
Simplified53.4%
Taylor expanded in F around inf 99.3%
+-commutative99.3%
mul-1-neg99.3%
unsub-neg99.3%
associate-*l/99.2%
*-commutative99.2%
Simplified99.2%
Final simplification99.1%
(FPCore (F B x)
:precision binary64
(if (<= F -8.8e-11)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 980.0)
(+
(* x (/ -1.0 (tan B)))
(* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)))
(- (/ 1.0 (sin B)) (* (cos B) (/ x (sin B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8.8e-11) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 980.0) {
tmp = (x * (-1.0 / tan(B))) + (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B));
} else {
tmp = (1.0 / sin(B)) - (cos(B) * (x / 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 <= (-8.8d-11)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 980.0d0) then
tmp = (x * ((-1.0d0) / tan(b))) + ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b))
else
tmp = (1.0d0 / sin(b)) - (cos(b) * (x / sin(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -8.8e-11) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 980.0) {
tmp = (x * (-1.0 / Math.tan(B))) + (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B));
} else {
tmp = (1.0 / Math.sin(B)) - (Math.cos(B) * (x / Math.sin(B)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -8.8e-11: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 980.0: tmp = (x * (-1.0 / math.tan(B))) + (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) else: tmp = (1.0 / math.sin(B)) - (math.cos(B) * (x / math.sin(B))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -8.8e-11) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 980.0) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(cos(B) * Float64(x / sin(B)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -8.8e-11) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 980.0) tmp = (x * (-1.0 / tan(B))) + ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)); else tmp = (1.0 / sin(B)) - (cos(B) * (x / sin(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -8.8e-11], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 980.0], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 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]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[Cos[B], $MachinePrecision] * N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -8.8 \cdot 10^{-11}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 980:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \cos B \cdot \frac{x}{\sin B}\\
\end{array}
\end{array}
if F < -8.8000000000000006e-11Initial program 69.9%
Taylor expanded in F around -inf 98.6%
div-inv98.7%
expm1-log1p-u74.5%
expm1-udef74.5%
Applied egg-rr74.5%
expm1-def74.5%
expm1-log1p98.7%
Simplified98.7%
if -8.8000000000000006e-11 < F < 980Initial program 99.4%
Taylor expanded in B around 0 88.3%
if 980 < F Initial program 53.4%
distribute-lft-neg-in53.4%
+-commutative53.4%
fma-def53.4%
+-commutative53.4%
*-commutative53.4%
fma-def53.4%
fma-def53.4%
metadata-eval53.4%
metadata-eval53.4%
associate-*r/53.4%
*-rgt-identity53.4%
Simplified53.4%
Taylor expanded in F around inf 99.3%
+-commutative99.3%
mul-1-neg99.3%
unsub-neg99.3%
associate-*l/99.2%
*-commutative99.2%
Simplified99.2%
Final simplification94.4%
(FPCore (F B x)
:precision binary64
(if (<= F -8.8e-11)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 195.0)
(+
(* x (/ -1.0 (tan B)))
(* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)))
(- (/ 1.0 (sin B)) (* x (/ 1.0 (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8.8e-11) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 195.0) {
tmp = (x * (-1.0 / tan(B))) + (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B));
} else {
tmp = (1.0 / sin(B)) - (x * (1.0 / tan(B)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-8.8d-11)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 195.0d0) then
tmp = (x * ((-1.0d0) / tan(b))) + ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b))
else
tmp = (1.0d0 / sin(b)) - (x * (1.0d0 / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -8.8e-11) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 195.0) {
tmp = (x * (-1.0 / Math.tan(B))) + (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B));
} else {
tmp = (1.0 / Math.sin(B)) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -8.8e-11: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 195.0: tmp = (x * (-1.0 / math.tan(B))) + (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) else: tmp = (1.0 / math.sin(B)) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -8.8e-11) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 195.0) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x * Float64(1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -8.8e-11) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 195.0) tmp = (x * (-1.0 / tan(B))) + ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)); else tmp = (1.0 / sin(B)) - (x * (1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -8.8e-11], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 195.0], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 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]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -8.8 \cdot 10^{-11}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 195:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -8.8000000000000006e-11Initial program 69.9%
Taylor expanded in F around -inf 98.6%
div-inv98.7%
expm1-log1p-u74.5%
expm1-udef74.5%
Applied egg-rr74.5%
expm1-def74.5%
expm1-log1p98.7%
Simplified98.7%
if -8.8000000000000006e-11 < F < 195Initial program 99.4%
Taylor expanded in B around 0 88.3%
if 195 < F Initial program 53.4%
Taylor expanded in F around inf 99.2%
Final simplification94.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* (/ F (sin B)) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x B))))
(if (<= F -4.8e-10)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -7.8e-202)
t_0
(if (<= F 1.55e-119)
(/ (* (- x) (cos B)) (sin B))
(if (<= F 0.78) t_0 (- (/ 1.0 (sin B)) (* x (/ 1.0 (tan B))))))))))
double code(double F, double B, double x) {
double t_0 = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
double tmp;
if (F <= -4.8e-10) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -7.8e-202) {
tmp = t_0;
} else if (F <= 1.55e-119) {
tmp = (-x * cos(B)) / sin(B);
} else if (F <= 0.78) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x * (1.0 / tan(B)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((f / sin(b)) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / b)
if (f <= (-4.8d-10)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-7.8d-202)) then
tmp = t_0
else if (f <= 1.55d-119) then
tmp = (-x * cos(b)) / sin(b)
else if (f <= 0.78d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x * (1.0d0 / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F / Math.sin(B)) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
double tmp;
if (F <= -4.8e-10) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -7.8e-202) {
tmp = t_0;
} else if (F <= 1.55e-119) {
tmp = (-x * Math.cos(B)) / Math.sin(B);
} else if (F <= 0.78) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): t_0 = ((F / math.sin(B)) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B) tmp = 0 if F <= -4.8e-10: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -7.8e-202: tmp = t_0 elif F <= 1.55e-119: tmp = (-x * math.cos(B)) / math.sin(B) elif F <= 0.78: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)) tmp = 0.0 if (F <= -4.8e-10) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -7.8e-202) tmp = t_0; elseif (F <= 1.55e-119) tmp = Float64(Float64(Float64(-x) * cos(B)) / sin(B)); elseif (F <= 0.78) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x * Float64(1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B); tmp = 0.0; if (F <= -4.8e-10) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -7.8e-202) tmp = t_0; elseif (F <= 1.55e-119) tmp = (-x * cos(B)) / sin(B); elseif (F <= 0.78) tmp = t_0; else tmp = (1.0 / sin(B)) - (x * (1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4.8e-10], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7.8e-202], t$95$0, If[LessEqual[F, 1.55e-119], N[(N[((-x) * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.78], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
\mathbf{if}\;F \leq -4.8 \cdot 10^{-10}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -7.8 \cdot 10^{-202}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.55 \cdot 10^{-119}:\\
\;\;\;\;\frac{\left(-x\right) \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 0.78:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -4.8e-10Initial program 69.5%
Taylor expanded in F around -inf 99.8%
div-inv99.9%
expm1-log1p-u75.4%
expm1-udef75.4%
Applied egg-rr75.4%
expm1-def75.4%
expm1-log1p99.9%
Simplified99.9%
if -4.8e-10 < F < -7.7999999999999998e-202 or 1.54999999999999989e-119 < F < 0.78000000000000003Initial program 99.4%
Taylor expanded in F around 0 98.0%
Taylor expanded in B around 0 78.2%
if -7.7999999999999998e-202 < F < 1.54999999999999989e-119Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 85.2%
if 0.78000000000000003 < F Initial program 53.4%
Taylor expanded in F around inf 99.2%
Final simplification91.7%
(FPCore (F B x)
:precision binary64
(if (<= F -8.8e-11)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 0.39)
(+ (* x (/ -1.0 (tan B))) (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)))
(- (/ 1.0 (sin B)) (* x (/ 1.0 (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8.8e-11) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 0.39) {
tmp = (x * (-1.0 / tan(B))) + (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B));
} else {
tmp = (1.0 / sin(B)) - (x * (1.0 / tan(B)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-8.8d-11)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 0.39d0) then
tmp = (x * ((-1.0d0) / tan(b))) + (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b))
else
tmp = (1.0d0 / sin(b)) - (x * (1.0d0 / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -8.8e-11) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 0.39) {
tmp = (x * (-1.0 / Math.tan(B))) + (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B));
} else {
tmp = (1.0 / Math.sin(B)) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -8.8e-11: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 0.39: tmp = (x * (-1.0 / math.tan(B))) + (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) else: tmp = (1.0 / math.sin(B)) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -8.8e-11) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 0.39) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x * Float64(1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -8.8e-11) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 0.39) tmp = (x * (-1.0 / tan(B))) + (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)); else tmp = (1.0 / sin(B)) - (x * (1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -8.8e-11], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.39], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -8.8 \cdot 10^{-11}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 0.39:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -8.8000000000000006e-11Initial program 69.9%
Taylor expanded in F around -inf 98.6%
div-inv98.7%
expm1-log1p-u74.5%
expm1-udef74.5%
Applied egg-rr74.5%
expm1-def74.5%
expm1-log1p98.7%
Simplified98.7%
if -8.8000000000000006e-11 < F < 0.39000000000000001Initial program 99.4%
Taylor expanded in F around 0 98.7%
Taylor expanded in B around 0 87.7%
if 0.39000000000000001 < F Initial program 53.4%
Taylor expanded in F around inf 99.2%
Final simplification94.1%
(FPCore (F B x)
:precision binary64
(if (<= F -6.8e-33)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 1.85e-60)
(/ (* (- x) (cos B)) (sin B))
(- (/ 1.0 (sin B)) (* x (/ 1.0 (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.8e-33) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 1.85e-60) {
tmp = (-x * cos(B)) / sin(B);
} else {
tmp = (1.0 / sin(B)) - (x * (1.0 / tan(B)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-6.8d-33)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 1.85d-60) then
tmp = (-x * cos(b)) / sin(b)
else
tmp = (1.0d0 / sin(b)) - (x * (1.0d0 / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -6.8e-33) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 1.85e-60) {
tmp = (-x * Math.cos(B)) / Math.sin(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6.8e-33: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 1.85e-60: tmp = (-x * math.cos(B)) / math.sin(B) else: tmp = (1.0 / math.sin(B)) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6.8e-33) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 1.85e-60) tmp = Float64(Float64(Float64(-x) * cos(B)) / sin(B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x * Float64(1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -6.8e-33) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 1.85e-60) tmp = (-x * cos(B)) / sin(B); else tmp = (1.0 / sin(B)) - (x * (1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6.8e-33], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.85e-60], N[(N[((-x) * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.8 \cdot 10^{-33}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 1.85 \cdot 10^{-60}:\\
\;\;\;\;\frac{\left(-x\right) \cdot \cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -6.8000000000000001e-33Initial program 71.7%
Taylor expanded in F around -inf 95.3%
div-inv95.3%
expm1-log1p-u70.2%
expm1-udef70.2%
Applied egg-rr70.2%
expm1-def70.2%
expm1-log1p95.3%
Simplified95.3%
if -6.8000000000000001e-33 < F < 1.85000000000000012e-60Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.5%
*-rgt-identity99.5%
Simplified99.5%
Taylor expanded in F around 0 74.7%
if 1.85000000000000012e-60 < F Initial program 58.1%
Taylor expanded in F around inf 94.8%
Final simplification87.3%
(FPCore (F B x)
:precision binary64
(if (<= F -0.082)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 2.6e-8)
(* (cos B) (/ (- x) (sin B)))
(- (/ 1.0 (/ (* F (sin B)) F)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.082) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 2.6e-8) {
tmp = cos(B) * (-x / sin(B));
} else {
tmp = (1.0 / ((F * sin(B)) / F)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.082d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 2.6d-8) then
tmp = cos(b) * (-x / sin(b))
else
tmp = (1.0d0 / ((f * sin(b)) / f)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.082) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 2.6e-8) {
tmp = Math.cos(B) * (-x / Math.sin(B));
} else {
tmp = (1.0 / ((F * Math.sin(B)) / F)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.082: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 2.6e-8: tmp = math.cos(B) * (-x / math.sin(B)) else: tmp = (1.0 / ((F * math.sin(B)) / F)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.082) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 2.6e-8) tmp = Float64(cos(B) * Float64(Float64(-x) / sin(B))); else tmp = Float64(Float64(1.0 / Float64(Float64(F * sin(B)) / F)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.082) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 2.6e-8) tmp = cos(B) * (-x / sin(B)); else tmp = (1.0 / ((F * sin(B)) / F)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.082], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.6e-8], N[(N[Cos[B], $MachinePrecision] * N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[(N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.082:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.6 \cdot 10^{-8}:\\
\;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{F \cdot \sin B}{F}} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -0.0820000000000000034Initial program 67.8%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 77.9%
if -0.0820000000000000034 < F < 2.6000000000000001e-8Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.5%
*-rgt-identity99.5%
Simplified99.5%
Taylor expanded in F around 0 73.5%
mul-1-neg73.5%
associate-*l/73.5%
distribute-rgt-neg-in73.5%
Simplified73.5%
if 2.6000000000000001e-8 < F Initial program 55.9%
Taylor expanded in F around inf 73.8%
frac-times95.7%
metadata-eval95.7%
div-inv95.7%
clear-num95.7%
/-rgt-identity95.7%
Applied egg-rr95.7%
Taylor expanded in B around 0 82.6%
Final simplification77.4%
(FPCore (F B x)
:precision binary64
(if (<= F -3800.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 1.08e-8)
(/ (- x) (/ (sin B) (cos B)))
(- (/ 1.0 (/ (* F (sin B)) F)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3800.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1.08e-8) {
tmp = -x / (sin(B) / cos(B));
} else {
tmp = (1.0 / ((F * sin(B)) / F)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3800.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 1.08d-8) then
tmp = -x / (sin(b) / cos(b))
else
tmp = (1.0d0 / ((f * sin(b)) / f)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3800.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 1.08e-8) {
tmp = -x / (Math.sin(B) / Math.cos(B));
} else {
tmp = (1.0 / ((F * Math.sin(B)) / F)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3800.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 1.08e-8: tmp = -x / (math.sin(B) / math.cos(B)) else: tmp = (1.0 / ((F * math.sin(B)) / F)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3800.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1.08e-8) tmp = Float64(Float64(-x) / Float64(sin(B) / cos(B))); else tmp = Float64(Float64(1.0 / Float64(Float64(F * sin(B)) / F)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3800.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 1.08e-8) tmp = -x / (sin(B) / cos(B)); else tmp = (1.0 / ((F * sin(B)) / F)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3800.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.08e-8], N[((-x) / N[(N[Sin[B], $MachinePrecision] / N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[(N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3800:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.08 \cdot 10^{-8}:\\
\;\;\;\;\frac{-x}{\frac{\sin B}{\cos B}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{F \cdot \sin B}{F}} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -3800Initial program 67.8%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 77.9%
if -3800 < F < 1.0800000000000001e-8Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.5%
*-rgt-identity99.5%
Simplified99.5%
Taylor expanded in F around 0 73.5%
mul-1-neg73.5%
associate-*l/73.5%
distribute-rgt-neg-in73.5%
Simplified73.5%
Taylor expanded in x around 0 73.5%
mul-1-neg73.5%
associate-/l*73.5%
distribute-neg-frac73.5%
Simplified73.5%
if 1.0800000000000001e-8 < F Initial program 55.9%
Taylor expanded in F around inf 73.8%
frac-times95.7%
metadata-eval95.7%
div-inv95.7%
clear-num95.7%
/-rgt-identity95.7%
Applied egg-rr95.7%
Taylor expanded in B around 0 82.6%
Final simplification77.4%
(FPCore (F B x)
:precision binary64
(if (<= F -130.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 2.75e-8)
(/ (* (- x) (cos B)) (sin B))
(- (/ 1.0 (/ (* F (sin B)) F)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -130.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 2.75e-8) {
tmp = (-x * cos(B)) / sin(B);
} else {
tmp = (1.0 / ((F * sin(B)) / F)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-130.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 2.75d-8) then
tmp = (-x * cos(b)) / sin(b)
else
tmp = (1.0d0 / ((f * sin(b)) / f)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -130.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 2.75e-8) {
tmp = (-x * Math.cos(B)) / Math.sin(B);
} else {
tmp = (1.0 / ((F * Math.sin(B)) / F)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -130.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 2.75e-8: tmp = (-x * math.cos(B)) / math.sin(B) else: tmp = (1.0 / ((F * math.sin(B)) / F)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -130.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 2.75e-8) tmp = Float64(Float64(Float64(-x) * cos(B)) / sin(B)); else tmp = Float64(Float64(1.0 / Float64(Float64(F * sin(B)) / F)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -130.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 2.75e-8) tmp = (-x * cos(B)) / sin(B); else tmp = (1.0 / ((F * sin(B)) / F)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -130.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.75e-8], N[(N[((-x) * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[(N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -130:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.75 \cdot 10^{-8}:\\
\;\;\;\;\frac{\left(-x\right) \cdot \cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{F \cdot \sin B}{F}} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -130Initial program 67.8%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 77.9%
if -130 < F < 2.7500000000000001e-8Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.5%
*-rgt-identity99.5%
Simplified99.5%
Taylor expanded in F around 0 73.5%
if 2.7500000000000001e-8 < F Initial program 55.9%
Taylor expanded in F around inf 73.8%
frac-times95.7%
metadata-eval95.7%
div-inv95.7%
clear-num95.7%
/-rgt-identity95.7%
Applied egg-rr95.7%
Taylor expanded in B around 0 82.6%
Final simplification77.4%
(FPCore (F B x)
:precision binary64
(if (<= F -2.3e-32)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 2e-11)
(/ (* (- x) (cos B)) (sin B))
(- (/ 1.0 (/ (* F (sin B)) F)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.3e-32) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 2e-11) {
tmp = (-x * cos(B)) / sin(B);
} else {
tmp = (1.0 / ((F * sin(B)) / F)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.3d-32)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 2d-11) then
tmp = (-x * cos(b)) / sin(b)
else
tmp = (1.0d0 / ((f * sin(b)) / f)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.3e-32) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 2e-11) {
tmp = (-x * Math.cos(B)) / Math.sin(B);
} else {
tmp = (1.0 / ((F * Math.sin(B)) / F)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.3e-32: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 2e-11: tmp = (-x * math.cos(B)) / math.sin(B) else: tmp = (1.0 / ((F * math.sin(B)) / F)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.3e-32) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 2e-11) tmp = Float64(Float64(Float64(-x) * cos(B)) / sin(B)); else tmp = Float64(Float64(1.0 / Float64(Float64(F * sin(B)) / F)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.3e-32) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 2e-11) tmp = (-x * cos(B)) / sin(B); else tmp = (1.0 / ((F * sin(B)) / F)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.3e-32], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2e-11], N[(N[((-x) * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[(N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.3 \cdot 10^{-32}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 2 \cdot 10^{-11}:\\
\;\;\;\;\frac{\left(-x\right) \cdot \cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{F \cdot \sin B}{F}} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.3000000000000001e-32Initial program 71.7%
Taylor expanded in F around -inf 95.3%
div-inv95.3%
expm1-log1p-u70.2%
expm1-udef70.2%
Applied egg-rr70.2%
expm1-def70.2%
expm1-log1p95.3%
Simplified95.3%
if -2.3000000000000001e-32 < F < 1.99999999999999988e-11Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.5%
*-rgt-identity99.5%
Simplified99.5%
Taylor expanded in F around 0 74.7%
if 1.99999999999999988e-11 < F Initial program 55.9%
Taylor expanded in F around inf 73.8%
frac-times95.7%
metadata-eval95.7%
div-inv95.7%
clear-num95.7%
/-rgt-identity95.7%
Applied egg-rr95.7%
Taylor expanded in B around 0 82.6%
Final simplification83.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))))
(if (<= F -8.8e-11)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -6.5e-281)
(/ (- (* F t_0) x) B)
(if (<= F 2.6e-238)
(- (* (/ F B) (/ 1.0 F)) (/ 1.0 (/ (tan B) x)))
(if (<= F 0.21)
(- (* t_0 (/ F B)) (/ x B))
(- (/ 1.0 (/ (* F (sin B)) F)) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = sqrt((1.0 / (2.0 + (x * 2.0))));
double tmp;
if (F <= -8.8e-11) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -6.5e-281) {
tmp = ((F * t_0) - x) / B;
} else if (F <= 2.6e-238) {
tmp = ((F / B) * (1.0 / F)) - (1.0 / (tan(B) / x));
} else if (F <= 0.21) {
tmp = (t_0 * (F / B)) - (x / B);
} else {
tmp = (1.0 / ((F * sin(B)) / F)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))
if (f <= (-8.8d-11)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-6.5d-281)) then
tmp = ((f * t_0) - x) / b
else if (f <= 2.6d-238) then
tmp = ((f / b) * (1.0d0 / f)) - (1.0d0 / (tan(b) / x))
else if (f <= 0.21d0) then
tmp = (t_0 * (f / b)) - (x / b)
else
tmp = (1.0d0 / ((f * sin(b)) / f)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.sqrt((1.0 / (2.0 + (x * 2.0))));
double tmp;
if (F <= -8.8e-11) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -6.5e-281) {
tmp = ((F * t_0) - x) / B;
} else if (F <= 2.6e-238) {
tmp = ((F / B) * (1.0 / F)) - (1.0 / (Math.tan(B) / x));
} else if (F <= 0.21) {
tmp = (t_0 * (F / B)) - (x / B);
} else {
tmp = (1.0 / ((F * Math.sin(B)) / F)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = math.sqrt((1.0 / (2.0 + (x * 2.0)))) tmp = 0 if F <= -8.8e-11: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -6.5e-281: tmp = ((F * t_0) - x) / B elif F <= 2.6e-238: tmp = ((F / B) * (1.0 / F)) - (1.0 / (math.tan(B) / x)) elif F <= 0.21: tmp = (t_0 * (F / B)) - (x / B) else: tmp = (1.0 / ((F * math.sin(B)) / F)) - (x / B) return tmp
function code(F, B, x) t_0 = sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) tmp = 0.0 if (F <= -8.8e-11) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -6.5e-281) tmp = Float64(Float64(Float64(F * t_0) - x) / B); elseif (F <= 2.6e-238) tmp = Float64(Float64(Float64(F / B) * Float64(1.0 / F)) - Float64(1.0 / Float64(tan(B) / x))); elseif (F <= 0.21) tmp = Float64(Float64(t_0 * Float64(F / B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / Float64(Float64(F * sin(B)) / F)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = sqrt((1.0 / (2.0 + (x * 2.0)))); tmp = 0.0; if (F <= -8.8e-11) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -6.5e-281) tmp = ((F * t_0) - x) / B; elseif (F <= 2.6e-238) tmp = ((F / B) * (1.0 / F)) - (1.0 / (tan(B) / x)); elseif (F <= 0.21) tmp = (t_0 * (F / B)) - (x / B); else tmp = (1.0 / ((F * sin(B)) / F)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[F, -8.8e-11], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -6.5e-281], N[(N[(N[(F * t$95$0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.6e-238], N[(N[(N[(F / B), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.21], N[(N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[(N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{2 + x \cdot 2}}\\
\mathbf{if}\;F \leq -8.8 \cdot 10^{-11}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -6.5 \cdot 10^{-281}:\\
\;\;\;\;\frac{F \cdot t_0 - x}{B}\\
\mathbf{elif}\;F \leq 2.6 \cdot 10^{-238}:\\
\;\;\;\;\frac{F}{B} \cdot \frac{1}{F} - \frac{1}{\frac{\tan B}{x}}\\
\mathbf{elif}\;F \leq 0.21:\\
\;\;\;\;t_0 \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{F \cdot \sin B}{F}} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -8.8000000000000006e-11Initial program 69.9%
Taylor expanded in F around -inf 98.6%
Taylor expanded in B around 0 76.9%
if -8.8000000000000006e-11 < F < -6.5e-281Initial program 99.4%
Taylor expanded in F around 0 99.4%
Taylor expanded in B around 0 60.0%
if -6.5e-281 < F < 2.6000000000000001e-238Initial program 99.3%
Taylor expanded in F around inf 41.9%
Taylor expanded in B around 0 81.2%
div-inv81.1%
clear-num81.4%
Applied egg-rr81.4%
if 2.6000000000000001e-238 < F < 0.209999999999999992Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in B around 0 66.6%
Taylor expanded in F around 0 64.7%
if 0.209999999999999992 < F Initial program 53.4%
Taylor expanded in F around inf 76.0%
frac-times99.1%
metadata-eval99.1%
div-inv99.1%
clear-num99.1%
/-rgt-identity99.1%
Applied egg-rr99.1%
Taylor expanded in B around 0 85.3%
Final simplification73.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))) (t_1 (- (/ 1.0 B) t_0)))
(if (<= F -18.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -3e-176)
t_1
(if (<= F -1.05e-200)
(/ (- x) B)
(if (<= F 2.7e-8)
(- (* (/ F B) (/ 1.0 F)) t_0)
(if (<= F 2.7e+82)
(- (* (/ F (sin B)) (/ 1.0 F)) (/ x B))
t_1)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = (1.0 / B) - t_0;
double tmp;
if (F <= -18.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -3e-176) {
tmp = t_1;
} else if (F <= -1.05e-200) {
tmp = -x / B;
} else if (F <= 2.7e-8) {
tmp = ((F / B) * (1.0 / F)) - t_0;
} else if (F <= 2.7e+82) {
tmp = ((F / sin(B)) * (1.0 / F)) - (x / B);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x / tan(b)
t_1 = (1.0d0 / b) - t_0
if (f <= (-18.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-3d-176)) then
tmp = t_1
else if (f <= (-1.05d-200)) then
tmp = -x / b
else if (f <= 2.7d-8) then
tmp = ((f / b) * (1.0d0 / f)) - t_0
else if (f <= 2.7d+82) then
tmp = ((f / sin(b)) * (1.0d0 / f)) - (x / b)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double t_1 = (1.0 / B) - t_0;
double tmp;
if (F <= -18.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -3e-176) {
tmp = t_1;
} else if (F <= -1.05e-200) {
tmp = -x / B;
} else if (F <= 2.7e-8) {
tmp = ((F / B) * (1.0 / F)) - t_0;
} else if (F <= 2.7e+82) {
tmp = ((F / Math.sin(B)) * (1.0 / F)) - (x / B);
} else {
tmp = t_1;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) t_1 = (1.0 / B) - t_0 tmp = 0 if F <= -18.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -3e-176: tmp = t_1 elif F <= -1.05e-200: tmp = -x / B elif F <= 2.7e-8: tmp = ((F / B) * (1.0 / F)) - t_0 elif F <= 2.7e+82: tmp = ((F / math.sin(B)) * (1.0 / F)) - (x / B) else: tmp = t_1 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(Float64(1.0 / B) - t_0) tmp = 0.0 if (F <= -18.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -3e-176) tmp = t_1; elseif (F <= -1.05e-200) tmp = Float64(Float64(-x) / B); elseif (F <= 2.7e-8) tmp = Float64(Float64(Float64(F / B) * Float64(1.0 / F)) - t_0); elseif (F <= 2.7e+82) tmp = Float64(Float64(Float64(F / sin(B)) * Float64(1.0 / F)) - Float64(x / B)); else tmp = t_1; end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); t_1 = (1.0 / B) - t_0; tmp = 0.0; if (F <= -18.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -3e-176) tmp = t_1; elseif (F <= -1.05e-200) tmp = -x / B; elseif (F <= 2.7e-8) tmp = ((F / B) * (1.0 / F)) - t_0; elseif (F <= 2.7e+82) tmp = ((F / sin(B)) * (1.0 / F)) - (x / B); else tmp = t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]}, If[LessEqual[F, -18.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3e-176], t$95$1, If[LessEqual[F, -1.05e-200], N[((-x) / B), $MachinePrecision], If[LessEqual[F, 2.7e-8], N[(N[(N[(F / B), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2.7e+82], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := \frac{1}{B} - t_0\\
\mathbf{if}\;F \leq -18:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -3 \cdot 10^{-176}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -1.05 \cdot 10^{-200}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{elif}\;F \leq 2.7 \cdot 10^{-8}:\\
\;\;\;\;\frac{F}{B} \cdot \frac{1}{F} - t_0\\
\mathbf{elif}\;F \leq 2.7 \cdot 10^{+82}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \frac{1}{F} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if F < -18Initial program 67.8%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 77.9%
if -18 < F < -3e-176 or 2.6999999999999999e82 < F Initial program 65.8%
Taylor expanded in F around inf 60.6%
Taylor expanded in B around 0 55.6%
+-commutative55.6%
*-un-lft-identity55.6%
fma-def55.6%
associate-*l/71.6%
pow171.6%
inv-pow71.6%
pow-prod-up71.6%
metadata-eval71.6%
metadata-eval71.6%
un-div-inv71.6%
Applied egg-rr71.6%
fma-udef71.6%
unsub-neg71.6%
*-lft-identity71.6%
Simplified71.6%
if -3e-176 < F < -1.05e-200Initial program 99.2%
distribute-lft-neg-in99.2%
+-commutative99.2%
fma-def99.2%
+-commutative99.2%
*-commutative99.2%
fma-def99.2%
fma-def99.2%
metadata-eval99.2%
metadata-eval99.2%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 84.5%
mul-1-neg84.5%
associate-*l/84.5%
distribute-rgt-neg-in84.5%
Simplified84.5%
Taylor expanded in B around 0 84.5%
associate-*r/84.5%
neg-mul-184.5%
Simplified84.5%
if -1.05e-200 < F < 2.70000000000000002e-8Initial program 99.5%
Taylor expanded in F around inf 38.7%
Taylor expanded in B around 0 59.6%
+-commutative59.6%
fma-def59.6%
un-div-inv59.6%
Applied egg-rr59.6%
fma-udef59.6%
unsub-neg59.6%
times-frac44.4%
*-rgt-identity44.4%
*-commutative44.4%
Simplified44.4%
*-un-lft-identity44.4%
times-frac59.6%
Applied egg-rr59.6%
if 2.70000000000000002e-8 < F < 2.6999999999999999e82Initial program 99.3%
Taylor expanded in F around inf 83.0%
Taylor expanded in B around 0 76.8%
Final simplification71.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)))
(if (<= F -8.8e-11)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -6.6e-281)
t_0
(if (<= F 1.8e-248)
(- (* (/ F B) (/ 1.0 F)) (/ x (tan B)))
(if (<= F 0.205) t_0 (- (/ 1.0 (/ (* F (sin B)) F)) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double tmp;
if (F <= -8.8e-11) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -6.6e-281) {
tmp = t_0;
} else if (F <= 1.8e-248) {
tmp = ((F / B) * (1.0 / F)) - (x / tan(B));
} else if (F <= 0.205) {
tmp = t_0;
} else {
tmp = (1.0 / ((F * sin(B)) / F)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
if (f <= (-8.8d-11)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-6.6d-281)) then
tmp = t_0
else if (f <= 1.8d-248) then
tmp = ((f / b) * (1.0d0 / f)) - (x / tan(b))
else if (f <= 0.205d0) then
tmp = t_0
else
tmp = (1.0d0 / ((f * sin(b)) / f)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double tmp;
if (F <= -8.8e-11) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -6.6e-281) {
tmp = t_0;
} else if (F <= 1.8e-248) {
tmp = ((F / B) * (1.0 / F)) - (x / Math.tan(B));
} else if (F <= 0.205) {
tmp = t_0;
} else {
tmp = (1.0 / ((F * Math.sin(B)) / F)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B tmp = 0 if F <= -8.8e-11: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -6.6e-281: tmp = t_0 elif F <= 1.8e-248: tmp = ((F / B) * (1.0 / F)) - (x / math.tan(B)) elif F <= 0.205: tmp = t_0 else: tmp = (1.0 / ((F * math.sin(B)) / F)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B) tmp = 0.0 if (F <= -8.8e-11) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -6.6e-281) tmp = t_0; elseif (F <= 1.8e-248) tmp = Float64(Float64(Float64(F / B) * Float64(1.0 / F)) - Float64(x / tan(B))); elseif (F <= 0.205) tmp = t_0; else tmp = Float64(Float64(1.0 / Float64(Float64(F * sin(B)) / F)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; tmp = 0.0; if (F <= -8.8e-11) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -6.6e-281) tmp = t_0; elseif (F <= 1.8e-248) tmp = ((F / B) * (1.0 / F)) - (x / tan(B)); elseif (F <= 0.205) tmp = t_0; else tmp = (1.0 / ((F * sin(B)) / F)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[F, -8.8e-11], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -6.6e-281], t$95$0, If[LessEqual[F, 1.8e-248], N[(N[(N[(F / B), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.205], t$95$0, N[(N[(1.0 / N[(N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{if}\;F \leq -8.8 \cdot 10^{-11}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -6.6 \cdot 10^{-281}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.8 \cdot 10^{-248}:\\
\;\;\;\;\frac{F}{B} \cdot \frac{1}{F} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 0.205:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{F \cdot \sin B}{F}} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -8.8000000000000006e-11Initial program 69.9%
Taylor expanded in F around -inf 98.6%
Taylor expanded in B around 0 76.9%
if -8.8000000000000006e-11 < F < -6.5999999999999998e-281 or 1.79999999999999992e-248 < F < 0.204999999999999988Initial program 99.4%
Taylor expanded in F around 0 98.6%
Taylor expanded in B around 0 61.7%
if -6.5999999999999998e-281 < F < 1.79999999999999992e-248Initial program 99.3%
Taylor expanded in F around inf 41.9%
Taylor expanded in B around 0 81.2%
+-commutative81.2%
fma-def81.2%
un-div-inv81.1%
Applied egg-rr81.1%
fma-udef81.1%
unsub-neg81.1%
times-frac67.7%
*-rgt-identity67.7%
*-commutative67.7%
Simplified67.7%
*-un-lft-identity67.7%
times-frac81.1%
Applied egg-rr81.1%
if 0.204999999999999988 < F Initial program 53.4%
Taylor expanded in F around inf 76.0%
frac-times99.1%
metadata-eval99.1%
div-inv99.1%
clear-num99.1%
/-rgt-identity99.1%
Applied egg-rr99.1%
Taylor expanded in B around 0 85.3%
Final simplification73.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)))
(if (<= F -8.8e-11)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -6.6e-281)
t_0
(if (<= F 6.6e-238)
(+ (* x (/ -1.0 (tan B))) (* (/ F B) (/ 1.0 F)))
(if (<= F 0.44) t_0 (- (/ 1.0 (/ (* F (sin B)) F)) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double tmp;
if (F <= -8.8e-11) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -6.6e-281) {
tmp = t_0;
} else if (F <= 6.6e-238) {
tmp = (x * (-1.0 / tan(B))) + ((F / B) * (1.0 / F));
} else if (F <= 0.44) {
tmp = t_0;
} else {
tmp = (1.0 / ((F * sin(B)) / F)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
if (f <= (-8.8d-11)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-6.6d-281)) then
tmp = t_0
else if (f <= 6.6d-238) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f / b) * (1.0d0 / f))
else if (f <= 0.44d0) then
tmp = t_0
else
tmp = (1.0d0 / ((f * sin(b)) / f)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double tmp;
if (F <= -8.8e-11) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -6.6e-281) {
tmp = t_0;
} else if (F <= 6.6e-238) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F / B) * (1.0 / F));
} else if (F <= 0.44) {
tmp = t_0;
} else {
tmp = (1.0 / ((F * Math.sin(B)) / F)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B tmp = 0 if F <= -8.8e-11: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -6.6e-281: tmp = t_0 elif F <= 6.6e-238: tmp = (x * (-1.0 / math.tan(B))) + ((F / B) * (1.0 / F)) elif F <= 0.44: tmp = t_0 else: tmp = (1.0 / ((F * math.sin(B)) / F)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B) tmp = 0.0 if (F <= -8.8e-11) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -6.6e-281) tmp = t_0; elseif (F <= 6.6e-238) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / B) * Float64(1.0 / F))); elseif (F <= 0.44) tmp = t_0; else tmp = Float64(Float64(1.0 / Float64(Float64(F * sin(B)) / F)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; tmp = 0.0; if (F <= -8.8e-11) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -6.6e-281) tmp = t_0; elseif (F <= 6.6e-238) tmp = (x * (-1.0 / tan(B))) + ((F / B) * (1.0 / F)); elseif (F <= 0.44) tmp = t_0; else tmp = (1.0 / ((F * sin(B)) / F)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[F, -8.8e-11], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -6.6e-281], t$95$0, If[LessEqual[F, 6.6e-238], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F / B), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.44], t$95$0, N[(N[(1.0 / N[(N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{if}\;F \leq -8.8 \cdot 10^{-11}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -6.6 \cdot 10^{-281}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 6.6 \cdot 10^{-238}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B} \cdot \frac{1}{F}\\
\mathbf{elif}\;F \leq 0.44:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{F \cdot \sin B}{F}} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -8.8000000000000006e-11Initial program 69.9%
Taylor expanded in F around -inf 98.6%
Taylor expanded in B around 0 76.9%
if -8.8000000000000006e-11 < F < -6.5999999999999998e-281 or 6.59999999999999939e-238 < F < 0.440000000000000002Initial program 99.4%
Taylor expanded in F around 0 98.6%
Taylor expanded in B around 0 61.7%
if -6.5999999999999998e-281 < F < 6.59999999999999939e-238Initial program 99.3%
Taylor expanded in F around inf 41.9%
Taylor expanded in B around 0 81.2%
if 0.440000000000000002 < F Initial program 53.4%
Taylor expanded in F around inf 76.0%
frac-times99.1%
metadata-eval99.1%
div-inv99.1%
clear-num99.1%
/-rgt-identity99.1%
Applied egg-rr99.1%
Taylor expanded in B around 0 85.3%
Final simplification73.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)))
(if (<= F -8.8e-11)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -6.5e-281)
t_0
(if (<= F 1.55e-243)
(- (* (/ F B) (/ 1.0 F)) (/ 1.0 (/ (tan B) x)))
(if (<= F 0.195) t_0 (- (/ 1.0 (/ (* F (sin B)) F)) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double tmp;
if (F <= -8.8e-11) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -6.5e-281) {
tmp = t_0;
} else if (F <= 1.55e-243) {
tmp = ((F / B) * (1.0 / F)) - (1.0 / (tan(B) / x));
} else if (F <= 0.195) {
tmp = t_0;
} else {
tmp = (1.0 / ((F * sin(B)) / F)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
if (f <= (-8.8d-11)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-6.5d-281)) then
tmp = t_0
else if (f <= 1.55d-243) then
tmp = ((f / b) * (1.0d0 / f)) - (1.0d0 / (tan(b) / x))
else if (f <= 0.195d0) then
tmp = t_0
else
tmp = (1.0d0 / ((f * sin(b)) / f)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double tmp;
if (F <= -8.8e-11) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -6.5e-281) {
tmp = t_0;
} else if (F <= 1.55e-243) {
tmp = ((F / B) * (1.0 / F)) - (1.0 / (Math.tan(B) / x));
} else if (F <= 0.195) {
tmp = t_0;
} else {
tmp = (1.0 / ((F * Math.sin(B)) / F)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B tmp = 0 if F <= -8.8e-11: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -6.5e-281: tmp = t_0 elif F <= 1.55e-243: tmp = ((F / B) * (1.0 / F)) - (1.0 / (math.tan(B) / x)) elif F <= 0.195: tmp = t_0 else: tmp = (1.0 / ((F * math.sin(B)) / F)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B) tmp = 0.0 if (F <= -8.8e-11) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -6.5e-281) tmp = t_0; elseif (F <= 1.55e-243) tmp = Float64(Float64(Float64(F / B) * Float64(1.0 / F)) - Float64(1.0 / Float64(tan(B) / x))); elseif (F <= 0.195) tmp = t_0; else tmp = Float64(Float64(1.0 / Float64(Float64(F * sin(B)) / F)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; tmp = 0.0; if (F <= -8.8e-11) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -6.5e-281) tmp = t_0; elseif (F <= 1.55e-243) tmp = ((F / B) * (1.0 / F)) - (1.0 / (tan(B) / x)); elseif (F <= 0.195) tmp = t_0; else tmp = (1.0 / ((F * sin(B)) / F)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[F, -8.8e-11], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -6.5e-281], t$95$0, If[LessEqual[F, 1.55e-243], N[(N[(N[(F / B), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.195], t$95$0, N[(N[(1.0 / N[(N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{if}\;F \leq -8.8 \cdot 10^{-11}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -6.5 \cdot 10^{-281}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.55 \cdot 10^{-243}:\\
\;\;\;\;\frac{F}{B} \cdot \frac{1}{F} - \frac{1}{\frac{\tan B}{x}}\\
\mathbf{elif}\;F \leq 0.195:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{F \cdot \sin B}{F}} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -8.8000000000000006e-11Initial program 69.9%
Taylor expanded in F around -inf 98.6%
Taylor expanded in B around 0 76.9%
if -8.8000000000000006e-11 < F < -6.5e-281 or 1.55e-243 < F < 0.19500000000000001Initial program 99.4%
Taylor expanded in F around 0 98.6%
Taylor expanded in B around 0 61.7%
if -6.5e-281 < F < 1.55e-243Initial program 99.3%
Taylor expanded in F around inf 41.9%
Taylor expanded in B around 0 81.2%
div-inv81.1%
clear-num81.4%
Applied egg-rr81.4%
if 0.19500000000000001 < F Initial program 53.4%
Taylor expanded in F around inf 76.0%
frac-times99.1%
metadata-eval99.1%
div-inv99.1%
clear-num99.1%
/-rgt-identity99.1%
Applied egg-rr99.1%
Taylor expanded in B around 0 85.3%
Final simplification73.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))) (t_1 (- (/ 1.0 B) t_0)))
(if (<= F -0.08)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -2.8e-176)
t_1
(if (<= F -1.6e-197)
(/ (- x) B)
(if (<= F 20500.0)
(- (* (/ F B) (/ 1.0 F)) t_0)
(if (<= F 9e+86) (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = (1.0 / B) - t_0;
double tmp;
if (F <= -0.08) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -2.8e-176) {
tmp = t_1;
} else if (F <= -1.6e-197) {
tmp = -x / B;
} else if (F <= 20500.0) {
tmp = ((F / B) * (1.0 / F)) - t_0;
} else if (F <= 9e+86) {
tmp = 1.0 / sin(B);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x / tan(b)
t_1 = (1.0d0 / b) - t_0
if (f <= (-0.08d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-2.8d-176)) then
tmp = t_1
else if (f <= (-1.6d-197)) then
tmp = -x / b
else if (f <= 20500.0d0) then
tmp = ((f / b) * (1.0d0 / f)) - t_0
else if (f <= 9d+86) then
tmp = 1.0d0 / sin(b)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double t_1 = (1.0 / B) - t_0;
double tmp;
if (F <= -0.08) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -2.8e-176) {
tmp = t_1;
} else if (F <= -1.6e-197) {
tmp = -x / B;
} else if (F <= 20500.0) {
tmp = ((F / B) * (1.0 / F)) - t_0;
} else if (F <= 9e+86) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = t_1;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) t_1 = (1.0 / B) - t_0 tmp = 0 if F <= -0.08: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -2.8e-176: tmp = t_1 elif F <= -1.6e-197: tmp = -x / B elif F <= 20500.0: tmp = ((F / B) * (1.0 / F)) - t_0 elif F <= 9e+86: tmp = 1.0 / math.sin(B) else: tmp = t_1 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(Float64(1.0 / B) - t_0) tmp = 0.0 if (F <= -0.08) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -2.8e-176) tmp = t_1; elseif (F <= -1.6e-197) tmp = Float64(Float64(-x) / B); elseif (F <= 20500.0) tmp = Float64(Float64(Float64(F / B) * Float64(1.0 / F)) - t_0); elseif (F <= 9e+86) tmp = Float64(1.0 / sin(B)); else tmp = t_1; end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); t_1 = (1.0 / B) - t_0; tmp = 0.0; if (F <= -0.08) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -2.8e-176) tmp = t_1; elseif (F <= -1.6e-197) tmp = -x / B; elseif (F <= 20500.0) tmp = ((F / B) * (1.0 / F)) - t_0; elseif (F <= 9e+86) tmp = 1.0 / sin(B); else tmp = t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]}, If[LessEqual[F, -0.08], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.8e-176], t$95$1, If[LessEqual[F, -1.6e-197], N[((-x) / B), $MachinePrecision], If[LessEqual[F, 20500.0], N[(N[(N[(F / B), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 9e+86], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := \frac{1}{B} - t_0\\
\mathbf{if}\;F \leq -0.08:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -2.8 \cdot 10^{-176}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -1.6 \cdot 10^{-197}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{elif}\;F \leq 20500:\\
\;\;\;\;\frac{F}{B} \cdot \frac{1}{F} - t_0\\
\mathbf{elif}\;F \leq 9 \cdot 10^{+86}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if F < -0.0800000000000000017Initial program 67.8%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 77.9%
if -0.0800000000000000017 < F < -2.8000000000000001e-176 or 8.99999999999999986e86 < F Initial program 65.8%
Taylor expanded in F around inf 60.6%
Taylor expanded in B around 0 55.6%
+-commutative55.6%
*-un-lft-identity55.6%
fma-def55.6%
associate-*l/71.6%
pow171.6%
inv-pow71.6%
pow-prod-up71.6%
metadata-eval71.6%
metadata-eval71.6%
un-div-inv71.6%
Applied egg-rr71.6%
fma-udef71.6%
unsub-neg71.6%
*-lft-identity71.6%
Simplified71.6%
if -2.8000000000000001e-176 < F < -1.5999999999999999e-197Initial program 99.2%
distribute-lft-neg-in99.2%
+-commutative99.2%
fma-def99.2%
+-commutative99.2%
*-commutative99.2%
fma-def99.2%
fma-def99.2%
metadata-eval99.2%
metadata-eval99.2%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 84.5%
mul-1-neg84.5%
associate-*l/84.5%
distribute-rgt-neg-in84.5%
Simplified84.5%
Taylor expanded in B around 0 84.5%
associate-*r/84.5%
neg-mul-184.5%
Simplified84.5%
if -1.5999999999999999e-197 < F < 20500Initial program 99.4%
Taylor expanded in F around inf 38.5%
Taylor expanded in B around 0 58.0%
+-commutative58.0%
fma-def58.0%
un-div-inv58.1%
Applied egg-rr58.1%
fma-udef58.1%
unsub-neg58.1%
times-frac43.8%
*-rgt-identity43.8%
*-commutative43.8%
Simplified43.8%
*-un-lft-identity43.8%
times-frac58.1%
Applied egg-rr58.1%
if 20500 < F < 8.99999999999999986e86Initial program 99.3%
Taylor expanded in F around inf 96.7%
Taylor expanded in B around 0 64.3%
Taylor expanded in x around 0 82.1%
Final simplification70.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.2)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -5.6e-174)
(- (/ 1.0 B) t_0)
(if (<= F -2.3e-198)
(/ (- x) B)
(if (<= F 2.7e-8)
(- (* (/ F B) (/ 1.0 F)) t_0)
(- (/ 1.0 (/ (* F (sin B)) F)) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.2) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -5.6e-174) {
tmp = (1.0 / B) - t_0;
} else if (F <= -2.3e-198) {
tmp = -x / B;
} else if (F <= 2.7e-8) {
tmp = ((F / B) * (1.0 / F)) - t_0;
} else {
tmp = (1.0 / ((F * sin(B)) / F)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.2d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-5.6d-174)) then
tmp = (1.0d0 / b) - t_0
else if (f <= (-2.3d-198)) then
tmp = -x / b
else if (f <= 2.7d-8) then
tmp = ((f / b) * (1.0d0 / f)) - t_0
else
tmp = (1.0d0 / ((f * sin(b)) / f)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.2) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -5.6e-174) {
tmp = (1.0 / B) - t_0;
} else if (F <= -2.3e-198) {
tmp = -x / B;
} else if (F <= 2.7e-8) {
tmp = ((F / B) * (1.0 / F)) - t_0;
} else {
tmp = (1.0 / ((F * Math.sin(B)) / F)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.2: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -5.6e-174: tmp = (1.0 / B) - t_0 elif F <= -2.3e-198: tmp = -x / B elif F <= 2.7e-8: tmp = ((F / B) * (1.0 / F)) - t_0 else: tmp = (1.0 / ((F * math.sin(B)) / F)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.2) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -5.6e-174) tmp = Float64(Float64(1.0 / B) - t_0); elseif (F <= -2.3e-198) tmp = Float64(Float64(-x) / B); elseif (F <= 2.7e-8) tmp = Float64(Float64(Float64(F / B) * Float64(1.0 / F)) - t_0); else tmp = Float64(Float64(1.0 / Float64(Float64(F * sin(B)) / F)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.2) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -5.6e-174) tmp = (1.0 / B) - t_0; elseif (F <= -2.3e-198) tmp = -x / B; elseif (F <= 2.7e-8) tmp = ((F / B) * (1.0 / F)) - t_0; else tmp = (1.0 / ((F * sin(B)) / F)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.2], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5.6e-174], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -2.3e-198], N[((-x) / B), $MachinePrecision], If[LessEqual[F, 2.7e-8], N[(N[(N[(F / B), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[(N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.2:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -5.6 \cdot 10^{-174}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\mathbf{elif}\;F \leq -2.3 \cdot 10^{-198}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{elif}\;F \leq 2.7 \cdot 10^{-8}:\\
\;\;\;\;\frac{F}{B} \cdot \frac{1}{F} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{F \cdot \sin B}{F}} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.19999999999999996Initial program 67.8%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 77.9%
if -1.19999999999999996 < F < -5.59999999999999998e-174Initial program 99.4%
Taylor expanded in F around inf 46.0%
Taylor expanded in B around 0 55.9%
+-commutative55.9%
*-un-lft-identity55.9%
fma-def55.9%
associate-*l/55.9%
pow155.9%
inv-pow55.9%
pow-prod-up55.9%
metadata-eval55.9%
metadata-eval55.9%
un-div-inv55.9%
Applied egg-rr55.9%
fma-udef55.9%
unsub-neg55.9%
*-lft-identity55.9%
Simplified55.9%
if -5.59999999999999998e-174 < F < -2.30000000000000013e-198Initial program 99.2%
distribute-lft-neg-in99.2%
+-commutative99.2%
fma-def99.2%
+-commutative99.2%
*-commutative99.2%
fma-def99.2%
fma-def99.2%
metadata-eval99.2%
metadata-eval99.2%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 84.5%
mul-1-neg84.5%
associate-*l/84.5%
distribute-rgt-neg-in84.5%
Simplified84.5%
Taylor expanded in B around 0 84.5%
associate-*r/84.5%
neg-mul-184.5%
Simplified84.5%
if -2.30000000000000013e-198 < F < 2.70000000000000002e-8Initial program 99.5%
Taylor expanded in F around inf 38.7%
Taylor expanded in B around 0 59.6%
+-commutative59.6%
fma-def59.6%
un-div-inv59.6%
Applied egg-rr59.6%
fma-udef59.6%
unsub-neg59.6%
times-frac44.4%
*-rgt-identity44.4%
*-commutative44.4%
Simplified44.4%
*-un-lft-identity44.4%
times-frac59.6%
Applied egg-rr59.6%
if 2.70000000000000002e-8 < F Initial program 55.9%
Taylor expanded in F around inf 73.8%
frac-times95.7%
metadata-eval95.7%
div-inv95.7%
clear-num95.7%
/-rgt-identity95.7%
Applied egg-rr95.7%
Taylor expanded in B around 0 82.6%
Final simplification71.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ 1.0 B) (/ x (tan B)))))
(if (<= F -0.19)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -4.2e-176)
t_0
(if (<= F -8e-200)
(/ (- x) B)
(if (or (<= F 0.175) (not (<= F 5.9e+87))) t_0 (/ 1.0 (sin B))))))))
double code(double F, double B, double x) {
double t_0 = (1.0 / B) - (x / tan(B));
double tmp;
if (F <= -0.19) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -4.2e-176) {
tmp = t_0;
} else if (F <= -8e-200) {
tmp = -x / B;
} else if ((F <= 0.175) || !(F <= 5.9e+87)) {
tmp = t_0;
} else {
tmp = 1.0 / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = (1.0d0 / b) - (x / tan(b))
if (f <= (-0.19d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-4.2d-176)) then
tmp = t_0
else if (f <= (-8d-200)) then
tmp = -x / b
else if ((f <= 0.175d0) .or. (.not. (f <= 5.9d+87))) then
tmp = t_0
else
tmp = 1.0d0 / sin(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 <= -0.19) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -4.2e-176) {
tmp = t_0;
} else if (F <= -8e-200) {
tmp = -x / B;
} else if ((F <= 0.175) || !(F <= 5.9e+87)) {
tmp = t_0;
} else {
tmp = 1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): t_0 = (1.0 / B) - (x / math.tan(B)) tmp = 0 if F <= -0.19: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -4.2e-176: tmp = t_0 elif F <= -8e-200: tmp = -x / B elif (F <= 0.175) or not (F <= 5.9e+87): tmp = t_0 else: tmp = 1.0 / math.sin(B) return tmp
function code(F, B, x) t_0 = Float64(Float64(1.0 / B) - Float64(x / tan(B))) tmp = 0.0 if (F <= -0.19) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -4.2e-176) tmp = t_0; elseif (F <= -8e-200) tmp = Float64(Float64(-x) / B); elseif ((F <= 0.175) || !(F <= 5.9e+87)) tmp = t_0; else tmp = Float64(1.0 / sin(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 <= -0.19) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -4.2e-176) tmp = t_0; elseif (F <= -8e-200) tmp = -x / B; elseif ((F <= 0.175) || ~((F <= 5.9e+87))) tmp = t_0; else tmp = 1.0 / sin(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, -0.19], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.2e-176], t$95$0, If[LessEqual[F, -8e-200], N[((-x) / B), $MachinePrecision], If[Or[LessEqual[F, 0.175], N[Not[LessEqual[F, 5.9e+87]], $MachinePrecision]], t$95$0, N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.19:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -4.2 \cdot 10^{-176}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -8 \cdot 10^{-200}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{elif}\;F \leq 0.175 \lor \neg \left(F \leq 5.9 \cdot 10^{+87}\right):\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -0.19Initial program 67.8%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 77.9%
if -0.19 < F < -4.19999999999999984e-176 or -7.9999999999999999e-200 < F < 0.17499999999999999 or 5.8999999999999997e87 < F Initial program 79.6%
Taylor expanded in F around inf 51.6%
Taylor expanded in B around 0 56.9%
+-commutative56.9%
*-un-lft-identity56.9%
fma-def56.9%
associate-*l/65.6%
pow165.6%
inv-pow65.6%
pow-prod-up65.6%
metadata-eval65.6%
metadata-eval65.6%
un-div-inv65.7%
Applied egg-rr65.7%
fma-udef65.7%
unsub-neg65.7%
*-lft-identity65.7%
Simplified65.7%
if -4.19999999999999984e-176 < F < -7.9999999999999999e-200Initial program 99.2%
distribute-lft-neg-in99.2%
+-commutative99.2%
fma-def99.2%
+-commutative99.2%
*-commutative99.2%
fma-def99.2%
fma-def99.2%
metadata-eval99.2%
metadata-eval99.2%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 84.5%
mul-1-neg84.5%
associate-*l/84.5%
distribute-rgt-neg-in84.5%
Simplified84.5%
Taylor expanded in B around 0 84.5%
associate-*r/84.5%
neg-mul-184.5%
Simplified84.5%
if 0.17499999999999999 < F < 5.8999999999999997e87Initial program 99.3%
Taylor expanded in F around inf 91.4%
Taylor expanded in B around 0 61.1%
Taylor expanded in x around 0 77.7%
Final simplification70.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ 1.0 B) (/ x (tan B)))))
(if (<= x -1.3e-146)
t_0
(if (<= x 9e-137)
(/ -1.0 (sin B))
(if (or (<= x 8.6e-82) (not (<= x 1.15e-18)))
t_0
(- (/ (- x) B) (* B (* x -0.3333333333333333))))))))
double code(double F, double B, double x) {
double t_0 = (1.0 / B) - (x / tan(B));
double tmp;
if (x <= -1.3e-146) {
tmp = t_0;
} else if (x <= 9e-137) {
tmp = -1.0 / sin(B);
} else if ((x <= 8.6e-82) || !(x <= 1.15e-18)) {
tmp = t_0;
} else {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
}
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 <= (-1.3d-146)) then
tmp = t_0
else if (x <= 9d-137) then
tmp = (-1.0d0) / sin(b)
else if ((x <= 8.6d-82) .or. (.not. (x <= 1.15d-18))) then
tmp = t_0
else
tmp = (-x / b) - (b * (x * (-0.3333333333333333d0)))
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 <= -1.3e-146) {
tmp = t_0;
} else if (x <= 9e-137) {
tmp = -1.0 / Math.sin(B);
} else if ((x <= 8.6e-82) || !(x <= 1.15e-18)) {
tmp = t_0;
} else {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
}
return tmp;
}
def code(F, B, x): t_0 = (1.0 / B) - (x / math.tan(B)) tmp = 0 if x <= -1.3e-146: tmp = t_0 elif x <= 9e-137: tmp = -1.0 / math.sin(B) elif (x <= 8.6e-82) or not (x <= 1.15e-18): tmp = t_0 else: tmp = (-x / B) - (B * (x * -0.3333333333333333)) return tmp
function code(F, B, x) t_0 = Float64(Float64(1.0 / B) - Float64(x / tan(B))) tmp = 0.0 if (x <= -1.3e-146) tmp = t_0; elseif (x <= 9e-137) tmp = Float64(-1.0 / sin(B)); elseif ((x <= 8.6e-82) || !(x <= 1.15e-18)) tmp = t_0; else tmp = Float64(Float64(Float64(-x) / B) - Float64(B * Float64(x * -0.3333333333333333))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (1.0 / B) - (x / tan(B)); tmp = 0.0; if (x <= -1.3e-146) tmp = t_0; elseif (x <= 9e-137) tmp = -1.0 / sin(B); elseif ((x <= 8.6e-82) || ~((x <= 1.15e-18))) tmp = t_0; else tmp = (-x / B) - (B * (x * -0.3333333333333333)); 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, -1.3e-146], t$95$0, If[LessEqual[x, 9e-137], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, 8.6e-82], N[Not[LessEqual[x, 1.15e-18]], $MachinePrecision]], t$95$0, N[(N[((-x) / B), $MachinePrecision] - N[(B * N[(x * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;x \leq -1.3 \cdot 10^{-146}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 9 \cdot 10^{-137}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;x \leq 8.6 \cdot 10^{-82} \lor \neg \left(x \leq 1.15 \cdot 10^{-18}\right):\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B} - B \cdot \left(x \cdot -0.3333333333333333\right)\\
\end{array}
\end{array}
if x < -1.29999999999999993e-146 or 8.9999999999999994e-137 < x < 8.60000000000000037e-82 or 1.15e-18 < x Initial program 80.5%
Taylor expanded in F around inf 65.6%
Taylor expanded in B around 0 69.8%
+-commutative69.8%
*-un-lft-identity69.8%
fma-def69.8%
associate-*l/80.3%
pow180.3%
inv-pow80.3%
pow-prod-up80.3%
metadata-eval80.3%
metadata-eval80.3%
un-div-inv80.4%
Applied egg-rr80.4%
fma-udef80.4%
unsub-neg80.4%
*-lft-identity80.4%
Simplified80.4%
if -1.29999999999999993e-146 < x < 8.9999999999999994e-137Initial program 71.2%
Taylor expanded in F around -inf 39.9%
Taylor expanded in x around 0 39.9%
if 8.60000000000000037e-82 < x < 1.15e-18Initial program 85.4%
distribute-lft-neg-in85.4%
+-commutative85.4%
fma-def85.4%
+-commutative85.4%
*-commutative85.4%
fma-def85.4%
fma-def85.4%
metadata-eval85.4%
metadata-eval85.4%
associate-*r/85.4%
*-rgt-identity85.4%
Simplified85.4%
Taylor expanded in F around 0 59.6%
mul-1-neg59.6%
associate-*l/59.5%
distribute-rgt-neg-in59.5%
Simplified59.5%
Taylor expanded in B around 0 44.7%
distribute-lft-out44.7%
distribute-rgt-out--44.7%
metadata-eval44.7%
Simplified44.7%
Final simplification65.1%
(FPCore (F B x)
:precision binary64
(if (<= F -1.2)
(/ -1.0 (sin B))
(if (<= F 0.175)
(* (cos B) (/ (- x) B))
(if (<= F 2.3e+83)
(/ 1.0 (sin B))
(-
(+ (/ 1.0 B) (* B (- 0.16666666666666666 (* x -0.3333333333333333))))
(/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.2) {
tmp = -1.0 / sin(B);
} else if (F <= 0.175) {
tmp = cos(B) * (-x / B);
} else if (F <= 2.3e+83) {
tmp = 1.0 / sin(B);
} else {
tmp = ((1.0 / B) + (B * (0.16666666666666666 - (x * -0.3333333333333333)))) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.2d0)) then
tmp = (-1.0d0) / sin(b)
else if (f <= 0.175d0) then
tmp = cos(b) * (-x / b)
else if (f <= 2.3d+83) then
tmp = 1.0d0 / sin(b)
else
tmp = ((1.0d0 / b) + (b * (0.16666666666666666d0 - (x * (-0.3333333333333333d0))))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.2) {
tmp = -1.0 / Math.sin(B);
} else if (F <= 0.175) {
tmp = Math.cos(B) * (-x / B);
} else if (F <= 2.3e+83) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = ((1.0 / B) + (B * (0.16666666666666666 - (x * -0.3333333333333333)))) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.2: tmp = -1.0 / math.sin(B) elif F <= 0.175: tmp = math.cos(B) * (-x / B) elif F <= 2.3e+83: tmp = 1.0 / math.sin(B) else: tmp = ((1.0 / B) + (B * (0.16666666666666666 - (x * -0.3333333333333333)))) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.2) tmp = Float64(-1.0 / sin(B)); elseif (F <= 0.175) tmp = Float64(cos(B) * Float64(Float64(-x) / B)); elseif (F <= 2.3e+83) tmp = Float64(1.0 / sin(B)); else tmp = Float64(Float64(Float64(1.0 / B) + Float64(B * Float64(0.16666666666666666 - Float64(x * -0.3333333333333333)))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.2) tmp = -1.0 / sin(B); elseif (F <= 0.175) tmp = cos(B) * (-x / B); elseif (F <= 2.3e+83) tmp = 1.0 / sin(B); else tmp = ((1.0 / B) + (B * (0.16666666666666666 - (x * -0.3333333333333333)))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.2], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.175], N[(N[Cos[B], $MachinePrecision] * N[((-x) / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.3e+83], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 / B), $MachinePrecision] + N[(B * N[(0.16666666666666666 - N[(x * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.2:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 0.175:\\
\;\;\;\;\cos B \cdot \frac{-x}{B}\\
\mathbf{elif}\;F \leq 2.3 \cdot 10^{+83}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{B} + B \cdot \left(0.16666666666666666 - x \cdot -0.3333333333333333\right)\right) - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.19999999999999996Initial program 67.8%
Taylor expanded in F around -inf 99.8%
Taylor expanded in x around 0 62.8%
if -1.19999999999999996 < F < 0.17499999999999999Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.5%
*-rgt-identity99.5%
Simplified99.5%
Taylor expanded in F around 0 72.5%
mul-1-neg72.5%
associate-*l/72.4%
distribute-rgt-neg-in72.4%
Simplified72.4%
Taylor expanded in B around 0 42.5%
if 0.17499999999999999 < F < 2.29999999999999995e83Initial program 99.3%
Taylor expanded in F around inf 91.4%
Taylor expanded in B around 0 61.1%
Taylor expanded in x around 0 77.7%
if 2.29999999999999995e83 < F Initial program 42.2%
Taylor expanded in F around inf 70.9%
Taylor expanded in B around 0 43.9%
Taylor expanded in B around 0 67.8%
Final simplification55.7%
(FPCore (F B x)
:precision binary64
(if (<= F -7.1)
(/ -1.0 (sin B))
(if (<= F 0.145)
(/ (- x) B)
(if (<= F 2.8e+85)
(/ 1.0 (sin B))
(-
(+ (/ 1.0 B) (* B (- 0.16666666666666666 (* x -0.3333333333333333))))
(/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.1) {
tmp = -1.0 / sin(B);
} else if (F <= 0.145) {
tmp = -x / B;
} else if (F <= 2.8e+85) {
tmp = 1.0 / sin(B);
} else {
tmp = ((1.0 / B) + (B * (0.16666666666666666 - (x * -0.3333333333333333)))) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-7.1d0)) then
tmp = (-1.0d0) / sin(b)
else if (f <= 0.145d0) then
tmp = -x / b
else if (f <= 2.8d+85) then
tmp = 1.0d0 / sin(b)
else
tmp = ((1.0d0 / b) + (b * (0.16666666666666666d0 - (x * (-0.3333333333333333d0))))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -7.1) {
tmp = -1.0 / Math.sin(B);
} else if (F <= 0.145) {
tmp = -x / B;
} else if (F <= 2.8e+85) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = ((1.0 / B) + (B * (0.16666666666666666 - (x * -0.3333333333333333)))) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.1: tmp = -1.0 / math.sin(B) elif F <= 0.145: tmp = -x / B elif F <= 2.8e+85: tmp = 1.0 / math.sin(B) else: tmp = ((1.0 / B) + (B * (0.16666666666666666 - (x * -0.3333333333333333)))) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.1) tmp = Float64(-1.0 / sin(B)); elseif (F <= 0.145) tmp = Float64(Float64(-x) / B); elseif (F <= 2.8e+85) tmp = Float64(1.0 / sin(B)); else tmp = Float64(Float64(Float64(1.0 / B) + Float64(B * Float64(0.16666666666666666 - Float64(x * -0.3333333333333333)))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -7.1) tmp = -1.0 / sin(B); elseif (F <= 0.145) tmp = -x / B; elseif (F <= 2.8e+85) tmp = 1.0 / sin(B); else tmp = ((1.0 / B) + (B * (0.16666666666666666 - (x * -0.3333333333333333)))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.1], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.145], N[((-x) / B), $MachinePrecision], If[LessEqual[F, 2.8e+85], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 / B), $MachinePrecision] + N[(B * N[(0.16666666666666666 - N[(x * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.1:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 0.145:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{elif}\;F \leq 2.8 \cdot 10^{+85}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{B} + B \cdot \left(0.16666666666666666 - x \cdot -0.3333333333333333\right)\right) - \frac{x}{B}\\
\end{array}
\end{array}
if F < -7.0999999999999996Initial program 67.8%
Taylor expanded in F around -inf 99.8%
Taylor expanded in x around 0 62.8%
if -7.0999999999999996 < F < 0.14499999999999999Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.5%
*-rgt-identity99.5%
Simplified99.5%
Taylor expanded in F around 0 72.5%
mul-1-neg72.5%
associate-*l/72.4%
distribute-rgt-neg-in72.4%
Simplified72.4%
Taylor expanded in B around 0 42.4%
associate-*r/42.4%
neg-mul-142.4%
Simplified42.4%
if 0.14499999999999999 < F < 2.7999999999999999e85Initial program 99.3%
Taylor expanded in F around inf 91.4%
Taylor expanded in B around 0 61.1%
Taylor expanded in x around 0 77.7%
if 2.7999999999999999e85 < F Initial program 42.2%
Taylor expanded in F around inf 70.9%
Taylor expanded in B around 0 43.9%
Taylor expanded in B around 0 67.8%
Final simplification55.7%
(FPCore (F B x)
:precision binary64
(if (<= F -5.5)
(/ -1.0 (sin B))
(if (<= F 8.6e-14)
(/ (- x) B)
(- (+ (/ 1.0 B) (* 0.3333333333333333 (* x B))) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.5) {
tmp = -1.0 / sin(B);
} else if (F <= 8.6e-14) {
tmp = -x / B;
} else {
tmp = ((1.0 / B) + (0.3333333333333333 * (x * 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 <= (-5.5d0)) then
tmp = (-1.0d0) / sin(b)
else if (f <= 8.6d-14) then
tmp = -x / b
else
tmp = ((1.0d0 / b) + (0.3333333333333333d0 * (x * b))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -5.5) {
tmp = -1.0 / Math.sin(B);
} else if (F <= 8.6e-14) {
tmp = -x / B;
} else {
tmp = ((1.0 / B) + (0.3333333333333333 * (x * B))) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5.5: tmp = -1.0 / math.sin(B) elif F <= 8.6e-14: tmp = -x / B else: tmp = ((1.0 / B) + (0.3333333333333333 * (x * B))) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5.5) tmp = Float64(-1.0 / sin(B)); elseif (F <= 8.6e-14) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(Float64(1.0 / B) + Float64(0.3333333333333333 * Float64(x * B))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -5.5) tmp = -1.0 / sin(B); elseif (F <= 8.6e-14) tmp = -x / B; else tmp = ((1.0 / B) + (0.3333333333333333 * (x * B))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5.5], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.6e-14], N[((-x) / B), $MachinePrecision], N[(N[(N[(1.0 / B), $MachinePrecision] + N[(0.3333333333333333 * N[(x * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5.5:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 8.6 \cdot 10^{-14}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{B} + 0.3333333333333333 \cdot \left(x \cdot B\right)\right) - \frac{x}{B}\\
\end{array}
\end{array}
if F < -5.5Initial program 67.8%
Taylor expanded in F around -inf 99.8%
Taylor expanded in x around 0 62.8%
if -5.5 < F < 8.59999999999999996e-14Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.5%
*-rgt-identity99.5%
Simplified99.5%
Taylor expanded in F around 0 73.5%
mul-1-neg73.5%
associate-*l/73.5%
distribute-rgt-neg-in73.5%
Simplified73.5%
Taylor expanded in B around 0 42.6%
associate-*r/42.6%
neg-mul-142.6%
Simplified42.6%
if 8.59999999999999996e-14 < F Initial program 55.9%
Taylor expanded in F around inf 73.8%
Taylor expanded in B around 0 53.6%
Taylor expanded in B around 0 62.0%
Final simplification53.8%
(FPCore (F B x)
:precision binary64
(if (<= F -4.9e-31)
(/ (- -1.0 x) B)
(if (<= F 2.6e-13)
(/ (- x) B)
(- (+ (/ 1.0 B) (* 0.3333333333333333 (* x B))) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.9e-31) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.6e-13) {
tmp = -x / B;
} else {
tmp = ((1.0 / B) + (0.3333333333333333 * (x * B))) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-4.9d-31)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 2.6d-13) then
tmp = -x / b
else
tmp = ((1.0d0 / b) + (0.3333333333333333d0 * (x * b))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4.9e-31) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.6e-13) {
tmp = -x / B;
} else {
tmp = ((1.0 / B) + (0.3333333333333333 * (x * B))) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.9e-31: tmp = (-1.0 - x) / B elif F <= 2.6e-13: tmp = -x / B else: tmp = ((1.0 / B) + (0.3333333333333333 * (x * B))) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.9e-31) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 2.6e-13) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(Float64(1.0 / B) + Float64(0.3333333333333333 * Float64(x * B))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4.9e-31) tmp = (-1.0 - x) / B; elseif (F <= 2.6e-13) tmp = -x / B; else tmp = ((1.0 / B) + (0.3333333333333333 * (x * B))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.9e-31], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.6e-13], N[((-x) / B), $MachinePrecision], N[(N[(N[(1.0 / B), $MachinePrecision] + N[(0.3333333333333333 * N[(x * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.9 \cdot 10^{-31}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 2.6 \cdot 10^{-13}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{B} + 0.3333333333333333 \cdot \left(x \cdot B\right)\right) - \frac{x}{B}\\
\end{array}
\end{array}
if F < -4.90000000000000023e-31Initial program 71.4%
Taylor expanded in F around -inf 95.2%
Taylor expanded in B around 0 44.7%
associate-*r/44.7%
distribute-lft-in44.7%
metadata-eval44.7%
neg-mul-144.7%
Simplified44.7%
if -4.90000000000000023e-31 < F < 2.6e-13Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.5%
*-rgt-identity99.5%
Simplified99.5%
Taylor expanded in F around 0 74.9%
mul-1-neg74.9%
associate-*l/74.9%
distribute-rgt-neg-in74.9%
Simplified74.9%
Taylor expanded in B around 0 43.2%
associate-*r/43.2%
neg-mul-143.2%
Simplified43.2%
if 2.6e-13 < F Initial program 55.9%
Taylor expanded in F around inf 73.8%
Taylor expanded in B around 0 53.6%
Taylor expanded in B around 0 62.0%
Final simplification49.2%
(FPCore (F B x)
:precision binary64
(if (<= F -1.9e-37)
(+ (* B (- (* x 0.3333333333333333) 0.16666666666666666)) (/ (- -1.0 x) B))
(if (<= F 9.6e-14)
(/ (- x) B)
(- (+ (/ 1.0 B) (* 0.3333333333333333 (* x B))) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.9e-37) {
tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B);
} else if (F <= 9.6e-14) {
tmp = -x / B;
} else {
tmp = ((1.0 / B) + (0.3333333333333333 * (x * 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 <= (-1.9d-37)) then
tmp = (b * ((x * 0.3333333333333333d0) - 0.16666666666666666d0)) + (((-1.0d0) - x) / b)
else if (f <= 9.6d-14) then
tmp = -x / b
else
tmp = ((1.0d0 / b) + (0.3333333333333333d0 * (x * b))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.9e-37) {
tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B);
} else if (F <= 9.6e-14) {
tmp = -x / B;
} else {
tmp = ((1.0 / B) + (0.3333333333333333 * (x * B))) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.9e-37: tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B) elif F <= 9.6e-14: tmp = -x / B else: tmp = ((1.0 / B) + (0.3333333333333333 * (x * B))) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.9e-37) tmp = Float64(Float64(B * Float64(Float64(x * 0.3333333333333333) - 0.16666666666666666)) + Float64(Float64(-1.0 - x) / B)); elseif (F <= 9.6e-14) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(Float64(1.0 / B) + Float64(0.3333333333333333 * Float64(x * B))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.9e-37) tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B); elseif (F <= 9.6e-14) tmp = -x / B; else tmp = ((1.0 / B) + (0.3333333333333333 * (x * B))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.9e-37], N[(N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] - 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9.6e-14], N[((-x) / B), $MachinePrecision], N[(N[(N[(1.0 / B), $MachinePrecision] + N[(0.3333333333333333 * N[(x * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.9 \cdot 10^{-37}:\\
\;\;\;\;B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right) + \frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 9.6 \cdot 10^{-14}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{B} + 0.3333333333333333 \cdot \left(x \cdot B\right)\right) - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.9000000000000002e-37Initial program 72.4%
Taylor expanded in F around -inf 94.3%
Taylor expanded in B around 0 43.5%
if -1.9000000000000002e-37 < F < 9.599999999999999e-14Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.5%
*-rgt-identity99.5%
Simplified99.5%
Taylor expanded in F around 0 74.2%
mul-1-neg74.2%
associate-*l/74.2%
distribute-rgt-neg-in74.2%
Simplified74.2%
Taylor expanded in B around 0 44.4%
associate-*r/44.4%
neg-mul-144.4%
Simplified44.4%
if 9.599999999999999e-14 < F Initial program 55.9%
Taylor expanded in F around inf 73.8%
Taylor expanded in B around 0 53.6%
Taylor expanded in B around 0 62.0%
Final simplification49.3%
(FPCore (F B x)
:precision binary64
(if (<= F -4.7e-32)
(/ (- -1.0 x) B)
(if (<= F 1.72e-10)
(/ (- x) B)
(+ (* 0.3333333333333333 (* x B)) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.7e-32) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.72e-10) {
tmp = -x / B;
} else {
tmp = (0.3333333333333333 * (x * 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 <= (-4.7d-32)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.72d-10) then
tmp = -x / b
else
tmp = (0.3333333333333333d0 * (x * 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 <= -4.7e-32) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.72e-10) {
tmp = -x / B;
} else {
tmp = (0.3333333333333333 * (x * B)) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.7e-32: tmp = (-1.0 - x) / B elif F <= 1.72e-10: tmp = -x / B else: tmp = (0.3333333333333333 * (x * B)) + ((1.0 - x) / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.7e-32) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.72e-10) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(0.3333333333333333 * Float64(x * B)) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4.7e-32) tmp = (-1.0 - x) / B; elseif (F <= 1.72e-10) tmp = -x / B; else tmp = (0.3333333333333333 * (x * B)) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.7e-32], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.72e-10], N[((-x) / B), $MachinePrecision], N[(N[(0.3333333333333333 * N[(x * B), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.7 \cdot 10^{-32}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.72 \cdot 10^{-10}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \left(x \cdot B\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -4.70000000000000019e-32Initial program 71.4%
Taylor expanded in F around -inf 95.2%
Taylor expanded in B around 0 44.7%
associate-*r/44.7%
distribute-lft-in44.7%
metadata-eval44.7%
neg-mul-144.7%
Simplified44.7%
if -4.70000000000000019e-32 < F < 1.72000000000000001e-10Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.5%
*-rgt-identity99.5%
Simplified99.5%
Taylor expanded in F around 0 74.9%
mul-1-neg74.9%
associate-*l/74.9%
distribute-rgt-neg-in74.9%
Simplified74.9%
Taylor expanded in B around 0 43.2%
associate-*r/43.2%
neg-mul-143.2%
Simplified43.2%
if 1.72000000000000001e-10 < F Initial program 55.9%
Taylor expanded in F around inf 73.8%
Taylor expanded in B around 0 53.6%
Taylor expanded in B around 0 62.0%
associate--l+62.0%
div-sub62.0%
Simplified62.0%
Final simplification49.2%
(FPCore (F B x) :precision binary64 (if (<= F -2.15e-31) (/ (- -1.0 x) B) (if (<= F 2.6e-60) (/ (- x) B) (- (/ 1.0 B) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.15e-31) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.6e-60) {
tmp = -x / B;
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.15d-31)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 2.6d-60) then
tmp = -x / b
else
tmp = (1.0d0 / b) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.15e-31) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.6e-60) {
tmp = -x / B;
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.15e-31: tmp = (-1.0 - x) / B elif F <= 2.6e-60: tmp = -x / B else: tmp = (1.0 / B) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.15e-31) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 2.6e-60) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 / B) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.15e-31) tmp = (-1.0 - x) / B; elseif (F <= 2.6e-60) tmp = -x / B; else tmp = (1.0 / B) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.15e-31], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.6e-60], N[((-x) / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.15 \cdot 10^{-31}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 2.6 \cdot 10^{-60}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.15e-31Initial program 71.4%
Taylor expanded in F around -inf 95.2%
Taylor expanded in B around 0 44.7%
associate-*r/44.7%
distribute-lft-in44.7%
metadata-eval44.7%
neg-mul-144.7%
Simplified44.7%
if -2.15e-31 < F < 2.5999999999999998e-60Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.5%
*-rgt-identity99.5%
Simplified99.5%
Taylor expanded in F around 0 74.2%
mul-1-neg74.2%
associate-*l/74.1%
distribute-rgt-neg-in74.1%
Simplified74.1%
Taylor expanded in B around 0 42.4%
associate-*r/42.4%
neg-mul-142.4%
Simplified42.4%
if 2.5999999999999998e-60 < F Initial program 57.6%
Taylor expanded in F around inf 74.8%
Taylor expanded in B around 0 55.4%
Taylor expanded in B around 0 61.8%
div-sub61.8%
Applied egg-rr61.8%
Final simplification49.0%
(FPCore (F B x) :precision binary64 (if (<= F -9.5e-32) (/ (- -1.0 x) B) (if (<= F 3e-60) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9.5e-32) {
tmp = (-1.0 - x) / B;
} else if (F <= 3e-60) {
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 <= (-9.5d-32)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 3d-60) 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 <= -9.5e-32) {
tmp = (-1.0 - x) / B;
} else if (F <= 3e-60) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9.5e-32: tmp = (-1.0 - x) / B elif F <= 3e-60: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -9.5e-32) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 3e-60) 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 <= -9.5e-32) tmp = (-1.0 - x) / B; elseif (F <= 3e-60) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9.5e-32], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3e-60], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9.5 \cdot 10^{-32}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 3 \cdot 10^{-60}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -9.4999999999999999e-32Initial program 71.4%
Taylor expanded in F around -inf 95.2%
Taylor expanded in B around 0 44.7%
associate-*r/44.7%
distribute-lft-in44.7%
metadata-eval44.7%
neg-mul-144.7%
Simplified44.7%
if -9.4999999999999999e-32 < F < 3.00000000000000019e-60Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.5%
*-rgt-identity99.5%
Simplified99.5%
Taylor expanded in F around 0 74.2%
mul-1-neg74.2%
associate-*l/74.1%
distribute-rgt-neg-in74.1%
Simplified74.1%
Taylor expanded in B around 0 42.4%
associate-*r/42.4%
neg-mul-142.4%
Simplified42.4%
if 3.00000000000000019e-60 < F Initial program 57.6%
Taylor expanded in F around inf 74.8%
Taylor expanded in B around 0 55.4%
Taylor expanded in B around 0 61.8%
Final simplification49.0%
(FPCore (F B x) :precision binary64 (if (or (<= x -5e-95) (not (<= x 1.95e-82))) (/ (- x) B) (/ 1.0 B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -5e-95) || !(x <= 1.95e-82)) {
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 <= (-5d-95)) .or. (.not. (x <= 1.95d-82))) 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 <= -5e-95) || !(x <= 1.95e-82)) {
tmp = -x / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -5e-95) or not (x <= 1.95e-82): tmp = -x / B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -5e-95) || !(x <= 1.95e-82)) 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 <= -5e-95) || ~((x <= 1.95e-82))) tmp = -x / B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -5e-95], N[Not[LessEqual[x, 1.95e-82]], $MachinePrecision]], N[((-x) / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5 \cdot 10^{-95} \lor \neg \left(x \leq 1.95 \cdot 10^{-82}\right):\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if x < -4.9999999999999998e-95 or 1.94999999999999987e-82 < x Initial program 82.6%
distribute-lft-neg-in82.6%
+-commutative82.6%
fma-def82.6%
+-commutative82.6%
*-commutative82.6%
fma-def82.6%
fma-def82.6%
metadata-eval82.6%
metadata-eval82.6%
associate-*r/82.7%
*-rgt-identity82.7%
Simplified82.7%
Taylor expanded in F around 0 83.9%
mul-1-neg83.9%
associate-*l/83.8%
distribute-rgt-neg-in83.8%
Simplified83.8%
Taylor expanded in B around 0 51.7%
associate-*r/51.7%
neg-mul-151.7%
Simplified51.7%
if -4.9999999999999998e-95 < x < 1.94999999999999987e-82Initial program 71.2%
Taylor expanded in F around inf 25.7%
Taylor expanded in B around 0 21.2%
Taylor expanded in B around 0 17.6%
Taylor expanded in x around 0 17.6%
Final simplification38.0%
(FPCore (F B x) :precision binary64 (if (<= F 3e-60) (/ (- x) B) (/ (- 1.0 x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 3e-60) {
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 <= 3d-60) 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 <= 3e-60) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 3e-60: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 3e-60) 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 <= 3e-60) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 3e-60], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 3 \cdot 10^{-60}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < 3.00000000000000019e-60Initial program 87.0%
distribute-lft-neg-in87.0%
+-commutative87.0%
fma-def87.0%
+-commutative87.0%
*-commutative87.0%
fma-def87.0%
fma-def87.0%
metadata-eval87.0%
metadata-eval87.0%
associate-*r/87.1%
*-rgt-identity87.1%
Simplified87.1%
Taylor expanded in F around 0 59.2%
mul-1-neg59.2%
associate-*l/59.2%
distribute-rgt-neg-in59.2%
Simplified59.2%
Taylor expanded in B around 0 32.7%
associate-*r/32.7%
neg-mul-132.7%
Simplified32.7%
if 3.00000000000000019e-60 < F Initial program 57.6%
Taylor expanded in F around inf 74.8%
Taylor expanded in B around 0 55.4%
Taylor expanded in B around 0 61.8%
Final simplification41.6%
(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 78.0%
Taylor expanded in F around inf 47.6%
Taylor expanded in B around 0 48.8%
Taylor expanded in B around 0 33.9%
Taylor expanded in x around 0 9.8%
Final simplification9.8%
herbie shell --seed 2023313
(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))))))