
(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 29 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 (/ -1.0 (tan B)))))
(if (<= F -4.4e+18)
(+ t_0 (/ -1.0 (sin B)))
(if (<= F 3.35e-37)
(+
t_0
(* (pow (/ (sin B) F) -1.0) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)))
(- (/ 1.0 (sin B)) (/ x (tan B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -4.4e+18) {
tmp = t_0 + (-1.0 / sin(B));
} else if (F <= 3.35e-37) {
tmp = t_0 + (pow((sin(B) / F), -1.0) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / sin(B)) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-4.4d+18)) then
tmp = t_0 + ((-1.0d0) / sin(b))
else if (f <= 3.35d-37) then
tmp = t_0 + (((sin(b) / f) ** (-1.0d0)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = (1.0d0 / sin(b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -4.4e+18) {
tmp = t_0 + (-1.0 / Math.sin(B));
} else if (F <= 3.35e-37) {
tmp = t_0 + (Math.pow((Math.sin(B) / F), -1.0) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -4.4e+18: tmp = t_0 + (-1.0 / math.sin(B)) elif F <= 3.35e-37: tmp = t_0 + (math.pow((math.sin(B) / F), -1.0) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -4.4e+18) tmp = Float64(t_0 + Float64(-1.0 / sin(B))); elseif (F <= 3.35e-37) tmp = Float64(t_0 + Float64((Float64(sin(B) / F) ^ -1.0) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -4.4e+18) tmp = t_0 + (-1.0 / sin(B)); elseif (F <= 3.35e-37) tmp = t_0 + (((sin(B) / F) ^ -1.0) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)); else tmp = (1.0 / sin(B)) - (x / tan(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, -4.4e+18], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.35e-37], N[(t$95$0 + N[(N[Power[N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision], -1.0], $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -4.4 \cdot 10^{+18}:\\
\;\;\;\;t_0 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 3.35 \cdot 10^{-37}:\\
\;\;\;\;t_0 + {\left(\frac{\sin B}{F}\right)}^{-1} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -4.4e18Initial program 52.2%
Taylor expanded in F around -inf 99.8%
if -4.4e18 < F < 3.35e-37Initial program 99.6%
clear-num99.7%
inv-pow99.7%
Applied egg-rr99.7%
if 3.35e-37 < F Initial program 58.0%
Taylor expanded in F around -inf 40.6%
neg-sub040.6%
associate-+l-40.6%
add-sqr-sqrt19.2%
sqrt-unprod13.2%
sqr-neg13.2%
sqrt-unprod0.3%
add-sqr-sqrt0.8%
div-inv0.8%
cancel-sign-sub-inv0.8%
metadata-eval0.8%
*-un-lft-identity0.8%
add-sqr-sqrt0.4%
sqrt-unprod17.7%
frac-times17.7%
metadata-eval17.7%
metadata-eval17.7%
Applied egg-rr99.7%
associate--r+99.7%
neg-sub099.7%
distribute-neg-frac99.7%
metadata-eval99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -6.6e+63)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 (sin B)))
(if (<= F 2.5e+16)
(- (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -6.6e+63) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B));
} else if (F <= 2.5e+16) {
tmp = (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-6.6d+63)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / sin(b))
else if (f <= 2.5d+16) then
tmp = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / sin(b))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -6.6e+63) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / Math.sin(B));
} else if (F <= 2.5e+16) {
tmp = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / Math.sin(B))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -6.6e+63: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / math.sin(B)) elif F <= 2.5e+16: tmp = (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / math.sin(B))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -6.6e+63) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / sin(B))); elseif (F <= 2.5e+16) tmp = Float64(Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -6.6e+63) tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B)); elseif (F <= 2.5e+16) tmp = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / sin(B))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6.6e+63], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.5e+16], N[(N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -6.6 \cdot 10^{+63}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{+16}:\\
\;\;\;\;{\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -6.6000000000000003e63Initial program 45.0%
Taylor expanded in F around -inf 99.8%
if -6.6000000000000003e63 < F < 2.5e16Initial program 99.6%
div-inv80.9%
expm1-log1p-u51.4%
expm1-udef37.6%
Applied egg-rr55.8%
expm1-def51.4%
expm1-log1p80.9%
Simplified99.7%
if 2.5e16 < F Initial program 55.8%
Taylor expanded in F around -inf 40.1%
neg-sub040.1%
associate-+l-40.1%
add-sqr-sqrt18.9%
sqrt-unprod12.6%
sqr-neg12.6%
sqrt-unprod0.3%
add-sqr-sqrt0.8%
div-inv0.8%
cancel-sign-sub-inv0.8%
metadata-eval0.8%
*-un-lft-identity0.8%
add-sqr-sqrt0.4%
sqrt-unprod17.2%
frac-times17.2%
metadata-eval17.2%
metadata-eval17.2%
Applied egg-rr99.8%
associate--r+99.8%
neg-sub099.8%
distribute-neg-frac99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -5.8)
(+ t_0 (/ -1.0 (sin B)))
(if (<= F 3.35e-37)
(+ t_0 (* (/ F (sin B)) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))))
(- (/ 1.0 (sin B)) (/ x (tan B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -5.8) {
tmp = t_0 + (-1.0 / sin(B));
} else if (F <= 3.35e-37) {
tmp = t_0 + ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0)))));
} else {
tmp = (1.0 / sin(B)) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-5.8d0)) then
tmp = t_0 + ((-1.0d0) / sin(b))
else if (f <= 3.35d-37) then
tmp = t_0 + ((f / sin(b)) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))
else
tmp = (1.0d0 / sin(b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -5.8) {
tmp = t_0 + (-1.0 / Math.sin(B));
} else if (F <= 3.35e-37) {
tmp = t_0 + ((F / Math.sin(B)) * Math.sqrt((1.0 / (2.0 + (x * 2.0)))));
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -5.8: tmp = t_0 + (-1.0 / math.sin(B)) elif F <= 3.35e-37: tmp = t_0 + ((F / math.sin(B)) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -5.8) tmp = Float64(t_0 + Float64(-1.0 / sin(B))); elseif (F <= 3.35e-37) tmp = Float64(t_0 + Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -5.8) tmp = t_0 + (-1.0 / sin(B)); elseif (F <= 3.35e-37) tmp = t_0 + ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.8], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.35e-37], N[(t$95$0 + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -5.8:\\
\;\;\;\;t_0 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 3.35 \cdot 10^{-37}:\\
\;\;\;\;t_0 + \frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -5.79999999999999982Initial program 55.1%
Taylor expanded in F around -inf 99.8%
if -5.79999999999999982 < F < 3.35e-37Initial program 99.6%
Taylor expanded in F around 0 99.6%
if 3.35e-37 < F Initial program 58.0%
Taylor expanded in F around -inf 40.6%
neg-sub040.6%
associate-+l-40.6%
add-sqr-sqrt19.2%
sqrt-unprod13.2%
sqr-neg13.2%
sqrt-unprod0.3%
add-sqr-sqrt0.8%
div-inv0.8%
cancel-sign-sub-inv0.8%
metadata-eval0.8%
*-un-lft-identity0.8%
add-sqr-sqrt0.4%
sqrt-unprod17.7%
frac-times17.7%
metadata-eval17.7%
metadata-eval17.7%
Applied egg-rr99.7%
associate--r+99.7%
neg-sub099.7%
distribute-neg-frac99.7%
metadata-eval99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -5.8)
(+ t_0 (/ -1.0 (sin B)))
(if (<= F 3.35e-37)
(+ t_0 (/ F (* (sin B) (sqrt (+ 2.0 (* x 2.0))))))
(- (/ 1.0 (sin B)) (/ x (tan B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -5.8) {
tmp = t_0 + (-1.0 / sin(B));
} else if (F <= 3.35e-37) {
tmp = t_0 + (F / (sin(B) * sqrt((2.0 + (x * 2.0)))));
} else {
tmp = (1.0 / sin(B)) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-5.8d0)) then
tmp = t_0 + ((-1.0d0) / sin(b))
else if (f <= 3.35d-37) then
tmp = t_0 + (f / (sin(b) * sqrt((2.0d0 + (x * 2.0d0)))))
else
tmp = (1.0d0 / sin(b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -5.8) {
tmp = t_0 + (-1.0 / Math.sin(B));
} else if (F <= 3.35e-37) {
tmp = t_0 + (F / (Math.sin(B) * Math.sqrt((2.0 + (x * 2.0)))));
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -5.8: tmp = t_0 + (-1.0 / math.sin(B)) elif F <= 3.35e-37: tmp = t_0 + (F / (math.sin(B) * math.sqrt((2.0 + (x * 2.0))))) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -5.8) tmp = Float64(t_0 + Float64(-1.0 / sin(B))); elseif (F <= 3.35e-37) tmp = Float64(t_0 + Float64(F / Float64(sin(B) * sqrt(Float64(2.0 + Float64(x * 2.0)))))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -5.8) tmp = t_0 + (-1.0 / sin(B)); elseif (F <= 3.35e-37) tmp = t_0 + (F / (sin(B) * sqrt((2.0 + (x * 2.0))))); else tmp = (1.0 / sin(B)) - (x / tan(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, -5.8], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.35e-37], 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[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -5.8:\\
\;\;\;\;t_0 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 3.35 \cdot 10^{-37}:\\
\;\;\;\;t_0 + \frac{F}{\sin B \cdot \sqrt{2 + x \cdot 2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -5.79999999999999982Initial program 55.1%
Taylor expanded in F around -inf 99.8%
if -5.79999999999999982 < F < 3.35e-37Initial program 99.6%
associate-*l/99.6%
associate-/l*99.5%
+-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 99.6%
if 3.35e-37 < F Initial program 58.0%
Taylor expanded in F around -inf 40.6%
neg-sub040.6%
associate-+l-40.6%
add-sqr-sqrt19.2%
sqrt-unprod13.2%
sqr-neg13.2%
sqrt-unprod0.3%
add-sqr-sqrt0.8%
div-inv0.8%
cancel-sign-sub-inv0.8%
metadata-eval0.8%
*-un-lft-identity0.8%
add-sqr-sqrt0.4%
sqrt-unprod17.7%
frac-times17.7%
metadata-eval17.7%
metadata-eval17.7%
Applied egg-rr99.7%
associate--r+99.7%
neg-sub099.7%
distribute-neg-frac99.7%
metadata-eval99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ 1.0 (sin B)))
(t_1 (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))))
(t_2 (/ x (tan B))))
(if (<= F -4.5e-10)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 (sin B)))
(if (<= F 2.2e-133)
(- (* t_1 (/ F B)) t_2)
(if (<= F 3.35e-37) (- (* t_1 (* F t_0)) (/ x B)) (- t_0 t_2))))))
double code(double F, double B, double x) {
double t_0 = 1.0 / sin(B);
double t_1 = sqrt((1.0 / (2.0 + (x * 2.0))));
double t_2 = x / tan(B);
double tmp;
if (F <= -4.5e-10) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B));
} else if (F <= 2.2e-133) {
tmp = (t_1 * (F / B)) - t_2;
} else if (F <= 3.35e-37) {
tmp = (t_1 * (F * t_0)) - (x / B);
} else {
tmp = t_0 - t_2;
}
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 / sin(b)
t_1 = sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))
t_2 = x / tan(b)
if (f <= (-4.5d-10)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / sin(b))
else if (f <= 2.2d-133) then
tmp = (t_1 * (f / b)) - t_2
else if (f <= 3.35d-37) then
tmp = (t_1 * (f * t_0)) - (x / b)
else
tmp = t_0 - t_2
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 1.0 / Math.sin(B);
double t_1 = Math.sqrt((1.0 / (2.0 + (x * 2.0))));
double t_2 = x / Math.tan(B);
double tmp;
if (F <= -4.5e-10) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / Math.sin(B));
} else if (F <= 2.2e-133) {
tmp = (t_1 * (F / B)) - t_2;
} else if (F <= 3.35e-37) {
tmp = (t_1 * (F * t_0)) - (x / B);
} else {
tmp = t_0 - t_2;
}
return tmp;
}
def code(F, B, x): t_0 = 1.0 / math.sin(B) t_1 = math.sqrt((1.0 / (2.0 + (x * 2.0)))) t_2 = x / math.tan(B) tmp = 0 if F <= -4.5e-10: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / math.sin(B)) elif F <= 2.2e-133: tmp = (t_1 * (F / B)) - t_2 elif F <= 3.35e-37: tmp = (t_1 * (F * t_0)) - (x / B) else: tmp = t_0 - t_2 return tmp
function code(F, B, x) t_0 = Float64(1.0 / sin(B)) t_1 = sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) t_2 = Float64(x / tan(B)) tmp = 0.0 if (F <= -4.5e-10) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / sin(B))); elseif (F <= 2.2e-133) tmp = Float64(Float64(t_1 * Float64(F / B)) - t_2); elseif (F <= 3.35e-37) tmp = Float64(Float64(t_1 * Float64(F * t_0)) - Float64(x / B)); else tmp = Float64(t_0 - t_2); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 1.0 / sin(B); t_1 = sqrt((1.0 / (2.0 + (x * 2.0)))); t_2 = x / tan(B); tmp = 0.0; if (F <= -4.5e-10) tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B)); elseif (F <= 2.2e-133) tmp = (t_1 * (F / B)) - t_2; elseif (F <= 3.35e-37) tmp = (t_1 * (F * t_0)) - (x / B); else tmp = t_0 - t_2; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4.5e-10], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.2e-133], N[(N[(t$95$1 * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[F, 3.35e-37], N[(N[(t$95$1 * N[(F * t$95$0), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(t$95$0 - t$95$2), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
t_1 := \sqrt{\frac{1}{2 + x \cdot 2}}\\
t_2 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -4.5 \cdot 10^{-10}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 2.2 \cdot 10^{-133}:\\
\;\;\;\;t_1 \cdot \frac{F}{B} - t_2\\
\mathbf{elif}\;F \leq 3.35 \cdot 10^{-37}:\\
\;\;\;\;t_1 \cdot \left(F \cdot t_0\right) - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t_0 - t_2\\
\end{array}
\end{array}
if F < -4.5e-10Initial program 57.7%
Taylor expanded in F around -inf 98.5%
if -4.5e-10 < F < 2.2000000000000001e-133Initial program 99.7%
Taylor expanded in B around 0 88.0%
div-inv88.0%
expm1-log1p-u57.4%
expm1-udef36.0%
Applied egg-rr36.0%
expm1-def57.4%
expm1-log1p88.0%
Simplified88.0%
Taylor expanded in F around 0 88.0%
if 2.2000000000000001e-133 < F < 3.35e-37Initial program 99.3%
clear-num99.5%
associate-/r/99.5%
Applied egg-rr99.5%
Taylor expanded in B around 0 88.0%
Taylor expanded in F around 0 88.0%
if 3.35e-37 < F Initial program 58.0%
Taylor expanded in F around -inf 40.6%
neg-sub040.6%
associate-+l-40.6%
add-sqr-sqrt19.2%
sqrt-unprod13.2%
sqr-neg13.2%
sqrt-unprod0.3%
add-sqr-sqrt0.8%
div-inv0.8%
cancel-sign-sub-inv0.8%
metadata-eval0.8%
*-un-lft-identity0.8%
add-sqr-sqrt0.4%
sqrt-unprod17.7%
frac-times17.7%
metadata-eval17.7%
metadata-eval17.7%
Applied egg-rr99.7%
associate--r+99.7%
neg-sub099.7%
distribute-neg-frac99.7%
metadata-eval99.7%
Simplified99.7%
Final simplification94.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B))))
(if (<= F -1.45e-9)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -5.8e-107)
(+ (* x (- (/ -1.0 B) (* B -0.3333333333333333))) t_0)
(if (<= F -2.15e-156)
(* (- x) (/ (cos B) (sin B)))
(if (<= F -5.3e-192)
(+ t_0 (* x (/ -1.0 B)))
(if (<= F 4.4e-129)
(/ (- x) (/ (sin B) (cos B)))
(if (<= F 3.35e-37)
(-
(+
(* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B))
(* 0.3333333333333333 (* x B)))
(/ x B))
(- (/ 1.0 (sin B)) (/ x (tan B)))))))))))
double code(double F, double B, double x) {
double t_0 = pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B);
double tmp;
if (F <= -1.45e-9) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -5.8e-107) {
tmp = (x * ((-1.0 / B) - (B * -0.3333333333333333))) + t_0;
} else if (F <= -2.15e-156) {
tmp = -x * (cos(B) / sin(B));
} else if (F <= -5.3e-192) {
tmp = t_0 + (x * (-1.0 / B));
} else if (F <= 4.4e-129) {
tmp = -x / (sin(B) / cos(B));
} else if (F <= 3.35e-37) {
tmp = ((sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) + (0.3333333333333333 * (x * B))) - (x / B);
} else {
tmp = (1.0 / sin(B)) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)
if (f <= (-1.45d-9)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-5.8d-107)) then
tmp = (x * (((-1.0d0) / b) - (b * (-0.3333333333333333d0)))) + t_0
else if (f <= (-2.15d-156)) then
tmp = -x * (cos(b) / sin(b))
else if (f <= (-5.3d-192)) then
tmp = t_0 + (x * ((-1.0d0) / b))
else if (f <= 4.4d-129) then
tmp = -x / (sin(b) / cos(b))
else if (f <= 3.35d-37) then
tmp = ((sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) + (0.3333333333333333d0 * (x * b))) - (x / b)
else
tmp = (1.0d0 / sin(b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B);
double tmp;
if (F <= -1.45e-9) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -5.8e-107) {
tmp = (x * ((-1.0 / B) - (B * -0.3333333333333333))) + t_0;
} else if (F <= -2.15e-156) {
tmp = -x * (Math.cos(B) / Math.sin(B));
} else if (F <= -5.3e-192) {
tmp = t_0 + (x * (-1.0 / B));
} else if (F <= 4.4e-129) {
tmp = -x / (Math.sin(B) / Math.cos(B));
} else if (F <= 3.35e-37) {
tmp = ((Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) + (0.3333333333333333 * (x * B))) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B) tmp = 0 if F <= -1.45e-9: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -5.8e-107: tmp = (x * ((-1.0 / B) - (B * -0.3333333333333333))) + t_0 elif F <= -2.15e-156: tmp = -x * (math.cos(B) / math.sin(B)) elif F <= -5.3e-192: tmp = t_0 + (x * (-1.0 / B)) elif F <= 4.4e-129: tmp = -x / (math.sin(B) / math.cos(B)) elif F <= 3.35e-37: tmp = ((math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) + (0.3333333333333333 * (x * B))) - (x / B) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) tmp = 0.0 if (F <= -1.45e-9) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -5.8e-107) tmp = Float64(Float64(x * Float64(Float64(-1.0 / B) - Float64(B * -0.3333333333333333))) + t_0); elseif (F <= -2.15e-156) tmp = Float64(Float64(-x) * Float64(cos(B) / sin(B))); elseif (F <= -5.3e-192) tmp = Float64(t_0 + Float64(x * Float64(-1.0 / B))); elseif (F <= 4.4e-129) tmp = Float64(Float64(-x) / Float64(sin(B) / cos(B))); elseif (F <= 3.35e-37) tmp = Float64(Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) + Float64(0.3333333333333333 * Float64(x * B))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B); tmp = 0.0; if (F <= -1.45e-9) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -5.8e-107) tmp = (x * ((-1.0 / B) - (B * -0.3333333333333333))) + t_0; elseif (F <= -2.15e-156) tmp = -x * (cos(B) / sin(B)); elseif (F <= -5.3e-192) tmp = t_0 + (x * (-1.0 / B)); elseif (F <= 4.4e-129) tmp = -x / (sin(B) / cos(B)); elseif (F <= 3.35e-37) tmp = ((sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) + (0.3333333333333333 * (x * B))) - (x / B); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.45e-9], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5.8e-107], N[(N[(x * N[(N[(-1.0 / B), $MachinePrecision] - N[(B * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision], If[LessEqual[F, -2.15e-156], N[((-x) * N[(N[Cos[B], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5.3e-192], N[(t$95$0 + N[(x * N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.4e-129], N[((-x) / N[(N[Sin[B], $MachinePrecision] / N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.35e-37], N[(N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] + N[(0.3333333333333333 * N[(x * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\
\mathbf{if}\;F \leq -1.45 \cdot 10^{-9}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -5.8 \cdot 10^{-107}:\\
\;\;\;\;x \cdot \left(\frac{-1}{B} - B \cdot -0.3333333333333333\right) + t_0\\
\mathbf{elif}\;F \leq -2.15 \cdot 10^{-156}:\\
\;\;\;\;\left(-x\right) \cdot \frac{\cos B}{\sin B}\\
\mathbf{elif}\;F \leq -5.3 \cdot 10^{-192}:\\
\;\;\;\;t_0 + x \cdot \frac{-1}{B}\\
\mathbf{elif}\;F \leq 4.4 \cdot 10^{-129}:\\
\;\;\;\;\frac{-x}{\frac{\sin B}{\cos B}}\\
\mathbf{elif}\;F \leq 3.35 \cdot 10^{-37}:\\
\;\;\;\;\left(\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} + 0.3333333333333333 \cdot \left(x \cdot B\right)\right) - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.44999999999999996e-9Initial program 57.1%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 78.6%
if -1.44999999999999996e-9 < F < -5.7999999999999996e-107Initial program 99.5%
Taylor expanded in B around 0 72.5%
Taylor expanded in B around 0 63.3%
if -5.7999999999999996e-107 < F < -2.14999999999999989e-156Initial program 99.9%
Taylor expanded in B around 0 90.2%
div-inv89.9%
expm1-log1p-u43.2%
expm1-udef16.0%
Applied egg-rr16.0%
expm1-def43.2%
expm1-log1p89.9%
Simplified89.9%
Taylor expanded in F around 0 89.9%
Taylor expanded in x around inf 82.7%
mul-1-neg82.7%
associate-*r/83.0%
Simplified83.0%
if -2.14999999999999989e-156 < F < -5.29999999999999969e-192Initial program 99.6%
Taylor expanded in B around 0 87.8%
Taylor expanded in B around 0 87.9%
if -5.29999999999999969e-192 < F < 4.40000000000000006e-129Initial program 99.7%
Taylor expanded in F around -inf 42.3%
Taylor expanded in x around inf 88.4%
mul-1-neg88.4%
associate-/l*88.6%
distribute-neg-frac88.6%
Simplified88.6%
if 4.40000000000000006e-129 < F < 3.35e-37Initial program 99.3%
Taylor expanded in B around 0 71.9%
div-inv72.0%
expm1-log1p-u50.2%
expm1-udef50.2%
Applied egg-rr50.2%
expm1-def50.2%
expm1-log1p72.0%
Simplified72.0%
Taylor expanded in F around 0 72.0%
Taylor expanded in B around 0 60.2%
if 3.35e-37 < F Initial program 58.0%
Taylor expanded in F around -inf 40.6%
neg-sub040.6%
associate-+l-40.6%
add-sqr-sqrt19.2%
sqrt-unprod13.2%
sqr-neg13.2%
sqrt-unprod0.3%
add-sqr-sqrt0.8%
div-inv0.8%
cancel-sign-sub-inv0.8%
metadata-eval0.8%
*-un-lft-identity0.8%
add-sqr-sqrt0.4%
sqrt-unprod17.7%
frac-times17.7%
metadata-eval17.7%
metadata-eval17.7%
Applied egg-rr99.7%
associate--r+99.7%
neg-sub099.7%
distribute-neg-frac99.7%
metadata-eval99.7%
Simplified99.7%
Final simplification85.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -4.5e-10)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 (sin B)))
(if (<= F 3.35e-37)
(- (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -4.5e-10) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B));
} else if (F <= 3.35e-37) {
tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-4.5d-10)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / sin(b))
else if (f <= 3.35d-37) then
tmp = (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -4.5e-10) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / Math.sin(B));
} else if (F <= 3.35e-37) {
tmp = (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -4.5e-10: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / math.sin(B)) elif F <= 3.35e-37: tmp = (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -4.5e-10) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / sin(B))); elseif (F <= 3.35e-37) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -4.5e-10) tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B)); elseif (F <= 3.35e-37) tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4.5e-10], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.35e-37], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -4.5 \cdot 10^{-10}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 3.35 \cdot 10^{-37}:\\
\;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -4.5e-10Initial program 57.7%
Taylor expanded in F around -inf 98.5%
if -4.5e-10 < F < 3.35e-37Initial program 99.6%
Taylor expanded in B around 0 83.7%
div-inv83.7%
expm1-log1p-u55.3%
expm1-udef38.9%
Applied egg-rr38.9%
expm1-def55.3%
expm1-log1p83.7%
Simplified83.7%
Taylor expanded in F around 0 83.7%
if 3.35e-37 < F Initial program 58.0%
Taylor expanded in F around -inf 40.6%
neg-sub040.6%
associate-+l-40.6%
add-sqr-sqrt19.2%
sqrt-unprod13.2%
sqr-neg13.2%
sqrt-unprod0.3%
add-sqr-sqrt0.8%
div-inv0.8%
cancel-sign-sub-inv0.8%
metadata-eval0.8%
*-un-lft-identity0.8%
add-sqr-sqrt0.4%
sqrt-unprod17.7%
frac-times17.7%
metadata-eval17.7%
metadata-eval17.7%
Applied egg-rr99.7%
associate--r+99.7%
neg-sub099.7%
distribute-neg-frac99.7%
metadata-eval99.7%
Simplified99.7%
Final simplification92.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* (- x) (/ (cos B) (sin B))))
(t_1 (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B))))
(if (<= F -1.25e-9)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -4.6e-109)
(+ (* x (- (/ -1.0 B) (* B -0.3333333333333333))) t_1)
(if (<= F -4.6e-156)
t_0
(if (<= F -5.5e-192)
(+ t_1 (* x (/ -1.0 B)))
(if (<= F 1.35e-128)
t_0
(if (<= F 3.2e-37)
(-
(+
(* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B))
(* 0.3333333333333333 (* x B)))
(/ x B))
(- (/ 1.0 B) (/ x (tan B)))))))))))
double code(double F, double B, double x) {
double t_0 = -x * (cos(B) / sin(B));
double t_1 = pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B);
double tmp;
if (F <= -1.25e-9) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -4.6e-109) {
tmp = (x * ((-1.0 / B) - (B * -0.3333333333333333))) + t_1;
} else if (F <= -4.6e-156) {
tmp = t_0;
} else if (F <= -5.5e-192) {
tmp = t_1 + (x * (-1.0 / B));
} else if (F <= 1.35e-128) {
tmp = t_0;
} else if (F <= 3.2e-37) {
tmp = ((sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) + (0.3333333333333333 * (x * B))) - (x / B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = -x * (cos(b) / sin(b))
t_1 = ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)
if (f <= (-1.25d-9)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-4.6d-109)) then
tmp = (x * (((-1.0d0) / b) - (b * (-0.3333333333333333d0)))) + t_1
else if (f <= (-4.6d-156)) then
tmp = t_0
else if (f <= (-5.5d-192)) then
tmp = t_1 + (x * ((-1.0d0) / b))
else if (f <= 1.35d-128) then
tmp = t_0
else if (f <= 3.2d-37) then
tmp = ((sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) + (0.3333333333333333d0 * (x * b))) - (x / b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = -x * (Math.cos(B) / Math.sin(B));
double t_1 = Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B);
double tmp;
if (F <= -1.25e-9) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -4.6e-109) {
tmp = (x * ((-1.0 / B) - (B * -0.3333333333333333))) + t_1;
} else if (F <= -4.6e-156) {
tmp = t_0;
} else if (F <= -5.5e-192) {
tmp = t_1 + (x * (-1.0 / B));
} else if (F <= 1.35e-128) {
tmp = t_0;
} else if (F <= 3.2e-37) {
tmp = ((Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) + (0.3333333333333333 * (x * B))) - (x / B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = -x * (math.cos(B) / math.sin(B)) t_1 = math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B) tmp = 0 if F <= -1.25e-9: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -4.6e-109: tmp = (x * ((-1.0 / B) - (B * -0.3333333333333333))) + t_1 elif F <= -4.6e-156: tmp = t_0 elif F <= -5.5e-192: tmp = t_1 + (x * (-1.0 / B)) elif F <= 1.35e-128: tmp = t_0 elif F <= 3.2e-37: tmp = ((math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) + (0.3333333333333333 * (x * B))) - (x / B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(Float64(-x) * Float64(cos(B) / sin(B))) t_1 = Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) tmp = 0.0 if (F <= -1.25e-9) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -4.6e-109) tmp = Float64(Float64(x * Float64(Float64(-1.0 / B) - Float64(B * -0.3333333333333333))) + t_1); elseif (F <= -4.6e-156) tmp = t_0; elseif (F <= -5.5e-192) tmp = Float64(t_1 + Float64(x * Float64(-1.0 / B))); elseif (F <= 1.35e-128) tmp = t_0; elseif (F <= 3.2e-37) tmp = Float64(Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) + Float64(0.3333333333333333 * Float64(x * B))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = -x * (cos(B) / sin(B)); t_1 = ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B); tmp = 0.0; if (F <= -1.25e-9) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -4.6e-109) tmp = (x * ((-1.0 / B) - (B * -0.3333333333333333))) + t_1; elseif (F <= -4.6e-156) tmp = t_0; elseif (F <= -5.5e-192) tmp = t_1 + (x * (-1.0 / B)); elseif (F <= 1.35e-128) tmp = t_0; elseif (F <= 3.2e-37) tmp = ((sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) + (0.3333333333333333 * (x * B))) - (x / B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[((-x) * N[(N[Cos[B], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.25e-9], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.6e-109], N[(N[(x * N[(N[(-1.0 / B), $MachinePrecision] - N[(B * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[F, -4.6e-156], t$95$0, If[LessEqual[F, -5.5e-192], N[(t$95$1 + N[(x * N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.35e-128], t$95$0, If[LessEqual[F, 3.2e-37], N[(N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] + N[(0.3333333333333333 * N[(x * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(-x\right) \cdot \frac{\cos B}{\sin B}\\
t_1 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\
\mathbf{if}\;F \leq -1.25 \cdot 10^{-9}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -4.6 \cdot 10^{-109}:\\
\;\;\;\;x \cdot \left(\frac{-1}{B} - B \cdot -0.3333333333333333\right) + t_1\\
\mathbf{elif}\;F \leq -4.6 \cdot 10^{-156}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -5.5 \cdot 10^{-192}:\\
\;\;\;\;t_1 + x \cdot \frac{-1}{B}\\
\mathbf{elif}\;F \leq 1.35 \cdot 10^{-128}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 3.2 \cdot 10^{-37}:\\
\;\;\;\;\left(\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} + 0.3333333333333333 \cdot \left(x \cdot B\right)\right) - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.25e-9Initial program 57.1%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 78.6%
if -1.25e-9 < F < -4.6000000000000003e-109Initial program 99.5%
Taylor expanded in B around 0 72.5%
Taylor expanded in B around 0 63.3%
if -4.6000000000000003e-109 < F < -4.5999999999999999e-156 or -5.49999999999999995e-192 < F < 1.35000000000000003e-128Initial program 99.8%
Taylor expanded in B around 0 88.9%
div-inv88.9%
expm1-log1p-u53.5%
expm1-udef26.1%
Applied egg-rr26.1%
expm1-def53.5%
expm1-log1p88.9%
Simplified88.9%
Taylor expanded in F around 0 88.9%
Taylor expanded in x around inf 87.2%
mul-1-neg87.2%
associate-*r/87.4%
Simplified87.4%
if -4.5999999999999999e-156 < F < -5.49999999999999995e-192Initial program 99.6%
Taylor expanded in B around 0 87.8%
Taylor expanded in B around 0 87.9%
if 1.35000000000000003e-128 < F < 3.1999999999999999e-37Initial program 99.3%
Taylor expanded in B around 0 71.9%
div-inv72.0%
expm1-log1p-u50.2%
expm1-udef50.2%
Applied egg-rr50.2%
expm1-def50.2%
expm1-log1p72.0%
Simplified72.0%
Taylor expanded in F around 0 72.0%
Taylor expanded in B around 0 60.2%
if 3.1999999999999999e-37 < F Initial program 58.0%
Taylor expanded in F around -inf 40.6%
neg-sub040.6%
associate-+l-40.6%
add-sqr-sqrt19.2%
sqrt-unprod13.2%
sqr-neg13.2%
sqrt-unprod0.3%
add-sqr-sqrt0.8%
div-inv0.8%
cancel-sign-sub-inv0.8%
metadata-eval0.8%
*-un-lft-identity0.8%
add-sqr-sqrt0.4%
sqrt-unprod17.7%
frac-times17.7%
metadata-eval17.7%
metadata-eval17.7%
Applied egg-rr99.7%
associate--r+99.7%
neg-sub099.7%
distribute-neg-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in B around 0 71.8%
Final simplification76.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B))))
(if (<= F -1.35e-9)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -6.2e-107)
(+ (* x (- (/ -1.0 B) (* B -0.3333333333333333))) t_0)
(if (<= F -7.2e-156)
(* (- x) (/ (cos B) (sin B)))
(if (<= F -5.4e-192)
(+ t_0 (* x (/ -1.0 B)))
(if (<= F 3.4e-131)
(/ (- x) (/ (sin B) (cos B)))
(if (<= F 2.6e-37)
(-
(+
(* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B))
(* 0.3333333333333333 (* x B)))
(/ x B))
(- (/ 1.0 B) (/ x (tan B)))))))))))
double code(double F, double B, double x) {
double t_0 = pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B);
double tmp;
if (F <= -1.35e-9) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -6.2e-107) {
tmp = (x * ((-1.0 / B) - (B * -0.3333333333333333))) + t_0;
} else if (F <= -7.2e-156) {
tmp = -x * (cos(B) / sin(B));
} else if (F <= -5.4e-192) {
tmp = t_0 + (x * (-1.0 / B));
} else if (F <= 3.4e-131) {
tmp = -x / (sin(B) / cos(B));
} else if (F <= 2.6e-37) {
tmp = ((sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) + (0.3333333333333333 * (x * B))) - (x / B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)
if (f <= (-1.35d-9)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-6.2d-107)) then
tmp = (x * (((-1.0d0) / b) - (b * (-0.3333333333333333d0)))) + t_0
else if (f <= (-7.2d-156)) then
tmp = -x * (cos(b) / sin(b))
else if (f <= (-5.4d-192)) then
tmp = t_0 + (x * ((-1.0d0) / b))
else if (f <= 3.4d-131) then
tmp = -x / (sin(b) / cos(b))
else if (f <= 2.6d-37) then
tmp = ((sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) + (0.3333333333333333d0 * (x * b))) - (x / b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B);
double tmp;
if (F <= -1.35e-9) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -6.2e-107) {
tmp = (x * ((-1.0 / B) - (B * -0.3333333333333333))) + t_0;
} else if (F <= -7.2e-156) {
tmp = -x * (Math.cos(B) / Math.sin(B));
} else if (F <= -5.4e-192) {
tmp = t_0 + (x * (-1.0 / B));
} else if (F <= 3.4e-131) {
tmp = -x / (Math.sin(B) / Math.cos(B));
} else if (F <= 2.6e-37) {
tmp = ((Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) + (0.3333333333333333 * (x * B))) - (x / B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B) tmp = 0 if F <= -1.35e-9: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -6.2e-107: tmp = (x * ((-1.0 / B) - (B * -0.3333333333333333))) + t_0 elif F <= -7.2e-156: tmp = -x * (math.cos(B) / math.sin(B)) elif F <= -5.4e-192: tmp = t_0 + (x * (-1.0 / B)) elif F <= 3.4e-131: tmp = -x / (math.sin(B) / math.cos(B)) elif F <= 2.6e-37: tmp = ((math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) + (0.3333333333333333 * (x * B))) - (x / B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) tmp = 0.0 if (F <= -1.35e-9) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -6.2e-107) tmp = Float64(Float64(x * Float64(Float64(-1.0 / B) - Float64(B * -0.3333333333333333))) + t_0); elseif (F <= -7.2e-156) tmp = Float64(Float64(-x) * Float64(cos(B) / sin(B))); elseif (F <= -5.4e-192) tmp = Float64(t_0 + Float64(x * Float64(-1.0 / B))); elseif (F <= 3.4e-131) tmp = Float64(Float64(-x) / Float64(sin(B) / cos(B))); elseif (F <= 2.6e-37) tmp = Float64(Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) + Float64(0.3333333333333333 * Float64(x * B))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B); tmp = 0.0; if (F <= -1.35e-9) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -6.2e-107) tmp = (x * ((-1.0 / B) - (B * -0.3333333333333333))) + t_0; elseif (F <= -7.2e-156) tmp = -x * (cos(B) / sin(B)); elseif (F <= -5.4e-192) tmp = t_0 + (x * (-1.0 / B)); elseif (F <= 3.4e-131) tmp = -x / (sin(B) / cos(B)); elseif (F <= 2.6e-37) tmp = ((sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) + (0.3333333333333333 * (x * B))) - (x / B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.35e-9], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -6.2e-107], N[(N[(x * N[(N[(-1.0 / B), $MachinePrecision] - N[(B * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision], If[LessEqual[F, -7.2e-156], N[((-x) * N[(N[Cos[B], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5.4e-192], N[(t$95$0 + N[(x * N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.4e-131], N[((-x) / N[(N[Sin[B], $MachinePrecision] / N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.6e-37], N[(N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] + N[(0.3333333333333333 * N[(x * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\
\mathbf{if}\;F \leq -1.35 \cdot 10^{-9}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -6.2 \cdot 10^{-107}:\\
\;\;\;\;x \cdot \left(\frac{-1}{B} - B \cdot -0.3333333333333333\right) + t_0\\
\mathbf{elif}\;F \leq -7.2 \cdot 10^{-156}:\\
\;\;\;\;\left(-x\right) \cdot \frac{\cos B}{\sin B}\\
\mathbf{elif}\;F \leq -5.4 \cdot 10^{-192}:\\
\;\;\;\;t_0 + x \cdot \frac{-1}{B}\\
\mathbf{elif}\;F \leq 3.4 \cdot 10^{-131}:\\
\;\;\;\;\frac{-x}{\frac{\sin B}{\cos B}}\\
\mathbf{elif}\;F \leq 2.6 \cdot 10^{-37}:\\
\;\;\;\;\left(\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} + 0.3333333333333333 \cdot \left(x \cdot B\right)\right) - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.3500000000000001e-9Initial program 57.1%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 78.6%
if -1.3500000000000001e-9 < F < -6.20000000000000043e-107Initial program 99.5%
Taylor expanded in B around 0 72.5%
Taylor expanded in B around 0 63.3%
if -6.20000000000000043e-107 < F < -7.19999999999999998e-156Initial program 99.9%
Taylor expanded in B around 0 90.2%
div-inv89.9%
expm1-log1p-u43.2%
expm1-udef16.0%
Applied egg-rr16.0%
expm1-def43.2%
expm1-log1p89.9%
Simplified89.9%
Taylor expanded in F around 0 89.9%
Taylor expanded in x around inf 82.7%
mul-1-neg82.7%
associate-*r/83.0%
Simplified83.0%
if -7.19999999999999998e-156 < F < -5.39999999999999982e-192Initial program 99.6%
Taylor expanded in B around 0 87.8%
Taylor expanded in B around 0 87.9%
if -5.39999999999999982e-192 < F < 3.39999999999999995e-131Initial program 99.7%
Taylor expanded in F around -inf 42.3%
Taylor expanded in x around inf 88.4%
mul-1-neg88.4%
associate-/l*88.6%
distribute-neg-frac88.6%
Simplified88.6%
if 3.39999999999999995e-131 < F < 2.5999999999999998e-37Initial program 99.3%
Taylor expanded in B around 0 71.9%
div-inv72.0%
expm1-log1p-u50.2%
expm1-udef50.2%
Applied egg-rr50.2%
expm1-def50.2%
expm1-log1p72.0%
Simplified72.0%
Taylor expanded in F around 0 72.0%
Taylor expanded in B around 0 60.2%
if 2.5999999999999998e-37 < F Initial program 58.0%
Taylor expanded in F around -inf 40.6%
neg-sub040.6%
associate-+l-40.6%
add-sqr-sqrt19.2%
sqrt-unprod13.2%
sqr-neg13.2%
sqrt-unprod0.3%
add-sqr-sqrt0.8%
div-inv0.8%
cancel-sign-sub-inv0.8%
metadata-eval0.8%
*-un-lft-identity0.8%
add-sqr-sqrt0.4%
sqrt-unprod17.7%
frac-times17.7%
metadata-eval17.7%
metadata-eval17.7%
Applied egg-rr99.7%
associate--r+99.7%
neg-sub099.7%
distribute-neg-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in B around 0 71.8%
Final simplification76.4%
(FPCore (F B x)
:precision binary64
(if (<= F -3.6e-10)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 (sin B)))
(if (<= F -1.3e-96)
(+
(* x (- (/ -1.0 B) (* B -0.3333333333333333)))
(* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B)))
(if (<= F 1.3e-130)
(/ (- x) (/ (sin B) (cos B)))
(if (<= F 2.4e-38)
(-
(+
(* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B))
(* 0.3333333333333333 (* x B)))
(/ x B))
(- (/ 1.0 (sin B)) (/ x (tan B))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.6e-10) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B));
} else if (F <= -1.3e-96) {
tmp = (x * ((-1.0 / B) - (B * -0.3333333333333333))) + (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B));
} else if (F <= 1.3e-130) {
tmp = -x / (sin(B) / cos(B));
} else if (F <= 2.4e-38) {
tmp = ((sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) + (0.3333333333333333 * (x * B))) - (x / B);
} else {
tmp = (1.0 / sin(B)) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3.6d-10)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / sin(b))
else if (f <= (-1.3d-96)) then
tmp = (x * (((-1.0d0) / b) - (b * (-0.3333333333333333d0)))) + (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b))
else if (f <= 1.3d-130) then
tmp = -x / (sin(b) / cos(b))
else if (f <= 2.4d-38) then
tmp = ((sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) + (0.3333333333333333d0 * (x * b))) - (x / b)
else
tmp = (1.0d0 / sin(b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.6e-10) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / Math.sin(B));
} else if (F <= -1.3e-96) {
tmp = (x * ((-1.0 / B) - (B * -0.3333333333333333))) + (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B));
} else if (F <= 1.3e-130) {
tmp = -x / (Math.sin(B) / Math.cos(B));
} else if (F <= 2.4e-38) {
tmp = ((Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) + (0.3333333333333333 * (x * B))) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.6e-10: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / math.sin(B)) elif F <= -1.3e-96: tmp = (x * ((-1.0 / B) - (B * -0.3333333333333333))) + (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) elif F <= 1.3e-130: tmp = -x / (math.sin(B) / math.cos(B)) elif F <= 2.4e-38: tmp = ((math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) + (0.3333333333333333 * (x * B))) - (x / B) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.6e-10) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / sin(B))); elseif (F <= -1.3e-96) tmp = Float64(Float64(x * Float64(Float64(-1.0 / B) - Float64(B * -0.3333333333333333))) + Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B))); elseif (F <= 1.3e-130) tmp = Float64(Float64(-x) / Float64(sin(B) / cos(B))); elseif (F <= 2.4e-38) tmp = Float64(Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) + Float64(0.3333333333333333 * Float64(x * B))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.6e-10) tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B)); elseif (F <= -1.3e-96) tmp = (x * ((-1.0 / B) - (B * -0.3333333333333333))) + (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B)); elseif (F <= 1.3e-130) tmp = -x / (sin(B) / cos(B)); elseif (F <= 2.4e-38) tmp = ((sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) + (0.3333333333333333 * (x * B))) - (x / B); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.6e-10], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.3e-96], N[(N[(x * N[(N[(-1.0 / B), $MachinePrecision] - N[(B * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.3e-130], N[((-x) / N[(N[Sin[B], $MachinePrecision] / N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.4e-38], N[(N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] + N[(0.3333333333333333 * N[(x * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.6 \cdot 10^{-10}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -1.3 \cdot 10^{-96}:\\
\;\;\;\;x \cdot \left(\frac{-1}{B} - B \cdot -0.3333333333333333\right) + {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\
\mathbf{elif}\;F \leq 1.3 \cdot 10^{-130}:\\
\;\;\;\;\frac{-x}{\frac{\sin B}{\cos B}}\\
\mathbf{elif}\;F \leq 2.4 \cdot 10^{-38}:\\
\;\;\;\;\left(\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} + 0.3333333333333333 \cdot \left(x \cdot B\right)\right) - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -3.6e-10Initial program 57.7%
Taylor expanded in F around -inf 98.5%
if -3.6e-10 < F < -1.3000000000000001e-96Initial program 99.4%
Taylor expanded in B around 0 77.9%
Taylor expanded in B around 0 67.5%
if -1.3000000000000001e-96 < F < 1.3e-130Initial program 99.8%
Taylor expanded in F around -inf 41.7%
Taylor expanded in x around inf 82.9%
mul-1-neg82.9%
associate-/l*83.1%
distribute-neg-frac83.1%
Simplified83.1%
if 1.3e-130 < F < 2.40000000000000022e-38Initial program 99.3%
Taylor expanded in B around 0 71.9%
div-inv72.0%
expm1-log1p-u50.2%
expm1-udef50.2%
Applied egg-rr50.2%
expm1-def50.2%
expm1-log1p72.0%
Simplified72.0%
Taylor expanded in F around 0 72.0%
Taylor expanded in B around 0 60.2%
if 2.40000000000000022e-38 < F Initial program 58.0%
Taylor expanded in F around -inf 40.6%
neg-sub040.6%
associate-+l-40.6%
add-sqr-sqrt19.2%
sqrt-unprod13.2%
sqr-neg13.2%
sqrt-unprod0.3%
add-sqr-sqrt0.8%
div-inv0.8%
cancel-sign-sub-inv0.8%
metadata-eval0.8%
*-un-lft-identity0.8%
add-sqr-sqrt0.4%
sqrt-unprod17.7%
frac-times17.7%
metadata-eval17.7%
metadata-eval17.7%
Applied egg-rr99.7%
associate--r+99.7%
neg-sub099.7%
distribute-neg-frac99.7%
metadata-eval99.7%
Simplified99.7%
Final simplification89.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -4.5e-10)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 (sin B)))
(if (<= F 3.35e-37)
(- (/ (* F (sqrt 0.5)) B) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -4.5e-10) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B));
} else if (F <= 3.35e-37) {
tmp = ((F * sqrt(0.5)) / B) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-4.5d-10)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / sin(b))
else if (f <= 3.35d-37) then
tmp = ((f * sqrt(0.5d0)) / b) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -4.5e-10) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / Math.sin(B));
} else if (F <= 3.35e-37) {
tmp = ((F * Math.sqrt(0.5)) / B) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -4.5e-10: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / math.sin(B)) elif F <= 3.35e-37: tmp = ((F * math.sqrt(0.5)) / B) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -4.5e-10) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / sin(B))); elseif (F <= 3.35e-37) tmp = Float64(Float64(Float64(F * sqrt(0.5)) / B) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -4.5e-10) tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B)); elseif (F <= 3.35e-37) tmp = ((F * sqrt(0.5)) / B) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4.5e-10], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.35e-37], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -4.5 \cdot 10^{-10}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 3.35 \cdot 10^{-37}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -4.5e-10Initial program 57.7%
Taylor expanded in F around -inf 98.5%
if -4.5e-10 < F < 3.35e-37Initial program 99.6%
Taylor expanded in B around 0 83.7%
div-inv83.7%
expm1-log1p-u55.3%
expm1-udef38.9%
Applied egg-rr38.9%
expm1-def55.3%
expm1-log1p83.7%
Simplified83.7%
Taylor expanded in F around 0 83.7%
Taylor expanded in x around 0 83.6%
if 3.35e-37 < F Initial program 58.0%
Taylor expanded in F around -inf 40.6%
neg-sub040.6%
associate-+l-40.6%
add-sqr-sqrt19.2%
sqrt-unprod13.2%
sqr-neg13.2%
sqrt-unprod0.3%
add-sqr-sqrt0.8%
div-inv0.8%
cancel-sign-sub-inv0.8%
metadata-eval0.8%
*-un-lft-identity0.8%
add-sqr-sqrt0.4%
sqrt-unprod17.7%
frac-times17.7%
metadata-eval17.7%
metadata-eval17.7%
Applied egg-rr99.7%
associate--r+99.7%
neg-sub099.7%
distribute-neg-frac99.7%
metadata-eval99.7%
Simplified99.7%
Final simplification92.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0
(+
(* x (- (/ -1.0 B) (* B -0.3333333333333333)))
(* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B))))
(t_1 (* x (/ -1.0 (tan B)))))
(if (<= F -1.2e-9)
(+ t_1 (/ -1.0 B))
(if (<= F -2.1e-109)
t_0
(if (<= F -1.8e-140)
(+ t_1 (/ 1.0 B))
(if (<= F -6.6e-217)
t_0
(if (<= F 1.92e-128)
(+ t_1 (* (/ F B) (/ -1.0 F)))
(if (<= F 3.3e-37)
(- (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (* F (/ 1.0 B))) (/ x B))
(- (/ 1.0 B) (/ x (tan B)))))))))))
double code(double F, double B, double x) {
double t_0 = (x * ((-1.0 / B) - (B * -0.3333333333333333))) + (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B));
double t_1 = x * (-1.0 / tan(B));
double tmp;
if (F <= -1.2e-9) {
tmp = t_1 + (-1.0 / B);
} else if (F <= -2.1e-109) {
tmp = t_0;
} else if (F <= -1.8e-140) {
tmp = t_1 + (1.0 / B);
} else if (F <= -6.6e-217) {
tmp = t_0;
} else if (F <= 1.92e-128) {
tmp = t_1 + ((F / B) * (-1.0 / F));
} else if (F <= 3.3e-37) {
tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F * (1.0 / B))) - (x / B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x * (((-1.0d0) / b) - (b * (-0.3333333333333333d0)))) + (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b))
t_1 = x * ((-1.0d0) / tan(b))
if (f <= (-1.2d-9)) then
tmp = t_1 + ((-1.0d0) / b)
else if (f <= (-2.1d-109)) then
tmp = t_0
else if (f <= (-1.8d-140)) then
tmp = t_1 + (1.0d0 / b)
else if (f <= (-6.6d-217)) then
tmp = t_0
else if (f <= 1.92d-128) then
tmp = t_1 + ((f / b) * ((-1.0d0) / f))
else if (f <= 3.3d-37) then
tmp = (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f * (1.0d0 / b))) - (x / b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (x * ((-1.0 / B) - (B * -0.3333333333333333))) + (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B));
double t_1 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -1.2e-9) {
tmp = t_1 + (-1.0 / B);
} else if (F <= -2.1e-109) {
tmp = t_0;
} else if (F <= -1.8e-140) {
tmp = t_1 + (1.0 / B);
} else if (F <= -6.6e-217) {
tmp = t_0;
} else if (F <= 1.92e-128) {
tmp = t_1 + ((F / B) * (-1.0 / F));
} else if (F <= 3.3e-37) {
tmp = (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F * (1.0 / B))) - (x / B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = (x * ((-1.0 / B) - (B * -0.3333333333333333))) + (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) t_1 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -1.2e-9: tmp = t_1 + (-1.0 / B) elif F <= -2.1e-109: tmp = t_0 elif F <= -1.8e-140: tmp = t_1 + (1.0 / B) elif F <= -6.6e-217: tmp = t_0 elif F <= 1.92e-128: tmp = t_1 + ((F / B) * (-1.0 / F)) elif F <= 3.3e-37: tmp = (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F * (1.0 / B))) - (x / B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(Float64(x * Float64(Float64(-1.0 / B) - Float64(B * -0.3333333333333333))) + Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B))) t_1 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -1.2e-9) tmp = Float64(t_1 + Float64(-1.0 / B)); elseif (F <= -2.1e-109) tmp = t_0; elseif (F <= -1.8e-140) tmp = Float64(t_1 + Float64(1.0 / B)); elseif (F <= -6.6e-217) tmp = t_0; elseif (F <= 1.92e-128) tmp = Float64(t_1 + Float64(Float64(F / B) * Float64(-1.0 / F))); elseif (F <= 3.3e-37) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F * Float64(1.0 / B))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (x * ((-1.0 / B) - (B * -0.3333333333333333))) + (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B)); t_1 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -1.2e-9) tmp = t_1 + (-1.0 / B); elseif (F <= -2.1e-109) tmp = t_0; elseif (F <= -1.8e-140) tmp = t_1 + (1.0 / B); elseif (F <= -6.6e-217) tmp = t_0; elseif (F <= 1.92e-128) tmp = t_1 + ((F / B) * (-1.0 / F)); elseif (F <= 3.3e-37) tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F * (1.0 / B))) - (x / B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(x * N[(N[(-1.0 / B), $MachinePrecision] - N[(B * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.2e-9], N[(t$95$1 + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.1e-109], t$95$0, If[LessEqual[F, -1.8e-140], N[(t$95$1 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -6.6e-217], t$95$0, If[LessEqual[F, 1.92e-128], N[(t$95$1 + N[(N[(F / B), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.3e-37], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(\frac{-1}{B} - B \cdot -0.3333333333333333\right) + {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\
t_1 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -1.2 \cdot 10^{-9}:\\
\;\;\;\;t_1 + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -2.1 \cdot 10^{-109}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -1.8 \cdot 10^{-140}:\\
\;\;\;\;t_1 + \frac{1}{B}\\
\mathbf{elif}\;F \leq -6.6 \cdot 10^{-217}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.92 \cdot 10^{-128}:\\
\;\;\;\;t_1 + \frac{F}{B} \cdot \frac{-1}{F}\\
\mathbf{elif}\;F \leq 3.3 \cdot 10^{-37}:\\
\;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \left(F \cdot \frac{1}{B}\right) - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.2e-9Initial program 57.1%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 78.6%
if -1.2e-9 < F < -2.09999999999999996e-109 or -1.8e-140 < F < -6.59999999999999986e-217Initial program 99.6%
Taylor expanded in B around 0 84.9%
Taylor expanded in B around 0 69.0%
if -2.09999999999999996e-109 < F < -1.8e-140Initial program 99.8%
Taylor expanded in B around 0 85.8%
Taylor expanded in F around inf 76.1%
if -6.59999999999999986e-217 < F < 1.91999999999999991e-128Initial program 99.8%
Taylor expanded in B around 0 85.1%
Taylor expanded in F around -inf 61.5%
if 1.91999999999999991e-128 < F < 3.29999999999999982e-37Initial program 99.2%
clear-num99.4%
associate-/r/99.5%
Applied egg-rr99.5%
Taylor expanded in B around 0 87.0%
Taylor expanded in B around 0 62.6%
Taylor expanded in F around 0 62.6%
if 3.29999999999999982e-37 < F Initial program 58.0%
Taylor expanded in F around -inf 40.6%
neg-sub040.6%
associate-+l-40.6%
add-sqr-sqrt19.2%
sqrt-unprod13.2%
sqr-neg13.2%
sqrt-unprod0.3%
add-sqr-sqrt0.8%
div-inv0.8%
cancel-sign-sub-inv0.8%
metadata-eval0.8%
*-un-lft-identity0.8%
add-sqr-sqrt0.4%
sqrt-unprod17.7%
frac-times17.7%
metadata-eval17.7%
metadata-eval17.7%
Applied egg-rr99.7%
associate--r+99.7%
neg-sub099.7%
distribute-neg-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in B around 0 71.8%
Final simplification70.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))))
(t_1 (- (+ (* t_0 (/ F B)) (* 0.3333333333333333 (* x B))) (/ x B)))
(t_2 (* x (/ -1.0 (tan B)))))
(if (<= F -1.45e-9)
(+ t_2 (/ -1.0 B))
(if (<= F -1.7e-97)
t_1
(if (<= F -1.25e-140)
(+ t_2 (/ 1.0 B))
(if (<= F -3.6e-217)
t_1
(if (<= F 1.92e-128)
(+ t_2 (* (/ F B) (/ -1.0 F)))
(if (<= F 4.5e-38)
(- (* t_0 (* F (/ 1.0 B))) (/ x B))
(- (/ 1.0 B) (/ x (tan B)))))))))))
double code(double F, double B, double x) {
double t_0 = sqrt((1.0 / (2.0 + (x * 2.0))));
double t_1 = ((t_0 * (F / B)) + (0.3333333333333333 * (x * B))) - (x / B);
double t_2 = x * (-1.0 / tan(B));
double tmp;
if (F <= -1.45e-9) {
tmp = t_2 + (-1.0 / B);
} else if (F <= -1.7e-97) {
tmp = t_1;
} else if (F <= -1.25e-140) {
tmp = t_2 + (1.0 / B);
} else if (F <= -3.6e-217) {
tmp = t_1;
} else if (F <= 1.92e-128) {
tmp = t_2 + ((F / B) * (-1.0 / F));
} else if (F <= 4.5e-38) {
tmp = (t_0 * (F * (1.0 / B))) - (x / B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))
t_1 = ((t_0 * (f / b)) + (0.3333333333333333d0 * (x * b))) - (x / b)
t_2 = x * ((-1.0d0) / tan(b))
if (f <= (-1.45d-9)) then
tmp = t_2 + ((-1.0d0) / b)
else if (f <= (-1.7d-97)) then
tmp = t_1
else if (f <= (-1.25d-140)) then
tmp = t_2 + (1.0d0 / b)
else if (f <= (-3.6d-217)) then
tmp = t_1
else if (f <= 1.92d-128) then
tmp = t_2 + ((f / b) * ((-1.0d0) / f))
else if (f <= 4.5d-38) then
tmp = (t_0 * (f * (1.0d0 / b))) - (x / b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.sqrt((1.0 / (2.0 + (x * 2.0))));
double t_1 = ((t_0 * (F / B)) + (0.3333333333333333 * (x * B))) - (x / B);
double t_2 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -1.45e-9) {
tmp = t_2 + (-1.0 / B);
} else if (F <= -1.7e-97) {
tmp = t_1;
} else if (F <= -1.25e-140) {
tmp = t_2 + (1.0 / B);
} else if (F <= -3.6e-217) {
tmp = t_1;
} else if (F <= 1.92e-128) {
tmp = t_2 + ((F / B) * (-1.0 / F));
} else if (F <= 4.5e-38) {
tmp = (t_0 * (F * (1.0 / B))) - (x / B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = math.sqrt((1.0 / (2.0 + (x * 2.0)))) t_1 = ((t_0 * (F / B)) + (0.3333333333333333 * (x * B))) - (x / B) t_2 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -1.45e-9: tmp = t_2 + (-1.0 / B) elif F <= -1.7e-97: tmp = t_1 elif F <= -1.25e-140: tmp = t_2 + (1.0 / B) elif F <= -3.6e-217: tmp = t_1 elif F <= 1.92e-128: tmp = t_2 + ((F / B) * (-1.0 / F)) elif F <= 4.5e-38: tmp = (t_0 * (F * (1.0 / B))) - (x / B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) t_1 = Float64(Float64(Float64(t_0 * Float64(F / B)) + Float64(0.3333333333333333 * Float64(x * B))) - Float64(x / B)) t_2 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -1.45e-9) tmp = Float64(t_2 + Float64(-1.0 / B)); elseif (F <= -1.7e-97) tmp = t_1; elseif (F <= -1.25e-140) tmp = Float64(t_2 + Float64(1.0 / B)); elseif (F <= -3.6e-217) tmp = t_1; elseif (F <= 1.92e-128) tmp = Float64(t_2 + Float64(Float64(F / B) * Float64(-1.0 / F))); elseif (F <= 4.5e-38) tmp = Float64(Float64(t_0 * Float64(F * Float64(1.0 / B))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = sqrt((1.0 / (2.0 + (x * 2.0)))); t_1 = ((t_0 * (F / B)) + (0.3333333333333333 * (x * B))) - (x / B); t_2 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -1.45e-9) tmp = t_2 + (-1.0 / B); elseif (F <= -1.7e-97) tmp = t_1; elseif (F <= -1.25e-140) tmp = t_2 + (1.0 / B); elseif (F <= -3.6e-217) tmp = t_1; elseif (F <= 1.92e-128) tmp = t_2 + ((F / B) * (-1.0 / F)); elseif (F <= 4.5e-38) tmp = (t_0 * (F * (1.0 / B))) - (x / B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision] + N[(0.3333333333333333 * N[(x * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.45e-9], N[(t$95$2 + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.7e-97], t$95$1, If[LessEqual[F, -1.25e-140], N[(t$95$2 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.6e-217], t$95$1, If[LessEqual[F, 1.92e-128], N[(t$95$2 + N[(N[(F / B), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.5e-38], N[(N[(t$95$0 * N[(F * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{2 + x \cdot 2}}\\
t_1 := \left(t_0 \cdot \frac{F}{B} + 0.3333333333333333 \cdot \left(x \cdot B\right)\right) - \frac{x}{B}\\
t_2 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -1.45 \cdot 10^{-9}:\\
\;\;\;\;t_2 + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -1.7 \cdot 10^{-97}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -1.25 \cdot 10^{-140}:\\
\;\;\;\;t_2 + \frac{1}{B}\\
\mathbf{elif}\;F \leq -3.6 \cdot 10^{-217}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 1.92 \cdot 10^{-128}:\\
\;\;\;\;t_2 + \frac{F}{B} \cdot \frac{-1}{F}\\
\mathbf{elif}\;F \leq 4.5 \cdot 10^{-38}:\\
\;\;\;\;t_0 \cdot \left(F \cdot \frac{1}{B}\right) - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.44999999999999996e-9Initial program 57.1%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 78.6%
if -1.44999999999999996e-9 < F < -1.6999999999999999e-97 or -1.25000000000000004e-140 < F < -3.59999999999999981e-217Initial program 99.6%
Taylor expanded in B around 0 84.9%
div-inv84.8%
expm1-log1p-u61.8%
expm1-udef51.0%
Applied egg-rr51.0%
expm1-def61.8%
expm1-log1p84.8%
Simplified84.8%
Taylor expanded in F around 0 84.8%
Taylor expanded in B around 0 69.0%
if -1.6999999999999999e-97 < F < -1.25000000000000004e-140Initial program 99.8%
Taylor expanded in B around 0 85.8%
Taylor expanded in F around inf 76.1%
if -3.59999999999999981e-217 < F < 1.91999999999999991e-128Initial program 99.8%
Taylor expanded in B around 0 85.1%
Taylor expanded in F around -inf 61.5%
if 1.91999999999999991e-128 < F < 4.50000000000000009e-38Initial program 99.2%
clear-num99.4%
associate-/r/99.5%
Applied egg-rr99.5%
Taylor expanded in B around 0 87.0%
Taylor expanded in B around 0 62.6%
Taylor expanded in F around 0 62.6%
if 4.50000000000000009e-38 < F Initial program 58.0%
Taylor expanded in F around -inf 40.6%
neg-sub040.6%
associate-+l-40.6%
add-sqr-sqrt19.2%
sqrt-unprod13.2%
sqr-neg13.2%
sqrt-unprod0.3%
add-sqr-sqrt0.8%
div-inv0.8%
cancel-sign-sub-inv0.8%
metadata-eval0.8%
*-un-lft-identity0.8%
add-sqr-sqrt0.4%
sqrt-unprod17.7%
frac-times17.7%
metadata-eval17.7%
metadata-eval17.7%
Applied egg-rr99.7%
associate--r+99.7%
neg-sub099.7%
distribute-neg-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in B around 0 71.8%
Final simplification70.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (t_1 (* x (/ -1.0 (tan B)))))
(if (<= F -1.05e-141)
(+ t_1 (/ -1.0 B))
(if (<= F -3.35e-217)
(- (* t_0 (/ F B)) (/ x B))
(if (<= F 2.12e-128)
(+ t_1 (* (/ F B) (/ -1.0 F)))
(if (<= F 3.1e-40)
(- (* t_0 (* F (/ 1.0 B))) (/ x B))
(- (/ 1.0 B) (/ x (tan B)))))))))
double code(double F, double B, double x) {
double t_0 = sqrt((1.0 / (2.0 + (x * 2.0))));
double t_1 = x * (-1.0 / tan(B));
double tmp;
if (F <= -1.05e-141) {
tmp = t_1 + (-1.0 / B);
} else if (F <= -3.35e-217) {
tmp = (t_0 * (F / B)) - (x / B);
} else if (F <= 2.12e-128) {
tmp = t_1 + ((F / B) * (-1.0 / F));
} else if (F <= 3.1e-40) {
tmp = (t_0 * (F * (1.0 / B))) - (x / B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))
t_1 = x * ((-1.0d0) / tan(b))
if (f <= (-1.05d-141)) then
tmp = t_1 + ((-1.0d0) / b)
else if (f <= (-3.35d-217)) then
tmp = (t_0 * (f / b)) - (x / b)
else if (f <= 2.12d-128) then
tmp = t_1 + ((f / b) * ((-1.0d0) / f))
else if (f <= 3.1d-40) then
tmp = (t_0 * (f * (1.0d0 / b))) - (x / b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.sqrt((1.0 / (2.0 + (x * 2.0))));
double t_1 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -1.05e-141) {
tmp = t_1 + (-1.0 / B);
} else if (F <= -3.35e-217) {
tmp = (t_0 * (F / B)) - (x / B);
} else if (F <= 2.12e-128) {
tmp = t_1 + ((F / B) * (-1.0 / F));
} else if (F <= 3.1e-40) {
tmp = (t_0 * (F * (1.0 / B))) - (x / B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = math.sqrt((1.0 / (2.0 + (x * 2.0)))) t_1 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -1.05e-141: tmp = t_1 + (-1.0 / B) elif F <= -3.35e-217: tmp = (t_0 * (F / B)) - (x / B) elif F <= 2.12e-128: tmp = t_1 + ((F / B) * (-1.0 / F)) elif F <= 3.1e-40: tmp = (t_0 * (F * (1.0 / B))) - (x / B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) t_1 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -1.05e-141) tmp = Float64(t_1 + Float64(-1.0 / B)); elseif (F <= -3.35e-217) tmp = Float64(Float64(t_0 * Float64(F / B)) - Float64(x / B)); elseif (F <= 2.12e-128) tmp = Float64(t_1 + Float64(Float64(F / B) * Float64(-1.0 / F))); elseif (F <= 3.1e-40) tmp = Float64(Float64(t_0 * Float64(F * Float64(1.0 / B))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = sqrt((1.0 / (2.0 + (x * 2.0)))); t_1 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -1.05e-141) tmp = t_1 + (-1.0 / B); elseif (F <= -3.35e-217) tmp = (t_0 * (F / B)) - (x / B); elseif (F <= 2.12e-128) tmp = t_1 + ((F / B) * (-1.0 / F)); elseif (F <= 3.1e-40) tmp = (t_0 * (F * (1.0 / B))) - (x / B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.05e-141], N[(t$95$1 + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.35e-217], N[(N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.12e-128], N[(t$95$1 + N[(N[(F / B), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.1e-40], N[(N[(t$95$0 * N[(F * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{2 + x \cdot 2}}\\
t_1 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -1.05 \cdot 10^{-141}:\\
\;\;\;\;t_1 + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -3.35 \cdot 10^{-217}:\\
\;\;\;\;t_0 \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.12 \cdot 10^{-128}:\\
\;\;\;\;t_1 + \frac{F}{B} \cdot \frac{-1}{F}\\
\mathbf{elif}\;F \leq 3.1 \cdot 10^{-40}:\\
\;\;\;\;t_0 \cdot \left(F \cdot \frac{1}{B}\right) - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.05e-141Initial program 68.5%
Taylor expanded in F around -inf 82.7%
Taylor expanded in B around 0 71.0%
if -1.05e-141 < F < -3.35e-217Initial program 99.7%
clear-num99.8%
associate-/r/99.5%
Applied egg-rr99.5%
Taylor expanded in B around 0 81.4%
Taylor expanded in B around 0 75.4%
Taylor expanded in F around 0 75.6%
if -3.35e-217 < F < 2.11999999999999989e-128Initial program 99.8%
Taylor expanded in B around 0 85.1%
Taylor expanded in F around -inf 61.5%
if 2.11999999999999989e-128 < F < 3.10000000000000011e-40Initial program 99.2%
clear-num99.4%
associate-/r/99.5%
Applied egg-rr99.5%
Taylor expanded in B around 0 87.0%
Taylor expanded in B around 0 62.6%
Taylor expanded in F around 0 62.6%
if 3.10000000000000011e-40 < F Initial program 58.0%
Taylor expanded in F around -inf 40.6%
neg-sub040.6%
associate-+l-40.6%
add-sqr-sqrt19.2%
sqrt-unprod13.2%
sqr-neg13.2%
sqrt-unprod0.3%
add-sqr-sqrt0.8%
div-inv0.8%
cancel-sign-sub-inv0.8%
metadata-eval0.8%
*-un-lft-identity0.8%
add-sqr-sqrt0.4%
sqrt-unprod17.7%
frac-times17.7%
metadata-eval17.7%
metadata-eval17.7%
Applied egg-rr99.7%
associate--r+99.7%
neg-sub099.7%
distribute-neg-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in B around 0 71.8%
Final simplification69.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)) (/ x B)))
(t_1 (* x (/ -1.0 (tan B)))))
(if (<= F -6.1e-142)
(+ t_1 (/ -1.0 B))
(if (<= F -5.5e-217)
t_0
(if (<= F 1.92e-128)
(+ t_1 (* (/ F B) (/ -1.0 F)))
(if (<= F 3.3e-37) t_0 (- (/ 1.0 B) (/ x (tan B)))))))))
double code(double F, double B, double x) {
double t_0 = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B);
double t_1 = x * (-1.0 / tan(B));
double tmp;
if (F <= -6.1e-142) {
tmp = t_1 + (-1.0 / B);
} else if (F <= -5.5e-217) {
tmp = t_0;
} else if (F <= 1.92e-128) {
tmp = t_1 + ((F / B) * (-1.0 / F));
} else if (F <= 3.3e-37) {
tmp = t_0;
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) - (x / b)
t_1 = x * ((-1.0d0) / tan(b))
if (f <= (-6.1d-142)) then
tmp = t_1 + ((-1.0d0) / b)
else if (f <= (-5.5d-217)) then
tmp = t_0
else if (f <= 1.92d-128) then
tmp = t_1 + ((f / b) * ((-1.0d0) / f))
else if (f <= 3.3d-37) then
tmp = t_0
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B);
double t_1 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -6.1e-142) {
tmp = t_1 + (-1.0 / B);
} else if (F <= -5.5e-217) {
tmp = t_0;
} else if (F <= 1.92e-128) {
tmp = t_1 + ((F / B) * (-1.0 / F));
} else if (F <= 3.3e-37) {
tmp = t_0;
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B) t_1 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -6.1e-142: tmp = t_1 + (-1.0 / B) elif F <= -5.5e-217: tmp = t_0 elif F <= 1.92e-128: tmp = t_1 + ((F / B) * (-1.0 / F)) elif F <= 3.3e-37: tmp = t_0 else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) - Float64(x / B)) t_1 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -6.1e-142) tmp = Float64(t_1 + Float64(-1.0 / B)); elseif (F <= -5.5e-217) tmp = t_0; elseif (F <= 1.92e-128) tmp = Float64(t_1 + Float64(Float64(F / B) * Float64(-1.0 / F))); elseif (F <= 3.3e-37) tmp = t_0; else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B); t_1 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -6.1e-142) tmp = t_1 + (-1.0 / B); elseif (F <= -5.5e-217) tmp = t_0; elseif (F <= 1.92e-128) tmp = t_1 + ((F / B) * (-1.0 / F)); elseif (F <= 3.3e-37) tmp = t_0; else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6.1e-142], N[(t$95$1 + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5.5e-217], t$95$0, If[LessEqual[F, 1.92e-128], N[(t$95$1 + N[(N[(F / B), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.3e-37], t$95$0, N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - \frac{x}{B}\\
t_1 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -6.1 \cdot 10^{-142}:\\
\;\;\;\;t_1 + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -5.5 \cdot 10^{-217}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.92 \cdot 10^{-128}:\\
\;\;\;\;t_1 + \frac{F}{B} \cdot \frac{-1}{F}\\
\mathbf{elif}\;F \leq 3.3 \cdot 10^{-37}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -6.1000000000000001e-142Initial program 68.5%
Taylor expanded in F around -inf 82.7%
Taylor expanded in B around 0 71.0%
if -6.1000000000000001e-142 < F < -5.49999999999999975e-217 or 1.91999999999999991e-128 < F < 3.29999999999999982e-37Initial program 99.4%
clear-num99.6%
associate-/r/99.5%
Applied egg-rr99.5%
Taylor expanded in B around 0 84.7%
Taylor expanded in B around 0 67.9%
Taylor expanded in F around 0 67.8%
if -5.49999999999999975e-217 < F < 1.91999999999999991e-128Initial program 99.8%
Taylor expanded in B around 0 85.1%
Taylor expanded in F around -inf 61.5%
if 3.29999999999999982e-37 < F Initial program 58.0%
Taylor expanded in F around -inf 40.6%
neg-sub040.6%
associate-+l-40.6%
add-sqr-sqrt19.2%
sqrt-unprod13.2%
sqr-neg13.2%
sqrt-unprod0.3%
add-sqr-sqrt0.8%
div-inv0.8%
cancel-sign-sub-inv0.8%
metadata-eval0.8%
*-un-lft-identity0.8%
add-sqr-sqrt0.4%
sqrt-unprod17.7%
frac-times17.7%
metadata-eval17.7%
metadata-eval17.7%
Applied egg-rr99.7%
associate--r+99.7%
neg-sub099.7%
distribute-neg-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in B around 0 71.8%
Final simplification69.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B))
(t_1 (/ x (tan B))))
(if (<= F -4.5e-142)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -2.55e-259)
t_0
(if (<= F 1.62e-130)
(- (* (/ F B) (/ 1.0 F)) t_1)
(if (<= F 3.35e-37) t_0 (- (/ 1.0 B) t_1)))))))
double code(double F, double B, double x) {
double t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double t_1 = x / tan(B);
double tmp;
if (F <= -4.5e-142) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -2.55e-259) {
tmp = t_0;
} else if (F <= 1.62e-130) {
tmp = ((F / B) * (1.0 / F)) - t_1;
} else if (F <= 3.35e-37) {
tmp = t_0;
} else {
tmp = (1.0 / B) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
t_1 = x / tan(b)
if (f <= (-4.5d-142)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-2.55d-259)) then
tmp = t_0
else if (f <= 1.62d-130) then
tmp = ((f / b) * (1.0d0 / f)) - t_1
else if (f <= 3.35d-37) then
tmp = t_0
else
tmp = (1.0d0 / b) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -4.5e-142) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -2.55e-259) {
tmp = t_0;
} else if (F <= 1.62e-130) {
tmp = ((F / B) * (1.0 / F)) - t_1;
} else if (F <= 3.35e-37) {
tmp = t_0;
} else {
tmp = (1.0 / B) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B t_1 = x / math.tan(B) tmp = 0 if F <= -4.5e-142: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -2.55e-259: tmp = t_0 elif F <= 1.62e-130: tmp = ((F / B) * (1.0 / F)) - t_1 elif F <= 3.35e-37: tmp = t_0 else: tmp = (1.0 / B) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -4.5e-142) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -2.55e-259) tmp = t_0; elseif (F <= 1.62e-130) tmp = Float64(Float64(Float64(F / B) * Float64(1.0 / F)) - t_1); elseif (F <= 3.35e-37) tmp = t_0; else tmp = Float64(Float64(1.0 / B) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; t_1 = x / tan(B); tmp = 0.0; if (F <= -4.5e-142) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -2.55e-259) tmp = t_0; elseif (F <= 1.62e-130) tmp = ((F / B) * (1.0 / F)) - t_1; elseif (F <= 3.35e-37) tmp = t_0; else tmp = (1.0 / B) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4.5e-142], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.55e-259], t$95$0, If[LessEqual[F, 1.62e-130], N[(N[(N[(F / B), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 3.35e-37], t$95$0, N[(N[(1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -4.5 \cdot 10^{-142}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -2.55 \cdot 10^{-259}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.62 \cdot 10^{-130}:\\
\;\;\;\;\frac{F}{B} \cdot \frac{1}{F} - t_1\\
\mathbf{elif}\;F \leq 3.35 \cdot 10^{-37}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_1\\
\end{array}
\end{array}
if F < -4.50000000000000019e-142Initial program 68.5%
Taylor expanded in F around -inf 82.7%
Taylor expanded in B around 0 71.0%
if -4.50000000000000019e-142 < F < -2.5499999999999999e-259 or 1.62e-130 < F < 3.35e-37Initial program 99.5%
Taylor expanded in B around 0 83.2%
div-inv83.2%
expm1-log1p-u51.5%
expm1-udef45.3%
Applied egg-rr45.3%
expm1-def51.5%
expm1-log1p83.2%
Simplified83.2%
Taylor expanded in F around 0 83.2%
Taylor expanded in B around 0 66.4%
if -2.5499999999999999e-259 < F < 1.62e-130Initial program 99.7%
Taylor expanded in B around 0 84.9%
div-inv85.0%
expm1-log1p-u56.4%
expm1-udef27.8%
Applied egg-rr27.8%
expm1-def56.4%
expm1-log1p85.0%
Simplified85.0%
Taylor expanded in F around inf 61.1%
if 3.35e-37 < F Initial program 58.0%
Taylor expanded in F around -inf 40.6%
neg-sub040.6%
associate-+l-40.6%
add-sqr-sqrt19.2%
sqrt-unprod13.2%
sqr-neg13.2%
sqrt-unprod0.3%
add-sqr-sqrt0.8%
div-inv0.8%
cancel-sign-sub-inv0.8%
metadata-eval0.8%
*-un-lft-identity0.8%
add-sqr-sqrt0.4%
sqrt-unprod17.7%
frac-times17.7%
metadata-eval17.7%
metadata-eval17.7%
Applied egg-rr99.7%
associate--r+99.7%
neg-sub099.7%
distribute-neg-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in B around 0 71.8%
Final simplification69.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B))
(t_1 (* x (/ -1.0 (tan B)))))
(if (<= F -9.5e-142)
(+ t_1 (/ -1.0 B))
(if (<= F -5.6e-217)
t_0
(if (<= F 1.92e-128)
(+ t_1 (* (/ F B) (/ -1.0 F)))
(if (<= F 5.8e-41) t_0 (- (/ 1.0 B) (/ x (tan B)))))))))
double code(double F, double B, double x) {
double t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double t_1 = x * (-1.0 / tan(B));
double tmp;
if (F <= -9.5e-142) {
tmp = t_1 + (-1.0 / B);
} else if (F <= -5.6e-217) {
tmp = t_0;
} else if (F <= 1.92e-128) {
tmp = t_1 + ((F / B) * (-1.0 / F));
} else if (F <= 5.8e-41) {
tmp = t_0;
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
t_1 = x * ((-1.0d0) / tan(b))
if (f <= (-9.5d-142)) then
tmp = t_1 + ((-1.0d0) / b)
else if (f <= (-5.6d-217)) then
tmp = t_0
else if (f <= 1.92d-128) then
tmp = t_1 + ((f / b) * ((-1.0d0) / f))
else if (f <= 5.8d-41) then
tmp = t_0
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double t_1 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -9.5e-142) {
tmp = t_1 + (-1.0 / B);
} else if (F <= -5.6e-217) {
tmp = t_0;
} else if (F <= 1.92e-128) {
tmp = t_1 + ((F / B) * (-1.0 / F));
} else if (F <= 5.8e-41) {
tmp = t_0;
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B t_1 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -9.5e-142: tmp = t_1 + (-1.0 / B) elif F <= -5.6e-217: tmp = t_0 elif F <= 1.92e-128: tmp = t_1 + ((F / B) * (-1.0 / F)) elif F <= 5.8e-41: tmp = t_0 else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B) t_1 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -9.5e-142) tmp = Float64(t_1 + Float64(-1.0 / B)); elseif (F <= -5.6e-217) tmp = t_0; elseif (F <= 1.92e-128) tmp = Float64(t_1 + Float64(Float64(F / B) * Float64(-1.0 / F))); elseif (F <= 5.8e-41) tmp = t_0; else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; t_1 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -9.5e-142) tmp = t_1 + (-1.0 / B); elseif (F <= -5.6e-217) tmp = t_0; elseif (F <= 1.92e-128) tmp = t_1 + ((F / B) * (-1.0 / F)); elseif (F <= 5.8e-41) tmp = t_0; else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -9.5e-142], N[(t$95$1 + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5.6e-217], t$95$0, If[LessEqual[F, 1.92e-128], N[(t$95$1 + N[(N[(F / B), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.8e-41], t$95$0, N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
t_1 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -9.5 \cdot 10^{-142}:\\
\;\;\;\;t_1 + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -5.6 \cdot 10^{-217}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.92 \cdot 10^{-128}:\\
\;\;\;\;t_1 + \frac{F}{B} \cdot \frac{-1}{F}\\
\mathbf{elif}\;F \leq 5.8 \cdot 10^{-41}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -9.49999999999999967e-142Initial program 68.5%
Taylor expanded in F around -inf 82.7%
Taylor expanded in B around 0 71.0%
if -9.49999999999999967e-142 < F < -5.6e-217 or 1.91999999999999991e-128 < F < 5.79999999999999955e-41Initial program 99.4%
Taylor expanded in B around 0 82.6%
div-inv82.6%
expm1-log1p-u53.1%
expm1-udef48.3%
Applied egg-rr48.3%
expm1-def53.1%
expm1-log1p82.6%
Simplified82.6%
Taylor expanded in F around 0 82.6%
Taylor expanded in B around 0 67.7%
if -5.6e-217 < F < 1.91999999999999991e-128Initial program 99.8%
Taylor expanded in B around 0 85.1%
Taylor expanded in F around -inf 61.5%
if 5.79999999999999955e-41 < F Initial program 58.0%
Taylor expanded in F around -inf 40.6%
neg-sub040.6%
associate-+l-40.6%
add-sqr-sqrt19.2%
sqrt-unprod13.2%
sqr-neg13.2%
sqrt-unprod0.3%
add-sqr-sqrt0.8%
div-inv0.8%
cancel-sign-sub-inv0.8%
metadata-eval0.8%
*-un-lft-identity0.8%
add-sqr-sqrt0.4%
sqrt-unprod17.7%
frac-times17.7%
metadata-eval17.7%
metadata-eval17.7%
Applied egg-rr99.7%
associate--r+99.7%
neg-sub099.7%
distribute-neg-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in B around 0 71.8%
Final simplification69.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ 1.0 (sin B))) (t_1 (- (/ 1.0 B) (/ x (tan B)))))
(if (<= x -3.3e-40)
t_1
(if (<= x 3.1e-145)
t_0
(if (<= x 5.3e-49) (/ -1.0 (sin B)) (if (<= x 9.2e-10) t_0 t_1))))))
double code(double F, double B, double x) {
double t_0 = 1.0 / sin(B);
double t_1 = (1.0 / B) - (x / tan(B));
double tmp;
if (x <= -3.3e-40) {
tmp = t_1;
} else if (x <= 3.1e-145) {
tmp = t_0;
} else if (x <= 5.3e-49) {
tmp = -1.0 / sin(B);
} else if (x <= 9.2e-10) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 1.0d0 / sin(b)
t_1 = (1.0d0 / b) - (x / tan(b))
if (x <= (-3.3d-40)) then
tmp = t_1
else if (x <= 3.1d-145) then
tmp = t_0
else if (x <= 5.3d-49) then
tmp = (-1.0d0) / sin(b)
else if (x <= 9.2d-10) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 1.0 / Math.sin(B);
double t_1 = (1.0 / B) - (x / Math.tan(B));
double tmp;
if (x <= -3.3e-40) {
tmp = t_1;
} else if (x <= 3.1e-145) {
tmp = t_0;
} else if (x <= 5.3e-49) {
tmp = -1.0 / Math.sin(B);
} else if (x <= 9.2e-10) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(F, B, x): t_0 = 1.0 / math.sin(B) t_1 = (1.0 / B) - (x / math.tan(B)) tmp = 0 if x <= -3.3e-40: tmp = t_1 elif x <= 3.1e-145: tmp = t_0 elif x <= 5.3e-49: tmp = -1.0 / math.sin(B) elif x <= 9.2e-10: tmp = t_0 else: tmp = t_1 return tmp
function code(F, B, x) t_0 = Float64(1.0 / sin(B)) t_1 = Float64(Float64(1.0 / B) - Float64(x / tan(B))) tmp = 0.0 if (x <= -3.3e-40) tmp = t_1; elseif (x <= 3.1e-145) tmp = t_0; elseif (x <= 5.3e-49) tmp = Float64(-1.0 / sin(B)); elseif (x <= 9.2e-10) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(F, B, x) t_0 = 1.0 / sin(B); t_1 = (1.0 / B) - (x / tan(B)); tmp = 0.0; if (x <= -3.3e-40) tmp = t_1; elseif (x <= 3.1e-145) tmp = t_0; elseif (x <= 5.3e-49) tmp = -1.0 / sin(B); elseif (x <= 9.2e-10) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.3e-40], t$95$1, If[LessEqual[x, 3.1e-145], t$95$0, If[LessEqual[x, 5.3e-49], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.2e-10], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
t_1 := \frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;x \leq -3.3 \cdot 10^{-40}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 3.1 \cdot 10^{-145}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 5.3 \cdot 10^{-49}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;x \leq 9.2 \cdot 10^{-10}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -3.29999999999999993e-40 or 9.20000000000000028e-10 < x Initial program 80.6%
Taylor expanded in F around -inf 96.6%
neg-sub096.6%
associate-+l-96.6%
add-sqr-sqrt44.4%
sqrt-unprod29.6%
sqr-neg29.6%
sqrt-unprod0.3%
add-sqr-sqrt2.2%
div-inv2.2%
cancel-sign-sub-inv2.2%
metadata-eval2.2%
*-un-lft-identity2.2%
add-sqr-sqrt0.2%
sqrt-unprod0.8%
frac-times0.8%
metadata-eval0.8%
metadata-eval0.8%
Applied egg-rr95.5%
associate--r+95.5%
neg-sub095.5%
distribute-neg-frac95.5%
metadata-eval95.5%
Simplified95.5%
Taylor expanded in B around 0 97.4%
if -3.29999999999999993e-40 < x < 3.1e-145 or 5.3000000000000003e-49 < x < 9.20000000000000028e-10Initial program 71.2%
Taylor expanded in F around -inf 21.7%
neg-sub021.7%
associate-+l-21.7%
add-sqr-sqrt12.2%
sqrt-unprod21.6%
sqr-neg21.6%
sqrt-unprod9.5%
add-sqr-sqrt21.7%
div-inv21.7%
cancel-sign-sub-inv21.7%
metadata-eval21.7%
*-un-lft-identity21.7%
add-sqr-sqrt6.8%
sqrt-unprod17.2%
frac-times17.2%
metadata-eval17.2%
metadata-eval17.2%
Applied egg-rr37.5%
associate--r+37.5%
neg-sub037.5%
distribute-neg-frac37.5%
metadata-eval37.5%
Simplified37.5%
Taylor expanded in x around 0 36.8%
if 3.1e-145 < x < 5.3000000000000003e-49Initial program 72.6%
Taylor expanded in F around -inf 38.9%
Taylor expanded in B around 0 26.8%
Taylor expanded in x around 0 38.9%
Final simplification62.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -16.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 4.7e+45)
(- (* (/ F B) (/ 1.0 F)) t_0)
(if (<= F 4.8e+45)
(/ (- x) B)
(if (<= F 3.7e+94) (/ 1.0 (sin B)) (- (/ 1.0 B) t_0)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -16.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 4.7e+45) {
tmp = ((F / B) * (1.0 / F)) - t_0;
} else if (F <= 4.8e+45) {
tmp = -x / B;
} else if (F <= 3.7e+94) {
tmp = 1.0 / sin(B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-16.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 4.7d+45) then
tmp = ((f / b) * (1.0d0 / f)) - t_0
else if (f <= 4.8d+45) then
tmp = -x / b
else if (f <= 3.7d+94) then
tmp = 1.0d0 / sin(b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -16.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 4.7e+45) {
tmp = ((F / B) * (1.0 / F)) - t_0;
} else if (F <= 4.8e+45) {
tmp = -x / B;
} else if (F <= 3.7e+94) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -16.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 4.7e+45: tmp = ((F / B) * (1.0 / F)) - t_0 elif F <= 4.8e+45: tmp = -x / B elif F <= 3.7e+94: tmp = 1.0 / math.sin(B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -16.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 4.7e+45) tmp = Float64(Float64(Float64(F / B) * Float64(1.0 / F)) - t_0); elseif (F <= 4.8e+45) tmp = Float64(Float64(-x) / B); elseif (F <= 3.7e+94) tmp = Float64(1.0 / sin(B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -16.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 4.7e+45) tmp = ((F / B) * (1.0 / F)) - t_0; elseif (F <= 4.8e+45) tmp = -x / B; elseif (F <= 3.7e+94) tmp = 1.0 / sin(B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -16.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.7e+45], N[(N[(N[(F / B), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 4.8e+45], N[((-x) / B), $MachinePrecision], If[LessEqual[F, 3.7e+94], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -16:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.7 \cdot 10^{+45}:\\
\;\;\;\;\frac{F}{B} \cdot \frac{1}{F} - t_0\\
\mathbf{elif}\;F \leq 4.8 \cdot 10^{+45}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{elif}\;F \leq 3.7 \cdot 10^{+94}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -16Initial program 55.1%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 79.3%
if -16 < F < 4.70000000000000002e45Initial program 99.6%
Taylor expanded in B around 0 83.5%
div-inv83.6%
expm1-log1p-u52.7%
expm1-udef37.8%
Applied egg-rr37.8%
expm1-def52.7%
expm1-log1p83.6%
Simplified83.6%
Taylor expanded in F around inf 52.7%
if 4.70000000000000002e45 < F < 4.79999999999999979e45Initial program 0.0%
Taylor expanded in F around -inf 100.0%
Taylor expanded in B around 0 100.0%
associate-*r/100.0%
distribute-lft-in100.0%
metadata-eval100.0%
neg-mul-1100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
neg-mul-1100.0%
distribute-neg-frac100.0%
Simplified100.0%
if 4.79999999999999979e45 < F < 3.7000000000000001e94Initial program 92.3%
Taylor expanded in F around -inf 8.6%
neg-sub08.6%
associate-+l-8.6%
add-sqr-sqrt8.4%
sqrt-unprod8.6%
sqr-neg8.6%
sqrt-unprod0.4%
add-sqr-sqrt1.2%
div-inv1.2%
cancel-sign-sub-inv1.2%
metadata-eval1.2%
*-un-lft-identity1.2%
add-sqr-sqrt0.5%
sqrt-unprod36.9%
frac-times36.9%
metadata-eval36.9%
metadata-eval36.9%
Applied egg-rr99.8%
associate--r+99.8%
neg-sub099.8%
distribute-neg-frac99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around 0 90.3%
if 3.7000000000000001e94 < F Initial program 46.5%
Taylor expanded in F around -inf 44.7%
neg-sub044.7%
associate-+l-44.7%
add-sqr-sqrt22.5%
sqrt-unprod14.3%
sqr-neg14.3%
sqrt-unprod0.3%
add-sqr-sqrt0.8%
div-inv0.8%
cancel-sign-sub-inv0.8%
metadata-eval0.8%
*-un-lft-identity0.8%
add-sqr-sqrt0.4%
sqrt-unprod14.1%
frac-times14.0%
metadata-eval14.0%
metadata-eval14.0%
Applied egg-rr99.7%
associate--r+99.7%
neg-sub099.7%
distribute-neg-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in B around 0 74.7%
Final simplification66.6%
(FPCore (F B x)
:precision binary64
(if (<= F -7e+96)
(/ (- -1.0 x) B)
(if (<= F -4.7e-12)
(/ -1.0 (sin B))
(if (<= F 485.0)
(* x (+ (* B 0.3333333333333333) (/ -1.0 B)))
(/ 1.0 (sin B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7e+96) {
tmp = (-1.0 - x) / B;
} else if (F <= -4.7e-12) {
tmp = -1.0 / sin(B);
} else if (F <= 485.0) {
tmp = x * ((B * 0.3333333333333333) + (-1.0 / B));
} else {
tmp = 1.0 / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-7d+96)) then
tmp = ((-1.0d0) - x) / b
else if (f <= (-4.7d-12)) then
tmp = (-1.0d0) / sin(b)
else if (f <= 485.0d0) then
tmp = x * ((b * 0.3333333333333333d0) + ((-1.0d0) / b))
else
tmp = 1.0d0 / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -7e+96) {
tmp = (-1.0 - x) / B;
} else if (F <= -4.7e-12) {
tmp = -1.0 / Math.sin(B);
} else if (F <= 485.0) {
tmp = x * ((B * 0.3333333333333333) + (-1.0 / B));
} else {
tmp = 1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7e+96: tmp = (-1.0 - x) / B elif F <= -4.7e-12: tmp = -1.0 / math.sin(B) elif F <= 485.0: tmp = x * ((B * 0.3333333333333333) + (-1.0 / B)) else: tmp = 1.0 / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7e+96) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= -4.7e-12) tmp = Float64(-1.0 / sin(B)); elseif (F <= 485.0) tmp = Float64(x * Float64(Float64(B * 0.3333333333333333) + Float64(-1.0 / B))); else tmp = Float64(1.0 / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -7e+96) tmp = (-1.0 - x) / B; elseif (F <= -4.7e-12) tmp = -1.0 / sin(B); elseif (F <= 485.0) tmp = x * ((B * 0.3333333333333333) + (-1.0 / B)); else tmp = 1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7e+96], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -4.7e-12], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 485.0], N[(x * N[(N[(B * 0.3333333333333333), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7 \cdot 10^{+96}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq -4.7 \cdot 10^{-12}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 485:\\
\;\;\;\;x \cdot \left(B \cdot 0.3333333333333333 + \frac{-1}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -6.9999999999999998e96Initial program 40.6%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 60.9%
associate-*r/60.9%
distribute-lft-in60.9%
metadata-eval60.9%
neg-mul-160.9%
Simplified60.9%
if -6.9999999999999998e96 < F < -4.69999999999999976e-12Initial program 99.6%
Taylor expanded in F around -inf 87.7%
Taylor expanded in B around 0 51.9%
Taylor expanded in x around 0 56.6%
if -4.69999999999999976e-12 < F < 485Initial program 99.6%
Taylor expanded in F around -inf 39.2%
Taylor expanded in B around 0 25.7%
Taylor expanded in x around -inf 38.5%
if 485 < F Initial program 56.9%
Taylor expanded in F around -inf 39.1%
neg-sub039.1%
associate-+l-39.1%
add-sqr-sqrt18.4%
sqrt-unprod12.3%
sqr-neg12.3%
sqrt-unprod0.3%
add-sqr-sqrt0.8%
div-inv0.8%
cancel-sign-sub-inv0.8%
metadata-eval0.8%
*-un-lft-identity0.8%
add-sqr-sqrt0.4%
sqrt-unprod18.2%
frac-times18.1%
metadata-eval18.1%
metadata-eval18.1%
Applied egg-rr99.7%
associate--r+99.7%
neg-sub099.7%
distribute-neg-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 60.4%
Final simplification51.0%
(FPCore (F B x) :precision binary64 (if (<= F -6.0) (- (/ -1.0 (sin B)) (/ x B)) (- (/ 1.0 B) (/ x (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-6.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -6.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6.0: tmp = (-1.0 / math.sin(B)) - (x / B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -6.0) tmp = (-1.0 / sin(B)) - (x / B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -6Initial program 55.1%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 79.3%
if -6 < F Initial program 82.2%
Taylor expanded in F around -inf 39.7%
neg-sub039.7%
associate-+l-39.7%
add-sqr-sqrt18.0%
sqrt-unprod13.5%
sqr-neg13.5%
sqrt-unprod0.7%
add-sqr-sqrt2.0%
div-inv2.0%
cancel-sign-sub-inv2.0%
metadata-eval2.0%
*-un-lft-identity2.0%
add-sqr-sqrt1.0%
sqrt-unprod8.9%
frac-times8.9%
metadata-eval8.9%
metadata-eval8.9%
Applied egg-rr64.2%
associate--r+64.2%
neg-sub064.2%
distribute-neg-frac64.2%
metadata-eval64.2%
Simplified64.2%
Taylor expanded in B around 0 58.8%
Final simplification64.0%
(FPCore (F B x)
:precision binary64
(if (<= F -8.8e+86)
(/ (- -1.0 x) B)
(if (<= F -4.7e-12)
(/ -1.0 (sin B))
(if (<= F 3.2e-68)
(* x (+ (* B 0.3333333333333333) (/ -1.0 B)))
(+
(* B (+ 0.16666666666666666 (* x 0.3333333333333333)))
(/ (- 1.0 x) B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8.8e+86) {
tmp = (-1.0 - x) / B;
} else if (F <= -4.7e-12) {
tmp = -1.0 / sin(B);
} else if (F <= 3.2e-68) {
tmp = x * ((B * 0.3333333333333333) + (-1.0 / B));
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-8.8d+86)) then
tmp = ((-1.0d0) - x) / b
else if (f <= (-4.7d-12)) then
tmp = (-1.0d0) / sin(b)
else if (f <= 3.2d-68) then
tmp = x * ((b * 0.3333333333333333d0) + ((-1.0d0) / b))
else
tmp = (b * (0.16666666666666666d0 + (x * 0.3333333333333333d0))) + ((1.0d0 - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -8.8e+86) {
tmp = (-1.0 - x) / B;
} else if (F <= -4.7e-12) {
tmp = -1.0 / Math.sin(B);
} else if (F <= 3.2e-68) {
tmp = x * ((B * 0.3333333333333333) + (-1.0 / B));
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -8.8e+86: tmp = (-1.0 - x) / B elif F <= -4.7e-12: tmp = -1.0 / math.sin(B) elif F <= 3.2e-68: tmp = x * ((B * 0.3333333333333333) + (-1.0 / B)) else: tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -8.8e+86) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= -4.7e-12) tmp = Float64(-1.0 / sin(B)); elseif (F <= 3.2e-68) tmp = Float64(x * Float64(Float64(B * 0.3333333333333333) + Float64(-1.0 / B))); else tmp = Float64(Float64(B * Float64(0.16666666666666666 + Float64(x * 0.3333333333333333))) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -8.8e+86) tmp = (-1.0 - x) / B; elseif (F <= -4.7e-12) tmp = -1.0 / sin(B); elseif (F <= 3.2e-68) tmp = x * ((B * 0.3333333333333333) + (-1.0 / B)); else tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -8.8e+86], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -4.7e-12], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.2e-68], N[(x * N[(N[(B * 0.3333333333333333), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(B * N[(0.16666666666666666 + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -8.8 \cdot 10^{+86}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq -4.7 \cdot 10^{-12}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 3.2 \cdot 10^{-68}:\\
\;\;\;\;x \cdot \left(B \cdot 0.3333333333333333 + \frac{-1}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;B \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -8.80000000000000013e86Initial program 40.6%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 60.9%
associate-*r/60.9%
distribute-lft-in60.9%
metadata-eval60.9%
neg-mul-160.9%
Simplified60.9%
if -8.80000000000000013e86 < F < -4.69999999999999976e-12Initial program 99.6%
Taylor expanded in F around -inf 87.7%
Taylor expanded in B around 0 51.9%
Taylor expanded in x around 0 56.6%
if -4.69999999999999976e-12 < F < 3.1999999999999999e-68Initial program 99.7%
Taylor expanded in F around -inf 39.1%
Taylor expanded in B around 0 25.2%
Taylor expanded in x around -inf 39.1%
if 3.1999999999999999e-68 < F Initial program 61.7%
Taylor expanded in F around -inf 39.3%
neg-sub039.3%
associate-+l-39.3%
add-sqr-sqrt18.6%
sqrt-unprod12.3%
sqr-neg12.3%
sqrt-unprod0.4%
add-sqr-sqrt0.8%
div-inv0.8%
cancel-sign-sub-inv0.8%
metadata-eval0.8%
*-un-lft-identity0.8%
add-sqr-sqrt0.4%
sqrt-unprod16.5%
frac-times16.5%
metadata-eval16.5%
metadata-eval16.5%
Applied egg-rr93.4%
associate--r+93.4%
neg-sub093.4%
distribute-neg-frac93.4%
metadata-eval93.4%
Simplified93.4%
Taylor expanded in B around 0 49.7%
associate--l+49.7%
*-commutative49.7%
div-sub49.7%
Simplified49.7%
Final simplification48.4%
(FPCore (F B x)
:precision binary64
(if (<= F -1.58e-34)
(/ (- -1.0 x) B)
(if (<= F 3.2e-68)
(* x (+ (* B 0.3333333333333333) (/ -1.0 B)))
(+
(* B (+ 0.16666666666666666 (* x 0.3333333333333333)))
(/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.58e-34) {
tmp = (-1.0 - x) / B;
} else if (F <= 3.2e-68) {
tmp = x * ((B * 0.3333333333333333) + (-1.0 / B));
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.58d-34)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 3.2d-68) then
tmp = x * ((b * 0.3333333333333333d0) + ((-1.0d0) / b))
else
tmp = (b * (0.16666666666666666d0 + (x * 0.3333333333333333d0))) + ((1.0d0 - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.58e-34) {
tmp = (-1.0 - x) / B;
} else if (F <= 3.2e-68) {
tmp = x * ((B * 0.3333333333333333) + (-1.0 / B));
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.58e-34: tmp = (-1.0 - x) / B elif F <= 3.2e-68: tmp = x * ((B * 0.3333333333333333) + (-1.0 / B)) else: tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.58e-34) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 3.2e-68) tmp = Float64(x * Float64(Float64(B * 0.3333333333333333) + Float64(-1.0 / B))); else tmp = Float64(Float64(B * Float64(0.16666666666666666 + Float64(x * 0.3333333333333333))) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.58e-34) tmp = (-1.0 - x) / B; elseif (F <= 3.2e-68) tmp = x * ((B * 0.3333333333333333) + (-1.0 / B)); else tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.58e-34], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3.2e-68], N[(x * N[(N[(B * 0.3333333333333333), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(B * N[(0.16666666666666666 + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.58 \cdot 10^{-34}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 3.2 \cdot 10^{-68}:\\
\;\;\;\;x \cdot \left(B \cdot 0.3333333333333333 + \frac{-1}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;B \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.57999999999999997e-34Initial program 61.5%
Taylor expanded in F around -inf 91.5%
Taylor expanded in B around 0 51.0%
associate-*r/51.0%
distribute-lft-in51.0%
metadata-eval51.0%
neg-mul-151.0%
Simplified51.0%
if -1.57999999999999997e-34 < F < 3.1999999999999999e-68Initial program 99.7%
Taylor expanded in F around -inf 39.7%
Taylor expanded in B around 0 25.2%
Taylor expanded in x around -inf 40.0%
if 3.1999999999999999e-68 < F Initial program 61.7%
Taylor expanded in F around -inf 39.3%
neg-sub039.3%
associate-+l-39.3%
add-sqr-sqrt18.6%
sqrt-unprod12.3%
sqr-neg12.3%
sqrt-unprod0.4%
add-sqr-sqrt0.8%
div-inv0.8%
cancel-sign-sub-inv0.8%
metadata-eval0.8%
*-un-lft-identity0.8%
add-sqr-sqrt0.4%
sqrt-unprod16.5%
frac-times16.5%
metadata-eval16.5%
metadata-eval16.5%
Applied egg-rr93.4%
associate--r+93.4%
neg-sub093.4%
distribute-neg-frac93.4%
metadata-eval93.4%
Simplified93.4%
Taylor expanded in B around 0 49.7%
associate--l+49.7%
*-commutative49.7%
div-sub49.7%
Simplified49.7%
Final simplification46.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- x) B)))
(if (<= F -1.05e+177)
(/ -1.0 B)
(if (<= F -2e+94)
t_0
(if (<= F -4.7e-12)
(/ -1.0 B)
(if (<= F 7.5e-161) t_0 (/ (- 1.0 x) B)))))))
double code(double F, double B, double x) {
double t_0 = -x / B;
double tmp;
if (F <= -1.05e+177) {
tmp = -1.0 / B;
} else if (F <= -2e+94) {
tmp = t_0;
} else if (F <= -4.7e-12) {
tmp = -1.0 / B;
} else if (F <= 7.5e-161) {
tmp = t_0;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = -x / b
if (f <= (-1.05d+177)) then
tmp = (-1.0d0) / b
else if (f <= (-2d+94)) then
tmp = t_0
else if (f <= (-4.7d-12)) then
tmp = (-1.0d0) / b
else if (f <= 7.5d-161) then
tmp = t_0
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = -x / B;
double tmp;
if (F <= -1.05e+177) {
tmp = -1.0 / B;
} else if (F <= -2e+94) {
tmp = t_0;
} else if (F <= -4.7e-12) {
tmp = -1.0 / B;
} else if (F <= 7.5e-161) {
tmp = t_0;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): t_0 = -x / B tmp = 0 if F <= -1.05e+177: tmp = -1.0 / B elif F <= -2e+94: tmp = t_0 elif F <= -4.7e-12: tmp = -1.0 / B elif F <= 7.5e-161: tmp = t_0 else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) t_0 = Float64(Float64(-x) / B) tmp = 0.0 if (F <= -1.05e+177) tmp = Float64(-1.0 / B); elseif (F <= -2e+94) tmp = t_0; elseif (F <= -4.7e-12) tmp = Float64(-1.0 / B); elseif (F <= 7.5e-161) tmp = t_0; else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) t_0 = -x / B; tmp = 0.0; if (F <= -1.05e+177) tmp = -1.0 / B; elseif (F <= -2e+94) tmp = t_0; elseif (F <= -4.7e-12) tmp = -1.0 / B; elseif (F <= 7.5e-161) tmp = t_0; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[((-x) / B), $MachinePrecision]}, If[LessEqual[F, -1.05e+177], N[(-1.0 / B), $MachinePrecision], If[LessEqual[F, -2e+94], t$95$0, If[LessEqual[F, -4.7e-12], N[(-1.0 / B), $MachinePrecision], If[LessEqual[F, 7.5e-161], t$95$0, N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x}{B}\\
\mathbf{if}\;F \leq -1.05 \cdot 10^{+177}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{elif}\;F \leq -2 \cdot 10^{+94}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -4.7 \cdot 10^{-12}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{elif}\;F \leq 7.5 \cdot 10^{-161}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.05000000000000006e177 or -2e94 < F < -4.69999999999999976e-12Initial program 58.4%
Taylor expanded in F around -inf 94.3%
Taylor expanded in B around 0 52.3%
associate-*r/52.3%
distribute-lft-in52.3%
metadata-eval52.3%
neg-mul-152.3%
Simplified52.3%
Taylor expanded in x around 0 39.7%
if -1.05000000000000006e177 < F < -2e94 or -4.69999999999999976e-12 < F < 7.49999999999999991e-161Initial program 90.7%
Taylor expanded in F around -inf 53.1%
Taylor expanded in B around 0 33.4%
associate-*r/33.4%
distribute-lft-in33.4%
metadata-eval33.4%
neg-mul-133.4%
Simplified33.4%
Taylor expanded in x around inf 43.8%
neg-mul-143.8%
distribute-neg-frac43.8%
Simplified43.8%
if 7.49999999999999991e-161 < F Initial program 68.4%
Taylor expanded in F around -inf 39.0%
neg-sub039.0%
associate-+l-39.0%
add-sqr-sqrt19.1%
sqrt-unprod12.3%
sqr-neg12.3%
sqrt-unprod0.4%
add-sqr-sqrt0.9%
div-inv0.9%
cancel-sign-sub-inv0.9%
metadata-eval0.9%
*-un-lft-identity0.9%
add-sqr-sqrt0.4%
sqrt-unprod14.0%
frac-times13.9%
metadata-eval13.9%
metadata-eval13.9%
Applied egg-rr84.0%
associate--r+84.0%
neg-sub084.0%
distribute-neg-frac84.0%
metadata-eval84.0%
Simplified84.0%
Taylor expanded in B around 0 44.1%
Final simplification43.1%
(FPCore (F B x)
:precision binary64
(if (<= F -1.05e-34)
(/ (- -1.0 x) B)
(if (<= F 5.6e-142)
(* x (+ (* B 0.3333333333333333) (/ -1.0 B)))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.05e-34) {
tmp = (-1.0 - x) / B;
} else if (F <= 5.6e-142) {
tmp = x * ((B * 0.3333333333333333) + (-1.0 / B));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.05d-34)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 5.6d-142) then
tmp = x * ((b * 0.3333333333333333d0) + ((-1.0d0) / b))
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.05e-34) {
tmp = (-1.0 - x) / B;
} else if (F <= 5.6e-142) {
tmp = x * ((B * 0.3333333333333333) + (-1.0 / B));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.05e-34: tmp = (-1.0 - x) / B elif F <= 5.6e-142: tmp = x * ((B * 0.3333333333333333) + (-1.0 / B)) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.05e-34) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 5.6e-142) tmp = Float64(x * Float64(Float64(B * 0.3333333333333333) + Float64(-1.0 / B))); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.05e-34) tmp = (-1.0 - x) / B; elseif (F <= 5.6e-142) tmp = x * ((B * 0.3333333333333333) + (-1.0 / B)); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.05e-34], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 5.6e-142], N[(x * N[(N[(B * 0.3333333333333333), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.05 \cdot 10^{-34}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 5.6 \cdot 10^{-142}:\\
\;\;\;\;x \cdot \left(B \cdot 0.3333333333333333 + \frac{-1}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.05e-34Initial program 61.5%
Taylor expanded in F around -inf 91.5%
Taylor expanded in B around 0 51.0%
associate-*r/51.0%
distribute-lft-in51.0%
metadata-eval51.0%
neg-mul-151.0%
Simplified51.0%
if -1.05e-34 < F < 5.60000000000000009e-142Initial program 99.8%
Taylor expanded in F around -inf 41.0%
Taylor expanded in B around 0 26.9%
Taylor expanded in x around -inf 44.8%
if 5.60000000000000009e-142 < F Initial program 68.1%
Taylor expanded in F around -inf 38.4%
neg-sub038.4%
associate-+l-38.4%
add-sqr-sqrt18.4%
sqrt-unprod12.3%
sqr-neg12.3%
sqrt-unprod0.4%
add-sqr-sqrt0.9%
div-inv0.9%
cancel-sign-sub-inv0.9%
metadata-eval0.9%
*-un-lft-identity0.9%
add-sqr-sqrt0.4%
sqrt-unprod14.1%
frac-times14.1%
metadata-eval14.1%
metadata-eval14.1%
Applied egg-rr83.9%
associate--r+83.9%
neg-sub083.9%
distribute-neg-frac83.9%
metadata-eval83.9%
Simplified83.9%
Taylor expanded in B around 0 44.5%
Final simplification46.5%
(FPCore (F B x) :precision binary64 (if (or (<= x -5.6e-145) (not (<= x 5.3e-49))) (/ (- x) B) (/ (+ x -1.0) B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -5.6e-145) || !(x <= 5.3e-49)) {
tmp = -x / B;
} else {
tmp = (x + -1.0) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-5.6d-145)) .or. (.not. (x <= 5.3d-49))) then
tmp = -x / b
else
tmp = (x + (-1.0d0)) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -5.6e-145) || !(x <= 5.3e-49)) {
tmp = -x / B;
} else {
tmp = (x + -1.0) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -5.6e-145) or not (x <= 5.3e-49): tmp = -x / B else: tmp = (x + -1.0) / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -5.6e-145) || !(x <= 5.3e-49)) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(x + -1.0) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -5.6e-145) || ~((x <= 5.3e-49))) tmp = -x / B; else tmp = (x + -1.0) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -5.6e-145], N[Not[LessEqual[x, 5.3e-49]], $MachinePrecision]], N[((-x) / B), $MachinePrecision], N[(N[(x + -1.0), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.6 \cdot 10^{-145} \lor \neg \left(x \leq 5.3 \cdot 10^{-49}\right):\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -1}{B}\\
\end{array}
\end{array}
if x < -5.6000000000000002e-145 or 5.3000000000000003e-49 < x Initial program 80.0%
Taylor expanded in F around -inf 73.9%
Taylor expanded in B around 0 41.7%
associate-*r/41.7%
distribute-lft-in41.7%
metadata-eval41.7%
neg-mul-141.7%
Simplified41.7%
Taylor expanded in x around inf 45.5%
neg-mul-145.5%
distribute-neg-frac45.5%
Simplified45.5%
if -5.6000000000000002e-145 < x < 5.3000000000000003e-49Initial program 69.3%
Taylor expanded in F around -inf 30.5%
Taylor expanded in B around 0 19.0%
associate-*r/19.0%
distribute-lft-in19.0%
metadata-eval19.0%
neg-mul-119.0%
Simplified19.0%
expm1-log1p-u14.8%
expm1-udef14.6%
+-commutative14.6%
add-sqr-sqrt6.5%
sqrt-unprod14.6%
sqr-neg14.6%
sqrt-unprod8.0%
add-sqr-sqrt14.6%
Applied egg-rr14.6%
expm1-def14.8%
expm1-log1p19.0%
Simplified19.0%
Final simplification33.9%
(FPCore (F B x) :precision binary64 (if (<= F -1.06e-141) (/ (- -1.0 x) B) (if (<= F 7.5e-161) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.06e-141) {
tmp = (-1.0 - x) / B;
} else if (F <= 7.5e-161) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.06d-141)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 7.5d-161) then
tmp = -x / b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.06e-141) {
tmp = (-1.0 - x) / B;
} else if (F <= 7.5e-161) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.06e-141: tmp = (-1.0 - x) / B elif F <= 7.5e-161: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.06e-141) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 7.5e-161) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.06e-141) tmp = (-1.0 - x) / B; elseif (F <= 7.5e-161) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.06e-141], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 7.5e-161], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.06 \cdot 10^{-141}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 7.5 \cdot 10^{-161}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.06e-141Initial program 68.5%
Taylor expanded in F around -inf 82.7%
Taylor expanded in B around 0 46.0%
associate-*r/46.0%
distribute-lft-in46.0%
metadata-eval46.0%
neg-mul-146.0%
Simplified46.0%
if -1.06e-141 < F < 7.49999999999999991e-161Initial program 99.8%
Taylor expanded in F around -inf 39.3%
Taylor expanded in B around 0 28.6%
associate-*r/28.6%
distribute-lft-in28.6%
metadata-eval28.6%
neg-mul-128.6%
Simplified28.6%
Taylor expanded in x around inf 51.8%
neg-mul-151.8%
distribute-neg-frac51.8%
Simplified51.8%
if 7.49999999999999991e-161 < F Initial program 68.4%
Taylor expanded in F around -inf 39.0%
neg-sub039.0%
associate-+l-39.0%
add-sqr-sqrt19.1%
sqrt-unprod12.3%
sqr-neg12.3%
sqrt-unprod0.4%
add-sqr-sqrt0.9%
div-inv0.9%
cancel-sign-sub-inv0.9%
metadata-eval0.9%
*-un-lft-identity0.9%
add-sqr-sqrt0.4%
sqrt-unprod14.0%
frac-times13.9%
metadata-eval13.9%
metadata-eval13.9%
Applied egg-rr84.0%
associate--r+84.0%
neg-sub084.0%
distribute-neg-frac84.0%
metadata-eval84.0%
Simplified84.0%
Taylor expanded in B around 0 44.1%
Final simplification46.5%
(FPCore (F B x) :precision binary64 (if (or (<= x -2.5e-154) (not (<= x 5.3e-49))) (/ (- x) B) (/ -1.0 B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -2.5e-154) || !(x <= 5.3e-49)) {
tmp = -x / B;
} else {
tmp = -1.0 / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-2.5d-154)) .or. (.not. (x <= 5.3d-49))) then
tmp = -x / b
else
tmp = (-1.0d0) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -2.5e-154) || !(x <= 5.3e-49)) {
tmp = -x / B;
} else {
tmp = -1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -2.5e-154) or not (x <= 5.3e-49): tmp = -x / B else: tmp = -1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -2.5e-154) || !(x <= 5.3e-49)) tmp = Float64(Float64(-x) / B); else tmp = Float64(-1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -2.5e-154) || ~((x <= 5.3e-49))) tmp = -x / B; else tmp = -1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -2.5e-154], N[Not[LessEqual[x, 5.3e-49]], $MachinePrecision]], N[((-x) / B), $MachinePrecision], N[(-1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.5 \cdot 10^{-154} \lor \neg \left(x \leq 5.3 \cdot 10^{-49}\right):\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B}\\
\end{array}
\end{array}
if x < -2.5000000000000001e-154 or 5.3000000000000003e-49 < x Initial program 80.0%
Taylor expanded in F around -inf 73.9%
Taylor expanded in B around 0 41.7%
associate-*r/41.7%
distribute-lft-in41.7%
metadata-eval41.7%
neg-mul-141.7%
Simplified41.7%
Taylor expanded in x around inf 45.5%
neg-mul-145.5%
distribute-neg-frac45.5%
Simplified45.5%
if -2.5000000000000001e-154 < x < 5.3000000000000003e-49Initial program 69.3%
Taylor expanded in F around -inf 30.5%
Taylor expanded in B around 0 19.0%
associate-*r/19.0%
distribute-lft-in19.0%
metadata-eval19.0%
neg-mul-119.0%
Simplified19.0%
Taylor expanded in x around 0 19.0%
Final simplification33.9%
(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 75.3%
Taylor expanded in F around -inf 54.9%
Taylor expanded in B around 0 31.8%
associate-*r/31.8%
distribute-lft-in31.8%
metadata-eval31.8%
neg-mul-131.8%
Simplified31.8%
Taylor expanded in x around 0 11.2%
Final simplification11.2%
herbie shell --seed 2023302
(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))))))