
(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 24 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -8000000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 6400000.0)
(- (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) t_0)
(+
(* x (/ -1.0 (tan B)))
(+ (/ 1.0 (sin B)) (/ (- -1.0 x) (* (sin B) (pow F 2.0)))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -8000000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 6400000.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + ((1.0 / sin(B)) + ((-1.0 - x) / (sin(B) * pow(F, 2.0))));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-8000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 6400000.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - t_0
else
tmp = (x * ((-1.0d0) / tan(b))) + ((1.0d0 / sin(b)) + (((-1.0d0) - x) / (sin(b) * (f ** 2.0d0))))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -8000000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 6400000.0) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - t_0;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + ((1.0 / Math.sin(B)) + ((-1.0 - x) / (Math.sin(B) * Math.pow(F, 2.0))));
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -8000000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 6400000.0: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - t_0 else: tmp = (x * (-1.0 / math.tan(B))) + ((1.0 / math.sin(B)) + ((-1.0 - x) / (math.sin(B) * math.pow(F, 2.0)))) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -8000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 6400000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - t_0); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(1.0 / sin(B)) + Float64(Float64(-1.0 - x) / Float64(sin(B) * (F ^ 2.0))))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -8000000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 6400000.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - t_0; else tmp = (x * (-1.0 / tan(B))) + ((1.0 / sin(B)) + ((-1.0 - x) / (sin(B) * (F ^ 2.0)))); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -8000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 6400000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 - x), $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] * N[Power[F, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -8000000000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 6400000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - t_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \left(\frac{1}{\sin B} + \frac{-1 - x}{\sin B \cdot {F}^{2}}\right)\\
\end{array}
\end{array}
if F < -8e9Initial program 63.4%
Taylor expanded in F around -inf 99.7%
div-inv99.9%
expm1-log1p-u66.2%
expm1-udef66.2%
Applied egg-rr66.2%
expm1-def66.2%
expm1-log1p99.9%
Simplified99.9%
if -8e9 < F < 6.4e6Initial program 99.5%
div-inv37.4%
expm1-log1p-u18.5%
expm1-udef18.5%
Applied egg-rr54.7%
expm1-def18.5%
expm1-log1p37.4%
Simplified99.6%
if 6.4e6 < F Initial program 58.4%
Taylor expanded in F around inf 98.5%
+-commutative98.5%
associate-*r/98.5%
distribute-lft-in98.5%
metadata-eval98.5%
associate-*r*99.8%
metadata-eval99.8%
neg-mul-199.8%
Simplified99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(if (<= x -1.0)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(+
(* x (/ -1.0 (tan B)))
(/ F (* (sin B) (hypot F (sqrt (fma 2.0 x 2.0))))))))
double code(double F, double B, double x) {
double tmp;
if (x <= -1.0) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else {
tmp = (x * (-1.0 / tan(B))) + (F / (sin(B) * hypot(F, sqrt(fma(2.0, x, 2.0)))));
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (x <= -1.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(F / Float64(sin(B) * hypot(F, sqrt(fma(2.0, x, 2.0)))))); end return tmp end
code[F_, B_, x_] := If[LessEqual[x, -1.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[F ^ 2 + N[Sqrt[N[(2.0 * x + 2.0), $MachinePrecision]], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\sin B \cdot \mathsf{hypot}\left(F, \sqrt{\mathsf{fma}\left(2, x, 2\right)}\right)}\\
\end{array}
\end{array}
if x < -1Initial program 63.1%
Taylor expanded in F around -inf 99.5%
div-inv99.8%
expm1-log1p-u38.2%
expm1-udef38.2%
Applied egg-rr38.2%
expm1-def38.2%
expm1-log1p99.8%
Simplified99.8%
if -1 < x Initial program 79.1%
add-sqr-sqrt79.1%
unpow-prod-down79.0%
+-commutative79.0%
fma-def79.0%
fma-def79.0%
metadata-eval79.0%
metadata-eval79.0%
+-commutative79.0%
fma-def79.0%
fma-def79.0%
metadata-eval79.0%
metadata-eval79.0%
Applied egg-rr79.0%
pow-sqr79.1%
metadata-eval79.1%
unpow-179.1%
fma-udef79.1%
+-commutative79.1%
fma-udef79.1%
unpow279.1%
associate-+r+79.1%
unpow279.1%
unpow179.1%
sqr-pow79.1%
hypot-def89.0%
+-commutative89.0%
fma-def89.0%
metadata-eval89.0%
Simplified89.0%
*-commutative89.0%
frac-times99.6%
*-un-lft-identity99.6%
unpow1/299.6%
Applied egg-rr99.6%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -7800000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 7e+37)
(- (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) t_0)
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -7800000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 7e+37) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-7800000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 7d+37) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - t_0
else
tmp = (x * ((-1.0d0) / tan(b))) + (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 tmp;
if (F <= -7800000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 7e+37) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - t_0;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -7800000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 7e+37: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - t_0 else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -7800000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 7e+37) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - t_0); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -7800000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 7e+37) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - t_0; else tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7800000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 7e+37], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -7800000000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 7 \cdot 10^{+37}:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - t_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -7.8e9Initial program 63.4%
Taylor expanded in F around -inf 99.7%
div-inv99.9%
expm1-log1p-u66.2%
expm1-udef66.2%
Applied egg-rr66.2%
expm1-def66.2%
expm1-log1p99.9%
Simplified99.9%
if -7.8e9 < F < 7e37Initial program 99.4%
div-inv38.1%
expm1-log1p-u17.9%
expm1-udef17.9%
Applied egg-rr53.6%
expm1-def17.9%
expm1-log1p38.1%
Simplified99.6%
if 7e37 < F Initial program 56.2%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -0.00033)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 9.4e-14)
(+ t_0 (/ F (* (sin B) (sqrt (+ 2.0 (* x 2.0))))))
(+ t_0 (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -0.00033) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 9.4e-14) {
tmp = t_0 + (F / (sin(B) * sqrt((2.0 + (x * 2.0)))));
} else {
tmp = t_0 + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-0.00033d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 9.4d-14) then
tmp = t_0 + (f / (sin(b) * sqrt((2.0d0 + (x * 2.0d0)))))
else
tmp = t_0 + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -0.00033) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 9.4e-14) {
tmp = t_0 + (F / (Math.sin(B) * Math.sqrt((2.0 + (x * 2.0)))));
} else {
tmp = t_0 + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -0.00033: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 9.4e-14: tmp = t_0 + (F / (math.sin(B) * math.sqrt((2.0 + (x * 2.0))))) else: tmp = t_0 + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -0.00033) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 9.4e-14) tmp = Float64(t_0 + Float64(F / Float64(sin(B) * sqrt(Float64(2.0 + Float64(x * 2.0)))))); else tmp = Float64(t_0 + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -0.00033) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 9.4e-14) tmp = t_0 + (F / (sin(B) * sqrt((2.0 + (x * 2.0))))); else tmp = t_0 + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.00033], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9.4e-14], N[(t$95$0 + N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -0.00033:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 9.4 \cdot 10^{-14}:\\
\;\;\;\;t_0 + \frac{F}{\sin B \cdot \sqrt{2 + x \cdot 2}}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -3.3e-4Initial program 66.4%
Taylor expanded in F around -inf 99.0%
div-inv99.1%
expm1-log1p-u64.0%
expm1-udef64.0%
Applied egg-rr64.0%
expm1-def64.0%
expm1-log1p99.1%
Simplified99.1%
if -3.3e-4 < F < 9.4000000000000003e-14Initial program 99.4%
add-sqr-sqrt99.4%
unpow-prod-down99.4%
+-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
+-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
Applied egg-rr99.4%
pow-sqr99.4%
metadata-eval99.4%
unpow-199.4%
fma-udef99.4%
+-commutative99.4%
fma-udef99.4%
unpow299.4%
associate-+r+99.4%
unpow299.4%
unpow199.4%
sqr-pow99.4%
hypot-def99.4%
+-commutative99.4%
fma-def99.4%
metadata-eval99.4%
Simplified99.4%
*-commutative99.4%
frac-times99.5%
*-un-lft-identity99.5%
unpow1/299.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 99.5%
if 9.4000000000000003e-14 < F Initial program 60.4%
Taylor expanded in F around inf 98.1%
Final simplification98.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B))))
(t_1 (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(if (<= F -1.18e-20)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -8.2e-134)
(- (* (/ F (sin B)) t_1) (/ x B))
(if (<= F 45.0) (+ t_0 (* t_1 (/ F B))) (+ t_0 (/ 1.0 (sin B))))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double t_1 = pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double tmp;
if (F <= -1.18e-20) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -8.2e-134) {
tmp = ((F / sin(B)) * t_1) - (x / B);
} else if (F <= 45.0) {
tmp = t_0 + (t_1 * (F / B));
} else {
tmp = t_0 + (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 * ((-1.0d0) / tan(b))
t_1 = ((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)
if (f <= (-1.18d-20)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-8.2d-134)) then
tmp = ((f / sin(b)) * t_1) - (x / b)
else if (f <= 45.0d0) then
tmp = t_0 + (t_1 * (f / b))
else
tmp = t_0 + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double t_1 = Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double tmp;
if (F <= -1.18e-20) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -8.2e-134) {
tmp = ((F / Math.sin(B)) * t_1) - (x / B);
} else if (F <= 45.0) {
tmp = t_0 + (t_1 * (F / B));
} else {
tmp = t_0 + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) t_1 = math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) tmp = 0 if F <= -1.18e-20: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -8.2e-134: tmp = ((F / math.sin(B)) * t_1) - (x / B) elif F <= 45.0: tmp = t_0 + (t_1 * (F / B)) else: tmp = t_0 + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) t_1 = Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5 tmp = 0.0 if (F <= -1.18e-20) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -8.2e-134) tmp = Float64(Float64(Float64(F / sin(B)) * t_1) - Float64(x / B)); elseif (F <= 45.0) tmp = Float64(t_0 + Float64(t_1 * Float64(F / B))); else tmp = Float64(t_0 + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); t_1 = ((2.0 + (F * F)) + (x * 2.0)) ^ -0.5; tmp = 0.0; if (F <= -1.18e-20) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -8.2e-134) tmp = ((F / sin(B)) * t_1) - (x / B); elseif (F <= 45.0) tmp = t_0 + (t_1 * (F / B)); else tmp = t_0 + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, If[LessEqual[F, -1.18e-20], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -8.2e-134], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 45.0], N[(t$95$0 + N[(t$95$1 * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
t_1 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{if}\;F \leq -1.18 \cdot 10^{-20}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -8.2 \cdot 10^{-134}:\\
\;\;\;\;\frac{F}{\sin B} \cdot t_1 - \frac{x}{B}\\
\mathbf{elif}\;F \leq 45:\\
\;\;\;\;t_0 + t_1 \cdot \frac{F}{B}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.1800000000000001e-20Initial program 67.2%
Taylor expanded in F around -inf 97.9%
div-inv98.0%
expm1-log1p-u63.7%
expm1-udef63.7%
Applied egg-rr63.7%
expm1-def63.7%
expm1-log1p98.0%
Simplified98.0%
if -1.1800000000000001e-20 < F < -8.2000000000000004e-134Initial program 99.5%
Taylor expanded in B around 0 92.0%
if -8.2000000000000004e-134 < F < 45Initial program 99.4%
Taylor expanded in B around 0 90.6%
if 45 < F Initial program 59.4%
Taylor expanded in F around inf 98.9%
Final simplification95.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -1.18e-20)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -3.1e-135)
(- (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (/ x B))
(if (<= F 9.4e-14)
(+ t_0 (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))))
(+ t_0 (/ 1.0 (sin B))))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -1.18e-20) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -3.1e-135) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 9.4e-14) {
tmp = t_0 + ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0)))));
} else {
tmp = t_0 + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-1.18d-20)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-3.1d-135)) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
else if (f <= 9.4d-14) then
tmp = t_0 + ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))
else
tmp = t_0 + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -1.18e-20) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -3.1e-135) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 9.4e-14) {
tmp = t_0 + ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0)))));
} else {
tmp = t_0 + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -1.18e-20: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -3.1e-135: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) elif F <= 9.4e-14: tmp = t_0 + ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) else: tmp = t_0 + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -1.18e-20) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -3.1e-135) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)); elseif (F <= 9.4e-14) tmp = Float64(t_0 + Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))))); else tmp = Float64(t_0 + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -1.18e-20) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -3.1e-135) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); elseif (F <= 9.4e-14) tmp = t_0 + ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))); else tmp = t_0 + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.18e-20], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.1e-135], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9.4e-14], N[(t$95$0 + N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -1.18 \cdot 10^{-20}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -3.1 \cdot 10^{-135}:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 9.4 \cdot 10^{-14}:\\
\;\;\;\;t_0 + \frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.1800000000000001e-20Initial program 67.2%
Taylor expanded in F around -inf 97.9%
div-inv98.0%
expm1-log1p-u63.7%
expm1-udef63.7%
Applied egg-rr63.7%
expm1-def63.7%
expm1-log1p98.0%
Simplified98.0%
if -1.1800000000000001e-20 < F < -3.1000000000000001e-135Initial program 99.5%
Taylor expanded in B around 0 92.0%
if -3.1000000000000001e-135 < F < 9.4000000000000003e-14Initial program 99.4%
Taylor expanded in B around 0 90.4%
Taylor expanded in F around 0 90.4%
if 9.4000000000000003e-14 < F Initial program 60.4%
Taylor expanded in F around inf 98.1%
Final simplification95.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -0.00033)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 9.4e-14)
(+ t_0 (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))))
(+ t_0 (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -0.00033) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 9.4e-14) {
tmp = t_0 + ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0)))));
} else {
tmp = t_0 + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-0.00033d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 9.4d-14) then
tmp = t_0 + ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))
else
tmp = t_0 + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -0.00033) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 9.4e-14) {
tmp = t_0 + ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0)))));
} else {
tmp = t_0 + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -0.00033: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 9.4e-14: tmp = t_0 + ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) else: tmp = t_0 + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -0.00033) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 9.4e-14) tmp = Float64(t_0 + Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))))); else tmp = Float64(t_0 + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -0.00033) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 9.4e-14) tmp = t_0 + ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))); else tmp = t_0 + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.00033], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9.4e-14], N[(t$95$0 + N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -0.00033:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 9.4 \cdot 10^{-14}:\\
\;\;\;\;t_0 + \frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -3.3e-4Initial program 66.4%
Taylor expanded in F around -inf 99.0%
div-inv99.1%
expm1-log1p-u64.0%
expm1-udef64.0%
Applied egg-rr64.0%
expm1-def64.0%
expm1-log1p99.1%
Simplified99.1%
if -3.3e-4 < F < 9.4000000000000003e-14Initial program 99.4%
Taylor expanded in B around 0 84.5%
Taylor expanded in F around 0 84.5%
if 9.4000000000000003e-14 < F Initial program 60.4%
Taylor expanded in F around inf 98.1%
Final simplification93.1%
(FPCore (F B x)
:precision binary64
(if (<= F -4.8e-21)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -1.55e-221)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (+ (* x 2.0) (pow F 2.0)))))) x) B)
(if (<= F 3.9e-84)
(/ (- x) (/ (sin B) (cos B)))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.8e-21) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -1.55e-221) {
tmp = ((F * sqrt((1.0 / (2.0 + ((x * 2.0) + pow(F, 2.0)))))) - x) / B;
} else if (F <= 3.9e-84) {
tmp = -x / (sin(B) / cos(B));
} else {
tmp = (x * (-1.0 / tan(B))) + (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.8d-21)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-1.55d-221)) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + ((x * 2.0d0) + (f ** 2.0d0)))))) - x) / b
else if (f <= 3.9d-84) then
tmp = -x / (sin(b) / cos(b))
else
tmp = (x * ((-1.0d0) / tan(b))) + (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.8e-21) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -1.55e-221) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + ((x * 2.0) + Math.pow(F, 2.0)))))) - x) / B;
} else if (F <= 3.9e-84) {
tmp = -x / (Math.sin(B) / Math.cos(B));
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.8e-21: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -1.55e-221: tmp = ((F * math.sqrt((1.0 / (2.0 + ((x * 2.0) + math.pow(F, 2.0)))))) - x) / B elif F <= 3.9e-84: tmp = -x / (math.sin(B) / math.cos(B)) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.8e-21) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -1.55e-221) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(Float64(x * 2.0) + (F ^ 2.0)))))) - x) / B); elseif (F <= 3.9e-84) tmp = Float64(Float64(-x) / Float64(sin(B) / cos(B))); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4.8e-21) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -1.55e-221) tmp = ((F * sqrt((1.0 / (2.0 + ((x * 2.0) + (F ^ 2.0)))))) - x) / B; elseif (F <= 3.9e-84) tmp = -x / (sin(B) / cos(B)); else tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.8e-21], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.55e-221], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(N[(x * 2.0), $MachinePrecision] + N[Power[F, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3.9e-84], N[((-x) / N[(N[Sin[B], $MachinePrecision] / N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.8 \cdot 10^{-21}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -1.55 \cdot 10^{-221}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + \left(x \cdot 2 + {F}^{2}\right)}} - x}{B}\\
\mathbf{elif}\;F \leq 3.9 \cdot 10^{-84}:\\
\;\;\;\;\frac{-x}{\frac{\sin B}{\cos B}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -4.7999999999999999e-21Initial program 67.2%
Taylor expanded in F around -inf 97.9%
div-inv98.0%
expm1-log1p-u63.7%
expm1-udef63.7%
Applied egg-rr63.7%
expm1-def63.7%
expm1-log1p98.0%
Simplified98.0%
if -4.7999999999999999e-21 < F < -1.55e-221Initial program 99.4%
Taylor expanded in B around 0 73.3%
Taylor expanded in B around 0 61.7%
Taylor expanded in B around 0 61.7%
if -1.55e-221 < F < 3.90000000000000023e-84Initial program 99.4%
Taylor expanded in F around -inf 33.7%
Taylor expanded in x around inf 76.9%
mul-1-neg76.9%
associate-/l*77.0%
distribute-neg-frac77.0%
Simplified77.0%
if 3.90000000000000023e-84 < F Initial program 64.9%
Taylor expanded in F around inf 92.4%
Final simplification86.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (* x (/ 1.0 (tan B))))))
(if (<= F -1.95e+177)
t_0
(if (<= F -1.5e+31)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -9.5e-21)
t_0
(if (<= F -1.55e-221)
(- (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x B))
(if (<= F 63.0)
(/ (- x) (/ (sin B) (cos B)))
(if (or (<= F 1.15e+149) (not (<= F 1.75e+225)))
(- (/ F (* (sin B) F)) (/ x B))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B))))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x * (1.0 / tan(B)));
double tmp;
if (F <= -1.95e+177) {
tmp = t_0;
} else if (F <= -1.5e+31) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -9.5e-21) {
tmp = t_0;
} else if (F <= -1.55e-221) {
tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else if (F <= 63.0) {
tmp = -x / (sin(B) / cos(B));
} else if ((F <= 1.15e+149) || !(F <= 1.75e+225)) {
tmp = (F / (sin(B) * F)) - (x / B);
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / b) - (x * (1.0d0 / tan(b)))
if (f <= (-1.95d+177)) then
tmp = t_0
else if (f <= (-1.5d+31)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-9.5d-21)) then
tmp = t_0
else if (f <= (-1.55d-221)) then
tmp = ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / b)
else if (f <= 63.0d0) then
tmp = -x / (sin(b) / cos(b))
else if ((f <= 1.15d+149) .or. (.not. (f <= 1.75d+225))) then
tmp = (f / (sin(b) * f)) - (x / b)
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x * (1.0 / Math.tan(B)));
double tmp;
if (F <= -1.95e+177) {
tmp = t_0;
} else if (F <= -1.5e+31) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -9.5e-21) {
tmp = t_0;
} else if (F <= -1.55e-221) {
tmp = ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else if (F <= 63.0) {
tmp = -x / (Math.sin(B) / Math.cos(B));
} else if ((F <= 1.15e+149) || !(F <= 1.75e+225)) {
tmp = (F / (Math.sin(B) * F)) - (x / B);
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x * (1.0 / math.tan(B))) tmp = 0 if F <= -1.95e+177: tmp = t_0 elif F <= -1.5e+31: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -9.5e-21: tmp = t_0 elif F <= -1.55e-221: tmp = ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B) elif F <= 63.0: tmp = -x / (math.sin(B) / math.cos(B)) elif (F <= 1.15e+149) or not (F <= 1.75e+225): tmp = (F / (math.sin(B) * F)) - (x / B) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x * Float64(1.0 / tan(B)))) tmp = 0.0 if (F <= -1.95e+177) tmp = t_0; elseif (F <= -1.5e+31) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -9.5e-21) tmp = t_0; elseif (F <= -1.55e-221) tmp = Float64(Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)); elseif (F <= 63.0) tmp = Float64(Float64(-x) / Float64(sin(B) / cos(B))); elseif ((F <= 1.15e+149) || !(F <= 1.75e+225)) tmp = Float64(Float64(F / Float64(sin(B) * F)) - Float64(x / B)); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x * (1.0 / tan(B))); tmp = 0.0; if (F <= -1.95e+177) tmp = t_0; elseif (F <= -1.5e+31) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -9.5e-21) tmp = t_0; elseif (F <= -1.55e-221) tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B); elseif (F <= 63.0) tmp = -x / (sin(B) / cos(B)); elseif ((F <= 1.15e+149) || ~((F <= 1.75e+225))) tmp = (F / (sin(B) * F)) - (x / B); else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.95e+177], t$95$0, If[LessEqual[F, -1.5e+31], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -9.5e-21], t$95$0, If[LessEqual[F, -1.55e-221], 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, 63.0], N[((-x) / N[(N[Sin[B], $MachinePrecision] / N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 1.15e+149], N[Not[LessEqual[F, 1.75e+225]], $MachinePrecision]], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{if}\;F \leq -1.95 \cdot 10^{+177}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -1.5 \cdot 10^{+31}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -9.5 \cdot 10^{-21}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -1.55 \cdot 10^{-221}:\\
\;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 63:\\
\;\;\;\;\frac{-x}{\frac{\sin B}{\cos B}}\\
\mathbf{elif}\;F \leq 1.15 \cdot 10^{+149} \lor \neg \left(F \leq 1.75 \cdot 10^{+225}\right):\\
\;\;\;\;\frac{F}{\sin B \cdot F} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -1.95e177 or -1.49999999999999995e31 < F < -9.4999999999999994e-21Initial program 64.2%
Taylor expanded in F around -inf 96.5%
Taylor expanded in B around 0 87.0%
if -1.95e177 < F < -1.49999999999999995e31Initial program 71.6%
Taylor expanded in F around -inf 99.9%
Taylor expanded in B around 0 84.2%
Taylor expanded in x around 0 84.2%
sub-neg84.2%
mul-1-neg84.2%
+-commutative84.2%
distribute-neg-frac84.2%
metadata-eval84.2%
sub-neg84.2%
Simplified84.2%
if -9.4999999999999994e-21 < F < -1.55e-221Initial program 99.4%
Taylor expanded in B around 0 73.3%
Taylor expanded in B around 0 61.7%
Taylor expanded in F around 0 61.7%
if -1.55e-221 < F < 63Initial program 99.4%
Taylor expanded in F around -inf 37.2%
Taylor expanded in x around inf 71.7%
mul-1-neg71.7%
associate-/l*71.8%
distribute-neg-frac71.8%
Simplified71.8%
if 63 < F < 1.1499999999999999e149 or 1.7500000000000002e225 < F Initial program 60.8%
add-sqr-sqrt60.8%
unpow-prod-down60.6%
+-commutative60.6%
fma-def60.6%
fma-def60.6%
metadata-eval60.6%
metadata-eval60.6%
+-commutative60.6%
fma-def60.6%
fma-def60.6%
metadata-eval60.6%
metadata-eval60.6%
Applied egg-rr60.6%
pow-sqr60.8%
metadata-eval60.8%
unpow-160.8%
fma-udef60.8%
+-commutative60.8%
fma-udef60.8%
unpow260.8%
associate-+r+60.8%
unpow260.8%
unpow160.8%
sqr-pow57.0%
hypot-def71.8%
+-commutative71.8%
fma-def71.8%
metadata-eval71.8%
Simplified71.8%
*-commutative71.8%
frac-times89.0%
*-un-lft-identity89.0%
unpow1/287.2%
Applied egg-rr87.2%
Taylor expanded in F around inf 98.4%
*-commutative98.4%
Simplified98.4%
Taylor expanded in B around 0 86.6%
if 1.1499999999999999e149 < F < 1.7500000000000002e225Initial program 54.5%
add-sqr-sqrt54.5%
unpow-prod-down54.5%
+-commutative54.5%
fma-def54.5%
fma-def54.5%
metadata-eval54.5%
metadata-eval54.5%
+-commutative54.5%
fma-def54.5%
fma-def54.5%
metadata-eval54.5%
metadata-eval54.5%
Applied egg-rr54.5%
pow-sqr54.5%
metadata-eval54.5%
unpow-154.5%
fma-udef54.5%
+-commutative54.5%
fma-udef54.5%
unpow254.5%
associate-+r+54.5%
unpow254.5%
unpow154.5%
sqr-pow29.6%
hypot-def43.1%
+-commutative43.1%
fma-def43.1%
metadata-eval43.1%
Simplified43.1%
*-commutative43.1%
frac-times74.7%
*-un-lft-identity74.7%
unpow1/274.7%
Applied egg-rr74.7%
Taylor expanded in F around inf 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in B around 0 91.9%
Final simplification79.8%
(FPCore (F B x)
:precision binary64
(if (<= F -1.15e-21)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -1.55e-221)
(- (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x B))
(if (<= F 2.5e-84)
(/ (- x) (/ (sin B) (cos B)))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.15e-21) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -1.55e-221) {
tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else if (F <= 2.5e-84) {
tmp = -x / (sin(B) / cos(B));
} else {
tmp = (x * (-1.0 / tan(B))) + (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.15d-21)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-1.55d-221)) then
tmp = ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / b)
else if (f <= 2.5d-84) then
tmp = -x / (sin(b) / cos(b))
else
tmp = (x * ((-1.0d0) / tan(b))) + (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.15e-21) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -1.55e-221) {
tmp = ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else if (F <= 2.5e-84) {
tmp = -x / (Math.sin(B) / Math.cos(B));
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.15e-21: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -1.55e-221: tmp = ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B) elif F <= 2.5e-84: tmp = -x / (math.sin(B) / math.cos(B)) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.15e-21) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -1.55e-221) tmp = Float64(Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)); elseif (F <= 2.5e-84) tmp = Float64(Float64(-x) / Float64(sin(B) / cos(B))); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.15e-21) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -1.55e-221) tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B); elseif (F <= 2.5e-84) tmp = -x / (sin(B) / cos(B)); else tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.15e-21], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.55e-221], 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, 2.5e-84], N[((-x) / N[(N[Sin[B], $MachinePrecision] / N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.15 \cdot 10^{-21}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -1.55 \cdot 10^{-221}:\\
\;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{-84}:\\
\;\;\;\;\frac{-x}{\frac{\sin B}{\cos B}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.15e-21Initial program 67.2%
Taylor expanded in F around -inf 97.9%
div-inv98.0%
expm1-log1p-u63.7%
expm1-udef63.7%
Applied egg-rr63.7%
expm1-def63.7%
expm1-log1p98.0%
Simplified98.0%
if -1.15e-21 < F < -1.55e-221Initial program 99.4%
Taylor expanded in B around 0 73.3%
Taylor expanded in B around 0 61.7%
Taylor expanded in F around 0 61.7%
if -1.55e-221 < F < 2.5000000000000001e-84Initial program 99.4%
Taylor expanded in F around -inf 33.7%
Taylor expanded in x around inf 76.9%
mul-1-neg76.9%
associate-/l*77.0%
distribute-neg-frac77.0%
Simplified77.0%
if 2.5000000000000001e-84 < F Initial program 64.9%
Taylor expanded in F around inf 92.4%
Final simplification86.9%
(FPCore (F B x)
:precision binary64
(if (<= F -3.1e-22)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -1.55e-221)
(- (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x B))
(if (<= F 63.0)
(/ (- x) (/ (sin B) (cos B)))
(if (or (<= F 3.5e+145) (not (<= F 5.2e+224)))
(- (/ F (* (sin B) F)) (/ x B))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.1e-22) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -1.55e-221) {
tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else if (F <= 63.0) {
tmp = -x / (sin(B) / cos(B));
} else if ((F <= 3.5e+145) || !(F <= 5.2e+224)) {
tmp = (F / (sin(B) * F)) - (x / B);
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3.1d-22)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-1.55d-221)) then
tmp = ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / b)
else if (f <= 63.0d0) then
tmp = -x / (sin(b) / cos(b))
else if ((f <= 3.5d+145) .or. (.not. (f <= 5.2d+224))) then
tmp = (f / (sin(b) * f)) - (x / b)
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.1e-22) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -1.55e-221) {
tmp = ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else if (F <= 63.0) {
tmp = -x / (Math.sin(B) / Math.cos(B));
} else if ((F <= 3.5e+145) || !(F <= 5.2e+224)) {
tmp = (F / (Math.sin(B) * F)) - (x / B);
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.1e-22: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -1.55e-221: tmp = ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B) elif F <= 63.0: tmp = -x / (math.sin(B) / math.cos(B)) elif (F <= 3.5e+145) or not (F <= 5.2e+224): tmp = (F / (math.sin(B) * F)) - (x / B) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.1e-22) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -1.55e-221) tmp = Float64(Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)); elseif (F <= 63.0) tmp = Float64(Float64(-x) / Float64(sin(B) / cos(B))); elseif ((F <= 3.5e+145) || !(F <= 5.2e+224)) tmp = Float64(Float64(F / Float64(sin(B) * F)) - Float64(x / B)); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.1e-22) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -1.55e-221) tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B); elseif (F <= 63.0) tmp = -x / (sin(B) / cos(B)); elseif ((F <= 3.5e+145) || ~((F <= 5.2e+224))) tmp = (F / (sin(B) * F)) - (x / B); else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.1e-22], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.55e-221], 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, 63.0], N[((-x) / N[(N[Sin[B], $MachinePrecision] / N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 3.5e+145], N[Not[LessEqual[F, 5.2e+224]], $MachinePrecision]], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.1 \cdot 10^{-22}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -1.55 \cdot 10^{-221}:\\
\;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 63:\\
\;\;\;\;\frac{-x}{\frac{\sin B}{\cos B}}\\
\mathbf{elif}\;F \leq 3.5 \cdot 10^{+145} \lor \neg \left(F \leq 5.2 \cdot 10^{+224}\right):\\
\;\;\;\;\frac{F}{\sin B \cdot F} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -3.10000000000000013e-22Initial program 67.2%
Taylor expanded in F around -inf 97.9%
div-inv98.0%
expm1-log1p-u63.7%
expm1-udef63.7%
Applied egg-rr63.7%
expm1-def63.7%
expm1-log1p98.0%
Simplified98.0%
if -3.10000000000000013e-22 < F < -1.55e-221Initial program 99.4%
Taylor expanded in B around 0 73.3%
Taylor expanded in B around 0 61.7%
Taylor expanded in F around 0 61.7%
if -1.55e-221 < F < 63Initial program 99.4%
Taylor expanded in F around -inf 37.2%
Taylor expanded in x around inf 71.7%
mul-1-neg71.7%
associate-/l*71.8%
distribute-neg-frac71.8%
Simplified71.8%
if 63 < F < 3.5000000000000001e145 or 5.2000000000000001e224 < F Initial program 60.8%
add-sqr-sqrt60.8%
unpow-prod-down60.6%
+-commutative60.6%
fma-def60.6%
fma-def60.6%
metadata-eval60.6%
metadata-eval60.6%
+-commutative60.6%
fma-def60.6%
fma-def60.6%
metadata-eval60.6%
metadata-eval60.6%
Applied egg-rr60.6%
pow-sqr60.8%
metadata-eval60.8%
unpow-160.8%
fma-udef60.8%
+-commutative60.8%
fma-udef60.8%
unpow260.8%
associate-+r+60.8%
unpow260.8%
unpow160.8%
sqr-pow57.0%
hypot-def71.8%
+-commutative71.8%
fma-def71.8%
metadata-eval71.8%
Simplified71.8%
*-commutative71.8%
frac-times89.0%
*-un-lft-identity89.0%
unpow1/287.2%
Applied egg-rr87.2%
Taylor expanded in F around inf 98.4%
*-commutative98.4%
Simplified98.4%
Taylor expanded in B around 0 86.6%
if 3.5000000000000001e145 < F < 5.2000000000000001e224Initial program 54.5%
add-sqr-sqrt54.5%
unpow-prod-down54.5%
+-commutative54.5%
fma-def54.5%
fma-def54.5%
metadata-eval54.5%
metadata-eval54.5%
+-commutative54.5%
fma-def54.5%
fma-def54.5%
metadata-eval54.5%
metadata-eval54.5%
Applied egg-rr54.5%
pow-sqr54.5%
metadata-eval54.5%
unpow-154.5%
fma-udef54.5%
+-commutative54.5%
fma-udef54.5%
unpow254.5%
associate-+r+54.5%
unpow254.5%
unpow154.5%
sqr-pow29.6%
hypot-def43.1%
+-commutative43.1%
fma-def43.1%
metadata-eval43.1%
Simplified43.1%
*-commutative43.1%
frac-times74.7%
*-un-lft-identity74.7%
unpow1/274.7%
Applied egg-rr74.7%
Taylor expanded in F around inf 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in B around 0 91.9%
Final simplification83.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (* x (/ 1.0 (tan B)))))
(t_1 (* x (/ -1.0 (tan B))))
(t_2 (- (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x B))))
(if (<= F -1.3e+177)
t_0
(if (<= F -1.32e+31)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -4.8e-21)
t_0
(if (<= F -1.3e-221)
t_2
(if (<= F 2.7e-180)
(+ t_1 (* (/ F B) (/ -1.0 F)))
(if (<= F 1.15e-59)
t_2
(if (<= F 7.5e+224)
(+ t_1 (/ 1.0 B))
(- (/ F (* (sin B) F)) (/ x B)))))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x * (1.0 / tan(B)));
double t_1 = x * (-1.0 / tan(B));
double t_2 = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
double tmp;
if (F <= -1.3e+177) {
tmp = t_0;
} else if (F <= -1.32e+31) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -4.8e-21) {
tmp = t_0;
} else if (F <= -1.3e-221) {
tmp = t_2;
} else if (F <= 2.7e-180) {
tmp = t_1 + ((F / B) * (-1.0 / F));
} else if (F <= 1.15e-59) {
tmp = t_2;
} else if (F <= 7.5e+224) {
tmp = t_1 + (1.0 / B);
} else {
tmp = (F / (sin(B) * F)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = ((-1.0d0) / b) - (x * (1.0d0 / tan(b)))
t_1 = x * ((-1.0d0) / tan(b))
t_2 = ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / b)
if (f <= (-1.3d+177)) then
tmp = t_0
else if (f <= (-1.32d+31)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-4.8d-21)) then
tmp = t_0
else if (f <= (-1.3d-221)) then
tmp = t_2
else if (f <= 2.7d-180) then
tmp = t_1 + ((f / b) * ((-1.0d0) / f))
else if (f <= 1.15d-59) then
tmp = t_2
else if (f <= 7.5d+224) then
tmp = t_1 + (1.0d0 / b)
else
tmp = (f / (sin(b) * f)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x * (1.0 / Math.tan(B)));
double t_1 = x * (-1.0 / Math.tan(B));
double t_2 = ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
double tmp;
if (F <= -1.3e+177) {
tmp = t_0;
} else if (F <= -1.32e+31) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -4.8e-21) {
tmp = t_0;
} else if (F <= -1.3e-221) {
tmp = t_2;
} else if (F <= 2.7e-180) {
tmp = t_1 + ((F / B) * (-1.0 / F));
} else if (F <= 1.15e-59) {
tmp = t_2;
} else if (F <= 7.5e+224) {
tmp = t_1 + (1.0 / B);
} else {
tmp = (F / (Math.sin(B) * F)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x * (1.0 / math.tan(B))) t_1 = x * (-1.0 / math.tan(B)) t_2 = ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B) tmp = 0 if F <= -1.3e+177: tmp = t_0 elif F <= -1.32e+31: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -4.8e-21: tmp = t_0 elif F <= -1.3e-221: tmp = t_2 elif F <= 2.7e-180: tmp = t_1 + ((F / B) * (-1.0 / F)) elif F <= 1.15e-59: tmp = t_2 elif F <= 7.5e+224: tmp = t_1 + (1.0 / B) else: tmp = (F / (math.sin(B) * F)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x * Float64(1.0 / tan(B)))) t_1 = Float64(x * Float64(-1.0 / tan(B))) t_2 = Float64(Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)) tmp = 0.0 if (F <= -1.3e+177) tmp = t_0; elseif (F <= -1.32e+31) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -4.8e-21) tmp = t_0; elseif (F <= -1.3e-221) tmp = t_2; elseif (F <= 2.7e-180) tmp = Float64(t_1 + Float64(Float64(F / B) * Float64(-1.0 / F))); elseif (F <= 1.15e-59) tmp = t_2; elseif (F <= 7.5e+224) tmp = Float64(t_1 + Float64(1.0 / B)); else tmp = Float64(Float64(F / Float64(sin(B) * F)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x * (1.0 / tan(B))); t_1 = x * (-1.0 / tan(B)); t_2 = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B); tmp = 0.0; if (F <= -1.3e+177) tmp = t_0; elseif (F <= -1.32e+31) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -4.8e-21) tmp = t_0; elseif (F <= -1.3e-221) tmp = t_2; elseif (F <= 2.7e-180) tmp = t_1 + ((F / B) * (-1.0 / F)); elseif (F <= 1.15e-59) tmp = t_2; elseif (F <= 7.5e+224) tmp = t_1 + (1.0 / B); else tmp = (F / (sin(B) * F)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = 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, -1.3e+177], t$95$0, If[LessEqual[F, -1.32e+31], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.8e-21], t$95$0, If[LessEqual[F, -1.3e-221], t$95$2, If[LessEqual[F, 2.7e-180], N[(t$95$1 + N[(N[(F / B), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.15e-59], t$95$2, If[LessEqual[F, 7.5e+224], N[(t$95$1 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - x \cdot \frac{1}{\tan B}\\
t_1 := x \cdot \frac{-1}{\tan B}\\
t_2 := \frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
\mathbf{if}\;F \leq -1.3 \cdot 10^{+177}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -1.32 \cdot 10^{+31}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -4.8 \cdot 10^{-21}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -1.3 \cdot 10^{-221}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;F \leq 2.7 \cdot 10^{-180}:\\
\;\;\;\;t_1 + \frac{F}{B} \cdot \frac{-1}{F}\\
\mathbf{elif}\;F \leq 1.15 \cdot 10^{-59}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;F \leq 7.5 \cdot 10^{+224}:\\
\;\;\;\;t_1 + \frac{1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{\sin B \cdot F} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.2999999999999999e177 or -1.32000000000000011e31 < F < -4.7999999999999999e-21Initial program 64.2%
Taylor expanded in F around -inf 96.5%
Taylor expanded in B around 0 87.0%
if -1.2999999999999999e177 < F < -1.32000000000000011e31Initial program 71.6%
Taylor expanded in F around -inf 99.9%
Taylor expanded in B around 0 84.2%
Taylor expanded in x around 0 84.2%
sub-neg84.2%
mul-1-neg84.2%
+-commutative84.2%
distribute-neg-frac84.2%
metadata-eval84.2%
sub-neg84.2%
Simplified84.2%
if -4.7999999999999999e-21 < F < -1.3000000000000001e-221 or 2.70000000000000014e-180 < F < 1.1499999999999999e-59Initial program 99.4%
Taylor expanded in B around 0 76.8%
Taylor expanded in B around 0 62.1%
Taylor expanded in F around 0 62.1%
if -1.3000000000000001e-221 < F < 2.70000000000000014e-180Initial program 99.5%
Taylor expanded in B around 0 95.4%
Taylor expanded in F around -inf 64.2%
if 1.1499999999999999e-59 < F < 7.500000000000001e224Initial program 79.4%
add-sqr-sqrt79.3%
unpow-prod-down79.2%
+-commutative79.2%
fma-def79.2%
fma-def79.2%
metadata-eval79.2%
metadata-eval79.2%
+-commutative79.2%
fma-def79.2%
fma-def79.2%
metadata-eval79.2%
metadata-eval79.2%
Applied egg-rr79.2%
pow-sqr79.3%
metadata-eval79.3%
unpow-179.3%
fma-udef79.3%
+-commutative79.3%
fma-udef79.3%
unpow279.3%
associate-+r+79.3%
unpow279.3%
unpow179.3%
sqr-pow67.3%
hypot-def72.1%
+-commutative72.1%
fma-def72.1%
metadata-eval72.1%
Simplified72.1%
*-commutative72.1%
frac-times86.3%
*-un-lft-identity86.3%
unpow1/286.3%
Applied egg-rr86.3%
Taylor expanded in F around inf 93.3%
*-commutative93.3%
Simplified93.3%
Taylor expanded in B around 0 77.6%
if 7.500000000000001e224 < F Initial program 13.3%
add-sqr-sqrt13.3%
unpow-prod-down13.3%
+-commutative13.3%
fma-def13.3%
fma-def13.3%
metadata-eval13.3%
metadata-eval13.3%
+-commutative13.3%
fma-def13.3%
fma-def13.3%
metadata-eval13.3%
metadata-eval13.3%
Applied egg-rr13.3%
pow-sqr13.3%
metadata-eval13.3%
unpow-113.3%
fma-udef13.3%
+-commutative13.3%
fma-udef13.3%
unpow213.3%
associate-+r+13.3%
unpow213.3%
unpow113.3%
sqr-pow13.3%
hypot-def51.1%
+-commutative51.1%
fma-def51.1%
metadata-eval51.1%
Simplified51.1%
*-commutative51.1%
frac-times86.2%
*-un-lft-identity86.2%
unpow1/281.6%
Applied egg-rr81.6%
Taylor expanded in F around inf 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in B around 0 90.8%
Final simplification75.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (* x (/ 1.0 (tan B))))))
(if (<= F -2.15e+177)
t_0
(if (<= F -8.8e+30)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -6.6e-49)
t_0
(if (<= F -5.2e-159)
(/ (- x) B)
(if (or (<= F 2e+38) (and (not (<= F 1.8e+146)) (<= F 3.8e+224)))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B))
(- (/ F (* (sin B) F)) (/ x B)))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x * (1.0 / tan(B)));
double tmp;
if (F <= -2.15e+177) {
tmp = t_0;
} else if (F <= -8.8e+30) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -6.6e-49) {
tmp = t_0;
} else if (F <= -5.2e-159) {
tmp = -x / B;
} else if ((F <= 2e+38) || (!(F <= 1.8e+146) && (F <= 3.8e+224))) {
tmp = (x * (-1.0 / tan(B))) + (1.0 / B);
} else {
tmp = (F / (sin(B) * F)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / b) - (x * (1.0d0 / tan(b)))
if (f <= (-2.15d+177)) then
tmp = t_0
else if (f <= (-8.8d+30)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-6.6d-49)) then
tmp = t_0
else if (f <= (-5.2d-159)) then
tmp = -x / b
else if ((f <= 2d+38) .or. (.not. (f <= 1.8d+146)) .and. (f <= 3.8d+224)) then
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / b)
else
tmp = (f / (sin(b) * f)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x * (1.0 / Math.tan(B)));
double tmp;
if (F <= -2.15e+177) {
tmp = t_0;
} else if (F <= -8.8e+30) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -6.6e-49) {
tmp = t_0;
} else if (F <= -5.2e-159) {
tmp = -x / B;
} else if ((F <= 2e+38) || (!(F <= 1.8e+146) && (F <= 3.8e+224))) {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
} else {
tmp = (F / (Math.sin(B) * F)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x * (1.0 / math.tan(B))) tmp = 0 if F <= -2.15e+177: tmp = t_0 elif F <= -8.8e+30: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -6.6e-49: tmp = t_0 elif F <= -5.2e-159: tmp = -x / B elif (F <= 2e+38) or (not (F <= 1.8e+146) and (F <= 3.8e+224)): tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) else: tmp = (F / (math.sin(B) * F)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x * Float64(1.0 / tan(B)))) tmp = 0.0 if (F <= -2.15e+177) tmp = t_0; elseif (F <= -8.8e+30) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -6.6e-49) tmp = t_0; elseif (F <= -5.2e-159) tmp = Float64(Float64(-x) / B); elseif ((F <= 2e+38) || (!(F <= 1.8e+146) && (F <= 3.8e+224))) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); else tmp = Float64(Float64(F / Float64(sin(B) * F)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x * (1.0 / tan(B))); tmp = 0.0; if (F <= -2.15e+177) tmp = t_0; elseif (F <= -8.8e+30) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -6.6e-49) tmp = t_0; elseif (F <= -5.2e-159) tmp = -x / B; elseif ((F <= 2e+38) || (~((F <= 1.8e+146)) && (F <= 3.8e+224))) tmp = (x * (-1.0 / tan(B))) + (1.0 / B); else tmp = (F / (sin(B) * F)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.15e+177], t$95$0, If[LessEqual[F, -8.8e+30], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -6.6e-49], t$95$0, If[LessEqual[F, -5.2e-159], N[((-x) / B), $MachinePrecision], If[Or[LessEqual[F, 2e+38], And[N[Not[LessEqual[F, 1.8e+146]], $MachinePrecision], LessEqual[F, 3.8e+224]]], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{if}\;F \leq -2.15 \cdot 10^{+177}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -8.8 \cdot 10^{+30}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -6.6 \cdot 10^{-49}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -5.2 \cdot 10^{-159}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{elif}\;F \leq 2 \cdot 10^{+38} \lor \neg \left(F \leq 1.8 \cdot 10^{+146}\right) \land F \leq 3.8 \cdot 10^{+224}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{\sin B \cdot F} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.15000000000000018e177 or -8.7999999999999999e30 < F < -6.6e-49Initial program 66.4%
Taylor expanded in F around -inf 94.7%
Taylor expanded in B around 0 85.9%
if -2.15000000000000018e177 < F < -8.7999999999999999e30Initial program 71.6%
Taylor expanded in F around -inf 99.9%
Taylor expanded in B around 0 84.2%
Taylor expanded in x around 0 84.2%
sub-neg84.2%
mul-1-neg84.2%
+-commutative84.2%
distribute-neg-frac84.2%
metadata-eval84.2%
sub-neg84.2%
Simplified84.2%
if -6.6e-49 < F < -5.1999999999999997e-159Initial program 99.4%
Taylor expanded in F around -inf 20.2%
Taylor expanded in B around 0 12.2%
associate-*r/12.2%
distribute-lft-in12.2%
metadata-eval12.2%
mul-1-neg12.2%
Simplified12.2%
Taylor expanded in x around inf 36.9%
associate-*r/36.9%
mul-1-neg36.9%
Simplified36.9%
if -5.1999999999999997e-159 < F < 1.99999999999999995e38 or 1.7999999999999999e146 < F < 3.80000000000000025e224Initial program 88.8%
add-sqr-sqrt88.8%
unpow-prod-down88.8%
+-commutative88.8%
fma-def88.8%
fma-def88.8%
metadata-eval88.8%
metadata-eval88.8%
+-commutative88.8%
fma-def88.8%
fma-def88.8%
metadata-eval88.8%
metadata-eval88.8%
Applied egg-rr88.8%
pow-sqr88.8%
metadata-eval88.8%
unpow-188.8%
fma-udef88.8%
+-commutative88.8%
fma-udef88.8%
unpow288.8%
associate-+r+88.8%
unpow288.8%
unpow188.8%
sqr-pow81.9%
hypot-def85.1%
+-commutative85.1%
fma-def85.1%
metadata-eval85.1%
Simplified85.1%
*-commutative85.1%
frac-times92.7%
*-un-lft-identity92.7%
unpow1/292.7%
Applied egg-rr92.7%
Taylor expanded in F around inf 48.6%
*-commutative48.6%
Simplified48.6%
Taylor expanded in B around 0 60.1%
if 1.99999999999999995e38 < F < 1.7999999999999999e146 or 3.80000000000000025e224 < F Initial program 57.0%
add-sqr-sqrt57.0%
unpow-prod-down56.8%
+-commutative56.8%
fma-def56.8%
fma-def56.8%
metadata-eval56.8%
metadata-eval56.8%
+-commutative56.8%
fma-def56.8%
fma-def56.8%
metadata-eval56.8%
metadata-eval56.8%
Applied egg-rr56.8%
pow-sqr57.0%
metadata-eval57.0%
unpow-157.0%
fma-udef57.0%
+-commutative57.0%
fma-udef57.0%
unpow257.0%
associate-+r+57.0%
unpow257.0%
unpow157.0%
sqr-pow54.8%
hypot-def71.1%
+-commutative71.1%
fma-def71.1%
metadata-eval71.1%
Simplified71.1%
*-commutative71.1%
frac-times89.9%
*-un-lft-identity89.9%
unpow1/287.9%
Applied egg-rr87.9%
Taylor expanded in F around inf 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in B around 0 88.5%
Final simplification71.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B))))
(t_1 (- (/ -1.0 B) (* x (/ 1.0 (tan B))))))
(if (<= F -3.5e+176)
t_1
(if (<= F -1.6e+31)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -4.5e-49)
t_1
(if (<= F -3e-159)
(/ (- x) B)
(if (<= F 46.0)
(+ t_0 (* (/ F B) (/ -1.0 F)))
(if (or (<= F 7.8e+147) (not (<= F 8.5e+224)))
(- (/ F (* (sin B) F)) (/ x B))
(+ t_0 (/ 1.0 B))))))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double t_1 = (-1.0 / B) - (x * (1.0 / tan(B)));
double tmp;
if (F <= -3.5e+176) {
tmp = t_1;
} else if (F <= -1.6e+31) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -4.5e-49) {
tmp = t_1;
} else if (F <= -3e-159) {
tmp = -x / B;
} else if (F <= 46.0) {
tmp = t_0 + ((F / B) * (-1.0 / F));
} else if ((F <= 7.8e+147) || !(F <= 8.5e+224)) {
tmp = (F / (sin(B) * F)) - (x / B);
} else {
tmp = t_0 + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
t_1 = ((-1.0d0) / b) - (x * (1.0d0 / tan(b)))
if (f <= (-3.5d+176)) then
tmp = t_1
else if (f <= (-1.6d+31)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-4.5d-49)) then
tmp = t_1
else if (f <= (-3d-159)) then
tmp = -x / b
else if (f <= 46.0d0) then
tmp = t_0 + ((f / b) * ((-1.0d0) / f))
else if ((f <= 7.8d+147) .or. (.not. (f <= 8.5d+224))) then
tmp = (f / (sin(b) * f)) - (x / b)
else
tmp = t_0 + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double t_1 = (-1.0 / B) - (x * (1.0 / Math.tan(B)));
double tmp;
if (F <= -3.5e+176) {
tmp = t_1;
} else if (F <= -1.6e+31) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -4.5e-49) {
tmp = t_1;
} else if (F <= -3e-159) {
tmp = -x / B;
} else if (F <= 46.0) {
tmp = t_0 + ((F / B) * (-1.0 / F));
} else if ((F <= 7.8e+147) || !(F <= 8.5e+224)) {
tmp = (F / (Math.sin(B) * F)) - (x / B);
} else {
tmp = t_0 + (1.0 / B);
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) t_1 = (-1.0 / B) - (x * (1.0 / math.tan(B))) tmp = 0 if F <= -3.5e+176: tmp = t_1 elif F <= -1.6e+31: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -4.5e-49: tmp = t_1 elif F <= -3e-159: tmp = -x / B elif F <= 46.0: tmp = t_0 + ((F / B) * (-1.0 / F)) elif (F <= 7.8e+147) or not (F <= 8.5e+224): tmp = (F / (math.sin(B) * F)) - (x / B) else: tmp = t_0 + (1.0 / B) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) t_1 = Float64(Float64(-1.0 / B) - Float64(x * Float64(1.0 / tan(B)))) tmp = 0.0 if (F <= -3.5e+176) tmp = t_1; elseif (F <= -1.6e+31) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -4.5e-49) tmp = t_1; elseif (F <= -3e-159) tmp = Float64(Float64(-x) / B); elseif (F <= 46.0) tmp = Float64(t_0 + Float64(Float64(F / B) * Float64(-1.0 / F))); elseif ((F <= 7.8e+147) || !(F <= 8.5e+224)) tmp = Float64(Float64(F / Float64(sin(B) * F)) - Float64(x / B)); else tmp = Float64(t_0 + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); t_1 = (-1.0 / B) - (x * (1.0 / tan(B))); tmp = 0.0; if (F <= -3.5e+176) tmp = t_1; elseif (F <= -1.6e+31) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -4.5e-49) tmp = t_1; elseif (F <= -3e-159) tmp = -x / B; elseif (F <= 46.0) tmp = t_0 + ((F / B) * (-1.0 / F)); elseif ((F <= 7.8e+147) || ~((F <= 8.5e+224))) tmp = (F / (sin(B) * F)) - (x / B); else tmp = t_0 + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.5e+176], t$95$1, If[LessEqual[F, -1.6e+31], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.5e-49], t$95$1, If[LessEqual[F, -3e-159], N[((-x) / B), $MachinePrecision], If[LessEqual[F, 46.0], N[(t$95$0 + N[(N[(F / B), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 7.8e+147], N[Not[LessEqual[F, 8.5e+224]], $MachinePrecision]], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
t_1 := \frac{-1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{if}\;F \leq -3.5 \cdot 10^{+176}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -1.6 \cdot 10^{+31}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -4.5 \cdot 10^{-49}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -3 \cdot 10^{-159}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{elif}\;F \leq 46:\\
\;\;\;\;t_0 + \frac{F}{B} \cdot \frac{-1}{F}\\
\mathbf{elif}\;F \leq 7.8 \cdot 10^{+147} \lor \neg \left(F \leq 8.5 \cdot 10^{+224}\right):\\
\;\;\;\;\frac{F}{\sin B \cdot F} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{B}\\
\end{array}
\end{array}
if F < -3.50000000000000003e176 or -1.6e31 < F < -4.5000000000000002e-49Initial program 66.4%
Taylor expanded in F around -inf 94.7%
Taylor expanded in B around 0 85.9%
if -3.50000000000000003e176 < F < -1.6e31Initial program 71.6%
Taylor expanded in F around -inf 99.9%
Taylor expanded in B around 0 84.2%
Taylor expanded in x around 0 84.2%
sub-neg84.2%
mul-1-neg84.2%
+-commutative84.2%
distribute-neg-frac84.2%
metadata-eval84.2%
sub-neg84.2%
Simplified84.2%
if -4.5000000000000002e-49 < F < -3.00000000000000009e-159Initial program 99.4%
Taylor expanded in F around -inf 20.2%
Taylor expanded in B around 0 12.2%
associate-*r/12.2%
distribute-lft-in12.2%
metadata-eval12.2%
mul-1-neg12.2%
Simplified12.2%
Taylor expanded in x around inf 36.9%
associate-*r/36.9%
mul-1-neg36.9%
Simplified36.9%
if -3.00000000000000009e-159 < F < 46Initial program 99.5%
Taylor expanded in B around 0 91.0%
Taylor expanded in F around -inf 53.2%
if 46 < F < 7.80000000000000033e147 or 8.50000000000000046e224 < F Initial program 60.8%
add-sqr-sqrt60.8%
unpow-prod-down60.6%
+-commutative60.6%
fma-def60.6%
fma-def60.6%
metadata-eval60.6%
metadata-eval60.6%
+-commutative60.6%
fma-def60.6%
fma-def60.6%
metadata-eval60.6%
metadata-eval60.6%
Applied egg-rr60.6%
pow-sqr60.8%
metadata-eval60.8%
unpow-160.8%
fma-udef60.8%
+-commutative60.8%
fma-udef60.8%
unpow260.8%
associate-+r+60.8%
unpow260.8%
unpow160.8%
sqr-pow57.0%
hypot-def71.8%
+-commutative71.8%
fma-def71.8%
metadata-eval71.8%
Simplified71.8%
*-commutative71.8%
frac-times89.0%
*-un-lft-identity89.0%
unpow1/287.2%
Applied egg-rr87.2%
Taylor expanded in F around inf 98.4%
*-commutative98.4%
Simplified98.4%
Taylor expanded in B around 0 86.6%
if 7.80000000000000033e147 < F < 8.50000000000000046e224Initial program 54.5%
add-sqr-sqrt54.5%
unpow-prod-down54.5%
+-commutative54.5%
fma-def54.5%
fma-def54.5%
metadata-eval54.5%
metadata-eval54.5%
+-commutative54.5%
fma-def54.5%
fma-def54.5%
metadata-eval54.5%
metadata-eval54.5%
Applied egg-rr54.5%
pow-sqr54.5%
metadata-eval54.5%
unpow-154.5%
fma-udef54.5%
+-commutative54.5%
fma-udef54.5%
unpow254.5%
associate-+r+54.5%
unpow254.5%
unpow154.5%
sqr-pow29.6%
hypot-def43.1%
+-commutative43.1%
fma-def43.1%
metadata-eval43.1%
Simplified43.1%
*-commutative43.1%
frac-times74.7%
*-un-lft-identity74.7%
unpow1/274.7%
Applied egg-rr74.7%
Taylor expanded in F around inf 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in B around 0 91.9%
Final simplification72.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B))))
(t_1 (- (/ -1.0 B) (* x (/ 1.0 (tan B))))))
(if (<= F -3e+176)
t_1
(if (<= F -9e+30)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.7e-48)
t_1
(if (<= F -4.6e-159)
(/ (- x) B)
(if (<= F 2.5e+38)
(+ t_0 (* (/ F B) (/ 1.0 F)))
(if (or (<= F 9.5e+148) (not (<= F 5.7e+224)))
(- (/ F (* (sin B) F)) (/ x B))
(+ t_0 (/ 1.0 B))))))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double t_1 = (-1.0 / B) - (x * (1.0 / tan(B)));
double tmp;
if (F <= -3e+176) {
tmp = t_1;
} else if (F <= -9e+30) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.7e-48) {
tmp = t_1;
} else if (F <= -4.6e-159) {
tmp = -x / B;
} else if (F <= 2.5e+38) {
tmp = t_0 + ((F / B) * (1.0 / F));
} else if ((F <= 9.5e+148) || !(F <= 5.7e+224)) {
tmp = (F / (sin(B) * F)) - (x / B);
} else {
tmp = t_0 + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
t_1 = ((-1.0d0) / b) - (x * (1.0d0 / tan(b)))
if (f <= (-3d+176)) then
tmp = t_1
else if (f <= (-9d+30)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.7d-48)) then
tmp = t_1
else if (f <= (-4.6d-159)) then
tmp = -x / b
else if (f <= 2.5d+38) then
tmp = t_0 + ((f / b) * (1.0d0 / f))
else if ((f <= 9.5d+148) .or. (.not. (f <= 5.7d+224))) then
tmp = (f / (sin(b) * f)) - (x / b)
else
tmp = t_0 + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double t_1 = (-1.0 / B) - (x * (1.0 / Math.tan(B)));
double tmp;
if (F <= -3e+176) {
tmp = t_1;
} else if (F <= -9e+30) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.7e-48) {
tmp = t_1;
} else if (F <= -4.6e-159) {
tmp = -x / B;
} else if (F <= 2.5e+38) {
tmp = t_0 + ((F / B) * (1.0 / F));
} else if ((F <= 9.5e+148) || !(F <= 5.7e+224)) {
tmp = (F / (Math.sin(B) * F)) - (x / B);
} else {
tmp = t_0 + (1.0 / B);
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) t_1 = (-1.0 / B) - (x * (1.0 / math.tan(B))) tmp = 0 if F <= -3e+176: tmp = t_1 elif F <= -9e+30: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.7e-48: tmp = t_1 elif F <= -4.6e-159: tmp = -x / B elif F <= 2.5e+38: tmp = t_0 + ((F / B) * (1.0 / F)) elif (F <= 9.5e+148) or not (F <= 5.7e+224): tmp = (F / (math.sin(B) * F)) - (x / B) else: tmp = t_0 + (1.0 / B) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) t_1 = Float64(Float64(-1.0 / B) - Float64(x * Float64(1.0 / tan(B)))) tmp = 0.0 if (F <= -3e+176) tmp = t_1; elseif (F <= -9e+30) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.7e-48) tmp = t_1; elseif (F <= -4.6e-159) tmp = Float64(Float64(-x) / B); elseif (F <= 2.5e+38) tmp = Float64(t_0 + Float64(Float64(F / B) * Float64(1.0 / F))); elseif ((F <= 9.5e+148) || !(F <= 5.7e+224)) tmp = Float64(Float64(F / Float64(sin(B) * F)) - Float64(x / B)); else tmp = Float64(t_0 + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); t_1 = (-1.0 / B) - (x * (1.0 / tan(B))); tmp = 0.0; if (F <= -3e+176) tmp = t_1; elseif (F <= -9e+30) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.7e-48) tmp = t_1; elseif (F <= -4.6e-159) tmp = -x / B; elseif (F <= 2.5e+38) tmp = t_0 + ((F / B) * (1.0 / F)); elseif ((F <= 9.5e+148) || ~((F <= 5.7e+224))) tmp = (F / (sin(B) * F)) - (x / B); else tmp = t_0 + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3e+176], t$95$1, If[LessEqual[F, -9e+30], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.7e-48], t$95$1, If[LessEqual[F, -4.6e-159], N[((-x) / B), $MachinePrecision], If[LessEqual[F, 2.5e+38], N[(t$95$0 + N[(N[(F / B), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 9.5e+148], N[Not[LessEqual[F, 5.7e+224]], $MachinePrecision]], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
t_1 := \frac{-1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{if}\;F \leq -3 \cdot 10^{+176}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -9 \cdot 10^{+30}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.7 \cdot 10^{-48}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -4.6 \cdot 10^{-159}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{+38}:\\
\;\;\;\;t_0 + \frac{F}{B} \cdot \frac{1}{F}\\
\mathbf{elif}\;F \leq 9.5 \cdot 10^{+148} \lor \neg \left(F \leq 5.7 \cdot 10^{+224}\right):\\
\;\;\;\;\frac{F}{\sin B \cdot F} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{B}\\
\end{array}
\end{array}
if F < -3e176 or -8.9999999999999999e30 < F < -1.70000000000000014e-48Initial program 66.4%
Taylor expanded in F around -inf 94.7%
Taylor expanded in B around 0 85.9%
if -3e176 < F < -8.9999999999999999e30Initial program 71.6%
Taylor expanded in F around -inf 99.9%
Taylor expanded in B around 0 84.2%
Taylor expanded in x around 0 84.2%
sub-neg84.2%
mul-1-neg84.2%
+-commutative84.2%
distribute-neg-frac84.2%
metadata-eval84.2%
sub-neg84.2%
Simplified84.2%
if -1.70000000000000014e-48 < F < -4.59999999999999957e-159Initial program 99.4%
Taylor expanded in F around -inf 20.2%
Taylor expanded in B around 0 12.2%
associate-*r/12.2%
distribute-lft-in12.2%
metadata-eval12.2%
mul-1-neg12.2%
Simplified12.2%
Taylor expanded in x around inf 36.9%
associate-*r/36.9%
mul-1-neg36.9%
Simplified36.9%
if -4.59999999999999957e-159 < F < 2.49999999999999985e38Initial program 99.5%
Taylor expanded in B around 0 90.3%
Taylor expanded in F around inf 55.4%
if 2.49999999999999985e38 < F < 9.5000000000000002e148 or 5.69999999999999997e224 < F Initial program 57.0%
add-sqr-sqrt57.0%
unpow-prod-down56.8%
+-commutative56.8%
fma-def56.8%
fma-def56.8%
metadata-eval56.8%
metadata-eval56.8%
+-commutative56.8%
fma-def56.8%
fma-def56.8%
metadata-eval56.8%
metadata-eval56.8%
Applied egg-rr56.8%
pow-sqr57.0%
metadata-eval57.0%
unpow-157.0%
fma-udef57.0%
+-commutative57.0%
fma-udef57.0%
unpow257.0%
associate-+r+57.0%
unpow257.0%
unpow157.0%
sqr-pow54.8%
hypot-def71.1%
+-commutative71.1%
fma-def71.1%
metadata-eval71.1%
Simplified71.1%
*-commutative71.1%
frac-times89.9%
*-un-lft-identity89.9%
unpow1/287.9%
Applied egg-rr87.9%
Taylor expanded in F around inf 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in B around 0 88.5%
if 9.5000000000000002e148 < F < 5.69999999999999997e224Initial program 54.5%
add-sqr-sqrt54.5%
unpow-prod-down54.5%
+-commutative54.5%
fma-def54.5%
fma-def54.5%
metadata-eval54.5%
metadata-eval54.5%
+-commutative54.5%
fma-def54.5%
fma-def54.5%
metadata-eval54.5%
metadata-eval54.5%
Applied egg-rr54.5%
pow-sqr54.5%
metadata-eval54.5%
unpow-154.5%
fma-udef54.5%
+-commutative54.5%
fma-udef54.5%
unpow254.5%
associate-+r+54.5%
unpow254.5%
unpow154.5%
sqr-pow29.6%
hypot-def43.1%
+-commutative43.1%
fma-def43.1%
metadata-eval43.1%
Simplified43.1%
*-commutative43.1%
frac-times74.7%
*-un-lft-identity74.7%
unpow1/274.7%
Applied egg-rr74.7%
Taylor expanded in F around inf 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in B around 0 91.9%
Final simplification72.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (* x (/ 1.0 (tan B))))))
(if (<= F -2.2e+177)
t_0
(if (<= F -9.2e+30)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -4.5e-49)
t_0
(if (<= F -4.4e-159)
(/ (- x) B)
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x * (1.0 / tan(B)));
double tmp;
if (F <= -2.2e+177) {
tmp = t_0;
} else if (F <= -9.2e+30) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -4.5e-49) {
tmp = t_0;
} else if (F <= -4.4e-159) {
tmp = -x / B;
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / b) - (x * (1.0d0 / tan(b)))
if (f <= (-2.2d+177)) then
tmp = t_0
else if (f <= (-9.2d+30)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-4.5d-49)) then
tmp = t_0
else if (f <= (-4.4d-159)) then
tmp = -x / b
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x * (1.0 / Math.tan(B)));
double tmp;
if (F <= -2.2e+177) {
tmp = t_0;
} else if (F <= -9.2e+30) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -4.5e-49) {
tmp = t_0;
} else if (F <= -4.4e-159) {
tmp = -x / B;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x * (1.0 / math.tan(B))) tmp = 0 if F <= -2.2e+177: tmp = t_0 elif F <= -9.2e+30: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -4.5e-49: tmp = t_0 elif F <= -4.4e-159: tmp = -x / B else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x * Float64(1.0 / tan(B)))) tmp = 0.0 if (F <= -2.2e+177) tmp = t_0; elseif (F <= -9.2e+30) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -4.5e-49) tmp = t_0; elseif (F <= -4.4e-159) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x * (1.0 / tan(B))); tmp = 0.0; if (F <= -2.2e+177) tmp = t_0; elseif (F <= -9.2e+30) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -4.5e-49) tmp = t_0; elseif (F <= -4.4e-159) tmp = -x / B; else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.2e+177], t$95$0, If[LessEqual[F, -9.2e+30], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.5e-49], t$95$0, If[LessEqual[F, -4.4e-159], N[((-x) / B), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{if}\;F \leq -2.2 \cdot 10^{+177}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -9.2 \cdot 10^{+30}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -4.5 \cdot 10^{-49}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -4.4 \cdot 10^{-159}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -2.1999999999999998e177 or -9.2e30 < F < -4.5000000000000002e-49Initial program 66.4%
Taylor expanded in F around -inf 94.7%
Taylor expanded in B around 0 85.9%
if -2.1999999999999998e177 < F < -9.2e30Initial program 71.6%
Taylor expanded in F around -inf 99.9%
Taylor expanded in B around 0 84.2%
Taylor expanded in x around 0 84.2%
sub-neg84.2%
mul-1-neg84.2%
+-commutative84.2%
distribute-neg-frac84.2%
metadata-eval84.2%
sub-neg84.2%
Simplified84.2%
if -4.5000000000000002e-49 < F < -4.4e-159Initial program 99.4%
Taylor expanded in F around -inf 20.2%
Taylor expanded in B around 0 12.2%
associate-*r/12.2%
distribute-lft-in12.2%
metadata-eval12.2%
mul-1-neg12.2%
Simplified12.2%
Taylor expanded in x around inf 36.9%
associate-*r/36.9%
mul-1-neg36.9%
Simplified36.9%
if -4.4e-159 < F Initial program 78.1%
add-sqr-sqrt78.1%
unpow-prod-down78.1%
+-commutative78.1%
fma-def78.1%
fma-def78.1%
metadata-eval78.1%
metadata-eval78.1%
+-commutative78.1%
fma-def78.1%
fma-def78.1%
metadata-eval78.1%
metadata-eval78.1%
Applied egg-rr78.1%
pow-sqr78.1%
metadata-eval78.1%
unpow-178.1%
fma-udef78.1%
+-commutative78.1%
fma-udef78.1%
unpow278.1%
associate-+r+78.1%
unpow278.1%
unpow178.1%
sqr-pow72.8%
hypot-def80.4%
+-commutative80.4%
fma-def80.4%
metadata-eval80.4%
Simplified80.4%
*-commutative80.4%
frac-times91.8%
*-un-lft-identity91.8%
unpow1/291.1%
Applied egg-rr91.1%
Taylor expanded in F around inf 65.7%
*-commutative65.7%
Simplified65.7%
Taylor expanded in B around 0 62.5%
Final simplification67.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (* x (/ 1.0 (tan B))))))
(if (<= x -4.3e-57)
t_0
(if (<= x 4e-285)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= x 1.5e+19) (- (/ 1.0 B) (/ x B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x * (1.0 / tan(B)));
double tmp;
if (x <= -4.3e-57) {
tmp = t_0;
} else if (x <= 4e-285) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (x <= 1.5e+19) {
tmp = (1.0 / B) - (x / B);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / b) - (x * (1.0d0 / tan(b)))
if (x <= (-4.3d-57)) then
tmp = t_0
else if (x <= 4d-285) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (x <= 1.5d+19) then
tmp = (1.0d0 / b) - (x / b)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x * (1.0 / Math.tan(B)));
double tmp;
if (x <= -4.3e-57) {
tmp = t_0;
} else if (x <= 4e-285) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (x <= 1.5e+19) {
tmp = (1.0 / B) - (x / B);
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x * (1.0 / math.tan(B))) tmp = 0 if x <= -4.3e-57: tmp = t_0 elif x <= 4e-285: tmp = (-1.0 / math.sin(B)) - (x / B) elif x <= 1.5e+19: tmp = (1.0 / B) - (x / B) else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x * Float64(1.0 / tan(B)))) tmp = 0.0 if (x <= -4.3e-57) tmp = t_0; elseif (x <= 4e-285) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (x <= 1.5e+19) tmp = Float64(Float64(1.0 / B) - Float64(x / B)); else tmp = t_0; end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x * (1.0 / tan(B))); tmp = 0.0; if (x <= -4.3e-57) tmp = t_0; elseif (x <= 4e-285) tmp = (-1.0 / sin(B)) - (x / B); elseif (x <= 1.5e+19) tmp = (1.0 / B) - (x / B); else tmp = t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.3e-57], t$95$0, If[LessEqual[x, 4e-285], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.5e+19], N[(N[(1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{if}\;x \leq -4.3 \cdot 10^{-57}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 4 \cdot 10^{-285}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;x \leq 1.5 \cdot 10^{+19}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x < -4.30000000000000022e-57 or 1.5e19 < x Initial program 82.7%
Taylor expanded in F around -inf 91.4%
Taylor expanded in B around 0 94.3%
if -4.30000000000000022e-57 < x < 4.0000000000000003e-285Initial program 70.1%
Taylor expanded in F around -inf 39.1%
Taylor expanded in B around 0 39.1%
Taylor expanded in x around 0 39.1%
sub-neg39.1%
mul-1-neg39.1%
+-commutative39.1%
distribute-neg-frac39.1%
metadata-eval39.1%
sub-neg39.1%
Simplified39.1%
if 4.0000000000000003e-285 < x < 1.5e19Initial program 75.3%
Taylor expanded in B around 0 50.4%
Taylor expanded in B around 0 39.6%
Taylor expanded in F around inf 26.5%
Final simplification60.7%
(FPCore (F B x) :precision binary64 (if (<= F -8.2e-51) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 1.25e-50) (/ (- x) B) (- (/ 1.0 B) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8.2e-51) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1.25e-50) {
tmp = -x / B;
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-8.2d-51)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 1.25d-50) then
tmp = -x / b
else
tmp = (1.0d0 / b) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -8.2e-51) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 1.25e-50) {
tmp = -x / B;
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -8.2e-51: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 1.25e-50: tmp = -x / B else: tmp = (1.0 / B) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -8.2e-51) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1.25e-50) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 / B) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -8.2e-51) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 1.25e-50) tmp = -x / B; else tmp = (1.0 / B) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -8.2e-51], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.25e-50], N[((-x) / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -8.2 \cdot 10^{-51}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.25 \cdot 10^{-50}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -8.19999999999999947e-51Initial program 69.2%
Taylor expanded in F around -inf 94.6%
Taylor expanded in B around 0 64.7%
Taylor expanded in x around 0 64.7%
sub-neg64.7%
mul-1-neg64.7%
+-commutative64.7%
distribute-neg-frac64.7%
metadata-eval64.7%
sub-neg64.7%
Simplified64.7%
if -8.19999999999999947e-51 < F < 1.24999999999999992e-50Initial program 99.4%
Taylor expanded in F around -inf 31.4%
Taylor expanded in B around 0 16.4%
associate-*r/16.4%
distribute-lft-in16.4%
metadata-eval16.4%
mul-1-neg16.4%
Simplified16.4%
Taylor expanded in x around inf 35.4%
associate-*r/35.4%
mul-1-neg35.4%
Simplified35.4%
if 1.24999999999999992e-50 < F Initial program 61.7%
Taylor expanded in B around 0 49.8%
Taylor expanded in B around 0 26.0%
Taylor expanded in F around inf 51.5%
Final simplification50.1%
(FPCore (F B x) :precision binary64 (if (<= F -1.06e-44) (/ (- -1.0 x) B) (if (<= F 3.9e-49) (/ (- x) B) (- (/ 1.0 B) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.06e-44) {
tmp = (-1.0 - x) / B;
} else if (F <= 3.9e-49) {
tmp = -x / B;
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.06d-44)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 3.9d-49) then
tmp = -x / b
else
tmp = (1.0d0 / b) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.06e-44) {
tmp = (-1.0 - x) / B;
} else if (F <= 3.9e-49) {
tmp = -x / B;
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.06e-44: tmp = (-1.0 - x) / B elif F <= 3.9e-49: tmp = -x / B else: tmp = (1.0 / B) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.06e-44) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 3.9e-49) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 / B) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.06e-44) tmp = (-1.0 - x) / B; elseif (F <= 3.9e-49) tmp = -x / B; else tmp = (1.0 / B) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.06e-44], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3.9e-49], N[((-x) / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.06 \cdot 10^{-44}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 3.9 \cdot 10^{-49}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.0599999999999999e-44Initial program 68.4%
Taylor expanded in F around -inf 96.8%
Taylor expanded in B around 0 43.9%
associate-*r/43.9%
distribute-lft-in43.9%
metadata-eval43.9%
mul-1-neg43.9%
Simplified43.9%
if -1.0599999999999999e-44 < F < 3.90000000000000011e-49Initial program 99.4%
Taylor expanded in F around -inf 30.9%
Taylor expanded in B around 0 16.1%
associate-*r/16.1%
distribute-lft-in16.1%
metadata-eval16.1%
mul-1-neg16.1%
Simplified16.1%
Taylor expanded in x around inf 34.7%
associate-*r/34.7%
mul-1-neg34.7%
Simplified34.7%
if 3.90000000000000011e-49 < F Initial program 61.7%
Taylor expanded in B around 0 49.8%
Taylor expanded in B around 0 26.0%
Taylor expanded in F around inf 51.5%
Final simplification43.2%
(FPCore (F B x) :precision binary64 (if (<= F -2.05e-47) (- (* B -0.16666666666666666) (/ (+ x 1.0) B)) (if (<= F 3.9e-49) (/ (- x) B) (- (/ 1.0 B) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.05e-47) {
tmp = (B * -0.16666666666666666) - ((x + 1.0) / B);
} else if (F <= 3.9e-49) {
tmp = -x / B;
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.05d-47)) then
tmp = (b * (-0.16666666666666666d0)) - ((x + 1.0d0) / b)
else if (f <= 3.9d-49) then
tmp = -x / b
else
tmp = (1.0d0 / b) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.05e-47) {
tmp = (B * -0.16666666666666666) - ((x + 1.0) / B);
} else if (F <= 3.9e-49) {
tmp = -x / B;
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.05e-47: tmp = (B * -0.16666666666666666) - ((x + 1.0) / B) elif F <= 3.9e-49: tmp = -x / B else: tmp = (1.0 / B) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.05e-47) tmp = Float64(Float64(B * -0.16666666666666666) - Float64(Float64(x + 1.0) / B)); elseif (F <= 3.9e-49) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 / B) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.05e-47) tmp = (B * -0.16666666666666666) - ((x + 1.0) / B); elseif (F <= 3.9e-49) tmp = -x / B; else tmp = (1.0 / B) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.05e-47], N[(N[(B * -0.16666666666666666), $MachinePrecision] - N[(N[(x + 1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.9e-49], N[((-x) / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.05 \cdot 10^{-47}:\\
\;\;\;\;B \cdot -0.16666666666666666 - \frac{x + 1}{B}\\
\mathbf{elif}\;F \leq 3.9 \cdot 10^{-49}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.05000000000000001e-47Initial program 68.4%
Taylor expanded in F around -inf 96.8%
Taylor expanded in B around 0 66.2%
Taylor expanded in B around 0 44.1%
+-commutative44.1%
mul-1-neg44.1%
unsub-neg44.1%
*-commutative44.1%
Simplified44.1%
if -2.05000000000000001e-47 < F < 3.90000000000000011e-49Initial program 99.4%
Taylor expanded in F around -inf 30.9%
Taylor expanded in B around 0 16.1%
associate-*r/16.1%
distribute-lft-in16.1%
metadata-eval16.1%
mul-1-neg16.1%
Simplified16.1%
Taylor expanded in x around inf 34.7%
associate-*r/34.7%
mul-1-neg34.7%
Simplified34.7%
if 3.90000000000000011e-49 < F Initial program 61.7%
Taylor expanded in B around 0 49.8%
Taylor expanded in B around 0 26.0%
Taylor expanded in F around inf 51.5%
Final simplification43.2%
(FPCore (F B x) :precision binary64 (if (<= F -2.65e+109) (/ (+ x -1.0) B) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.65e+109) {
tmp = (x + -1.0) / B;
} else {
tmp = -x / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.65d+109)) then
tmp = (x + (-1.0d0)) / b
else
tmp = -x / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.65e+109) {
tmp = (x + -1.0) / B;
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.65e+109: tmp = (x + -1.0) / B else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.65e+109) tmp = Float64(Float64(x + -1.0) / B); else tmp = Float64(Float64(-x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.65e+109) tmp = (x + -1.0) / B; else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.65e+109], N[(N[(x + -1.0), $MachinePrecision] / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.65 \cdot 10^{+109}:\\
\;\;\;\;\frac{x + -1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -2.65000000000000013e109Initial program 52.2%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 50.8%
associate-*r/50.8%
distribute-lft-in50.8%
metadata-eval50.8%
mul-1-neg50.8%
Simplified50.8%
expm1-log1p-u23.2%
expm1-udef23.0%
+-commutative23.0%
add-sqr-sqrt18.6%
sqrt-unprod22.6%
sqr-neg22.6%
sqrt-unprod4.1%
add-sqr-sqrt13.1%
Applied egg-rr13.1%
expm1-def13.3%
expm1-log1p33.1%
Simplified33.1%
if -2.65000000000000013e109 < F Initial program 83.0%
Taylor expanded in F around -inf 47.5%
Taylor expanded in B around 0 22.7%
associate-*r/22.7%
distribute-lft-in22.7%
metadata-eval22.7%
mul-1-neg22.7%
Simplified22.7%
Taylor expanded in x around inf 29.4%
associate-*r/29.4%
mul-1-neg29.4%
Simplified29.4%
Final simplification30.1%
(FPCore (F B x) :precision binary64 (if (<= F -6.6e-45) (/ (- -1.0 x) B) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.6e-45) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-6.6d-45)) then
tmp = ((-1.0d0) - x) / b
else
tmp = -x / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -6.6e-45) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6.6e-45: tmp = (-1.0 - x) / B else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6.6e-45) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(Float64(-x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -6.6e-45) tmp = (-1.0 - x) / B; else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6.6e-45], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.6 \cdot 10^{-45}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -6.6000000000000001e-45Initial program 68.4%
Taylor expanded in F around -inf 96.8%
Taylor expanded in B around 0 43.9%
associate-*r/43.9%
distribute-lft-in43.9%
metadata-eval43.9%
mul-1-neg43.9%
Simplified43.9%
if -6.6000000000000001e-45 < F Initial program 81.1%
Taylor expanded in F around -inf 39.7%
Taylor expanded in B around 0 20.9%
associate-*r/20.9%
distribute-lft-in20.9%
metadata-eval20.9%
mul-1-neg20.9%
Simplified20.9%
Taylor expanded in x around inf 30.7%
associate-*r/30.7%
mul-1-neg30.7%
Simplified30.7%
Final simplification34.8%
(FPCore (F B x) :precision binary64 (if (<= F -7.2e+102) (/ -1.0 B) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.2e+102) {
tmp = -1.0 / B;
} else {
tmp = -x / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-7.2d+102)) then
tmp = (-1.0d0) / b
else
tmp = -x / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -7.2e+102) {
tmp = -1.0 / B;
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.2e+102: tmp = -1.0 / B else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.2e+102) tmp = Float64(-1.0 / B); else tmp = Float64(Float64(-x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -7.2e+102) tmp = -1.0 / B; else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.2e+102], N[(-1.0 / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.2 \cdot 10^{+102}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -7.2000000000000003e102Initial program 52.2%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 50.8%
associate-*r/50.8%
distribute-lft-in50.8%
metadata-eval50.8%
mul-1-neg50.8%
Simplified50.8%
Taylor expanded in x around 0 33.0%
if -7.2000000000000003e102 < F Initial program 83.0%
Taylor expanded in F around -inf 47.5%
Taylor expanded in B around 0 22.7%
associate-*r/22.7%
distribute-lft-in22.7%
metadata-eval22.7%
mul-1-neg22.7%
Simplified22.7%
Taylor expanded in x around inf 29.4%
associate-*r/29.4%
mul-1-neg29.4%
Simplified29.4%
Final simplification30.1%
(FPCore (F B x) :precision binary64 (/ -1.0 B))
double code(double F, double B, double x) {
return -1.0 / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = (-1.0d0) / b
end function
public static double code(double F, double B, double x) {
return -1.0 / B;
}
def code(F, B, x): return -1.0 / B
function code(F, B, x) return Float64(-1.0 / B) end
function tmp = code(F, B, x) tmp = -1.0 / B; end
code[F_, B_, x_] := N[(-1.0 / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{B}
\end{array}
Initial program 77.2%
Taylor expanded in F around -inf 57.3%
Taylor expanded in B around 0 28.0%
associate-*r/28.0%
distribute-lft-in28.0%
metadata-eval28.0%
mul-1-neg28.0%
Simplified28.0%
Taylor expanded in x around 0 10.4%
Final simplification10.4%
herbie shell --seed 2023322
(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))))))