
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 24 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -8e+18)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 4.7e+29)
(- (* F (/ (pow (fma x 2.0 (fma F F 2.0)) -0.5) (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 <= -8e+18) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 4.7e+29) {
tmp = (F * (pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -8e+18) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 4.7e+29) tmp = Float64(Float64(F * Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -8e+18], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.7e+29], N[(N[(F * N[(N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / 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 -8 \cdot 10^{+18}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 4.7 \cdot 10^{+29}:\\
\;\;\;\;F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -8e18Initial program 57.6%
Taylor expanded in F around -inf 99.7%
div-inv99.8%
clear-num99.8%
Applied egg-rr99.8%
if -8e18 < F < 4.7000000000000002e29Initial program 98.6%
Simplified99.6%
if 4.7000000000000002e29 < F Initial program 50.7%
Simplified66.6%
Taylor expanded in x around 0 66.6%
associate-*l/66.6%
*-lft-identity66.6%
+-commutative66.6%
unpow266.6%
fma-undefine66.6%
Simplified66.6%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2e+48)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 4.4e+29)
(- (* F (/ (sqrt (/ 1.0 (fma F F 2.0))) (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 <= -2e+48) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 4.4e+29) {
tmp = (F * (sqrt((1.0 / fma(F, F, 2.0))) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2e+48) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 4.4e+29) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2e+48], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.4e+29], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / 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 -2 \cdot 10^{+48}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 4.4 \cdot 10^{+29}:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2.00000000000000009e48Initial program 54.4%
Taylor expanded in F around -inf 99.7%
div-inv99.8%
clear-num99.8%
Applied egg-rr99.8%
if -2.00000000000000009e48 < F < 4.4000000000000003e29Initial program 98.6%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
if 4.4000000000000003e29 < F Initial program 50.7%
Simplified66.6%
Taylor expanded in x around 0 66.6%
associate-*l/66.6%
*-lft-identity66.6%
+-commutative66.6%
unpow266.6%
fma-undefine66.6%
Simplified66.6%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ -1.0 (/ (tan B) x))))
(if (<= F -1e+23)
(+ t_0 (/ -1.0 (sin B)))
(if (<= F 12500000.0)
(+ t_0 (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(- (/ 1.0 (sin B)) (/ x (tan B)))))))
double code(double F, double B, double x) {
double t_0 = -1.0 / (tan(B) / x);
double tmp;
if (F <= -1e+23) {
tmp = t_0 + (-1.0 / sin(B));
} else if (F <= 12500000.0) {
tmp = t_0 + ((F / sin(B)) * pow(((2.0 + (F * F)) + (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 = (-1.0d0) / (tan(b) / x)
if (f <= (-1d+23)) then
tmp = t_0 + ((-1.0d0) / sin(b))
else if (f <= 12500000.0d0) then
tmp = t_0 + ((f / sin(b)) * (((2.0d0 + (f * f)) + (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 = -1.0 / (Math.tan(B) / x);
double tmp;
if (F <= -1e+23) {
tmp = t_0 + (-1.0 / Math.sin(B));
} else if (F <= 12500000.0) {
tmp = t_0 + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (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 = -1.0 / (math.tan(B) / x) tmp = 0 if F <= -1e+23: tmp = t_0 + (-1.0 / math.sin(B)) elif F <= 12500000.0: tmp = t_0 + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (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(-1.0 / Float64(tan(B) / x)) tmp = 0.0 if (F <= -1e+23) tmp = Float64(t_0 + Float64(-1.0 / sin(B))); elseif (F <= 12500000.0) tmp = Float64(t_0 + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + 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 = -1.0 / (tan(B) / x); tmp = 0.0; if (F <= -1e+23) tmp = t_0 + (-1.0 / sin(B)); elseif (F <= 12500000.0) tmp = t_0 + ((F / sin(B)) * (((2.0 + (F * F)) + (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[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1e+23], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 12500000.0], N[(t$95$0 + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\frac{\tan B}{x}}\\
\mathbf{if}\;F \leq -1 \cdot 10^{+23}:\\
\;\;\;\;t\_0 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 12500000:\\
\;\;\;\;t\_0 + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -9.9999999999999992e22Initial program 57.6%
Taylor expanded in F around -inf 99.7%
div-inv99.8%
clear-num99.8%
Applied egg-rr99.8%
if -9.9999999999999992e22 < F < 1.25e7Initial program 99.4%
div-inv37.4%
clear-num37.4%
Applied egg-rr99.5%
if 1.25e7 < F Initial program 53.2%
Simplified69.2%
Taylor expanded in x around 0 69.2%
associate-*l/69.2%
*-lft-identity69.2%
+-commutative69.2%
unpow269.2%
fma-undefine69.2%
Simplified69.2%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(if (<= F -4e+18)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 115000000.0)
(+
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(* x (/ -1.0 (tan B))))
(- (/ 1.0 (sin B)) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4e+18) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 115000000.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / tan(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 <= (-4d+18)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
else if (f <= 115000000.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) + (x * ((-1.0d0) / tan(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 <= -4e+18) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
} else if (F <= 115000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / Math.tan(B)));
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4e+18: tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B)) elif F <= 115000000.0: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / math.tan(B))) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4e+18) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 115000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) + Float64(x * Float64(-1.0 / tan(B)))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4e+18) tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B)); elseif (F <= 115000000.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) + (x * (-1.0 / tan(B))); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4e+18], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 115000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4 \cdot 10^{+18}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 115000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} + x \cdot \frac{-1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -4e18Initial program 57.6%
Taylor expanded in F around -inf 99.7%
div-inv99.8%
clear-num99.8%
Applied egg-rr99.8%
if -4e18 < F < 1.15e8Initial program 99.4%
if 1.15e8 < F Initial program 53.2%
Simplified69.2%
Taylor expanded in x around 0 69.2%
associate-*l/69.2%
*-lft-identity69.2%
+-commutative69.2%
unpow269.2%
fma-undefine69.2%
Simplified69.2%
Taylor expanded in F around inf 99.8%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 1.42)
(- (* F (/ (sqrt 0.5) (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 <= -1.4) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 1.42) {
tmp = (F * (sqrt(0.5) / 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 <= (-1.4d0)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
else if (f <= 1.42d0) then
tmp = (f * (sqrt(0.5d0) / 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 <= -1.4) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
} else if (F <= 1.42) {
tmp = (F * (Math.sqrt(0.5) / 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 <= -1.4: tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B)) elif F <= 1.42: tmp = (F * (math.sqrt(0.5) / 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 <= -1.4) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 1.42) tmp = Float64(Float64(F * Float64(sqrt(0.5) / 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 <= -1.4) tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B)); elseif (F <= 1.42) tmp = (F * (sqrt(0.5) / 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, -1.4], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.42], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / 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 -1.4:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 1.42:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 59.9%
Taylor expanded in F around -inf 97.5%
div-inv97.6%
clear-num97.6%
Applied egg-rr97.6%
if -1.3999999999999999 < F < 1.4199999999999999Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 98.9%
if 1.4199999999999999 < F Initial program 53.8%
Simplified69.6%
Taylor expanded in x around 0 69.6%
associate-*l/69.6%
*-lft-identity69.6%
+-commutative69.6%
unpow269.6%
fma-undefine69.6%
Simplified69.6%
Taylor expanded in F around inf 99.6%
Final simplification98.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* (/ F (sin B)) (/ 1.0 (sqrt (+ 2.0 (* x 2.0))))) (/ x B))))
(if (<= F -0.000275)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F -4.8e-123)
t_0
(if (<= F 3.4e-134)
(* x (/ (cos B) (- (sin B))))
(if (<= F 0.195) t_0 (- (/ 1.0 (sin B)) (/ x (tan B)))))))))
double code(double F, double B, double x) {
double t_0 = ((F / sin(B)) * (1.0 / sqrt((2.0 + (x * 2.0))))) - (x / B);
double tmp;
if (F <= -0.000275) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= -4.8e-123) {
tmp = t_0;
} else if (F <= 3.4e-134) {
tmp = x * (cos(B) / -sin(B));
} else if (F <= 0.195) {
tmp = t_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 = ((f / sin(b)) * (1.0d0 / sqrt((2.0d0 + (x * 2.0d0))))) - (x / b)
if (f <= (-0.000275d0)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
else if (f <= (-4.8d-123)) then
tmp = t_0
else if (f <= 3.4d-134) then
tmp = x * (cos(b) / -sin(b))
else if (f <= 0.195d0) then
tmp = t_0
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 = ((F / Math.sin(B)) * (1.0 / Math.sqrt((2.0 + (x * 2.0))))) - (x / B);
double tmp;
if (F <= -0.000275) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
} else if (F <= -4.8e-123) {
tmp = t_0;
} else if (F <= 3.4e-134) {
tmp = x * (Math.cos(B) / -Math.sin(B));
} else if (F <= 0.195) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = ((F / math.sin(B)) * (1.0 / math.sqrt((2.0 + (x * 2.0))))) - (x / B) tmp = 0 if F <= -0.000275: tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B)) elif F <= -4.8e-123: tmp = t_0 elif F <= 3.4e-134: tmp = x * (math.cos(B) / -math.sin(B)) elif F <= 0.195: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F / sin(B)) * Float64(1.0 / sqrt(Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)) tmp = 0.0 if (F <= -0.000275) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= -4.8e-123) tmp = t_0; elseif (F <= 3.4e-134) tmp = Float64(x * Float64(cos(B) / Float64(-sin(B)))); elseif (F <= 0.195) tmp = t_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 = ((F / sin(B)) * (1.0 / sqrt((2.0 + (x * 2.0))))) - (x / B); tmp = 0.0; if (F <= -0.000275) tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B)); elseif (F <= -4.8e-123) tmp = t_0; elseif (F <= 3.4e-134) tmp = x * (cos(B) / -sin(B)); elseif (F <= 0.195) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.000275], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.8e-123], t$95$0, If[LessEqual[F, 3.4e-134], N[(x * N[(N[Cos[B], $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.195], t$95$0, 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 := \frac{F}{\sin B} \cdot \frac{1}{\sqrt{2 + x \cdot 2}} - \frac{x}{B}\\
\mathbf{if}\;F \leq -0.000275:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -4.8 \cdot 10^{-123}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 3.4 \cdot 10^{-134}:\\
\;\;\;\;x \cdot \frac{\cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 0.195:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -2.75000000000000017e-4Initial program 61.4%
Taylor expanded in F around -inf 96.5%
div-inv96.6%
clear-num96.6%
Applied egg-rr96.6%
if -2.75000000000000017e-4 < F < -4.8e-123 or 3.39999999999999977e-134 < F < 0.19500000000000001Initial program 99.2%
add-sqr-sqrt99.3%
unpow-prod-down99.3%
+-commutative99.3%
fma-define99.3%
fma-define99.3%
metadata-eval99.3%
metadata-eval99.3%
+-commutative99.3%
fma-define99.3%
fma-define99.3%
metadata-eval99.3%
metadata-eval99.3%
Applied egg-rr99.3%
pow-sqr99.3%
metadata-eval99.3%
unpow-199.3%
Simplified99.3%
Taylor expanded in F around 0 99.3%
Taylor expanded in B around 0 84.0%
if -4.8e-123 < F < 3.39999999999999977e-134Initial program 99.5%
add-sqr-sqrt99.4%
unpow-prod-down99.4%
+-commutative99.4%
fma-define99.4%
fma-define99.4%
metadata-eval99.4%
metadata-eval99.4%
+-commutative99.4%
fma-define99.4%
fma-define99.4%
metadata-eval99.4%
metadata-eval99.4%
Applied egg-rr99.4%
pow-sqr99.4%
metadata-eval99.4%
unpow-199.4%
Simplified99.4%
Taylor expanded in F around 0 99.4%
Taylor expanded in x around inf 88.0%
mul-1-neg88.0%
associate-*r/88.0%
distribute-rgt-neg-in88.0%
distribute-neg-frac88.0%
Simplified88.0%
if 0.19500000000000001 < F Initial program 53.8%
Simplified69.6%
Taylor expanded in x around 0 69.6%
associate-*l/69.6%
*-lft-identity69.6%
+-commutative69.6%
unpow269.6%
fma-undefine69.6%
Simplified69.6%
Taylor expanded in F around inf 99.6%
Final simplification93.5%
(FPCore (F B x)
:precision binary64
(if (<= F -4e+18)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F -9.2e-93)
(- (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (/ x B))
(if (<= F 0.36)
(+ (* x (/ -1.0 (tan B))) (* (/ F 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 tmp;
if (F <= -4e+18) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= -9.2e-93) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 0.36) {
tmp = (x * (-1.0 / tan(B))) + ((F / 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) :: tmp
if (f <= (-4d+18)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
else if (f <= (-9.2d-93)) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
else if (f <= 0.36d0) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f / 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 tmp;
if (F <= -4e+18) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
} else if (F <= -9.2e-93) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 0.36) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F / 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): tmp = 0 if F <= -4e+18: tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B)) elif F <= -9.2e-93: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) elif F <= 0.36: tmp = (x * (-1.0 / math.tan(B))) + ((F / 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) tmp = 0.0 if (F <= -4e+18) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= -9.2e-93) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)); elseif (F <= 0.36) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / 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) tmp = 0.0; if (F <= -4e+18) tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B)); elseif (F <= -9.2e-93) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); elseif (F <= 0.36) tmp = (x * (-1.0 / tan(B))) + ((F / 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_] := If[LessEqual[F, -4e+18], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -9.2e-93], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.36], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F / B), $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}
\mathbf{if}\;F \leq -4 \cdot 10^{+18}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -9.2 \cdot 10^{-93}:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.36:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{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 < -4e18Initial program 57.6%
Taylor expanded in F around -inf 99.7%
div-inv99.8%
clear-num99.8%
Applied egg-rr99.8%
if -4e18 < F < -9.1999999999999993e-93Initial program 99.4%
Taylor expanded in B around 0 93.7%
if -9.1999999999999993e-93 < F < 0.35999999999999999Initial program 99.4%
add-sqr-sqrt99.4%
unpow-prod-down99.4%
+-commutative99.4%
fma-define99.4%
fma-define99.4%
metadata-eval99.4%
metadata-eval99.4%
+-commutative99.4%
fma-define99.4%
fma-define99.4%
metadata-eval99.4%
metadata-eval99.4%
Applied egg-rr99.4%
pow-sqr99.4%
metadata-eval99.4%
unpow-199.4%
Simplified99.4%
Taylor expanded in F around 0 99.4%
Taylor expanded in B around 0 92.6%
if 0.35999999999999999 < F Initial program 53.8%
Simplified69.6%
Taylor expanded in x around 0 69.6%
associate-*l/69.6%
*-lft-identity69.6%
+-commutative69.6%
unpow269.6%
fma-undefine69.6%
Simplified69.6%
Taylor expanded in F around inf 99.6%
Final simplification96.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ 2.0 (* x 2.0))))
(if (<= F -0.000275)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F -1.5e-95)
(- (* (/ F (sin B)) (/ 1.0 (sqrt t_0))) (/ x B))
(if (<= F 0.46)
(+ (* x (/ -1.0 (tan B))) (* (/ F B) (sqrt (/ 1.0 t_0))))
(- (/ 1.0 (sin B)) (/ x (tan B))))))))
double code(double F, double B, double x) {
double t_0 = 2.0 + (x * 2.0);
double tmp;
if (F <= -0.000275) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= -1.5e-95) {
tmp = ((F / sin(B)) * (1.0 / sqrt(t_0))) - (x / B);
} else if (F <= 0.46) {
tmp = (x * (-1.0 / tan(B))) + ((F / B) * sqrt((1.0 / t_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 = 2.0d0 + (x * 2.0d0)
if (f <= (-0.000275d0)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
else if (f <= (-1.5d-95)) then
tmp = ((f / sin(b)) * (1.0d0 / sqrt(t_0))) - (x / b)
else if (f <= 0.46d0) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f / b) * sqrt((1.0d0 / t_0)))
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 = 2.0 + (x * 2.0);
double tmp;
if (F <= -0.000275) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
} else if (F <= -1.5e-95) {
tmp = ((F / Math.sin(B)) * (1.0 / Math.sqrt(t_0))) - (x / B);
} else if (F <= 0.46) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F / B) * Math.sqrt((1.0 / t_0)));
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = 2.0 + (x * 2.0) tmp = 0 if F <= -0.000275: tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B)) elif F <= -1.5e-95: tmp = ((F / math.sin(B)) * (1.0 / math.sqrt(t_0))) - (x / B) elif F <= 0.46: tmp = (x * (-1.0 / math.tan(B))) + ((F / B) * math.sqrt((1.0 / t_0))) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(2.0 + Float64(x * 2.0)) tmp = 0.0 if (F <= -0.000275) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= -1.5e-95) tmp = Float64(Float64(Float64(F / sin(B)) * Float64(1.0 / sqrt(t_0))) - Float64(x / B)); elseif (F <= 0.46) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / B) * sqrt(Float64(1.0 / t_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 = 2.0 + (x * 2.0); tmp = 0.0; if (F <= -0.000275) tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B)); elseif (F <= -1.5e-95) tmp = ((F / sin(B)) * (1.0 / sqrt(t_0))) - (x / B); elseif (F <= 0.46) tmp = (x * (-1.0 / tan(B))) + ((F / B) * sqrt((1.0 / t_0))); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.000275], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.5e-95], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.46], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$0), $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 := 2 + x \cdot 2\\
\mathbf{if}\;F \leq -0.000275:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -1.5 \cdot 10^{-95}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \frac{1}{\sqrt{t\_0}} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.46:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B} \cdot \sqrt{\frac{1}{t\_0}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -2.75000000000000017e-4Initial program 61.4%
Taylor expanded in F around -inf 96.5%
div-inv96.6%
clear-num96.6%
Applied egg-rr96.6%
if -2.75000000000000017e-4 < F < -1.5e-95Initial program 99.3%
add-sqr-sqrt99.6%
unpow-prod-down99.6%
+-commutative99.6%
fma-define99.6%
fma-define99.6%
metadata-eval99.6%
metadata-eval99.6%
+-commutative99.6%
fma-define99.6%
fma-define99.6%
metadata-eval99.6%
metadata-eval99.6%
Applied egg-rr99.6%
pow-sqr99.6%
metadata-eval99.6%
unpow-199.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 99.6%
if -1.5e-95 < F < 0.46000000000000002Initial program 99.4%
add-sqr-sqrt99.4%
unpow-prod-down99.4%
+-commutative99.4%
fma-define99.4%
fma-define99.4%
metadata-eval99.4%
metadata-eval99.4%
+-commutative99.4%
fma-define99.4%
fma-define99.4%
metadata-eval99.4%
metadata-eval99.4%
Applied egg-rr99.4%
pow-sqr99.4%
metadata-eval99.4%
unpow-199.4%
Simplified99.4%
Taylor expanded in F around 0 99.4%
Taylor expanded in B around 0 92.5%
if 0.46000000000000002 < F Initial program 53.8%
Simplified69.6%
Taylor expanded in x around 0 69.6%
associate-*l/69.6%
*-lft-identity69.6%
+-commutative69.6%
unpow269.6%
fma-undefine69.6%
Simplified69.6%
Taylor expanded in F around inf 99.6%
Final simplification96.2%
(FPCore (F B x)
:precision binary64
(if (<= F -4e-117)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 4.6e-119)
(* x (/ (cos B) (- (sin B))))
(if (<= F 0.0033)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(- (/ 1.0 (sin B)) (/ x (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4e-117) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 4.6e-119) {
tmp = x * (cos(B) / -sin(B));
} else if (F <= 0.0033) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - 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 <= (-4d-117)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
else if (f <= 4.6d-119) then
tmp = x * (cos(b) / -sin(b))
else if (f <= 0.0033d0) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - 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 <= -4e-117) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
} else if (F <= 4.6e-119) {
tmp = x * (Math.cos(B) / -Math.sin(B));
} else if (F <= 0.0033) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4e-117: tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B)) elif F <= 4.6e-119: tmp = x * (math.cos(B) / -math.sin(B)) elif F <= 0.0033: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - 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 <= -4e-117) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 4.6e-119) tmp = Float64(x * Float64(cos(B) / Float64(-sin(B)))); elseif (F <= 0.0033) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - 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 <= -4e-117) tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B)); elseif (F <= 4.6e-119) tmp = x * (cos(B) / -sin(B)); elseif (F <= 0.0033) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4e-117], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.6e-119], N[(x * N[(N[Cos[B], $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.0033], 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], 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 -4 \cdot 10^{-117}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 4.6 \cdot 10^{-119}:\\
\;\;\;\;x \cdot \frac{\cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 0.0033:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -4.00000000000000012e-117Initial program 67.6%
Taylor expanded in F around -inf 88.0%
div-inv88.1%
clear-num88.1%
Applied egg-rr88.1%
if -4.00000000000000012e-117 < F < 4.59999999999999987e-119Initial program 99.5%
add-sqr-sqrt99.4%
unpow-prod-down99.4%
+-commutative99.4%
fma-define99.4%
fma-define99.4%
metadata-eval99.4%
metadata-eval99.4%
+-commutative99.4%
fma-define99.4%
fma-define99.4%
metadata-eval99.4%
metadata-eval99.4%
Applied egg-rr99.4%
pow-sqr99.4%
metadata-eval99.4%
unpow-199.4%
Simplified99.4%
Taylor expanded in F around 0 99.4%
Taylor expanded in x around inf 85.7%
mul-1-neg85.7%
associate-*r/85.7%
distribute-rgt-neg-in85.7%
distribute-neg-frac85.7%
Simplified85.7%
if 4.59999999999999987e-119 < F < 0.0033Initial program 99.1%
add-sqr-sqrt99.2%
unpow-prod-down99.2%
+-commutative99.2%
fma-define99.2%
fma-define99.2%
metadata-eval99.2%
metadata-eval99.2%
+-commutative99.2%
fma-define99.2%
fma-define99.2%
metadata-eval99.2%
metadata-eval99.2%
Applied egg-rr99.2%
pow-sqr99.2%
metadata-eval99.2%
unpow-199.2%
Simplified99.2%
Taylor expanded in F around 0 99.2%
Taylor expanded in B around 0 65.9%
if 0.0033 < F Initial program 53.8%
Simplified69.6%
Taylor expanded in x around 0 69.6%
associate-*l/69.6%
*-lft-identity69.6%
+-commutative69.6%
unpow269.6%
fma-undefine69.6%
Simplified69.6%
Taylor expanded in F around inf 99.6%
Final simplification89.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -4e-117)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 7.2e-127)
(* x (/ (cos B) (- (sin B))))
(if (<= F 0.014)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -4e-117) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 7.2e-127) {
tmp = x * (cos(B) / -sin(B));
} else if (F <= 0.014) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} 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 <= (-4d-117)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 7.2d-127) then
tmp = x * (cos(b) / -sin(b))
else if (f <= 0.014d0) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
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 <= -4e-117) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 7.2e-127) {
tmp = x * (Math.cos(B) / -Math.sin(B));
} else if (F <= 0.014) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} 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 <= -4e-117: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 7.2e-127: tmp = x * (math.cos(B) / -math.sin(B)) elif F <= 0.014: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B 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 <= -4e-117) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 7.2e-127) tmp = Float64(x * Float64(cos(B) / Float64(-sin(B)))); elseif (F <= 0.014) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B); 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 <= -4e-117) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 7.2e-127) tmp = x * (cos(B) / -sin(B)); elseif (F <= 0.014) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; 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, -4e-117], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 7.2e-127], N[(x * N[(N[Cos[B], $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.014], 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], 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 \cdot 10^{-117}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 7.2 \cdot 10^{-127}:\\
\;\;\;\;x \cdot \frac{\cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 0.014:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -4.00000000000000012e-117Initial program 67.6%
Simplified76.2%
Taylor expanded in x around 0 76.2%
associate-*l/76.2%
*-lft-identity76.2%
+-commutative76.2%
unpow276.2%
fma-undefine76.2%
Simplified76.2%
Taylor expanded in F around -inf 88.1%
if -4.00000000000000012e-117 < F < 7.1999999999999999e-127Initial program 99.5%
add-sqr-sqrt99.4%
unpow-prod-down99.4%
+-commutative99.4%
fma-define99.4%
fma-define99.4%
metadata-eval99.4%
metadata-eval99.4%
+-commutative99.4%
fma-define99.4%
fma-define99.4%
metadata-eval99.4%
metadata-eval99.4%
Applied egg-rr99.4%
pow-sqr99.4%
metadata-eval99.4%
unpow-199.4%
Simplified99.4%
Taylor expanded in F around 0 99.4%
Taylor expanded in x around inf 85.7%
mul-1-neg85.7%
associate-*r/85.7%
distribute-rgt-neg-in85.7%
distribute-neg-frac85.7%
Simplified85.7%
if 7.1999999999999999e-127 < F < 0.0140000000000000003Initial program 99.1%
add-sqr-sqrt99.2%
unpow-prod-down99.2%
+-commutative99.2%
fma-define99.2%
fma-define99.2%
metadata-eval99.2%
metadata-eval99.2%
+-commutative99.2%
fma-define99.2%
fma-define99.2%
metadata-eval99.2%
metadata-eval99.2%
Applied egg-rr99.2%
pow-sqr99.2%
metadata-eval99.2%
unpow-199.2%
Simplified99.2%
Taylor expanded in F around 0 99.2%
Taylor expanded in B around 0 65.9%
if 0.0140000000000000003 < F Initial program 53.8%
Simplified69.6%
Taylor expanded in x around 0 69.6%
associate-*l/69.6%
*-lft-identity69.6%
+-commutative69.6%
unpow269.6%
fma-undefine69.6%
Simplified69.6%
Taylor expanded in F around inf 99.6%
Final simplification89.1%
(FPCore (F B x)
:precision binary64
(if (<= F -4e-117)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 6.2e-131)
(* x (/ (cos B) (- (sin B))))
(if (<= F 0.072)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(if (<= F 1.55e+47)
(/ (- (/ B (sin B)) x) B)
(if (<= F 1.02e+209)
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B))
(- (/ 1.0 (sin B)) (/ x B))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4e-117) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 6.2e-131) {
tmp = x * (cos(B) / -sin(B));
} else if (F <= 0.072) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 1.55e+47) {
tmp = ((B / sin(B)) - x) / B;
} else if (F <= 1.02e+209) {
tmp = (x * (-1.0 / tan(B))) + (1.0 / B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-4d-117)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 6.2d-131) then
tmp = x * (cos(b) / -sin(b))
else if (f <= 0.072d0) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
else if (f <= 1.55d+47) then
tmp = ((b / sin(b)) - x) / b
else if (f <= 1.02d+209) then
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4e-117) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 6.2e-131) {
tmp = x * (Math.cos(B) / -Math.sin(B));
} else if (F <= 0.072) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 1.55e+47) {
tmp = ((B / Math.sin(B)) - x) / B;
} else if (F <= 1.02e+209) {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4e-117: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 6.2e-131: tmp = x * (math.cos(B) / -math.sin(B)) elif F <= 0.072: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B elif F <= 1.55e+47: tmp = ((B / math.sin(B)) - x) / B elif F <= 1.02e+209: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4e-117) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 6.2e-131) tmp = Float64(x * Float64(cos(B) / Float64(-sin(B)))); elseif (F <= 0.072) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B); elseif (F <= 1.55e+47) tmp = Float64(Float64(Float64(B / sin(B)) - x) / B); elseif (F <= 1.02e+209) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4e-117) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 6.2e-131) tmp = x * (cos(B) / -sin(B)); elseif (F <= 0.072) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; elseif (F <= 1.55e+47) tmp = ((B / sin(B)) - x) / B; elseif (F <= 1.02e+209) tmp = (x * (-1.0 / tan(B))) + (1.0 / B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4e-117], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.2e-131], N[(x * N[(N[Cos[B], $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.072], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.55e+47], N[(N[(N[(B / N[Sin[B], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.02e+209], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4 \cdot 10^{-117}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 6.2 \cdot 10^{-131}:\\
\;\;\;\;x \cdot \frac{\cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 0.072:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{elif}\;F \leq 1.55 \cdot 10^{+47}:\\
\;\;\;\;\frac{\frac{B}{\sin B} - x}{B}\\
\mathbf{elif}\;F \leq 1.02 \cdot 10^{+209}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -4.00000000000000012e-117Initial program 67.6%
Simplified76.2%
Taylor expanded in x around 0 76.2%
associate-*l/76.2%
*-lft-identity76.2%
+-commutative76.2%
unpow276.2%
fma-undefine76.2%
Simplified76.2%
Taylor expanded in F around -inf 88.1%
if -4.00000000000000012e-117 < F < 6.20000000000000041e-131Initial program 99.5%
add-sqr-sqrt99.4%
unpow-prod-down99.4%
+-commutative99.4%
fma-define99.4%
fma-define99.4%
metadata-eval99.4%
metadata-eval99.4%
+-commutative99.4%
fma-define99.4%
fma-define99.4%
metadata-eval99.4%
metadata-eval99.4%
Applied egg-rr99.4%
pow-sqr99.4%
metadata-eval99.4%
unpow-199.4%
Simplified99.4%
Taylor expanded in F around 0 99.4%
Taylor expanded in x around inf 85.7%
mul-1-neg85.7%
associate-*r/85.7%
distribute-rgt-neg-in85.7%
distribute-neg-frac85.7%
Simplified85.7%
if 6.20000000000000041e-131 < F < 0.0719999999999999946Initial program 99.1%
add-sqr-sqrt99.2%
unpow-prod-down99.2%
+-commutative99.2%
fma-define99.2%
fma-define99.2%
metadata-eval99.2%
metadata-eval99.2%
+-commutative99.2%
fma-define99.2%
fma-define99.2%
metadata-eval99.2%
metadata-eval99.2%
Applied egg-rr99.2%
pow-sqr99.2%
metadata-eval99.2%
unpow-199.2%
Simplified99.2%
Taylor expanded in F around 0 99.2%
Taylor expanded in B around 0 65.9%
if 0.0719999999999999946 < F < 1.55e47Initial program 84.9%
Taylor expanded in F around -inf 23.9%
Taylor expanded in B around 0 16.9%
add-sqr-sqrt15.8%
sqrt-unprod47.8%
frac-times47.8%
metadata-eval47.8%
metadata-eval47.8%
frac-times47.8%
metadata-eval47.8%
metadata-eval47.8%
pow-prod-up47.8%
pow147.8%
inv-pow47.8%
associate-*l/47.8%
metadata-eval47.8%
metadata-eval47.8%
pow-prod-up47.8%
pow147.8%
inv-pow47.8%
associate-*l/47.8%
sqrt-unprod38.8%
add-sqr-sqrt76.5%
un-div-inv76.4%
Applied egg-rr91.4%
+-commutative91.4%
/-rgt-identity91.4%
distribute-neg-frac91.4%
frac-add91.4%
/-rgt-identity91.4%
associate-/l/91.0%
un-div-inv91.0%
*-un-lft-identity91.0%
*-un-lft-identity91.0%
Applied egg-rr91.0%
unsub-neg91.0%
associate-*l/91.4%
times-frac91.4%
*-inverses91.4%
Simplified91.4%
if 1.55e47 < F < 1.02e209Initial program 71.9%
Taylor expanded in F around inf 89.1%
Taylor expanded in B around 0 85.3%
if 1.02e209 < F Initial program 18.0%
Taylor expanded in F around -inf 38.3%
Taylor expanded in B around 0 25.1%
add-sqr-sqrt11.0%
sqrt-unprod39.2%
frac-times39.3%
metadata-eval39.3%
metadata-eval39.3%
frac-times39.2%
metadata-eval39.2%
metadata-eval39.2%
pow-prod-up39.2%
pow139.2%
inv-pow39.2%
associate-*l/29.2%
metadata-eval29.2%
metadata-eval29.2%
pow-prod-up29.2%
pow129.2%
inv-pow29.2%
associate-*l/29.2%
sqrt-unprod18.2%
add-sqr-sqrt37.5%
un-div-inv37.4%
Applied egg-rr86.6%
Taylor expanded in x around 0 86.7%
mul-1-neg86.7%
+-commutative86.7%
sub-neg86.7%
Simplified86.7%
Final simplification85.3%
(FPCore (F B x)
:precision binary64
(if (<= F -0.06)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 1.1e-118)
(/ (* x (cos B)) (- (sin B)))
(if (<= F 0.26)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(if (<= F 1.42e+47)
(/ (- (/ B (sin B)) x) B)
(if (<= F 1.1e+206)
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B))
(- (/ 1.0 (sin B)) (/ x B))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.06) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1.1e-118) {
tmp = (x * cos(B)) / -sin(B);
} else if (F <= 0.26) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 1.42e+47) {
tmp = ((B / sin(B)) - x) / B;
} else if (F <= 1.1e+206) {
tmp = (x * (-1.0 / tan(B))) + (1.0 / B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.06d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 1.1d-118) then
tmp = (x * cos(b)) / -sin(b)
else if (f <= 0.26d0) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
else if (f <= 1.42d+47) then
tmp = ((b / sin(b)) - x) / b
else if (f <= 1.1d+206) then
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.06) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 1.1e-118) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else if (F <= 0.26) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 1.42e+47) {
tmp = ((B / Math.sin(B)) - x) / B;
} else if (F <= 1.1e+206) {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.06: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 1.1e-118: tmp = (x * math.cos(B)) / -math.sin(B) elif F <= 0.26: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B elif F <= 1.42e+47: tmp = ((B / math.sin(B)) - x) / B elif F <= 1.1e+206: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.06) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1.1e-118) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); elseif (F <= 0.26) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B); elseif (F <= 1.42e+47) tmp = Float64(Float64(Float64(B / sin(B)) - x) / B); elseif (F <= 1.1e+206) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.06) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 1.1e-118) tmp = (x * cos(B)) / -sin(B); elseif (F <= 0.26) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; elseif (F <= 1.42e+47) tmp = ((B / sin(B)) - x) / B; elseif (F <= 1.1e+206) tmp = (x * (-1.0 / tan(B))) + (1.0 / B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.06], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.1e-118], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 0.26], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.42e+47], N[(N[(N[(B / N[Sin[B], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.1e+206], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.06:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.1 \cdot 10^{-118}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 0.26:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{elif}\;F \leq 1.42 \cdot 10^{+47}:\\
\;\;\;\;\frac{\frac{B}{\sin B} - x}{B}\\
\mathbf{elif}\;F \leq 1.1 \cdot 10^{+206}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -0.059999999999999998Initial program 60.4%
Taylor expanded in F around -inf 96.4%
Taylor expanded in B around 0 76.9%
+-commutative76.9%
div-inv76.9%
fma-define76.9%
distribute-neg-frac276.9%
Applied egg-rr76.9%
fma-undefine76.9%
distribute-frac-neg276.9%
unsub-neg76.9%
neg-mul-176.9%
distribute-neg-frac76.9%
metadata-eval76.9%
Simplified76.9%
if -0.059999999999999998 < F < 1.09999999999999992e-118Initial program 99.5%
add-sqr-sqrt99.4%
unpow-prod-down99.4%
+-commutative99.4%
fma-define99.4%
fma-define99.4%
metadata-eval99.4%
metadata-eval99.4%
+-commutative99.4%
fma-define99.4%
fma-define99.4%
metadata-eval99.4%
metadata-eval99.4%
Applied egg-rr99.4%
pow-sqr99.4%
metadata-eval99.4%
unpow-199.4%
Simplified99.4%
Taylor expanded in F around 0 99.4%
Taylor expanded in x around inf 78.3%
if 1.09999999999999992e-118 < F < 0.26000000000000001Initial program 99.1%
add-sqr-sqrt99.2%
unpow-prod-down99.2%
+-commutative99.2%
fma-define99.2%
fma-define99.2%
metadata-eval99.2%
metadata-eval99.2%
+-commutative99.2%
fma-define99.2%
fma-define99.2%
metadata-eval99.2%
metadata-eval99.2%
Applied egg-rr99.2%
pow-sqr99.2%
metadata-eval99.2%
unpow-199.2%
Simplified99.2%
Taylor expanded in F around 0 99.2%
Taylor expanded in B around 0 65.9%
if 0.26000000000000001 < F < 1.42e47Initial program 84.9%
Taylor expanded in F around -inf 23.9%
Taylor expanded in B around 0 16.9%
add-sqr-sqrt15.8%
sqrt-unprod47.8%
frac-times47.8%
metadata-eval47.8%
metadata-eval47.8%
frac-times47.8%
metadata-eval47.8%
metadata-eval47.8%
pow-prod-up47.8%
pow147.8%
inv-pow47.8%
associate-*l/47.8%
metadata-eval47.8%
metadata-eval47.8%
pow-prod-up47.8%
pow147.8%
inv-pow47.8%
associate-*l/47.8%
sqrt-unprod38.8%
add-sqr-sqrt76.5%
un-div-inv76.4%
Applied egg-rr91.4%
+-commutative91.4%
/-rgt-identity91.4%
distribute-neg-frac91.4%
frac-add91.4%
/-rgt-identity91.4%
associate-/l/91.0%
un-div-inv91.0%
*-un-lft-identity91.0%
*-un-lft-identity91.0%
Applied egg-rr91.0%
unsub-neg91.0%
associate-*l/91.4%
times-frac91.4%
*-inverses91.4%
Simplified91.4%
if 1.42e47 < F < 1.10000000000000001e206Initial program 71.9%
Taylor expanded in F around inf 89.1%
Taylor expanded in B around 0 85.3%
if 1.10000000000000001e206 < F Initial program 18.0%
Taylor expanded in F around -inf 38.3%
Taylor expanded in B around 0 25.1%
add-sqr-sqrt11.0%
sqrt-unprod39.2%
frac-times39.3%
metadata-eval39.3%
metadata-eval39.3%
frac-times39.2%
metadata-eval39.2%
metadata-eval39.2%
pow-prod-up39.2%
pow139.2%
inv-pow39.2%
associate-*l/29.2%
metadata-eval29.2%
metadata-eval29.2%
pow-prod-up29.2%
pow129.2%
inv-pow29.2%
associate-*l/29.2%
sqrt-unprod18.2%
add-sqr-sqrt37.5%
un-div-inv37.4%
Applied egg-rr86.6%
Taylor expanded in x around 0 86.7%
mul-1-neg86.7%
+-commutative86.7%
sub-neg86.7%
Simplified86.7%
Final simplification79.4%
(FPCore (F B x)
:precision binary64
(if (<= F -0.07)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 3.5e-107)
(* x (/ (cos B) (- (sin B))))
(if (<= F 0.024)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(if (<= F 1.7e+47)
(/ (- (/ B (sin B)) x) B)
(if (<= F 3.15e+206)
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B))
(- (/ 1.0 (sin B)) (/ x B))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.07) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 3.5e-107) {
tmp = x * (cos(B) / -sin(B));
} else if (F <= 0.024) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 1.7e+47) {
tmp = ((B / sin(B)) - x) / B;
} else if (F <= 3.15e+206) {
tmp = (x * (-1.0 / tan(B))) + (1.0 / B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.07d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 3.5d-107) then
tmp = x * (cos(b) / -sin(b))
else if (f <= 0.024d0) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
else if (f <= 1.7d+47) then
tmp = ((b / sin(b)) - x) / b
else if (f <= 3.15d+206) then
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.07) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 3.5e-107) {
tmp = x * (Math.cos(B) / -Math.sin(B));
} else if (F <= 0.024) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 1.7e+47) {
tmp = ((B / Math.sin(B)) - x) / B;
} else if (F <= 3.15e+206) {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.07: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 3.5e-107: tmp = x * (math.cos(B) / -math.sin(B)) elif F <= 0.024: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B elif F <= 1.7e+47: tmp = ((B / math.sin(B)) - x) / B elif F <= 3.15e+206: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.07) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 3.5e-107) tmp = Float64(x * Float64(cos(B) / Float64(-sin(B)))); elseif (F <= 0.024) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B); elseif (F <= 1.7e+47) tmp = Float64(Float64(Float64(B / sin(B)) - x) / B); elseif (F <= 3.15e+206) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.07) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 3.5e-107) tmp = x * (cos(B) / -sin(B)); elseif (F <= 0.024) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; elseif (F <= 1.7e+47) tmp = ((B / sin(B)) - x) / B; elseif (F <= 3.15e+206) tmp = (x * (-1.0 / tan(B))) + (1.0 / B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.07], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.5e-107], N[(x * N[(N[Cos[B], $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.024], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.7e+47], N[(N[(N[(B / N[Sin[B], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3.15e+206], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.07:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.5 \cdot 10^{-107}:\\
\;\;\;\;x \cdot \frac{\cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 0.024:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{elif}\;F \leq 1.7 \cdot 10^{+47}:\\
\;\;\;\;\frac{\frac{B}{\sin B} - x}{B}\\
\mathbf{elif}\;F \leq 3.15 \cdot 10^{+206}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -0.070000000000000007Initial program 60.4%
Taylor expanded in F around -inf 96.4%
Taylor expanded in B around 0 76.9%
+-commutative76.9%
div-inv76.9%
fma-define76.9%
distribute-neg-frac276.9%
Applied egg-rr76.9%
fma-undefine76.9%
distribute-frac-neg276.9%
unsub-neg76.9%
neg-mul-176.9%
distribute-neg-frac76.9%
metadata-eval76.9%
Simplified76.9%
if -0.070000000000000007 < F < 3.49999999999999985e-107Initial program 99.5%
add-sqr-sqrt99.4%
unpow-prod-down99.4%
+-commutative99.4%
fma-define99.4%
fma-define99.4%
metadata-eval99.4%
metadata-eval99.4%
+-commutative99.4%
fma-define99.4%
fma-define99.4%
metadata-eval99.4%
metadata-eval99.4%
Applied egg-rr99.4%
pow-sqr99.4%
metadata-eval99.4%
unpow-199.4%
Simplified99.4%
Taylor expanded in F around 0 99.4%
Taylor expanded in x around inf 78.3%
mul-1-neg78.3%
associate-*r/78.2%
distribute-rgt-neg-in78.2%
distribute-neg-frac78.2%
Simplified78.2%
if 3.49999999999999985e-107 < F < 0.024Initial program 99.1%
add-sqr-sqrt99.2%
unpow-prod-down99.2%
+-commutative99.2%
fma-define99.2%
fma-define99.2%
metadata-eval99.2%
metadata-eval99.2%
+-commutative99.2%
fma-define99.2%
fma-define99.2%
metadata-eval99.2%
metadata-eval99.2%
Applied egg-rr99.2%
pow-sqr99.2%
metadata-eval99.2%
unpow-199.2%
Simplified99.2%
Taylor expanded in F around 0 99.2%
Taylor expanded in B around 0 65.9%
if 0.024 < F < 1.6999999999999999e47Initial program 84.9%
Taylor expanded in F around -inf 23.9%
Taylor expanded in B around 0 16.9%
add-sqr-sqrt15.8%
sqrt-unprod47.8%
frac-times47.8%
metadata-eval47.8%
metadata-eval47.8%
frac-times47.8%
metadata-eval47.8%
metadata-eval47.8%
pow-prod-up47.8%
pow147.8%
inv-pow47.8%
associate-*l/47.8%
metadata-eval47.8%
metadata-eval47.8%
pow-prod-up47.8%
pow147.8%
inv-pow47.8%
associate-*l/47.8%
sqrt-unprod38.8%
add-sqr-sqrt76.5%
un-div-inv76.4%
Applied egg-rr91.4%
+-commutative91.4%
/-rgt-identity91.4%
distribute-neg-frac91.4%
frac-add91.4%
/-rgt-identity91.4%
associate-/l/91.0%
un-div-inv91.0%
*-un-lft-identity91.0%
*-un-lft-identity91.0%
Applied egg-rr91.0%
unsub-neg91.0%
associate-*l/91.4%
times-frac91.4%
*-inverses91.4%
Simplified91.4%
if 1.6999999999999999e47 < F < 3.14999999999999998e206Initial program 71.9%
Taylor expanded in F around inf 89.1%
Taylor expanded in B around 0 85.3%
if 3.14999999999999998e206 < F Initial program 18.0%
Taylor expanded in F around -inf 38.3%
Taylor expanded in B around 0 25.1%
add-sqr-sqrt11.0%
sqrt-unprod39.2%
frac-times39.3%
metadata-eval39.3%
metadata-eval39.3%
frac-times39.2%
metadata-eval39.2%
metadata-eval39.2%
pow-prod-up39.2%
pow139.2%
inv-pow39.2%
associate-*l/29.2%
metadata-eval29.2%
metadata-eval29.2%
pow-prod-up29.2%
pow129.2%
inv-pow29.2%
associate-*l/29.2%
sqrt-unprod18.2%
add-sqr-sqrt37.5%
un-div-inv37.4%
Applied egg-rr86.6%
Taylor expanded in x around 0 86.7%
mul-1-neg86.7%
+-commutative86.7%
sub-neg86.7%
Simplified86.7%
Final simplification79.4%
(FPCore (F B x)
:precision binary64
(if (<= F -9.5e+41)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 7.2e-250)
(- (* (/ F B) (/ -1.0 F)) (* x (/ 1.0 (tan B))))
(if (<= F 0.135)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(if (<= F 1.6e+47)
(/ (- (/ B (sin B)) x) B)
(if (<= F 1.12e+205)
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B))
(- (/ 1.0 (sin B)) (/ x B))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9.5e+41) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 7.2e-250) {
tmp = ((F / B) * (-1.0 / F)) - (x * (1.0 / tan(B)));
} else if (F <= 0.135) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 1.6e+47) {
tmp = ((B / sin(B)) - x) / B;
} else if (F <= 1.12e+205) {
tmp = (x * (-1.0 / tan(B))) + (1.0 / B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-9.5d+41)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 7.2d-250) then
tmp = ((f / b) * ((-1.0d0) / f)) - (x * (1.0d0 / tan(b)))
else if (f <= 0.135d0) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
else if (f <= 1.6d+47) then
tmp = ((b / sin(b)) - x) / b
else if (f <= 1.12d+205) then
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -9.5e+41) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 7.2e-250) {
tmp = ((F / B) * (-1.0 / F)) - (x * (1.0 / Math.tan(B)));
} else if (F <= 0.135) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 1.6e+47) {
tmp = ((B / Math.sin(B)) - x) / B;
} else if (F <= 1.12e+205) {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9.5e+41: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 7.2e-250: tmp = ((F / B) * (-1.0 / F)) - (x * (1.0 / math.tan(B))) elif F <= 0.135: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B elif F <= 1.6e+47: tmp = ((B / math.sin(B)) - x) / B elif F <= 1.12e+205: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -9.5e+41) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 7.2e-250) tmp = Float64(Float64(Float64(F / B) * Float64(-1.0 / F)) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= 0.135) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B); elseif (F <= 1.6e+47) tmp = Float64(Float64(Float64(B / sin(B)) - x) / B); elseif (F <= 1.12e+205) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -9.5e+41) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 7.2e-250) tmp = ((F / B) * (-1.0 / F)) - (x * (1.0 / tan(B))); elseif (F <= 0.135) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; elseif (F <= 1.6e+47) tmp = ((B / sin(B)) - x) / B; elseif (F <= 1.12e+205) tmp = (x * (-1.0 / tan(B))) + (1.0 / B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9.5e+41], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.2e-250], N[(N[(N[(F / B), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.135], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.6e+47], N[(N[(N[(B / N[Sin[B], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.12e+205], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9.5 \cdot 10^{+41}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 7.2 \cdot 10^{-250}:\\
\;\;\;\;\frac{F}{B} \cdot \frac{-1}{F} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq 0.135:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{elif}\;F \leq 1.6 \cdot 10^{+47}:\\
\;\;\;\;\frac{\frac{B}{\sin B} - x}{B}\\
\mathbf{elif}\;F \leq 1.12 \cdot 10^{+205}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -9.4999999999999996e41Initial program 55.7%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 79.2%
+-commutative79.2%
div-inv79.2%
fma-define79.2%
distribute-neg-frac279.2%
Applied egg-rr79.2%
fma-undefine79.2%
distribute-frac-neg279.2%
unsub-neg79.2%
neg-mul-179.2%
distribute-neg-frac79.2%
metadata-eval79.2%
Simplified79.2%
if -9.4999999999999996e41 < F < 7.19999999999999964e-250Initial program 99.4%
Taylor expanded in F around -inf 44.2%
Taylor expanded in B around 0 59.0%
if 7.19999999999999964e-250 < F < 0.13500000000000001Initial program 99.3%
add-sqr-sqrt99.3%
unpow-prod-down99.3%
+-commutative99.3%
fma-define99.3%
fma-define99.3%
metadata-eval99.3%
metadata-eval99.3%
+-commutative99.3%
fma-define99.3%
fma-define99.3%
metadata-eval99.3%
metadata-eval99.3%
Applied egg-rr99.3%
pow-sqr99.3%
metadata-eval99.3%
unpow-199.3%
Simplified99.3%
Taylor expanded in F around 0 99.3%
Taylor expanded in B around 0 59.6%
if 0.13500000000000001 < F < 1.6e47Initial program 84.9%
Taylor expanded in F around -inf 23.9%
Taylor expanded in B around 0 16.9%
add-sqr-sqrt15.8%
sqrt-unprod47.8%
frac-times47.8%
metadata-eval47.8%
metadata-eval47.8%
frac-times47.8%
metadata-eval47.8%
metadata-eval47.8%
pow-prod-up47.8%
pow147.8%
inv-pow47.8%
associate-*l/47.8%
metadata-eval47.8%
metadata-eval47.8%
pow-prod-up47.8%
pow147.8%
inv-pow47.8%
associate-*l/47.8%
sqrt-unprod38.8%
add-sqr-sqrt76.5%
un-div-inv76.4%
Applied egg-rr91.4%
+-commutative91.4%
/-rgt-identity91.4%
distribute-neg-frac91.4%
frac-add91.4%
/-rgt-identity91.4%
associate-/l/91.0%
un-div-inv91.0%
*-un-lft-identity91.0%
*-un-lft-identity91.0%
Applied egg-rr91.0%
unsub-neg91.0%
associate-*l/91.4%
times-frac91.4%
*-inverses91.4%
Simplified91.4%
if 1.6e47 < F < 1.1200000000000001e205Initial program 71.9%
Taylor expanded in F around inf 89.1%
Taylor expanded in B around 0 85.3%
if 1.1200000000000001e205 < F Initial program 18.0%
Taylor expanded in F around -inf 38.3%
Taylor expanded in B around 0 25.1%
add-sqr-sqrt11.0%
sqrt-unprod39.2%
frac-times39.3%
metadata-eval39.3%
metadata-eval39.3%
frac-times39.2%
metadata-eval39.2%
metadata-eval39.2%
pow-prod-up39.2%
pow139.2%
inv-pow39.2%
associate-*l/29.2%
metadata-eval29.2%
metadata-eval29.2%
pow-prod-up29.2%
pow129.2%
inv-pow29.2%
associate-*l/29.2%
sqrt-unprod18.2%
add-sqr-sqrt37.5%
un-div-inv37.4%
Applied egg-rr86.6%
Taylor expanded in x around 0 86.7%
mul-1-neg86.7%
+-commutative86.7%
sub-neg86.7%
Simplified86.7%
Final simplification72.8%
(FPCore (F B x)
:precision binary64
(if (<= F -1.6e-33)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 0.38)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(if (<= F 1.42e+47)
(/ (- (/ B (sin B)) x) B)
(if (<= F 1.55e+206)
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B))
(- (/ 1.0 (sin B)) (/ x B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.6e-33) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 0.38) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 1.42e+47) {
tmp = ((B / sin(B)) - x) / B;
} else if (F <= 1.55e+206) {
tmp = (x * (-1.0 / tan(B))) + (1.0 / B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.6d-33)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 0.38d0) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
else if (f <= 1.42d+47) then
tmp = ((b / sin(b)) - x) / b
else if (f <= 1.55d+206) then
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.6e-33) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 0.38) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 1.42e+47) {
tmp = ((B / Math.sin(B)) - x) / B;
} else if (F <= 1.55e+206) {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.6e-33: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 0.38: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B elif F <= 1.42e+47: tmp = ((B / math.sin(B)) - x) / B elif F <= 1.55e+206: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.6e-33) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 0.38) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B); elseif (F <= 1.42e+47) tmp = Float64(Float64(Float64(B / sin(B)) - x) / B); elseif (F <= 1.55e+206) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.6e-33) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 0.38) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; elseif (F <= 1.42e+47) tmp = ((B / sin(B)) - x) / B; elseif (F <= 1.55e+206) tmp = (x * (-1.0 / tan(B))) + (1.0 / B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.6e-33], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.38], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.42e+47], N[(N[(N[(B / N[Sin[B], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.55e+206], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.6 \cdot 10^{-33}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.38:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{elif}\;F \leq 1.42 \cdot 10^{+47}:\\
\;\;\;\;\frac{\frac{B}{\sin B} - x}{B}\\
\mathbf{elif}\;F \leq 1.55 \cdot 10^{+206}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.59999999999999988e-33Initial program 63.3%
Taylor expanded in F around -inf 93.3%
Taylor expanded in B around 0 74.0%
+-commutative74.0%
div-inv74.0%
fma-define74.0%
distribute-neg-frac274.0%
Applied egg-rr74.0%
fma-undefine74.0%
distribute-frac-neg274.0%
unsub-neg74.0%
neg-mul-174.0%
distribute-neg-frac74.0%
metadata-eval74.0%
Simplified74.0%
if -1.59999999999999988e-33 < F < 0.38Initial program 99.4%
add-sqr-sqrt99.4%
unpow-prod-down99.4%
+-commutative99.4%
fma-define99.4%
fma-define99.4%
metadata-eval99.4%
metadata-eval99.4%
+-commutative99.4%
fma-define99.4%
fma-define99.4%
metadata-eval99.4%
metadata-eval99.4%
Applied egg-rr99.4%
pow-sqr99.4%
metadata-eval99.4%
unpow-199.4%
Simplified99.4%
Taylor expanded in F around 0 99.4%
Taylor expanded in B around 0 55.9%
if 0.38 < F < 1.42e47Initial program 84.9%
Taylor expanded in F around -inf 23.9%
Taylor expanded in B around 0 16.9%
add-sqr-sqrt15.8%
sqrt-unprod47.8%
frac-times47.8%
metadata-eval47.8%
metadata-eval47.8%
frac-times47.8%
metadata-eval47.8%
metadata-eval47.8%
pow-prod-up47.8%
pow147.8%
inv-pow47.8%
associate-*l/47.8%
metadata-eval47.8%
metadata-eval47.8%
pow-prod-up47.8%
pow147.8%
inv-pow47.8%
associate-*l/47.8%
sqrt-unprod38.8%
add-sqr-sqrt76.5%
un-div-inv76.4%
Applied egg-rr91.4%
+-commutative91.4%
/-rgt-identity91.4%
distribute-neg-frac91.4%
frac-add91.4%
/-rgt-identity91.4%
associate-/l/91.0%
un-div-inv91.0%
*-un-lft-identity91.0%
*-un-lft-identity91.0%
Applied egg-rr91.0%
unsub-neg91.0%
associate-*l/91.4%
times-frac91.4%
*-inverses91.4%
Simplified91.4%
if 1.42e47 < F < 1.54999999999999995e206Initial program 71.9%
Taylor expanded in F around inf 89.1%
Taylor expanded in B around 0 85.3%
if 1.54999999999999995e206 < F Initial program 18.0%
Taylor expanded in F around -inf 38.3%
Taylor expanded in B around 0 25.1%
add-sqr-sqrt11.0%
sqrt-unprod39.2%
frac-times39.3%
metadata-eval39.3%
metadata-eval39.3%
frac-times39.2%
metadata-eval39.2%
metadata-eval39.2%
pow-prod-up39.2%
pow139.2%
inv-pow39.2%
associate-*l/29.2%
metadata-eval29.2%
metadata-eval29.2%
pow-prod-up29.2%
pow129.2%
inv-pow29.2%
associate-*l/29.2%
sqrt-unprod18.2%
add-sqr-sqrt37.5%
un-div-inv37.4%
Applied egg-rr86.6%
Taylor expanded in x around 0 86.7%
mul-1-neg86.7%
+-commutative86.7%
sub-neg86.7%
Simplified86.7%
Final simplification71.0%
(FPCore (F B x)
:precision binary64
(if (<= F -0.185)
(- (/ -1.0 (sin B)) (/ x B))
(if (or (<= F 1.1e-14) (not (<= F 1.1e+47)))
(- (/ 1.0 B) (/ x (tan B)))
(/ (- (/ B (sin B)) x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.185) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if ((F <= 1.1e-14) || !(F <= 1.1e+47)) {
tmp = (1.0 / B) - (x / tan(B));
} else {
tmp = ((B / sin(B)) - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.185d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if ((f <= 1.1d-14) .or. (.not. (f <= 1.1d+47))) then
tmp = (1.0d0 / b) - (x / tan(b))
else
tmp = ((b / sin(b)) - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.185) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if ((F <= 1.1e-14) || !(F <= 1.1e+47)) {
tmp = (1.0 / B) - (x / Math.tan(B));
} else {
tmp = ((B / Math.sin(B)) - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.185: tmp = (-1.0 / math.sin(B)) - (x / B) elif (F <= 1.1e-14) or not (F <= 1.1e+47): tmp = (1.0 / B) - (x / math.tan(B)) else: tmp = ((B / math.sin(B)) - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.185) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif ((F <= 1.1e-14) || !(F <= 1.1e+47)) tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); else tmp = Float64(Float64(Float64(B / sin(B)) - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.185) tmp = (-1.0 / sin(B)) - (x / B); elseif ((F <= 1.1e-14) || ~((F <= 1.1e+47))) tmp = (1.0 / B) - (x / tan(B)); else tmp = ((B / sin(B)) - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.185], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 1.1e-14], N[Not[LessEqual[F, 1.1e+47]], $MachinePrecision]], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(B / N[Sin[B], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.185:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.1 \cdot 10^{-14} \lor \neg \left(F \leq 1.1 \cdot 10^{+47}\right):\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{B}{\sin B} - x}{B}\\
\end{array}
\end{array}
if F < -0.185Initial program 60.4%
Taylor expanded in F around -inf 96.4%
Taylor expanded in B around 0 76.9%
+-commutative76.9%
div-inv76.9%
fma-define76.9%
distribute-neg-frac276.9%
Applied egg-rr76.9%
fma-undefine76.9%
distribute-frac-neg276.9%
unsub-neg76.9%
neg-mul-176.9%
distribute-neg-frac76.9%
metadata-eval76.9%
Simplified76.9%
if -0.185 < F < 1.1e-14 or 1.1e47 < F Initial program 79.5%
Taylor expanded in F around inf 50.5%
Taylor expanded in B around 0 63.0%
+-commutative63.0%
unsub-neg63.0%
un-div-inv63.1%
Applied egg-rr63.1%
if 1.1e-14 < F < 1.1e47Initial program 85.9%
Taylor expanded in F around -inf 22.2%
Taylor expanded in B around 0 15.7%
add-sqr-sqrt14.7%
sqrt-unprod44.9%
frac-times44.9%
metadata-eval44.9%
metadata-eval44.9%
frac-times44.9%
metadata-eval44.9%
metadata-eval44.9%
pow-prod-up44.9%
pow144.9%
inv-pow44.9%
associate-*l/44.9%
metadata-eval44.9%
metadata-eval44.9%
pow-prod-up44.9%
pow144.9%
inv-pow44.9%
associate-*l/44.9%
sqrt-unprod36.8%
add-sqr-sqrt71.8%
un-div-inv71.7%
Applied egg-rr85.6%
+-commutative85.6%
/-rgt-identity85.6%
distribute-neg-frac85.6%
frac-add85.6%
/-rgt-identity85.6%
associate-/l/85.2%
un-div-inv85.2%
*-un-lft-identity85.2%
*-un-lft-identity85.2%
Applied egg-rr85.2%
unsub-neg85.2%
associate-*l/85.6%
times-frac85.6%
*-inverses85.6%
Simplified85.6%
Final simplification68.4%
(FPCore (F B x)
:precision binary64
(if (<= F -0.03)
(- (/ -1.0 (sin B)) (/ x B))
(if (or (<= F 1.4e-14) (not (<= F 1.75e+47)))
(- (/ 1.0 B) (/ x (tan B)))
(- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.03) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if ((F <= 1.4e-14) || !(F <= 1.75e+47)) {
tmp = (1.0 / B) - (x / tan(B));
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.03d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if ((f <= 1.4d-14) .or. (.not. (f <= 1.75d+47))) then
tmp = (1.0d0 / b) - (x / tan(b))
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.03) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if ((F <= 1.4e-14) || !(F <= 1.75e+47)) {
tmp = (1.0 / B) - (x / Math.tan(B));
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.03: tmp = (-1.0 / math.sin(B)) - (x / B) elif (F <= 1.4e-14) or not (F <= 1.75e+47): tmp = (1.0 / B) - (x / math.tan(B)) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.03) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif ((F <= 1.4e-14) || !(F <= 1.75e+47)) tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.03) tmp = (-1.0 / sin(B)) - (x / B); elseif ((F <= 1.4e-14) || ~((F <= 1.75e+47))) tmp = (1.0 / B) - (x / tan(B)); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.03], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 1.4e-14], N[Not[LessEqual[F, 1.75e+47]], $MachinePrecision]], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.03:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-14} \lor \neg \left(F \leq 1.75 \cdot 10^{+47}\right):\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -0.029999999999999999Initial program 60.4%
Taylor expanded in F around -inf 96.4%
Taylor expanded in B around 0 76.9%
+-commutative76.9%
div-inv76.9%
fma-define76.9%
distribute-neg-frac276.9%
Applied egg-rr76.9%
fma-undefine76.9%
distribute-frac-neg276.9%
unsub-neg76.9%
neg-mul-176.9%
distribute-neg-frac76.9%
metadata-eval76.9%
Simplified76.9%
if -0.029999999999999999 < F < 1.4e-14 or 1.75000000000000008e47 < F Initial program 79.5%
Taylor expanded in F around inf 50.5%
Taylor expanded in B around 0 63.0%
+-commutative63.0%
unsub-neg63.0%
un-div-inv63.1%
Applied egg-rr63.1%
if 1.4e-14 < F < 1.75000000000000008e47Initial program 85.9%
Taylor expanded in F around -inf 22.2%
Taylor expanded in B around 0 15.7%
add-sqr-sqrt14.7%
sqrt-unprod44.9%
frac-times44.9%
metadata-eval44.9%
metadata-eval44.9%
frac-times44.9%
metadata-eval44.9%
metadata-eval44.9%
pow-prod-up44.9%
pow144.9%
inv-pow44.9%
associate-*l/44.9%
metadata-eval44.9%
metadata-eval44.9%
pow-prod-up44.9%
pow144.9%
inv-pow44.9%
associate-*l/44.9%
sqrt-unprod36.8%
add-sqr-sqrt71.8%
un-div-inv71.7%
Applied egg-rr85.6%
Taylor expanded in x around 0 85.5%
mul-1-neg85.5%
+-commutative85.5%
sub-neg85.5%
Simplified85.5%
Final simplification68.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ -1.0 (sin B))))
(if (<= F -6e+245)
t_0
(if (<= F -6.6e+195)
(/ (- -1.0 x) B)
(if (<= F -0.185)
t_0
(if (<= F 1.05e-136) (/ (- x) B) (/ (- 1.0 x) B)))))))
double code(double F, double B, double x) {
double t_0 = -1.0 / sin(B);
double tmp;
if (F <= -6e+245) {
tmp = t_0;
} else if (F <= -6.6e+195) {
tmp = (-1.0 - x) / B;
} else if (F <= -0.185) {
tmp = t_0;
} else if (F <= 1.05e-136) {
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) :: t_0
real(8) :: tmp
t_0 = (-1.0d0) / sin(b)
if (f <= (-6d+245)) then
tmp = t_0
else if (f <= (-6.6d+195)) then
tmp = ((-1.0d0) - x) / b
else if (f <= (-0.185d0)) then
tmp = t_0
else if (f <= 1.05d-136) 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 t_0 = -1.0 / Math.sin(B);
double tmp;
if (F <= -6e+245) {
tmp = t_0;
} else if (F <= -6.6e+195) {
tmp = (-1.0 - x) / B;
} else if (F <= -0.185) {
tmp = t_0;
} else if (F <= 1.05e-136) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): t_0 = -1.0 / math.sin(B) tmp = 0 if F <= -6e+245: tmp = t_0 elif F <= -6.6e+195: tmp = (-1.0 - x) / B elif F <= -0.185: tmp = t_0 elif F <= 1.05e-136: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) t_0 = Float64(-1.0 / sin(B)) tmp = 0.0 if (F <= -6e+245) tmp = t_0; elseif (F <= -6.6e+195) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= -0.185) tmp = t_0; elseif (F <= 1.05e-136) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) t_0 = -1.0 / sin(B); tmp = 0.0; if (F <= -6e+245) tmp = t_0; elseif (F <= -6.6e+195) tmp = (-1.0 - x) / B; elseif (F <= -0.185) tmp = t_0; elseif (F <= 1.05e-136) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6e+245], t$95$0, If[LessEqual[F, -6.6e+195], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -0.185], t$95$0, If[LessEqual[F, 1.05e-136], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\sin B}\\
\mathbf{if}\;F \leq -6 \cdot 10^{+245}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -6.6 \cdot 10^{+195}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq -0.185:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.05 \cdot 10^{-136}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -6e245 or -6.5999999999999999e195 < F < -0.185Initial program 64.9%
Taylor expanded in F around -inf 95.6%
Taylor expanded in B around 0 75.6%
Taylor expanded in x around 0 61.2%
if -6e245 < F < -6.5999999999999999e195Initial program 43.8%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 81.9%
Taylor expanded in B around 0 75.8%
associate-*r/75.8%
distribute-lft-in75.8%
metadata-eval75.8%
neg-mul-175.8%
unsub-neg75.8%
Simplified75.8%
if -0.185 < F < 1.0499999999999999e-136Initial program 99.5%
Taylor expanded in F around -inf 37.6%
Taylor expanded in B around 0 23.8%
Taylor expanded in x around inf 42.2%
mul-1-neg42.2%
distribute-frac-neg242.2%
Simplified42.2%
if 1.0499999999999999e-136 < F Initial program 64.2%
Taylor expanded in F around inf 65.8%
Taylor expanded in B around 0 69.9%
Taylor expanded in B around 0 48.8%
Final simplification51.2%
(FPCore (F B x) :precision binary64 (if (<= F -0.082) (- (/ -1.0 (sin B)) (/ x B)) (- (/ 1.0 B) (/ x (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.082) {
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 <= (-0.082d0)) 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 <= -0.082) {
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 <= -0.082: 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 <= -0.082) 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 <= -0.082) 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, -0.082], 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 -0.082:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -0.0820000000000000034Initial program 60.4%
Taylor expanded in F around -inf 96.4%
Taylor expanded in B around 0 76.9%
+-commutative76.9%
div-inv76.9%
fma-define76.9%
distribute-neg-frac276.9%
Applied egg-rr76.9%
fma-undefine76.9%
distribute-frac-neg276.9%
unsub-neg76.9%
neg-mul-176.9%
distribute-neg-frac76.9%
metadata-eval76.9%
Simplified76.9%
if -0.0820000000000000034 < F Initial program 80.0%
Taylor expanded in F around inf 52.7%
Taylor expanded in B around 0 62.2%
+-commutative62.2%
unsub-neg62.2%
un-div-inv62.2%
Applied egg-rr62.2%
(FPCore (F B x) :precision binary64 (if (<= F -2.9e-138) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 1.05e-136) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.9e-138) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1.05e-136) {
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 <= (-2.9d-138)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 1.05d-136) 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 <= -2.9e-138) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 1.05e-136) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.9e-138: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 1.05e-136: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.9e-138) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1.05e-136) 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 <= -2.9e-138) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 1.05e-136) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.9e-138], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.05e-136], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.9 \cdot 10^{-138}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.05 \cdot 10^{-136}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.89999999999999973e-138Initial program 69.8%
Taylor expanded in F around -inf 82.2%
Taylor expanded in B around 0 65.4%
+-commutative65.4%
div-inv65.4%
fma-define65.4%
distribute-neg-frac265.4%
Applied egg-rr65.4%
fma-undefine65.4%
distribute-frac-neg265.4%
unsub-neg65.4%
neg-mul-165.4%
distribute-neg-frac65.4%
metadata-eval65.4%
Simplified65.4%
if -2.89999999999999973e-138 < F < 1.0499999999999999e-136Initial program 99.6%
Taylor expanded in F around -inf 37.6%
Taylor expanded in B around 0 21.5%
Taylor expanded in x around inf 48.1%
mul-1-neg48.1%
distribute-frac-neg248.1%
Simplified48.1%
if 1.0499999999999999e-136 < F Initial program 64.2%
Taylor expanded in F around inf 65.8%
Taylor expanded in B around 0 69.9%
Taylor expanded in B around 0 48.8%
Final simplification55.1%
(FPCore (F B x)
:precision binary64
(if (<= F -6.5e-138)
(/ (- -1.0 x) B)
(if (or (<= F 5e+19) (and (not (<= F 1.3e+65)) (<= F 5.1e+129)))
(/ (- x) B)
(/ 1.0 B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.5e-138) {
tmp = (-1.0 - x) / B;
} else if ((F <= 5e+19) || (!(F <= 1.3e+65) && (F <= 5.1e+129))) {
tmp = -x / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-6.5d-138)) then
tmp = ((-1.0d0) - x) / b
else if ((f <= 5d+19) .or. (.not. (f <= 1.3d+65)) .and. (f <= 5.1d+129)) then
tmp = -x / b
else
tmp = 1.0d0 / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -6.5e-138) {
tmp = (-1.0 - x) / B;
} else if ((F <= 5e+19) || (!(F <= 1.3e+65) && (F <= 5.1e+129))) {
tmp = -x / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6.5e-138: tmp = (-1.0 - x) / B elif (F <= 5e+19) or (not (F <= 1.3e+65) and (F <= 5.1e+129)): tmp = -x / B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6.5e-138) tmp = Float64(Float64(-1.0 - x) / B); elseif ((F <= 5e+19) || (!(F <= 1.3e+65) && (F <= 5.1e+129))) tmp = Float64(Float64(-x) / B); else tmp = Float64(1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -6.5e-138) tmp = (-1.0 - x) / B; elseif ((F <= 5e+19) || (~((F <= 1.3e+65)) && (F <= 5.1e+129))) tmp = -x / B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6.5e-138], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[Or[LessEqual[F, 5e+19], And[N[Not[LessEqual[F, 1.3e+65]], $MachinePrecision], LessEqual[F, 5.1e+129]]], N[((-x) / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.5 \cdot 10^{-138}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 5 \cdot 10^{+19} \lor \neg \left(F \leq 1.3 \cdot 10^{+65}\right) \land F \leq 5.1 \cdot 10^{+129}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < -6.4999999999999999e-138Initial program 69.8%
Taylor expanded in F around -inf 82.2%
Taylor expanded in B around 0 65.4%
Taylor expanded in B around 0 46.6%
associate-*r/46.6%
distribute-lft-in46.6%
metadata-eval46.6%
neg-mul-146.6%
unsub-neg46.6%
Simplified46.6%
if -6.4999999999999999e-138 < F < 5e19 or 1.30000000000000001e65 < F < 5.09999999999999996e129Initial program 97.5%
Taylor expanded in F around -inf 44.5%
Taylor expanded in B around 0 25.6%
Taylor expanded in x around inf 41.5%
mul-1-neg41.5%
distribute-frac-neg241.5%
Simplified41.5%
if 5e19 < F < 1.30000000000000001e65 or 5.09999999999999996e129 < F Initial program 42.1%
Taylor expanded in F around inf 68.7%
Taylor expanded in B around 0 76.6%
Taylor expanded in x around 0 41.5%
Final simplification43.5%
(FPCore (F B x) :precision binary64 (if (<= F -4e-152) (/ (- -1.0 x) B) (if (<= F 1.05e-136) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4e-152) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.05e-136) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-4d-152)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.05d-136) then
tmp = -x / b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4e-152) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.05e-136) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4e-152: tmp = (-1.0 - x) / B elif F <= 1.05e-136: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4e-152) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.05e-136) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4e-152) tmp = (-1.0 - x) / B; elseif (F <= 1.05e-136) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4e-152], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.05e-136], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4 \cdot 10^{-152}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.05 \cdot 10^{-136}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -4.00000000000000026e-152Initial program 69.8%
Taylor expanded in F around -inf 82.2%
Taylor expanded in B around 0 65.4%
Taylor expanded in B around 0 46.6%
associate-*r/46.6%
distribute-lft-in46.6%
metadata-eval46.6%
neg-mul-146.6%
unsub-neg46.6%
Simplified46.6%
if -4.00000000000000026e-152 < F < 1.0499999999999999e-136Initial program 99.6%
Taylor expanded in F around -inf 37.6%
Taylor expanded in B around 0 21.5%
Taylor expanded in x around inf 48.1%
mul-1-neg48.1%
distribute-frac-neg248.1%
Simplified48.1%
if 1.0499999999999999e-136 < F Initial program 64.2%
Taylor expanded in F around inf 65.8%
Taylor expanded in B around 0 69.9%
Taylor expanded in B around 0 48.8%
Final simplification47.8%
(FPCore (F B x) :precision binary64 (if (or (<= x -2.9e-116) (not (<= x 9.6e-26))) (/ (- x) B) (/ 1.0 B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -2.9e-116) || !(x <= 9.6e-26)) {
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.9d-116)) .or. (.not. (x <= 9.6d-26))) 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.9e-116) || !(x <= 9.6e-26)) {
tmp = -x / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -2.9e-116) or not (x <= 9.6e-26): tmp = -x / B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -2.9e-116) || !(x <= 9.6e-26)) 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.9e-116) || ~((x <= 9.6e-26))) tmp = -x / B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -2.9e-116], N[Not[LessEqual[x, 9.6e-26]], $MachinePrecision]], N[((-x) / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.9 \cdot 10^{-116} \lor \neg \left(x \leq 9.6 \cdot 10^{-26}\right):\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if x < -2.8999999999999998e-116 or 9.6000000000000004e-26 < x Initial program 83.5%
Taylor expanded in F around -inf 82.7%
Taylor expanded in B around 0 48.6%
Taylor expanded in x around inf 50.7%
mul-1-neg50.7%
distribute-frac-neg250.7%
Simplified50.7%
if -2.8999999999999998e-116 < x < 9.6000000000000004e-26Initial program 64.1%
Taylor expanded in F around inf 19.6%
Taylor expanded in B around 0 28.4%
Taylor expanded in x around 0 19.3%
Final simplification35.8%
(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 74.3%
Taylor expanded in F around inf 47.2%
Taylor expanded in B around 0 56.3%
Taylor expanded in x around 0 12.1%
herbie shell --seed 2024116
(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))))))