
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 26 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
(FPCore (F B x)
:precision binary64
(if (<= F -1.3e+38)
(- (/ -1.0 (sin B)) (* x (/ (cos B) (sin B))))
(if (<= F 200000000.0)
(-
(* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5))
(/ x (tan B)))
(+ (/ -1.0 (/ (tan B) x)) (/ 1.0 (sin B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.3e+38) {
tmp = (-1.0 / sin(B)) - (x * (cos(B) / sin(B)));
} else if (F <= 200000000.0) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / tan(B));
} else {
tmp = (-1.0 / (tan(B) / x)) + (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) :: tmp
if (f <= (-1.3d+38)) then
tmp = ((-1.0d0) / sin(b)) - (x * (cos(b) / sin(b)))
else if (f <= 200000000.0d0) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - (x / tan(b))
else
tmp = ((-1.0d0) / (tan(b) / x)) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.3e+38) {
tmp = (-1.0 / Math.sin(B)) - (x * (Math.cos(B) / Math.sin(B)));
} else if (F <= 200000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / Math.tan(B));
} else {
tmp = (-1.0 / (Math.tan(B) / x)) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.3e+38: tmp = (-1.0 / math.sin(B)) - (x * (math.cos(B) / math.sin(B))) elif F <= 200000000.0: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / math.tan(B)) else: tmp = (-1.0 / (math.tan(B) / x)) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.3e+38) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x * Float64(cos(B) / sin(B)))); elseif (F <= 200000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / tan(B))); else tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.3e+38) tmp = (-1.0 / sin(B)) - (x * (cos(B) / sin(B))); elseif (F <= 200000000.0) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - (x / tan(B)); else tmp = (-1.0 / (tan(B) / x)) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.3e+38], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(N[Cos[B], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 200000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.3 \cdot 10^{+38}:\\
\;\;\;\;\frac{-1}{\sin B} - x \cdot \frac{\cos B}{\sin B}\\
\mathbf{elif}\;F \leq 200000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.3e38Initial program 62.9%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around inf 99.7%
if -1.3e38 < F < 2e8Initial program 99.5%
div-inv99.7%
expm1-log1p-u73.9%
expm1-udef53.8%
Applied egg-rr53.8%
expm1-def73.9%
expm1-log1p99.7%
Simplified99.7%
if 2e8 < F Initial program 61.5%
div-inv61.7%
clear-num61.6%
Applied egg-rr61.6%
Taylor expanded in F around inf 99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(if (<= F -0.9)
(+ (* x (/ -1.0 (tan B))) (* F (/ 1.0 (* (sin B) (- (/ (+ x -1.0) F) F)))))
(if (<= F 1100.0)
(- (/ F (* (sin B) (sqrt 2.0))) (* x (/ 1.0 (tan B))))
(+ (/ -1.0 (/ (tan B) x)) (/ 1.0 (sin B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.9) {
tmp = (x * (-1.0 / tan(B))) + (F * (1.0 / (sin(B) * (((x + -1.0) / F) - F))));
} else if (F <= 1100.0) {
tmp = (F / (sin(B) * sqrt(2.0))) - (x * (1.0 / tan(B)));
} else {
tmp = (-1.0 / (tan(B) / x)) + (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) :: tmp
if (f <= (-0.9d0)) then
tmp = (x * ((-1.0d0) / tan(b))) + (f * (1.0d0 / (sin(b) * (((x + (-1.0d0)) / f) - f))))
else if (f <= 1100.0d0) then
tmp = (f / (sin(b) * sqrt(2.0d0))) - (x * (1.0d0 / tan(b)))
else
tmp = ((-1.0d0) / (tan(b) / x)) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.9) {
tmp = (x * (-1.0 / Math.tan(B))) + (F * (1.0 / (Math.sin(B) * (((x + -1.0) / F) - F))));
} else if (F <= 1100.0) {
tmp = (F / (Math.sin(B) * Math.sqrt(2.0))) - (x * (1.0 / Math.tan(B)));
} else {
tmp = (-1.0 / (Math.tan(B) / x)) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.9: tmp = (x * (-1.0 / math.tan(B))) + (F * (1.0 / (math.sin(B) * (((x + -1.0) / F) - F)))) elif F <= 1100.0: tmp = (F / (math.sin(B) * math.sqrt(2.0))) - (x * (1.0 / math.tan(B))) else: tmp = (-1.0 / (math.tan(B) / x)) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.9) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(F * Float64(1.0 / Float64(sin(B) * Float64(Float64(Float64(x + -1.0) / F) - F))))); elseif (F <= 1100.0) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(2.0))) - Float64(x * Float64(1.0 / tan(B)))); else tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.9) tmp = (x * (-1.0 / tan(B))) + (F * (1.0 / (sin(B) * (((x + -1.0) / F) - F)))); elseif (F <= 1100.0) tmp = (F / (sin(B) * sqrt(2.0))) - (x * (1.0 / tan(B))); else tmp = (-1.0 / (tan(B) / x)) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.9], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F * N[(1.0 / N[(N[Sin[B], $MachinePrecision] * N[(N[(N[(x + -1.0), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1100.0], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.9:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + F \cdot \frac{1}{\sin B \cdot \left(\frac{x + -1}{F} - F\right)}\\
\mathbf{elif}\;F \leq 1100:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{2}} - x \cdot \frac{1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -0.900000000000000022Initial program 67.3%
associate-*l/78.0%
associate-/l*77.9%
+-commutative77.9%
fma-def77.9%
fma-def77.9%
metadata-eval77.9%
metadata-eval77.9%
Applied egg-rr77.9%
Applied egg-rr56.3%
expm1-def56.3%
expm1-log1p78.0%
associate-/r*67.3%
Simplified67.3%
Taylor expanded in F around -inf 89.5%
+-commutative89.5%
mul-1-neg89.5%
unsub-neg89.5%
associate-*r/89.5%
distribute-lft-in89.5%
metadata-eval89.5%
associate-*r*89.5%
metadata-eval89.5%
neg-mul-189.5%
Simplified89.5%
associate-/l/99.5%
div-inv99.5%
add-sqr-sqrt46.7%
sqrt-unprod99.5%
sqr-neg99.5%
sqrt-unprod52.8%
add-sqr-sqrt99.5%
Applied egg-rr99.5%
if -0.900000000000000022 < F < 1100Initial program 99.5%
associate-*l/99.5%
associate-/l*99.5%
+-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in x around 0 99.5%
if 1100 < F Initial program 61.5%
div-inv61.7%
clear-num61.6%
Applied egg-rr61.6%
Taylor expanded in F around inf 99.7%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(if (<= F -0.14)
(+ (* x (/ -1.0 (tan B))) (* F (/ 1.0 (* (sin B) (- (/ (+ x -1.0) F) F)))))
(if (<= F 2.3e-10)
(- (/ F (* B (sqrt (+ 2.0 (* x 2.0))))) (* x (/ 1.0 (tan B))))
(+ (/ -1.0 (/ (tan B) x)) (/ 1.0 (sin B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.14) {
tmp = (x * (-1.0 / tan(B))) + (F * (1.0 / (sin(B) * (((x + -1.0) / F) - F))));
} else if (F <= 2.3e-10) {
tmp = (F / (B * sqrt((2.0 + (x * 2.0))))) - (x * (1.0 / tan(B)));
} else {
tmp = (-1.0 / (tan(B) / x)) + (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) :: tmp
if (f <= (-0.14d0)) then
tmp = (x * ((-1.0d0) / tan(b))) + (f * (1.0d0 / (sin(b) * (((x + (-1.0d0)) / f) - f))))
else if (f <= 2.3d-10) then
tmp = (f / (b * sqrt((2.0d0 + (x * 2.0d0))))) - (x * (1.0d0 / tan(b)))
else
tmp = ((-1.0d0) / (tan(b) / x)) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.14) {
tmp = (x * (-1.0 / Math.tan(B))) + (F * (1.0 / (Math.sin(B) * (((x + -1.0) / F) - F))));
} else if (F <= 2.3e-10) {
tmp = (F / (B * Math.sqrt((2.0 + (x * 2.0))))) - (x * (1.0 / Math.tan(B)));
} else {
tmp = (-1.0 / (Math.tan(B) / x)) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.14: tmp = (x * (-1.0 / math.tan(B))) + (F * (1.0 / (math.sin(B) * (((x + -1.0) / F) - F)))) elif F <= 2.3e-10: tmp = (F / (B * math.sqrt((2.0 + (x * 2.0))))) - (x * (1.0 / math.tan(B))) else: tmp = (-1.0 / (math.tan(B) / x)) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.14) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(F * Float64(1.0 / Float64(sin(B) * Float64(Float64(Float64(x + -1.0) / F) - F))))); elseif (F <= 2.3e-10) tmp = Float64(Float64(F / Float64(B * sqrt(Float64(2.0 + Float64(x * 2.0))))) - Float64(x * Float64(1.0 / tan(B)))); else tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.14) tmp = (x * (-1.0 / tan(B))) + (F * (1.0 / (sin(B) * (((x + -1.0) / F) - F)))); elseif (F <= 2.3e-10) tmp = (F / (B * sqrt((2.0 + (x * 2.0))))) - (x * (1.0 / tan(B))); else tmp = (-1.0 / (tan(B) / x)) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.14], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F * N[(1.0 / N[(N[Sin[B], $MachinePrecision] * N[(N[(N[(x + -1.0), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.3e-10], N[(N[(F / N[(B * N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.14:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + F \cdot \frac{1}{\sin B \cdot \left(\frac{x + -1}{F} - F\right)}\\
\mathbf{elif}\;F \leq 2.3 \cdot 10^{-10}:\\
\;\;\;\;\frac{F}{B \cdot \sqrt{2 + x \cdot 2}} - x \cdot \frac{1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -0.14000000000000001Initial program 67.3%
associate-*l/78.0%
associate-/l*77.9%
+-commutative77.9%
fma-def77.9%
fma-def77.9%
metadata-eval77.9%
metadata-eval77.9%
Applied egg-rr77.9%
Applied egg-rr56.3%
expm1-def56.3%
expm1-log1p78.0%
associate-/r*67.3%
Simplified67.3%
Taylor expanded in F around -inf 89.5%
+-commutative89.5%
mul-1-neg89.5%
unsub-neg89.5%
associate-*r/89.5%
distribute-lft-in89.5%
metadata-eval89.5%
associate-*r*89.5%
metadata-eval89.5%
neg-mul-189.5%
Simplified89.5%
associate-/l/99.5%
div-inv99.5%
add-sqr-sqrt46.7%
sqrt-unprod99.5%
sqr-neg99.5%
sqrt-unprod52.8%
add-sqr-sqrt99.5%
Applied egg-rr99.5%
if -0.14000000000000001 < F < 2.30000000000000007e-10Initial program 99.5%
associate-*l/99.5%
associate-/l*99.5%
+-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 89.7%
if 2.30000000000000007e-10 < F Initial program 62.7%
div-inv62.8%
clear-num62.8%
Applied egg-rr62.8%
Taylor expanded in F around inf 98.3%
Final simplification95.0%
(FPCore (F B x)
:precision binary64
(if (<= F -4.6e-7)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 2.3e-10)
(- (/ F (* B (sqrt (+ 2.0 (* x 2.0))))) (* x (/ 1.0 (tan B))))
(+ (/ -1.0 (/ (tan B) x)) (/ 1.0 (sin B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.6e-7) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 2.3e-10) {
tmp = (F / (B * sqrt((2.0 + (x * 2.0))))) - (x * (1.0 / tan(B)));
} else {
tmp = (-1.0 / (tan(B) / x)) + (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) :: tmp
if (f <= (-4.6d-7)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 2.3d-10) then
tmp = (f / (b * sqrt((2.0d0 + (x * 2.0d0))))) - (x * (1.0d0 / tan(b)))
else
tmp = ((-1.0d0) / (tan(b) / x)) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4.6e-7) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 2.3e-10) {
tmp = (F / (B * Math.sqrt((2.0 + (x * 2.0))))) - (x * (1.0 / Math.tan(B)));
} else {
tmp = (-1.0 / (Math.tan(B) / x)) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.6e-7: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 2.3e-10: tmp = (F / (B * math.sqrt((2.0 + (x * 2.0))))) - (x * (1.0 / math.tan(B))) else: tmp = (-1.0 / (math.tan(B) / x)) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.6e-7) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 2.3e-10) tmp = Float64(Float64(F / Float64(B * sqrt(Float64(2.0 + Float64(x * 2.0))))) - Float64(x * Float64(1.0 / tan(B)))); else tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4.6e-7) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 2.3e-10) tmp = (F / (B * sqrt((2.0 + (x * 2.0))))) - (x * (1.0 / tan(B))); else tmp = (-1.0 / (tan(B) / x)) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.6e-7], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.3e-10], N[(N[(F / N[(B * N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.6 \cdot 10^{-7}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 2.3 \cdot 10^{-10}:\\
\;\;\;\;\frac{F}{B \cdot \sqrt{2 + x \cdot 2}} - x \cdot \frac{1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -4.5999999999999999e-7Initial program 68.1%
Taylor expanded in F around -inf 99.2%
+-commutative99.2%
unsub-neg99.2%
un-div-inv99.2%
Applied egg-rr99.2%
if -4.5999999999999999e-7 < F < 2.30000000000000007e-10Initial program 99.5%
associate-*l/99.5%
associate-/l*99.5%
+-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 89.6%
if 2.30000000000000007e-10 < F Initial program 62.7%
div-inv62.8%
clear-num62.8%
Applied egg-rr62.8%
Taylor expanded in F around inf 98.3%
Final simplification95.0%
(FPCore (F B x)
:precision binary64
(if (<= F -7.2e-8)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -3.4e-98)
(- (/ F (* (sin B) (sqrt (+ 2.0 (* x 2.0))))) (/ x B))
(if (<= F 6e-54)
(/ (- x) (tan B))
(+ (/ -1.0 (/ (tan B) x)) (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.2e-8) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -3.4e-98) {
tmp = (F / (sin(B) * sqrt((2.0 + (x * 2.0))))) - (x / B);
} else if (F <= 6e-54) {
tmp = -x / tan(B);
} else {
tmp = (-1.0 / (tan(B) / x)) + (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) :: tmp
if (f <= (-7.2d-8)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-3.4d-98)) then
tmp = (f / (sin(b) * sqrt((2.0d0 + (x * 2.0d0))))) - (x / b)
else if (f <= 6d-54) then
tmp = -x / tan(b)
else
tmp = ((-1.0d0) / (tan(b) / x)) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -7.2e-8) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -3.4e-98) {
tmp = (F / (Math.sin(B) * Math.sqrt((2.0 + (x * 2.0))))) - (x / B);
} else if (F <= 6e-54) {
tmp = -x / Math.tan(B);
} else {
tmp = (-1.0 / (Math.tan(B) / x)) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.2e-8: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -3.4e-98: tmp = (F / (math.sin(B) * math.sqrt((2.0 + (x * 2.0))))) - (x / B) elif F <= 6e-54: tmp = -x / math.tan(B) else: tmp = (-1.0 / (math.tan(B) / x)) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.2e-8) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -3.4e-98) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)); elseif (F <= 6e-54) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -7.2e-8) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -3.4e-98) tmp = (F / (sin(B) * sqrt((2.0 + (x * 2.0))))) - (x / B); elseif (F <= 6e-54) tmp = -x / tan(B); else tmp = (-1.0 / (tan(B) / x)) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.2e-8], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.4e-98], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6e-54], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.2 \cdot 10^{-8}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -3.4 \cdot 10^{-98}:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{2 + x \cdot 2}} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 6 \cdot 10^{-54}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -7.19999999999999962e-8Initial program 68.4%
Taylor expanded in F around -inf 99.2%
+-commutative99.2%
unsub-neg99.2%
un-div-inv99.2%
Applied egg-rr99.2%
if -7.19999999999999962e-8 < F < -3.4000000000000001e-98Initial program 99.2%
associate-*l/99.2%
associate-/l*99.3%
+-commutative99.3%
fma-def99.3%
fma-def99.3%
metadata-eval99.3%
metadata-eval99.3%
Applied egg-rr99.3%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 85.6%
if -3.4000000000000001e-98 < F < 6.00000000000000018e-54Initial program 99.6%
associate-*l/99.6%
associate-/l*99.5%
+-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in x around inf 80.4%
mul-1-neg80.4%
Simplified80.4%
expm1-log1p-u55.8%
expm1-udef30.7%
associate-/l*30.7%
quot-tan30.7%
Applied egg-rr30.7%
expm1-def55.8%
expm1-log1p80.5%
Simplified80.5%
if 6.00000000000000018e-54 < F Initial program 64.9%
div-inv64.9%
clear-num64.9%
Applied egg-rr64.9%
Taylor expanded in F around inf 95.7%
Final simplification91.2%
(FPCore (F B x)
:precision binary64
(if (<= F -5.8e-8)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -6.5e-69)
(/ (* F (sqrt 0.5)) (sin B))
(if (<= F 1.4e-51)
(/ (- x) (tan B))
(- (/ 1.0 (sin B)) (* x (/ 1.0 (tan B))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.8e-8) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -6.5e-69) {
tmp = (F * sqrt(0.5)) / sin(B);
} else if (F <= 1.4e-51) {
tmp = -x / tan(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 <= (-5.8d-8)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-6.5d-69)) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else if (f <= 1.4d-51) then
tmp = -x / tan(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 <= -5.8e-8) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -6.5e-69) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else if (F <= 1.4e-51) {
tmp = -x / Math.tan(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 <= -5.8e-8: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -6.5e-69: tmp = (F * math.sqrt(0.5)) / math.sin(B) elif F <= 1.4e-51: tmp = -x / math.tan(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 <= -5.8e-8) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -6.5e-69) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); elseif (F <= 1.4e-51) tmp = Float64(Float64(-x) / tan(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 <= -5.8e-8) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -6.5e-69) tmp = (F * sqrt(0.5)) / sin(B); elseif (F <= 1.4e-51) tmp = -x / tan(B); else tmp = (1.0 / sin(B)) - (x * (1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5.8e-8], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -6.5e-69], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4e-51], N[((-x) / N[Tan[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 -5.8 \cdot 10^{-8}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -6.5 \cdot 10^{-69}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-51}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -5.8000000000000003e-8Initial program 68.4%
Taylor expanded in F around -inf 99.2%
+-commutative99.2%
unsub-neg99.2%
un-div-inv99.2%
Applied egg-rr99.2%
if -5.8000000000000003e-8 < F < -6.49999999999999951e-69Initial program 98.9%
associate-*l/99.1%
associate-/l*99.1%
+-commutative99.1%
fma-def99.1%
fma-def99.1%
metadata-eval99.1%
metadata-eval99.1%
Applied egg-rr99.1%
Taylor expanded in F around 0 99.7%
Taylor expanded in x around 0 99.1%
if -6.49999999999999951e-69 < F < 1.4e-51Initial program 99.6%
associate-*l/99.6%
associate-/l*99.5%
+-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in x around inf 77.8%
mul-1-neg77.8%
Simplified77.8%
expm1-log1p-u52.0%
expm1-udef29.2%
associate-/l*29.2%
quot-tan29.2%
Applied egg-rr29.2%
expm1-def52.1%
expm1-log1p78.0%
Simplified78.0%
if 1.4e-51 < F Initial program 64.9%
Taylor expanded in F around inf 95.7%
Final simplification90.6%
(FPCore (F B x)
:precision binary64
(if (<= F -5.8e-9)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -8e-68)
(/ (* F (sqrt 0.5)) (sin B))
(if (<= F 3.1e-52)
(/ (- x) (tan B))
(+ (/ -1.0 (/ (tan B) x)) (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.8e-9) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -8e-68) {
tmp = (F * sqrt(0.5)) / sin(B);
} else if (F <= 3.1e-52) {
tmp = -x / tan(B);
} else {
tmp = (-1.0 / (tan(B) / x)) + (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) :: tmp
if (f <= (-5.8d-9)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-8d-68)) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else if (f <= 3.1d-52) then
tmp = -x / tan(b)
else
tmp = ((-1.0d0) / (tan(b) / x)) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -5.8e-9) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -8e-68) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else if (F <= 3.1e-52) {
tmp = -x / Math.tan(B);
} else {
tmp = (-1.0 / (Math.tan(B) / x)) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5.8e-9: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -8e-68: tmp = (F * math.sqrt(0.5)) / math.sin(B) elif F <= 3.1e-52: tmp = -x / math.tan(B) else: tmp = (-1.0 / (math.tan(B) / x)) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5.8e-9) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -8e-68) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); elseif (F <= 3.1e-52) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -5.8e-9) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -8e-68) tmp = (F * sqrt(0.5)) / sin(B); elseif (F <= 3.1e-52) tmp = -x / tan(B); else tmp = (-1.0 / (tan(B) / x)) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5.8e-9], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -8e-68], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.1e-52], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5.8 \cdot 10^{-9}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -8 \cdot 10^{-68}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq 3.1 \cdot 10^{-52}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -5.79999999999999982e-9Initial program 68.4%
Taylor expanded in F around -inf 99.2%
+-commutative99.2%
unsub-neg99.2%
un-div-inv99.2%
Applied egg-rr99.2%
if -5.79999999999999982e-9 < F < -8.00000000000000053e-68Initial program 98.9%
associate-*l/99.1%
associate-/l*99.1%
+-commutative99.1%
fma-def99.1%
fma-def99.1%
metadata-eval99.1%
metadata-eval99.1%
Applied egg-rr99.1%
Taylor expanded in F around 0 99.7%
Taylor expanded in x around 0 99.1%
if -8.00000000000000053e-68 < F < 3.0999999999999999e-52Initial program 99.6%
associate-*l/99.6%
associate-/l*99.5%
+-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in x around inf 77.8%
mul-1-neg77.8%
Simplified77.8%
expm1-log1p-u52.0%
expm1-udef29.2%
associate-/l*29.2%
quot-tan29.2%
Applied egg-rr29.2%
expm1-def52.1%
expm1-log1p78.0%
Simplified78.0%
if 3.0999999999999999e-52 < F Initial program 64.9%
div-inv64.9%
clear-num64.9%
Applied egg-rr64.9%
Taylor expanded in F around inf 95.7%
Final simplification90.7%
(FPCore (F B x)
:precision binary64
(if (<= F -7.2e-8)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -7e-98)
(- (* (/ F (sin B)) (sqrt 0.5)) (/ x B))
(if (<= F 6.6e-52)
(/ (- x) (tan B))
(+ (/ -1.0 (/ (tan B) x)) (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.2e-8) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -7e-98) {
tmp = ((F / sin(B)) * sqrt(0.5)) - (x / B);
} else if (F <= 6.6e-52) {
tmp = -x / tan(B);
} else {
tmp = (-1.0 / (tan(B) / x)) + (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) :: tmp
if (f <= (-7.2d-8)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-7d-98)) then
tmp = ((f / sin(b)) * sqrt(0.5d0)) - (x / b)
else if (f <= 6.6d-52) then
tmp = -x / tan(b)
else
tmp = ((-1.0d0) / (tan(b) / x)) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -7.2e-8) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -7e-98) {
tmp = ((F / Math.sin(B)) * Math.sqrt(0.5)) - (x / B);
} else if (F <= 6.6e-52) {
tmp = -x / Math.tan(B);
} else {
tmp = (-1.0 / (Math.tan(B) / x)) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.2e-8: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -7e-98: tmp = ((F / math.sin(B)) * math.sqrt(0.5)) - (x / B) elif F <= 6.6e-52: tmp = -x / math.tan(B) else: tmp = (-1.0 / (math.tan(B) / x)) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.2e-8) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -7e-98) tmp = Float64(Float64(Float64(F / sin(B)) * sqrt(0.5)) - Float64(x / B)); elseif (F <= 6.6e-52) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -7.2e-8) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -7e-98) tmp = ((F / sin(B)) * sqrt(0.5)) - (x / B); elseif (F <= 6.6e-52) tmp = -x / tan(B); else tmp = (-1.0 / (tan(B) / x)) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.2e-8], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7e-98], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.6e-52], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.2 \cdot 10^{-8}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -7 \cdot 10^{-98}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 6.6 \cdot 10^{-52}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -7.19999999999999962e-8Initial program 68.4%
Taylor expanded in F around -inf 99.2%
+-commutative99.2%
unsub-neg99.2%
un-div-inv99.2%
Applied egg-rr99.2%
if -7.19999999999999962e-8 < F < -7.0000000000000004e-98Initial program 99.2%
Taylor expanded in B around 0 85.2%
Taylor expanded in F around 0 85.2%
Taylor expanded in x around 0 85.2%
if -7.0000000000000004e-98 < F < 6.5999999999999999e-52Initial program 99.6%
associate-*l/99.6%
associate-/l*99.5%
+-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in x around inf 80.4%
mul-1-neg80.4%
Simplified80.4%
expm1-log1p-u55.8%
expm1-udef30.7%
associate-/l*30.7%
quot-tan30.7%
Applied egg-rr30.7%
expm1-def55.8%
expm1-log1p80.5%
Simplified80.5%
if 6.5999999999999999e-52 < F Initial program 64.9%
div-inv64.9%
clear-num64.9%
Applied egg-rr64.9%
Taylor expanded in F around inf 95.7%
Final simplification91.2%
(FPCore (F B x)
:precision binary64
(if (<= F -7.2e-8)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -2.8e-98)
(- (/ F (/ (sin B) (sqrt 0.5))) (/ x B))
(if (<= F 3.3e-51)
(/ (- x) (tan B))
(+ (/ -1.0 (/ (tan B) x)) (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.2e-8) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -2.8e-98) {
tmp = (F / (sin(B) / sqrt(0.5))) - (x / B);
} else if (F <= 3.3e-51) {
tmp = -x / tan(B);
} else {
tmp = (-1.0 / (tan(B) / x)) + (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) :: tmp
if (f <= (-7.2d-8)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-2.8d-98)) then
tmp = (f / (sin(b) / sqrt(0.5d0))) - (x / b)
else if (f <= 3.3d-51) then
tmp = -x / tan(b)
else
tmp = ((-1.0d0) / (tan(b) / x)) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -7.2e-8) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -2.8e-98) {
tmp = (F / (Math.sin(B) / Math.sqrt(0.5))) - (x / B);
} else if (F <= 3.3e-51) {
tmp = -x / Math.tan(B);
} else {
tmp = (-1.0 / (Math.tan(B) / x)) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.2e-8: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -2.8e-98: tmp = (F / (math.sin(B) / math.sqrt(0.5))) - (x / B) elif F <= 3.3e-51: tmp = -x / math.tan(B) else: tmp = (-1.0 / (math.tan(B) / x)) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.2e-8) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -2.8e-98) tmp = Float64(Float64(F / Float64(sin(B) / sqrt(0.5))) - Float64(x / B)); elseif (F <= 3.3e-51) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -7.2e-8) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -2.8e-98) tmp = (F / (sin(B) / sqrt(0.5))) - (x / B); elseif (F <= 3.3e-51) tmp = -x / tan(B); else tmp = (-1.0 / (tan(B) / x)) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.2e-8], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.8e-98], N[(N[(F / N[(N[Sin[B], $MachinePrecision] / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.3e-51], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.2 \cdot 10^{-8}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -2.8 \cdot 10^{-98}:\\
\;\;\;\;\frac{F}{\frac{\sin B}{\sqrt{0.5}}} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.3 \cdot 10^{-51}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -7.19999999999999962e-8Initial program 68.4%
Taylor expanded in F around -inf 99.2%
+-commutative99.2%
unsub-neg99.2%
un-div-inv99.2%
Applied egg-rr99.2%
if -7.19999999999999962e-8 < F < -2.7999999999999999e-98Initial program 99.2%
Taylor expanded in B around 0 85.2%
Taylor expanded in F around 0 85.2%
Taylor expanded in x around 0 85.3%
associate-/l*85.4%
Simplified85.4%
if -2.7999999999999999e-98 < F < 3.29999999999999973e-51Initial program 99.6%
associate-*l/99.6%
associate-/l*99.5%
+-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in x around inf 80.4%
mul-1-neg80.4%
Simplified80.4%
expm1-log1p-u55.8%
expm1-udef30.7%
associate-/l*30.7%
quot-tan30.7%
Applied egg-rr30.7%
expm1-def55.8%
expm1-log1p80.5%
Simplified80.5%
if 3.29999999999999973e-51 < F Initial program 64.9%
div-inv64.9%
clear-num64.9%
Applied egg-rr64.9%
Taylor expanded in F around inf 95.7%
Final simplification91.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 (sin B)) (/ x B))))
(if (<= F -2.9e+237)
t_0
(if (<= F -1.6e+153)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -4.6e-7)
t_0
(if (<= F -3.5e-72)
(* F (/ (sqrt 0.5) (sin B)))
(if (<= F 1100.0)
(/ (- x) (tan B))
(- (/ 1.0 (sin B)) (/ x B)))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / sin(B)) - (x / B);
double tmp;
if (F <= -2.9e+237) {
tmp = t_0;
} else if (F <= -1.6e+153) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -4.6e-7) {
tmp = t_0;
} else if (F <= -3.5e-72) {
tmp = F * (sqrt(0.5) / sin(B));
} else if (F <= 1100.0) {
tmp = -x / tan(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / sin(b)) - (x / b)
if (f <= (-2.9d+237)) then
tmp = t_0
else if (f <= (-1.6d+153)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-4.6d-7)) then
tmp = t_0
else if (f <= (-3.5d-72)) then
tmp = f * (sqrt(0.5d0) / sin(b))
else if (f <= 1100.0d0) then
tmp = -x / tan(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / Math.sin(B)) - (x / B);
double tmp;
if (F <= -2.9e+237) {
tmp = t_0;
} else if (F <= -1.6e+153) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -4.6e-7) {
tmp = t_0;
} else if (F <= -3.5e-72) {
tmp = F * (Math.sqrt(0.5) / Math.sin(B));
} else if (F <= 1100.0) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / math.sin(B)) - (x / B) tmp = 0 if F <= -2.9e+237: tmp = t_0 elif F <= -1.6e+153: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -4.6e-7: tmp = t_0 elif F <= -3.5e-72: tmp = F * (math.sqrt(0.5) / math.sin(B)) elif F <= 1100.0: tmp = -x / math.tan(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) tmp = 0.0 if (F <= -2.9e+237) tmp = t_0; elseif (F <= -1.6e+153) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -4.6e-7) tmp = t_0; elseif (F <= -3.5e-72) tmp = Float64(F * Float64(sqrt(0.5) / sin(B))); elseif (F <= 1100.0) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / sin(B)) - (x / B); tmp = 0.0; if (F <= -2.9e+237) tmp = t_0; elseif (F <= -1.6e+153) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -4.6e-7) tmp = t_0; elseif (F <= -3.5e-72) tmp = F * (sqrt(0.5) / sin(B)); elseif (F <= 1100.0) tmp = -x / tan(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.9e+237], t$95$0, If[LessEqual[F, -1.6e+153], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.6e-7], t$95$0, If[LessEqual[F, -3.5e-72], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1100.0], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -2.9 \cdot 10^{+237}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -1.6 \cdot 10^{+153}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -4.6 \cdot 10^{-7}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -3.5 \cdot 10^{-72}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq 1100:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.9000000000000001e237 or -1.6000000000000001e153 < F < -4.5999999999999999e-7Initial program 70.0%
Taylor expanded in B around 0 55.2%
Taylor expanded in F around -inf 84.0%
mul-1-neg84.0%
distribute-neg-in84.0%
distribute-neg-frac84.0%
metadata-eval84.0%
unsub-neg84.0%
Simplified84.0%
if -2.9000000000000001e237 < F < -1.6000000000000001e153Initial program 63.7%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 85.7%
if -4.5999999999999999e-7 < F < -3.5e-72Initial program 99.0%
associate-*l/99.1%
associate-/l*99.2%
+-commutative99.2%
fma-def99.2%
fma-def99.2%
metadata-eval99.2%
metadata-eval99.2%
Applied egg-rr99.2%
Taylor expanded in F around 0 99.7%
Taylor expanded in x around 0 90.3%
*-lft-identity90.3%
times-frac90.1%
/-rgt-identity90.1%
Simplified90.1%
if -3.5e-72 < F < 1100Initial program 99.6%
associate-*l/99.6%
associate-/l*99.5%
+-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in x around inf 76.2%
mul-1-neg76.2%
Simplified76.2%
expm1-log1p-u49.9%
expm1-udef28.4%
associate-/l*28.4%
quot-tan28.4%
Applied egg-rr28.4%
expm1-def49.9%
expm1-log1p76.4%
Simplified76.4%
if 1100 < F Initial program 61.5%
Taylor expanded in B around 0 37.6%
Taylor expanded in F around inf 76.1%
Final simplification79.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 (sin B)) (/ x B))))
(if (<= F -9.2e+231)
t_0
(if (<= F -4.5e+149)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -4.6e-7)
t_0
(if (<= F -1.1e-69)
(/ (* F (sqrt 0.5)) (sin B))
(if (<= F 3100.0)
(/ (- x) (tan B))
(- (/ 1.0 (sin B)) (/ x B)))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / sin(B)) - (x / B);
double tmp;
if (F <= -9.2e+231) {
tmp = t_0;
} else if (F <= -4.5e+149) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -4.6e-7) {
tmp = t_0;
} else if (F <= -1.1e-69) {
tmp = (F * sqrt(0.5)) / sin(B);
} else if (F <= 3100.0) {
tmp = -x / tan(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / sin(b)) - (x / b)
if (f <= (-9.2d+231)) then
tmp = t_0
else if (f <= (-4.5d+149)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-4.6d-7)) then
tmp = t_0
else if (f <= (-1.1d-69)) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else if (f <= 3100.0d0) then
tmp = -x / tan(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / Math.sin(B)) - (x / B);
double tmp;
if (F <= -9.2e+231) {
tmp = t_0;
} else if (F <= -4.5e+149) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -4.6e-7) {
tmp = t_0;
} else if (F <= -1.1e-69) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else if (F <= 3100.0) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / math.sin(B)) - (x / B) tmp = 0 if F <= -9.2e+231: tmp = t_0 elif F <= -4.5e+149: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -4.6e-7: tmp = t_0 elif F <= -1.1e-69: tmp = (F * math.sqrt(0.5)) / math.sin(B) elif F <= 3100.0: tmp = -x / math.tan(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) tmp = 0.0 if (F <= -9.2e+231) tmp = t_0; elseif (F <= -4.5e+149) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -4.6e-7) tmp = t_0; elseif (F <= -1.1e-69) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); elseif (F <= 3100.0) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / sin(B)) - (x / B); tmp = 0.0; if (F <= -9.2e+231) tmp = t_0; elseif (F <= -4.5e+149) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -4.6e-7) tmp = t_0; elseif (F <= -1.1e-69) tmp = (F * sqrt(0.5)) / sin(B); elseif (F <= 3100.0) tmp = -x / tan(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -9.2e+231], t$95$0, If[LessEqual[F, -4.5e+149], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.6e-7], t$95$0, If[LessEqual[F, -1.1e-69], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3100.0], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -9.2 \cdot 10^{+231}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -4.5 \cdot 10^{+149}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -4.6 \cdot 10^{-7}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -1.1 \cdot 10^{-69}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq 3100:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -9.19999999999999997e231 or -4.49999999999999982e149 < F < -4.5999999999999999e-7Initial program 70.0%
Taylor expanded in B around 0 55.2%
Taylor expanded in F around -inf 84.0%
mul-1-neg84.0%
distribute-neg-in84.0%
distribute-neg-frac84.0%
metadata-eval84.0%
unsub-neg84.0%
Simplified84.0%
if -9.19999999999999997e231 < F < -4.49999999999999982e149Initial program 63.7%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 85.7%
if -4.5999999999999999e-7 < F < -1.1e-69Initial program 99.0%
associate-*l/99.1%
associate-/l*99.2%
+-commutative99.2%
fma-def99.2%
fma-def99.2%
metadata-eval99.2%
metadata-eval99.2%
Applied egg-rr99.2%
Taylor expanded in F around 0 99.7%
Taylor expanded in x around 0 90.3%
if -1.1e-69 < F < 3100Initial program 99.6%
associate-*l/99.6%
associate-/l*99.5%
+-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in x around inf 76.2%
mul-1-neg76.2%
Simplified76.2%
expm1-log1p-u49.9%
expm1-udef28.4%
associate-/l*28.4%
quot-tan28.4%
Applied egg-rr28.4%
expm1-def49.9%
expm1-log1p76.4%
Simplified76.4%
if 3100 < F Initial program 61.5%
Taylor expanded in B around 0 37.6%
Taylor expanded in F around inf 76.1%
Final simplification79.6%
(FPCore (F B x)
:precision binary64
(if (<= F -5.8e-9)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -1.95e-70)
(/ (* F (sqrt 0.5)) (sin B))
(if (<= F 8000.0) (/ (- x) (tan B)) (- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.8e-9) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -1.95e-70) {
tmp = (F * sqrt(0.5)) / sin(B);
} else if (F <= 8000.0) {
tmp = -x / tan(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-5.8d-9)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-1.95d-70)) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else if (f <= 8000.0d0) then
tmp = -x / tan(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -5.8e-9) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -1.95e-70) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else if (F <= 8000.0) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5.8e-9: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -1.95e-70: tmp = (F * math.sqrt(0.5)) / math.sin(B) elif F <= 8000.0: tmp = -x / math.tan(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5.8e-9) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -1.95e-70) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); elseif (F <= 8000.0) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -5.8e-9) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -1.95e-70) tmp = (F * sqrt(0.5)) / sin(B); elseif (F <= 8000.0) tmp = -x / tan(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5.8e-9], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.95e-70], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8000.0], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5.8 \cdot 10^{-9}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -1.95 \cdot 10^{-70}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq 8000:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -5.79999999999999982e-9Initial program 68.4%
Taylor expanded in F around -inf 99.2%
+-commutative99.2%
unsub-neg99.2%
un-div-inv99.2%
Applied egg-rr99.2%
if -5.79999999999999982e-9 < F < -1.9500000000000001e-70Initial program 98.9%
associate-*l/99.1%
associate-/l*99.1%
+-commutative99.1%
fma-def99.1%
fma-def99.1%
metadata-eval99.1%
metadata-eval99.1%
Applied egg-rr99.1%
Taylor expanded in F around 0 99.7%
Taylor expanded in x around 0 99.1%
if -1.9500000000000001e-70 < F < 8e3Initial program 99.6%
associate-*l/99.6%
associate-/l*99.5%
+-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in x around inf 76.2%
mul-1-neg76.2%
Simplified76.2%
expm1-log1p-u49.9%
expm1-udef28.4%
associate-/l*28.4%
quot-tan28.4%
Applied egg-rr28.4%
expm1-def49.9%
expm1-log1p76.4%
Simplified76.4%
if 8e3 < F Initial program 61.5%
Taylor expanded in B around 0 37.6%
Taylor expanded in F around inf 76.1%
Final simplification84.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 (sin B)) (/ x B))))
(if (<= F -5.6e+235)
t_0
(if (<= F -2.4e+154)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -780.0)
t_0
(if (<= F -2.2e-97)
(- (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= F 1100.0)
(/ (- x) (tan B))
(- (/ 1.0 (sin B)) (/ x B)))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / sin(B)) - (x / B);
double tmp;
if (F <= -5.6e+235) {
tmp = t_0;
} else if (F <= -2.4e+154) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -780.0) {
tmp = t_0;
} else if (F <= -2.2e-97) {
tmp = (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 1100.0) {
tmp = -x / tan(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / sin(b)) - (x / b)
if (f <= (-5.6d+235)) then
tmp = t_0
else if (f <= (-2.4d+154)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-780.0d0)) then
tmp = t_0
else if (f <= (-2.2d-97)) then
tmp = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (f <= 1100.0d0) then
tmp = -x / tan(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / Math.sin(B)) - (x / B);
double tmp;
if (F <= -5.6e+235) {
tmp = t_0;
} else if (F <= -2.4e+154) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -780.0) {
tmp = t_0;
} else if (F <= -2.2e-97) {
tmp = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 1100.0) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / math.sin(B)) - (x / B) tmp = 0 if F <= -5.6e+235: tmp = t_0 elif F <= -2.4e+154: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -780.0: tmp = t_0 elif F <= -2.2e-97: tmp = (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif F <= 1100.0: tmp = -x / math.tan(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) tmp = 0.0 if (F <= -5.6e+235) tmp = t_0; elseif (F <= -2.4e+154) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -780.0) tmp = t_0; elseif (F <= -2.2e-97) tmp = Float64(Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 1100.0) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / sin(B)) - (x / B); tmp = 0.0; if (F <= -5.6e+235) tmp = t_0; elseif (F <= -2.4e+154) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -780.0) tmp = t_0; elseif (F <= -2.2e-97) tmp = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (F <= 1100.0) tmp = -x / tan(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.6e+235], t$95$0, If[LessEqual[F, -2.4e+154], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -780.0], t$95$0, If[LessEqual[F, -2.2e-97], N[(N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1100.0], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -5.6 \cdot 10^{+235}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -2.4 \cdot 10^{+154}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -780:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -2.2 \cdot 10^{-97}:\\
\;\;\;\;{\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1100:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -5.60000000000000052e235 or -2.40000000000000015e154 < F < -780Initial program 69.0%
Taylor expanded in B around 0 53.7%
Taylor expanded in F around -inf 83.4%
mul-1-neg83.4%
distribute-neg-in83.4%
distribute-neg-frac83.4%
metadata-eval83.4%
unsub-neg83.4%
Simplified83.4%
if -5.60000000000000052e235 < F < -2.40000000000000015e154Initial program 63.7%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 85.7%
if -780 < F < -2.1999999999999999e-97Initial program 99.2%
Taylor expanded in B around 0 82.6%
Taylor expanded in B around 0 64.5%
if -2.1999999999999999e-97 < F < 1100Initial program 99.6%
associate-*l/99.6%
associate-/l*99.5%
+-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in x around inf 78.5%
mul-1-neg78.5%
Simplified78.5%
expm1-log1p-u53.1%
expm1-udef29.8%
associate-/l*29.8%
quot-tan29.8%
Applied egg-rr29.8%
expm1-def53.2%
expm1-log1p78.6%
Simplified78.6%
if 1100 < F Initial program 61.5%
Taylor expanded in B around 0 37.6%
Taylor expanded in F around inf 76.1%
Final simplification78.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 (sin B)) (/ x B))))
(if (<= F -2.3e+234)
t_0
(if (<= F -1.1e+153)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -7.2e-8)
t_0
(if (<= F -6.2e-98)
(- (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x B))
(if (<= F 1100.0)
(/ (- x) (tan B))
(- (/ 1.0 (sin B)) (/ x B)))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / sin(B)) - (x / B);
double tmp;
if (F <= -2.3e+234) {
tmp = t_0;
} else if (F <= -1.1e+153) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -7.2e-8) {
tmp = t_0;
} else if (F <= -6.2e-98) {
tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else if (F <= 1100.0) {
tmp = -x / tan(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / sin(b)) - (x / b)
if (f <= (-2.3d+234)) then
tmp = t_0
else if (f <= (-1.1d+153)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-7.2d-8)) then
tmp = t_0
else if (f <= (-6.2d-98)) then
tmp = ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / b)
else if (f <= 1100.0d0) then
tmp = -x / tan(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / Math.sin(B)) - (x / B);
double tmp;
if (F <= -2.3e+234) {
tmp = t_0;
} else if (F <= -1.1e+153) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -7.2e-8) {
tmp = t_0;
} else if (F <= -6.2e-98) {
tmp = ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else if (F <= 1100.0) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / math.sin(B)) - (x / B) tmp = 0 if F <= -2.3e+234: tmp = t_0 elif F <= -1.1e+153: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -7.2e-8: tmp = t_0 elif F <= -6.2e-98: tmp = ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B) elif F <= 1100.0: tmp = -x / math.tan(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) tmp = 0.0 if (F <= -2.3e+234) tmp = t_0; elseif (F <= -1.1e+153) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -7.2e-8) tmp = t_0; elseif (F <= -6.2e-98) tmp = Float64(Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)); elseif (F <= 1100.0) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / sin(B)) - (x / B); tmp = 0.0; if (F <= -2.3e+234) tmp = t_0; elseif (F <= -1.1e+153) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -7.2e-8) tmp = t_0; elseif (F <= -6.2e-98) tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B); elseif (F <= 1100.0) tmp = -x / tan(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.3e+234], t$95$0, If[LessEqual[F, -1.1e+153], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7.2e-8], t$95$0, If[LessEqual[F, -6.2e-98], N[(N[(N[(F / B), $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, 1100.0], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -2.3 \cdot 10^{+234}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -1.1 \cdot 10^{+153}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -7.2 \cdot 10^{-8}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -6.2 \cdot 10^{-98}:\\
\;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1100:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.3000000000000001e234 or -1.1e153 < F < -7.19999999999999962e-8Initial program 70.5%
Taylor expanded in B around 0 54.3%
Taylor expanded in F around -inf 82.6%
mul-1-neg82.6%
distribute-neg-in82.6%
distribute-neg-frac82.6%
metadata-eval82.6%
unsub-neg82.6%
Simplified82.6%
if -2.3000000000000001e234 < F < -1.1e153Initial program 63.7%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 85.7%
if -7.19999999999999962e-8 < F < -6.2e-98Initial program 99.2%
Taylor expanded in B around 0 85.2%
Taylor expanded in F around 0 85.2%
Taylor expanded in B around 0 64.1%
if -6.2e-98 < F < 1100Initial program 99.6%
associate-*l/99.6%
associate-/l*99.5%
+-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in x around inf 78.5%
mul-1-neg78.5%
Simplified78.5%
expm1-log1p-u53.1%
expm1-udef29.8%
associate-/l*29.8%
quot-tan29.8%
Applied egg-rr29.8%
expm1-def53.2%
expm1-log1p78.6%
Simplified78.6%
if 1100 < F Initial program 61.5%
Taylor expanded in B around 0 37.6%
Taylor expanded in F around inf 76.1%
Final simplification78.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 (sin B)) (/ x B))))
(if (<= F -5.5e+231)
t_0
(if (<= F -2.95e+155)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -7.2e-8)
t_0
(if (<= F -7.6e-98)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(if (<= F 2300.0)
(/ (- x) (tan B))
(- (/ 1.0 (sin B)) (/ x B)))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / sin(B)) - (x / B);
double tmp;
if (F <= -5.5e+231) {
tmp = t_0;
} else if (F <= -2.95e+155) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -7.2e-8) {
tmp = t_0;
} else if (F <= -7.6e-98) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 2300.0) {
tmp = -x / tan(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / sin(b)) - (x / b)
if (f <= (-5.5d+231)) then
tmp = t_0
else if (f <= (-2.95d+155)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-7.2d-8)) then
tmp = t_0
else if (f <= (-7.6d-98)) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
else if (f <= 2300.0d0) then
tmp = -x / tan(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / Math.sin(B)) - (x / B);
double tmp;
if (F <= -5.5e+231) {
tmp = t_0;
} else if (F <= -2.95e+155) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -7.2e-8) {
tmp = t_0;
} else if (F <= -7.6e-98) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 2300.0) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / math.sin(B)) - (x / B) tmp = 0 if F <= -5.5e+231: tmp = t_0 elif F <= -2.95e+155: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -7.2e-8: tmp = t_0 elif F <= -7.6e-98: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B elif F <= 2300.0: tmp = -x / math.tan(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) tmp = 0.0 if (F <= -5.5e+231) tmp = t_0; elseif (F <= -2.95e+155) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -7.2e-8) tmp = t_0; elseif (F <= -7.6e-98) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B); elseif (F <= 2300.0) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / sin(B)) - (x / B); tmp = 0.0; if (F <= -5.5e+231) tmp = t_0; elseif (F <= -2.95e+155) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -7.2e-8) tmp = t_0; elseif (F <= -7.6e-98) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; elseif (F <= 2300.0) tmp = -x / tan(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.5e+231], t$95$0, If[LessEqual[F, -2.95e+155], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7.2e-8], t$95$0, If[LessEqual[F, -7.6e-98], 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, 2300.0], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -5.5 \cdot 10^{+231}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -2.95 \cdot 10^{+155}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -7.2 \cdot 10^{-8}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -7.6 \cdot 10^{-98}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{elif}\;F \leq 2300:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -5.5e231 or -2.95e155 < F < -7.19999999999999962e-8Initial program 70.5%
Taylor expanded in B around 0 54.3%
Taylor expanded in F around -inf 82.6%
mul-1-neg82.6%
distribute-neg-in82.6%
distribute-neg-frac82.6%
metadata-eval82.6%
unsub-neg82.6%
Simplified82.6%
if -5.5e231 < F < -2.95e155Initial program 63.7%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 85.7%
if -7.19999999999999962e-8 < F < -7.6000000000000006e-98Initial program 99.2%
associate-*l/99.2%
associate-/l*99.3%
+-commutative99.3%
fma-def99.3%
fma-def99.3%
metadata-eval99.3%
metadata-eval99.3%
Applied egg-rr99.3%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 64.1%
if -7.6000000000000006e-98 < F < 2300Initial program 99.6%
associate-*l/99.6%
associate-/l*99.5%
+-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in x around inf 78.5%
mul-1-neg78.5%
Simplified78.5%
expm1-log1p-u53.1%
expm1-udef29.8%
associate-/l*29.8%
quot-tan29.8%
Applied egg-rr29.8%
expm1-def53.2%
expm1-log1p78.6%
Simplified78.6%
if 2300 < F Initial program 61.5%
Taylor expanded in B around 0 37.6%
Taylor expanded in F around inf 76.1%
Final simplification78.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- x) (tan B))) (t_1 (- (/ -1.0 (sin B)) (/ x B))))
(if (<= F -2e+199)
t_1
(if (<= F -2.8e+177)
t_0
(if (<= F -230.0)
t_1
(if (or (<= F 15500.0)
(and (not (<= F 1.5e+89))
(or (<= F 1.46e+147)
(and (not (<= F 1.6e+169)) (<= F 5e+185)))))
t_0
(/ 1.0 (sin B))))))))
double code(double F, double B, double x) {
double t_0 = -x / tan(B);
double t_1 = (-1.0 / sin(B)) - (x / B);
double tmp;
if (F <= -2e+199) {
tmp = t_1;
} else if (F <= -2.8e+177) {
tmp = t_0;
} else if (F <= -230.0) {
tmp = t_1;
} else if ((F <= 15500.0) || (!(F <= 1.5e+89) && ((F <= 1.46e+147) || (!(F <= 1.6e+169) && (F <= 5e+185))))) {
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) :: t_1
real(8) :: tmp
t_0 = -x / tan(b)
t_1 = ((-1.0d0) / sin(b)) - (x / b)
if (f <= (-2d+199)) then
tmp = t_1
else if (f <= (-2.8d+177)) then
tmp = t_0
else if (f <= (-230.0d0)) then
tmp = t_1
else if ((f <= 15500.0d0) .or. (.not. (f <= 1.5d+89)) .and. (f <= 1.46d+147) .or. (.not. (f <= 1.6d+169)) .and. (f <= 5d+185)) 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 = -x / Math.tan(B);
double t_1 = (-1.0 / Math.sin(B)) - (x / B);
double tmp;
if (F <= -2e+199) {
tmp = t_1;
} else if (F <= -2.8e+177) {
tmp = t_0;
} else if (F <= -230.0) {
tmp = t_1;
} else if ((F <= 15500.0) || (!(F <= 1.5e+89) && ((F <= 1.46e+147) || (!(F <= 1.6e+169) && (F <= 5e+185))))) {
tmp = t_0;
} else {
tmp = 1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): t_0 = -x / math.tan(B) t_1 = (-1.0 / math.sin(B)) - (x / B) tmp = 0 if F <= -2e+199: tmp = t_1 elif F <= -2.8e+177: tmp = t_0 elif F <= -230.0: tmp = t_1 elif (F <= 15500.0) or (not (F <= 1.5e+89) and ((F <= 1.46e+147) or (not (F <= 1.6e+169) and (F <= 5e+185)))): tmp = t_0 else: tmp = 1.0 / math.sin(B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-x) / tan(B)) t_1 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) tmp = 0.0 if (F <= -2e+199) tmp = t_1; elseif (F <= -2.8e+177) tmp = t_0; elseif (F <= -230.0) tmp = t_1; elseif ((F <= 15500.0) || (!(F <= 1.5e+89) && ((F <= 1.46e+147) || (!(F <= 1.6e+169) && (F <= 5e+185))))) tmp = t_0; else tmp = Float64(1.0 / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = -x / tan(B); t_1 = (-1.0 / sin(B)) - (x / B); tmp = 0.0; if (F <= -2e+199) tmp = t_1; elseif (F <= -2.8e+177) tmp = t_0; elseif (F <= -230.0) tmp = t_1; elseif ((F <= 15500.0) || (~((F <= 1.5e+89)) && ((F <= 1.46e+147) || (~((F <= 1.6e+169)) && (F <= 5e+185))))) tmp = t_0; else tmp = 1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2e+199], t$95$1, If[LessEqual[F, -2.8e+177], t$95$0, If[LessEqual[F, -230.0], t$95$1, If[Or[LessEqual[F, 15500.0], And[N[Not[LessEqual[F, 1.5e+89]], $MachinePrecision], Or[LessEqual[F, 1.46e+147], And[N[Not[LessEqual[F, 1.6e+169]], $MachinePrecision], LessEqual[F, 5e+185]]]]], t$95$0, N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x}{\tan B}\\
t_1 := \frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -2 \cdot 10^{+199}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -2.8 \cdot 10^{+177}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -230:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 15500 \lor \neg \left(F \leq 1.5 \cdot 10^{+89}\right) \land \left(F \leq 1.46 \cdot 10^{+147} \lor \neg \left(F \leq 1.6 \cdot 10^{+169}\right) \land F \leq 5 \cdot 10^{+185}\right):\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -2.00000000000000019e199 or -2.80000000000000002e177 < F < -230Initial program 64.8%
Taylor expanded in B around 0 49.1%
Taylor expanded in F around -inf 82.5%
mul-1-neg82.5%
distribute-neg-in82.5%
distribute-neg-frac82.5%
metadata-eval82.5%
unsub-neg82.5%
Simplified82.5%
if -2.00000000000000019e199 < F < -2.80000000000000002e177 or -230 < F < 15500 or 1.50000000000000006e89 < F < 1.46000000000000007e147 or 1.5999999999999999e169 < F < 4.9999999999999999e185Initial program 97.1%
associate-*l/98.6%
associate-/l*98.6%
+-commutative98.6%
fma-def98.6%
fma-def98.6%
metadata-eval98.6%
metadata-eval98.6%
Applied egg-rr98.6%
Taylor expanded in F around 0 87.8%
Taylor expanded in x around inf 73.5%
mul-1-neg73.5%
Simplified73.5%
expm1-log1p-u45.2%
expm1-udef29.3%
associate-/l*29.3%
quot-tan29.3%
Applied egg-rr29.3%
expm1-def45.2%
expm1-log1p73.6%
Simplified73.6%
if 15500 < F < 1.50000000000000006e89 or 1.46000000000000007e147 < F < 1.5999999999999999e169 or 4.9999999999999999e185 < F Initial program 55.3%
associate-*l/66.3%
associate-/l*66.3%
+-commutative66.3%
fma-def66.3%
fma-def66.3%
metadata-eval66.3%
metadata-eval66.3%
Applied egg-rr66.3%
Taylor expanded in F around inf 99.6%
Taylor expanded in B around 0 78.0%
Taylor expanded in x around 0 67.8%
Final simplification75.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- x) (tan B))) (t_1 (- (/ -1.0 (sin B)) (/ x B))))
(if (<= F -6e+199)
t_1
(if (<= F -2.8e+177)
t_0
(if (<= F -7.8)
t_1
(if (<= F 60000.0) t_0 (- (/ 1.0 (sin B)) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = -x / tan(B);
double t_1 = (-1.0 / sin(B)) - (x / B);
double tmp;
if (F <= -6e+199) {
tmp = t_1;
} else if (F <= -2.8e+177) {
tmp = t_0;
} else if (F <= -7.8) {
tmp = t_1;
} else if (F <= 60000.0) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = -x / tan(b)
t_1 = ((-1.0d0) / sin(b)) - (x / b)
if (f <= (-6d+199)) then
tmp = t_1
else if (f <= (-2.8d+177)) then
tmp = t_0
else if (f <= (-7.8d0)) then
tmp = t_1
else if (f <= 60000.0d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = -x / Math.tan(B);
double t_1 = (-1.0 / Math.sin(B)) - (x / B);
double tmp;
if (F <= -6e+199) {
tmp = t_1;
} else if (F <= -2.8e+177) {
tmp = t_0;
} else if (F <= -7.8) {
tmp = t_1;
} else if (F <= 60000.0) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = -x / math.tan(B) t_1 = (-1.0 / math.sin(B)) - (x / B) tmp = 0 if F <= -6e+199: tmp = t_1 elif F <= -2.8e+177: tmp = t_0 elif F <= -7.8: tmp = t_1 elif F <= 60000.0: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-x) / tan(B)) t_1 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) tmp = 0.0 if (F <= -6e+199) tmp = t_1; elseif (F <= -2.8e+177) tmp = t_0; elseif (F <= -7.8) tmp = t_1; elseif (F <= 60000.0) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = -x / tan(B); t_1 = (-1.0 / sin(B)) - (x / B); tmp = 0.0; if (F <= -6e+199) tmp = t_1; elseif (F <= -2.8e+177) tmp = t_0; elseif (F <= -7.8) tmp = t_1; elseif (F <= 60000.0) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6e+199], t$95$1, If[LessEqual[F, -2.8e+177], t$95$0, If[LessEqual[F, -7.8], t$95$1, If[LessEqual[F, 60000.0], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x}{\tan B}\\
t_1 := \frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -6 \cdot 10^{+199}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -2.8 \cdot 10^{+177}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -7.8:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 60000:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -6.0000000000000002e199 or -2.80000000000000002e177 < F < -7.79999999999999982Initial program 64.8%
Taylor expanded in B around 0 49.1%
Taylor expanded in F around -inf 82.5%
mul-1-neg82.5%
distribute-neg-in82.5%
distribute-neg-frac82.5%
metadata-eval82.5%
unsub-neg82.5%
Simplified82.5%
if -6.0000000000000002e199 < F < -2.80000000000000002e177 or -7.79999999999999982 < F < 6e4Initial program 99.5%
associate-*l/99.5%
associate-/l*99.5%
+-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 96.0%
Taylor expanded in x around inf 71.8%
mul-1-neg71.8%
Simplified71.8%
expm1-log1p-u46.6%
expm1-udef28.6%
associate-/l*28.6%
quot-tan28.6%
Applied egg-rr28.6%
expm1-def46.6%
expm1-log1p71.9%
Simplified71.9%
if 6e4 < F Initial program 61.5%
Taylor expanded in B around 0 37.6%
Taylor expanded in F around inf 76.1%
Final simplification76.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 (sin B)) (/ x B))))
(if (<= F -3.7e+233)
t_0
(if (<= F -7.5e+146)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -2.6)
t_0
(if (<= F 23000.0) (/ (- x) (tan B)) (- (/ 1.0 (sin B)) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / sin(B)) - (x / B);
double tmp;
if (F <= -3.7e+233) {
tmp = t_0;
} else if (F <= -7.5e+146) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -2.6) {
tmp = t_0;
} else if (F <= 23000.0) {
tmp = -x / tan(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / sin(b)) - (x / b)
if (f <= (-3.7d+233)) then
tmp = t_0
else if (f <= (-7.5d+146)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-2.6d0)) then
tmp = t_0
else if (f <= 23000.0d0) then
tmp = -x / tan(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / Math.sin(B)) - (x / B);
double tmp;
if (F <= -3.7e+233) {
tmp = t_0;
} else if (F <= -7.5e+146) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -2.6) {
tmp = t_0;
} else if (F <= 23000.0) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / math.sin(B)) - (x / B) tmp = 0 if F <= -3.7e+233: tmp = t_0 elif F <= -7.5e+146: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -2.6: tmp = t_0 elif F <= 23000.0: tmp = -x / math.tan(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) tmp = 0.0 if (F <= -3.7e+233) tmp = t_0; elseif (F <= -7.5e+146) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -2.6) tmp = t_0; elseif (F <= 23000.0) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / sin(B)) - (x / B); tmp = 0.0; if (F <= -3.7e+233) tmp = t_0; elseif (F <= -7.5e+146) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -2.6) tmp = t_0; elseif (F <= 23000.0) tmp = -x / tan(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.7e+233], t$95$0, If[LessEqual[F, -7.5e+146], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.6], t$95$0, If[LessEqual[F, 23000.0], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -3.7 \cdot 10^{+233}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -7.5 \cdot 10^{+146}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -2.6:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 23000:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -3.6999999999999998e233 or -7.49999999999999983e146 < F < -2.60000000000000009Initial program 69.0%
Taylor expanded in B around 0 53.7%
Taylor expanded in F around -inf 83.4%
mul-1-neg83.4%
distribute-neg-in83.4%
distribute-neg-frac83.4%
metadata-eval83.4%
unsub-neg83.4%
Simplified83.4%
if -3.6999999999999998e233 < F < -7.49999999999999983e146Initial program 63.7%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 85.7%
if -2.60000000000000009 < F < 23000Initial program 99.5%
associate-*l/99.5%
associate-/l*99.5%
+-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in x around inf 70.3%
mul-1-neg70.3%
Simplified70.3%
expm1-log1p-u45.9%
expm1-udef26.9%
associate-/l*26.9%
quot-tan26.9%
Applied egg-rr26.9%
expm1-def46.0%
expm1-log1p70.5%
Simplified70.5%
if 23000 < F Initial program 61.5%
Taylor expanded in B around 0 37.6%
Taylor expanded in F around inf 76.1%
Final simplification76.3%
(FPCore (F B x)
:precision binary64
(if (<= F -2.2e-97)
(- (* B (- (* x 0.3333333333333333) 0.16666666666666666)) (/ (+ x 1.0) B))
(if (<= F 2.3e-10)
(/ (- x) B)
(if (or (<= F 7.8e+80) (not (<= F 2.35e+185)))
(/ 1.0 (sin B))
(/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.2e-97) {
tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) - ((x + 1.0) / B);
} else if (F <= 2.3e-10) {
tmp = -x / B;
} else if ((F <= 7.8e+80) || !(F <= 2.35e+185)) {
tmp = 1.0 / sin(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 <= (-2.2d-97)) then
tmp = (b * ((x * 0.3333333333333333d0) - 0.16666666666666666d0)) - ((x + 1.0d0) / b)
else if (f <= 2.3d-10) then
tmp = -x / b
else if ((f <= 7.8d+80) .or. (.not. (f <= 2.35d+185))) then
tmp = 1.0d0 / sin(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 <= -2.2e-97) {
tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) - ((x + 1.0) / B);
} else if (F <= 2.3e-10) {
tmp = -x / B;
} else if ((F <= 7.8e+80) || !(F <= 2.35e+185)) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.2e-97: tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) - ((x + 1.0) / B) elif F <= 2.3e-10: tmp = -x / B elif (F <= 7.8e+80) or not (F <= 2.35e+185): tmp = 1.0 / math.sin(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.2e-97) tmp = Float64(Float64(B * Float64(Float64(x * 0.3333333333333333) - 0.16666666666666666)) - Float64(Float64(x + 1.0) / B)); elseif (F <= 2.3e-10) tmp = Float64(Float64(-x) / B); elseif ((F <= 7.8e+80) || !(F <= 2.35e+185)) tmp = Float64(1.0 / sin(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 <= -2.2e-97) tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) - ((x + 1.0) / B); elseif (F <= 2.3e-10) tmp = -x / B; elseif ((F <= 7.8e+80) || ~((F <= 2.35e+185))) tmp = 1.0 / sin(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.2e-97], N[(N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] - 0.16666666666666666), $MachinePrecision]), $MachinePrecision] - N[(N[(x + 1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.3e-10], N[((-x) / B), $MachinePrecision], If[Or[LessEqual[F, 7.8e+80], N[Not[LessEqual[F, 2.35e+185]], $MachinePrecision]], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.2 \cdot 10^{-97}:\\
\;\;\;\;B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right) - \frac{x + 1}{B}\\
\mathbf{elif}\;F \leq 2.3 \cdot 10^{-10}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{elif}\;F \leq 7.8 \cdot 10^{+80} \lor \neg \left(F \leq 2.35 \cdot 10^{+185}\right):\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.1999999999999999e-97Initial program 73.8%
Taylor expanded in F around -inf 86.8%
Taylor expanded in B around 0 45.5%
if -2.1999999999999999e-97 < F < 2.30000000000000007e-10Initial program 99.6%
Taylor expanded in B around 0 59.0%
Taylor expanded in x around inf 40.6%
associate-*r/40.6%
neg-mul-140.6%
Simplified40.6%
if 2.30000000000000007e-10 < F < 7.79999999999999998e80 or 2.34999999999999986e185 < F Initial program 56.9%
associate-*l/67.0%
associate-/l*67.0%
+-commutative67.0%
fma-def67.0%
fma-def67.0%
metadata-eval67.0%
metadata-eval67.0%
Applied egg-rr67.0%
Taylor expanded in F around inf 97.4%
Taylor expanded in B around 0 70.8%
Taylor expanded in x around 0 59.2%
if 7.79999999999999998e80 < F < 2.34999999999999986e185Initial program 73.0%
associate-*l/85.6%
associate-/l*85.6%
+-commutative85.6%
fma-def85.6%
fma-def85.6%
metadata-eval85.6%
metadata-eval85.6%
Applied egg-rr85.6%
Taylor expanded in F around inf 99.4%
Taylor expanded in B around 0 78.8%
Taylor expanded in B around 0 62.4%
Final simplification47.5%
(FPCore (F B x)
:precision binary64
(if (<= F -6.8e-98)
(- (* B (- (* x 0.3333333333333333) 0.16666666666666666)) (/ (+ x 1.0) B))
(if (<= F 1100.0)
(/ (- x) (sin B))
(if (or (<= F 2.25e+79) (not (<= F 3.7e+186)))
(/ 1.0 (sin B))
(/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.8e-98) {
tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) - ((x + 1.0) / B);
} else if (F <= 1100.0) {
tmp = -x / sin(B);
} else if ((F <= 2.25e+79) || !(F <= 3.7e+186)) {
tmp = 1.0 / sin(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 <= (-6.8d-98)) then
tmp = (b * ((x * 0.3333333333333333d0) - 0.16666666666666666d0)) - ((x + 1.0d0) / b)
else if (f <= 1100.0d0) then
tmp = -x / sin(b)
else if ((f <= 2.25d+79) .or. (.not. (f <= 3.7d+186))) then
tmp = 1.0d0 / sin(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 <= -6.8e-98) {
tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) - ((x + 1.0) / B);
} else if (F <= 1100.0) {
tmp = -x / Math.sin(B);
} else if ((F <= 2.25e+79) || !(F <= 3.7e+186)) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6.8e-98: tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) - ((x + 1.0) / B) elif F <= 1100.0: tmp = -x / math.sin(B) elif (F <= 2.25e+79) or not (F <= 3.7e+186): tmp = 1.0 / math.sin(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6.8e-98) tmp = Float64(Float64(B * Float64(Float64(x * 0.3333333333333333) - 0.16666666666666666)) - Float64(Float64(x + 1.0) / B)); elseif (F <= 1100.0) tmp = Float64(Float64(-x) / sin(B)); elseif ((F <= 2.25e+79) || !(F <= 3.7e+186)) tmp = Float64(1.0 / sin(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 <= -6.8e-98) tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) - ((x + 1.0) / B); elseif (F <= 1100.0) tmp = -x / sin(B); elseif ((F <= 2.25e+79) || ~((F <= 3.7e+186))) tmp = 1.0 / sin(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6.8e-98], N[(N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] - 0.16666666666666666), $MachinePrecision]), $MachinePrecision] - N[(N[(x + 1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1100.0], N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 2.25e+79], N[Not[LessEqual[F, 3.7e+186]], $MachinePrecision]], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.8 \cdot 10^{-98}:\\
\;\;\;\;B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right) - \frac{x + 1}{B}\\
\mathbf{elif}\;F \leq 1100:\\
\;\;\;\;\frac{-x}{\sin B}\\
\mathbf{elif}\;F \leq 2.25 \cdot 10^{+79} \lor \neg \left(F \leq 3.7 \cdot 10^{+186}\right):\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -6.8000000000000003e-98Initial program 73.8%
Taylor expanded in F around -inf 86.8%
Taylor expanded in B around 0 45.5%
if -6.8000000000000003e-98 < F < 1100Initial program 99.6%
associate-*l/99.6%
associate-/l*99.5%
+-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in x around inf 78.5%
mul-1-neg78.5%
Simplified78.5%
Taylor expanded in B around 0 42.8%
if 1100 < F < 2.24999999999999997e79 or 3.7e186 < F Initial program 54.8%
associate-*l/65.3%
associate-/l*65.4%
+-commutative65.4%
fma-def65.4%
fma-def65.4%
metadata-eval65.4%
metadata-eval65.4%
Applied egg-rr65.4%
Taylor expanded in F around inf 99.6%
Taylor expanded in B around 0 74.1%
Taylor expanded in x around 0 62.0%
if 2.24999999999999997e79 < F < 3.7e186Initial program 73.0%
associate-*l/85.6%
associate-/l*85.6%
+-commutative85.6%
fma-def85.6%
fma-def85.6%
metadata-eval85.6%
metadata-eval85.6%
Applied egg-rr85.6%
Taylor expanded in F around inf 99.4%
Taylor expanded in B around 0 78.8%
Taylor expanded in B around 0 62.4%
Final simplification48.6%
(FPCore (F B x) :precision binary64 (/ (- x) (tan B)))
double code(double F, double B, double x) {
return -x / tan(B);
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -x / tan(b)
end function
public static double code(double F, double B, double x) {
return -x / Math.tan(B);
}
def code(F, B, x): return -x / math.tan(B)
function code(F, B, x) return Float64(Float64(-x) / tan(B)) end
function tmp = code(F, B, x) tmp = -x / tan(B); end
code[F_, B_, x_] := N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-x}{\tan B}
\end{array}
Initial program 79.9%
associate-*l/86.1%
associate-/l*86.1%
+-commutative86.1%
fma-def86.1%
fma-def86.1%
metadata-eval86.1%
metadata-eval86.1%
Applied egg-rr86.1%
Taylor expanded in F around 0 54.9%
Taylor expanded in x around inf 57.1%
mul-1-neg57.1%
Simplified57.1%
expm1-log1p-u33.4%
expm1-udef25.1%
associate-/l*25.1%
quot-tan25.1%
Applied egg-rr25.1%
expm1-def33.5%
expm1-log1p57.2%
Simplified57.2%
Final simplification57.2%
(FPCore (F B x)
:precision binary64
(if (<= F -1.6e-97)
(- (* B (- (* x 0.3333333333333333) 0.16666666666666666)) (/ (+ x 1.0) B))
(if (<= F 2.4e-113)
(/ (- x) B)
(+ (/ (- 1.0 x) B) (* B 0.16666666666666666)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.6e-97) {
tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) - ((x + 1.0) / B);
} else if (F <= 2.4e-113) {
tmp = -x / B;
} else {
tmp = ((1.0 - x) / B) + (B * 0.16666666666666666);
}
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.6d-97)) then
tmp = (b * ((x * 0.3333333333333333d0) - 0.16666666666666666d0)) - ((x + 1.0d0) / b)
else if (f <= 2.4d-113) then
tmp = -x / b
else
tmp = ((1.0d0 - x) / b) + (b * 0.16666666666666666d0)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.6e-97) {
tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) - ((x + 1.0) / B);
} else if (F <= 2.4e-113) {
tmp = -x / B;
} else {
tmp = ((1.0 - x) / B) + (B * 0.16666666666666666);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.6e-97: tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) - ((x + 1.0) / B) elif F <= 2.4e-113: tmp = -x / B else: tmp = ((1.0 - x) / B) + (B * 0.16666666666666666) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.6e-97) tmp = Float64(Float64(B * Float64(Float64(x * 0.3333333333333333) - 0.16666666666666666)) - Float64(Float64(x + 1.0) / B)); elseif (F <= 2.4e-113) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(Float64(1.0 - x) / B) + Float64(B * 0.16666666666666666)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.6e-97) tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) - ((x + 1.0) / B); elseif (F <= 2.4e-113) tmp = -x / B; else tmp = ((1.0 - x) / B) + (B * 0.16666666666666666); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.6e-97], N[(N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] - 0.16666666666666666), $MachinePrecision]), $MachinePrecision] - N[(N[(x + 1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.4e-113], N[((-x) / B), $MachinePrecision], N[(N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision] + N[(B * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.6 \cdot 10^{-97}:\\
\;\;\;\;B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right) - \frac{x + 1}{B}\\
\mathbf{elif}\;F \leq 2.4 \cdot 10^{-113}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B} + B \cdot 0.16666666666666666\\
\end{array}
\end{array}
if F < -1.5999999999999999e-97Initial program 73.8%
Taylor expanded in F around -inf 86.8%
Taylor expanded in B around 0 45.5%
if -1.5999999999999999e-97 < F < 2.40000000000000012e-113Initial program 99.6%
Taylor expanded in B around 0 60.3%
Taylor expanded in x around inf 44.4%
associate-*r/44.4%
neg-mul-144.4%
Simplified44.4%
if 2.40000000000000012e-113 < F Initial program 68.9%
associate-*l/78.1%
associate-/l*78.0%
+-commutative78.0%
fma-def78.0%
fma-def78.0%
metadata-eval78.0%
metadata-eval78.0%
Applied egg-rr78.0%
Taylor expanded in F around inf 87.3%
Taylor expanded in B around 0 64.7%
Taylor expanded in B around 0 38.8%
associate--l+38.8%
*-commutative38.8%
div-sub38.8%
Simplified38.8%
Final simplification43.2%
(FPCore (F B x)
:precision binary64
(if (<= F -6.5e-125)
(/ (- -1.0 x) B)
(if (<= F 2.15e-113)
(/ (- x) B)
(+ (/ (- 1.0 x) B) (* B 0.16666666666666666)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.5e-125) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.15e-113) {
tmp = -x / B;
} else {
tmp = ((1.0 - x) / B) + (B * 0.16666666666666666);
}
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.5d-125)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 2.15d-113) then
tmp = -x / b
else
tmp = ((1.0d0 - x) / b) + (b * 0.16666666666666666d0)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -6.5e-125) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.15e-113) {
tmp = -x / B;
} else {
tmp = ((1.0 - x) / B) + (B * 0.16666666666666666);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6.5e-125: tmp = (-1.0 - x) / B elif F <= 2.15e-113: tmp = -x / B else: tmp = ((1.0 - x) / B) + (B * 0.16666666666666666) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6.5e-125) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 2.15e-113) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(Float64(1.0 - x) / B) + Float64(B * 0.16666666666666666)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -6.5e-125) tmp = (-1.0 - x) / B; elseif (F <= 2.15e-113) tmp = -x / B; else tmp = ((1.0 - x) / B) + (B * 0.16666666666666666); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6.5e-125], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.15e-113], N[((-x) / B), $MachinePrecision], N[(N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision] + N[(B * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.5 \cdot 10^{-125}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 2.15 \cdot 10^{-113}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B} + B \cdot 0.16666666666666666\\
\end{array}
\end{array}
if F < -6.4999999999999999e-125Initial program 74.9%
Taylor expanded in F around -inf 84.9%
Taylor expanded in B around 0 42.8%
associate-*r/42.8%
distribute-lft-in42.8%
metadata-eval42.8%
neg-mul-142.8%
Simplified42.8%
if -6.4999999999999999e-125 < F < 2.15e-113Initial program 99.7%
Taylor expanded in B around 0 61.6%
Taylor expanded in x around inf 47.3%
associate-*r/47.3%
neg-mul-147.3%
Simplified47.3%
if 2.15e-113 < F Initial program 68.9%
associate-*l/78.1%
associate-/l*78.0%
+-commutative78.0%
fma-def78.0%
fma-def78.0%
metadata-eval78.0%
metadata-eval78.0%
Applied egg-rr78.0%
Taylor expanded in F around inf 87.3%
Taylor expanded in B around 0 64.7%
Taylor expanded in B around 0 38.8%
associate--l+38.8%
*-commutative38.8%
div-sub38.8%
Simplified38.8%
Final simplification42.8%
(FPCore (F B x) :precision binary64 (if (<= F -6.5e-125) (/ (- -1.0 x) B) (if (<= F 8.5e-79) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.5e-125) {
tmp = (-1.0 - x) / B;
} else if (F <= 8.5e-79) {
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 <= (-6.5d-125)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 8.5d-79) 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 <= -6.5e-125) {
tmp = (-1.0 - x) / B;
} else if (F <= 8.5e-79) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6.5e-125: tmp = (-1.0 - x) / B elif F <= 8.5e-79: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6.5e-125) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 8.5e-79) 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 <= -6.5e-125) tmp = (-1.0 - x) / B; elseif (F <= 8.5e-79) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6.5e-125], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 8.5e-79], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.5 \cdot 10^{-125}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{-79}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -6.4999999999999999e-125Initial program 74.9%
Taylor expanded in F around -inf 84.9%
Taylor expanded in B around 0 42.8%
associate-*r/42.8%
distribute-lft-in42.8%
metadata-eval42.8%
neg-mul-142.8%
Simplified42.8%
if -6.4999999999999999e-125 < F < 8.50000000000000029e-79Initial program 99.7%
Taylor expanded in B around 0 60.2%
Taylor expanded in x around inf 45.6%
associate-*r/45.6%
neg-mul-145.6%
Simplified45.6%
if 8.50000000000000029e-79 < F Initial program 66.8%
associate-*l/76.6%
associate-/l*76.5%
+-commutative76.5%
fma-def76.5%
fma-def76.5%
metadata-eval76.5%
metadata-eval76.5%
Applied egg-rr76.5%
Taylor expanded in F around inf 90.6%
Taylor expanded in B around 0 67.6%
Taylor expanded in B around 0 39.8%
Final simplification42.8%
(FPCore (F B x) :precision binary64 (if (<= F 3.5e-86) (/ (- x) B) (/ (- 1.0 x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 3.5e-86) {
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 <= 3.5d-86) 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 <= 3.5e-86) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 3.5e-86: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 3.5e-86) 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 <= 3.5e-86) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 3.5e-86], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 3.5 \cdot 10^{-86}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < 3.50000000000000021e-86Initial program 85.0%
Taylor expanded in B around 0 55.8%
Taylor expanded in x around inf 32.7%
associate-*r/32.7%
neg-mul-132.7%
Simplified32.7%
if 3.50000000000000021e-86 < F Initial program 66.8%
associate-*l/76.6%
associate-/l*76.5%
+-commutative76.5%
fma-def76.5%
fma-def76.5%
metadata-eval76.5%
metadata-eval76.5%
Applied egg-rr76.5%
Taylor expanded in F around inf 90.6%
Taylor expanded in B around 0 67.6%
Taylor expanded in B around 0 39.8%
Final simplification34.7%
(FPCore (F B x) :precision binary64 (/ (- x) B))
double code(double F, double B, double x) {
return -x / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -x / b
end function
public static double code(double F, double B, double x) {
return -x / B;
}
def code(F, B, x): return -x / B
function code(F, B, x) return Float64(Float64(-x) / B) end
function tmp = code(F, B, x) tmp = -x / B; end
code[F_, B_, x_] := N[((-x) / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-x}{B}
\end{array}
Initial program 79.9%
Taylor expanded in B around 0 51.4%
Taylor expanded in x around inf 30.0%
associate-*r/30.0%
neg-mul-130.0%
Simplified30.0%
Final simplification30.0%
herbie shell --seed 2023318
(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))))))