
(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 27 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 -7.5e+28)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 200000000000.0)
(- (* 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 <= -7.5e+28) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 200000000000.0) {
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 <= -7.5e+28) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 200000000000.0) 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, -7.5e+28], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 200000000000.0], 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 -7.5 \cdot 10^{+28}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 200000000000:\\
\;\;\;\;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 < -7.4999999999999998e28Initial program 63.8%
Simplified78.7%
Taylor expanded in x around 0 78.7%
associate-*l/78.7%
*-lft-identity78.7%
+-commutative78.7%
unpow278.7%
fma-udef78.7%
Simplified78.7%
Taylor expanded in F around -inf 99.7%
if -7.4999999999999998e28 < F < 2e11Initial program 99.5%
Simplified99.7%
if 2e11 < F Initial program 50.9%
Simplified70.1%
Taylor expanded in x around 0 70.2%
associate-*l/70.1%
*-lft-identity70.1%
+-commutative70.1%
unpow270.1%
fma-udef70.1%
Simplified70.1%
Taylor expanded in F around inf 99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -7.6e+28)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 195000000000.0)
(-
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(/ (* x (cos B)) (sin 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 <= -7.6e+28) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 195000000000.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - ((x * cos(B)) / sin(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 <= (-7.6d+28)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 195000000000.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - ((x * cos(b)) / sin(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 <= -7.6e+28) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 195000000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - ((x * Math.cos(B)) / Math.sin(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 <= -7.6e+28: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 195000000000.0: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - ((x * math.cos(B)) / math.sin(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 <= -7.6e+28) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 195000000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(Float64(x * cos(B)) / sin(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 <= -7.6e+28) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 195000000000.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - ((x * cos(B)) / sin(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, -7.6e+28], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 195000000000.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[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $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 -7.6 \cdot 10^{+28}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 195000000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x \cdot \cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -7.5999999999999998e28Initial program 63.8%
Simplified78.7%
Taylor expanded in x around 0 78.7%
associate-*l/78.7%
*-lft-identity78.7%
+-commutative78.7%
unpow278.7%
fma-udef78.7%
Simplified78.7%
Taylor expanded in F around -inf 99.7%
if -7.5999999999999998e28 < F < 1.95e11Initial program 99.5%
Taylor expanded in x around 0 99.6%
if 1.95e11 < F Initial program 50.9%
Simplified70.1%
Taylor expanded in x around 0 70.2%
associate-*l/70.1%
*-lft-identity70.1%
+-commutative70.1%
unpow270.1%
fma-udef70.1%
Simplified70.1%
Taylor expanded in F around inf 99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1e+29)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 200000000000.0)
(- (* 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 <= -1e+29) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 200000000000.0) {
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 <= -1e+29) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 200000000000.0) 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, -1e+29], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 200000000000.0], 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 -1 \cdot 10^{+29}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 200000000000:\\
\;\;\;\;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 < -9.99999999999999914e28Initial program 63.8%
Simplified78.7%
Taylor expanded in x around 0 78.7%
associate-*l/78.7%
*-lft-identity78.7%
+-commutative78.7%
unpow278.7%
fma-udef78.7%
Simplified78.7%
Taylor expanded in F around -inf 99.7%
if -9.99999999999999914e28 < F < 2e11Initial program 99.5%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
if 2e11 < F Initial program 50.9%
Simplified70.1%
Taylor expanded in x around 0 70.2%
associate-*l/70.1%
*-lft-identity70.1%
+-commutative70.1%
unpow270.1%
fma-udef70.1%
Simplified70.1%
Taylor expanded in F around inf 99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -100000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 185000000000.0)
(+
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(* x (/ -1.0 (tan 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 <= -100000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 185000000000.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)) - 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 <= (-100000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 185000000000.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)) - 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 <= -100000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 185000000000.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)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -100000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 185000000000.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)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -100000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 185000000000.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)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -100000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 185000000000.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)) - 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, -100000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 185000000000.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] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -100000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 185000000000:\\
\;\;\;\;\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} - t\_0\\
\end{array}
\end{array}
if F < -1e8Initial program 65.2%
Simplified79.6%
Taylor expanded in x around 0 79.6%
associate-*l/79.6%
*-lft-identity79.6%
+-commutative79.6%
unpow279.6%
fma-udef79.6%
Simplified79.6%
Taylor expanded in F around -inf 99.7%
if -1e8 < F < 1.85e11Initial program 99.5%
if 1.85e11 < F Initial program 50.9%
Simplified70.1%
Taylor expanded in x around 0 70.2%
associate-*l/70.1%
*-lft-identity70.1%
+-commutative70.1%
unpow270.1%
fma-udef70.1%
Simplified70.1%
Taylor expanded in F around inf 99.7%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1e+29)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 185000000000.0)
(+
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(/ -1.0 (/ (tan B) x)))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1e+29) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 185000000000.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (-1.0 / (tan(B) / x));
} 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 <= (-1d+29)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 185000000000.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) + ((-1.0d0) / (tan(b) / x))
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 <= -1e+29) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 185000000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (-1.0 / (Math.tan(B) / x));
} 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 <= -1e+29: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 185000000000.0: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (-1.0 / (math.tan(B) / x)) 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 <= -1e+29) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 185000000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) + Float64(-1.0 / Float64(tan(B) / x))); 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 <= -1e+29) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 185000000000.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) + (-1.0 / (tan(B) / x)); 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, -1e+29], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 185000000000.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[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $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 \cdot 10^{+29}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 185000000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} + \frac{-1}{\frac{\tan B}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -9.99999999999999914e28Initial program 63.8%
Simplified78.7%
Taylor expanded in x around 0 78.7%
associate-*l/78.7%
*-lft-identity78.7%
+-commutative78.7%
unpow278.7%
fma-udef78.7%
Simplified78.7%
Taylor expanded in F around -inf 99.7%
if -9.99999999999999914e28 < F < 1.85e11Initial program 99.5%
div-inv99.6%
clear-num99.5%
Applied egg-rr99.5%
if 1.85e11 < F Initial program 50.9%
Simplified70.1%
Taylor expanded in x around 0 70.2%
associate-*l/70.1%
*-lft-identity70.1%
+-commutative70.1%
unpow270.1%
fma-udef70.1%
Simplified70.1%
Taylor expanded in F around inf 99.7%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ 1.0 (sin B))) (t_1 (/ x (tan B))))
(if (<= F -1.6)
(- (/ -1.0 (sin B)) t_1)
(if (<= F 2.1)
(- (* F (* t_0 (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))))) t_1)
(- t_0 t_1)))))
double code(double F, double B, double x) {
double t_0 = 1.0 / sin(B);
double t_1 = x / tan(B);
double tmp;
if (F <= -1.6) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= 2.1) {
tmp = (F * (t_0 * sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1;
} else {
tmp = t_0 - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 1.0d0 / sin(b)
t_1 = x / tan(b)
if (f <= (-1.6d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= 2.1d0) then
tmp = (f * (t_0 * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))) - t_1
else
tmp = t_0 - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 1.0 / Math.sin(B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -1.6) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= 2.1) {
tmp = (F * (t_0 * Math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1;
} else {
tmp = t_0 - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = 1.0 / math.sin(B) t_1 = x / math.tan(B) tmp = 0 if F <= -1.6: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= 2.1: tmp = (F * (t_0 * math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1 else: tmp = t_0 - t_1 return tmp
function code(F, B, x) t_0 = Float64(1.0 / sin(B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.6) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= 2.1) tmp = Float64(Float64(F * Float64(t_0 * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))))) - t_1); else tmp = Float64(t_0 - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 1.0 / sin(B); t_1 = x / tan(B); tmp = 0.0; if (F <= -1.6) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= 2.1) tmp = (F * (t_0 * sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1; else tmp = t_0 - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.6], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 2.1], N[(N[(F * N[(t$95$0 * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(t$95$0 - t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.6:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq 2.1:\\
\;\;\;\;F \cdot \left(t\_0 \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_0 - t\_1\\
\end{array}
\end{array}
if F < -1.6000000000000001Initial program 65.7%
Simplified79.8%
Taylor expanded in x around 0 79.8%
associate-*l/79.8%
*-lft-identity79.8%
+-commutative79.8%
unpow279.8%
fma-udef79.8%
Simplified79.8%
Taylor expanded in F around -inf 99.7%
if -1.6000000000000001 < F < 2.10000000000000009Initial program 99.5%
Simplified99.6%
Taylor expanded in F around 0 98.8%
if 2.10000000000000009 < F Initial program 51.6%
Simplified70.5%
Taylor expanded in x around 0 70.6%
associate-*l/70.5%
*-lft-identity70.5%
+-commutative70.5%
unpow270.5%
fma-udef70.5%
Simplified70.5%
Taylor expanded in F around inf 99.7%
Final simplification99.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.4)
(- (* 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 / sin(B)) - t_0;
} else if (F <= 1.4) {
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) / sin(b)) - t_0
else if (f <= 1.4d0) 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.sin(B)) - t_0;
} else if (F <= 1.4) {
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.sin(B)) - t_0 elif F <= 1.4: 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 / sin(B)) - t_0); elseif (F <= 1.4) 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 / sin(B)) - t_0; elseif (F <= 1.4) 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[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4], 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}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;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 65.7%
Simplified79.8%
Taylor expanded in x around 0 79.8%
associate-*l/79.8%
*-lft-identity79.8%
+-commutative79.8%
unpow279.8%
fma-udef79.8%
Simplified79.8%
Taylor expanded in F around -inf 99.7%
if -1.3999999999999999 < F < 1.3999999999999999Initial program 99.5%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around 0 98.7%
if 1.3999999999999999 < F Initial program 51.6%
Simplified70.5%
Taylor expanded in x around 0 70.6%
associate-*l/70.5%
*-lft-identity70.5%
+-commutative70.5%
unpow270.5%
fma-udef70.5%
Simplified70.5%
Taylor expanded in F around inf 99.7%
Final simplification99.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))) (t_1 (/ 1.0 (sin B))))
(if (<= F -70000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -5.2e-67)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (* F t_1)) (/ x B))
(if (<= F 0.23) (- (/ F (/ B (sqrt 0.5))) t_0) (- t_1 t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = 1.0 / sin(B);
double tmp;
if (F <= -70000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -5.2e-67) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F * t_1)) - (x / B);
} else if (F <= 0.23) {
tmp = (F / (B / sqrt(0.5))) - t_0;
} else {
tmp = t_1 - 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) :: t_1
real(8) :: tmp
t_0 = x / tan(b)
t_1 = 1.0d0 / sin(b)
if (f <= (-70000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-5.2d-67)) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f * t_1)) - (x / b)
else if (f <= 0.23d0) then
tmp = (f / (b / sqrt(0.5d0))) - t_0
else
tmp = t_1 - 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 t_1 = 1.0 / Math.sin(B);
double tmp;
if (F <= -70000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -5.2e-67) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F * t_1)) - (x / B);
} else if (F <= 0.23) {
tmp = (F / (B / Math.sqrt(0.5))) - t_0;
} else {
tmp = t_1 - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) t_1 = 1.0 / math.sin(B) tmp = 0 if F <= -70000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -5.2e-67: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F * t_1)) - (x / B) elif F <= 0.23: tmp = (F / (B / math.sqrt(0.5))) - t_0 else: tmp = t_1 - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(1.0 / sin(B)) tmp = 0.0 if (F <= -70000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -5.2e-67) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F * t_1)) - Float64(x / B)); elseif (F <= 0.23) tmp = Float64(Float64(F / Float64(B / sqrt(0.5))) - t_0); else tmp = Float64(t_1 - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); t_1 = 1.0 / sin(B); tmp = 0.0; if (F <= -70000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -5.2e-67) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F * t_1)) - (x / B); elseif (F <= 0.23) tmp = (F / (B / sqrt(0.5))) - t_0; else tmp = t_1 - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -70000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -5.2e-67], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.23], N[(N[(F / N[(B / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(t$95$1 - t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := \frac{1}{\sin B}\\
\mathbf{if}\;F \leq -70000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -5.2 \cdot 10^{-67}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \left(F \cdot t\_1\right) - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.23:\\
\;\;\;\;\frac{F}{\frac{B}{\sqrt{0.5}}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1 - t\_0\\
\end{array}
\end{array}
if F < -7e7Initial program 65.2%
Simplified79.6%
Taylor expanded in x around 0 79.6%
associate-*l/79.6%
*-lft-identity79.6%
+-commutative79.6%
unpow279.6%
fma-udef79.6%
Simplified79.6%
Taylor expanded in F around -inf 99.7%
if -7e7 < F < -5.1999999999999998e-67Initial program 99.3%
Taylor expanded in B around 0 85.8%
div-inv86.1%
Applied egg-rr86.1%
if -5.1999999999999998e-67 < F < 0.23000000000000001Initial program 99.5%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 94.5%
associate-/l*94.6%
Simplified94.6%
if 0.23000000000000001 < F Initial program 51.6%
Simplified70.5%
Taylor expanded in x around 0 70.6%
associate-*l/70.5%
*-lft-identity70.5%
+-commutative70.5%
unpow270.5%
fma-udef70.5%
Simplified70.5%
Taylor expanded in F around inf 99.7%
Final simplification97.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -70000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -8e-67)
(- (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (/ x B))
(if (<= F 0.46)
(- (/ F (/ B (sqrt 0.5))) 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 <= -70000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -8e-67) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 0.46) {
tmp = (F / (B / sqrt(0.5))) - 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 <= (-70000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-8d-67)) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
else if (f <= 0.46d0) then
tmp = (f / (b / sqrt(0.5d0))) - 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 <= -70000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -8e-67) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 0.46) {
tmp = (F / (B / Math.sqrt(0.5))) - 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 <= -70000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -8e-67: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) elif F <= 0.46: tmp = (F / (B / math.sqrt(0.5))) - 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 <= -70000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -8e-67) 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.46) tmp = Float64(Float64(F / Float64(B / sqrt(0.5))) - 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 <= -70000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -8e-67) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); elseif (F <= 0.46) tmp = (F / (B / sqrt(0.5))) - 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, -70000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -8e-67], 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.46], N[(N[(F / N[(B / N[Sqrt[0.5], $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 -70000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -8 \cdot 10^{-67}:\\
\;\;\;\;\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.46:\\
\;\;\;\;\frac{F}{\frac{B}{\sqrt{0.5}}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -7e7Initial program 65.2%
Simplified79.6%
Taylor expanded in x around 0 79.6%
associate-*l/79.6%
*-lft-identity79.6%
+-commutative79.6%
unpow279.6%
fma-udef79.6%
Simplified79.6%
Taylor expanded in F around -inf 99.7%
if -7e7 < F < -7.99999999999999954e-67Initial program 99.3%
Taylor expanded in B around 0 85.8%
if -7.99999999999999954e-67 < F < 0.46000000000000002Initial program 99.5%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 94.5%
associate-/l*94.6%
Simplified94.6%
if 0.46000000000000002 < F Initial program 51.6%
Simplified70.5%
Taylor expanded in x around 0 70.6%
associate-*l/70.5%
*-lft-identity70.5%
+-commutative70.5%
unpow270.5%
fma-udef70.5%
Simplified70.5%
Taylor expanded in F around inf 99.7%
Final simplification97.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.1e-9)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -9e-67)
(- (* (/ F (sin B)) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x B))
(if (<= F 0.226)
(- (/ F (/ B (sqrt 0.5))) 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 <= -2.1e-9) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -9e-67) {
tmp = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else if (F <= 0.226) {
tmp = (F / (B / sqrt(0.5))) - 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 <= (-2.1d-9)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-9d-67)) then
tmp = ((f / sin(b)) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / b)
else if (f <= 0.226d0) then
tmp = (f / (b / sqrt(0.5d0))) - 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 <= -2.1e-9) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -9e-67) {
tmp = ((F / Math.sin(B)) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else if (F <= 0.226) {
tmp = (F / (B / Math.sqrt(0.5))) - 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 <= -2.1e-9: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -9e-67: tmp = ((F / math.sin(B)) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B) elif F <= 0.226: tmp = (F / (B / math.sqrt(0.5))) - 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 <= -2.1e-9) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -9e-67) tmp = Float64(Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)); elseif (F <= 0.226) tmp = Float64(Float64(F / Float64(B / sqrt(0.5))) - 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 <= -2.1e-9) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -9e-67) tmp = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B); elseif (F <= 0.226) tmp = (F / (B / sqrt(0.5))) - 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, -2.1e-9], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -9e-67], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.226], N[(N[(F / N[(B / N[Sqrt[0.5], $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.1 \cdot 10^{-9}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -9 \cdot 10^{-67}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.226:\\
\;\;\;\;\frac{F}{\frac{B}{\sqrt{0.5}}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2.10000000000000019e-9Initial program 66.9%
Simplified80.5%
Taylor expanded in x around 0 80.5%
associate-*l/80.5%
*-lft-identity80.5%
+-commutative80.5%
unpow280.5%
fma-udef80.5%
Simplified80.5%
Taylor expanded in F around -inf 97.6%
if -2.10000000000000019e-9 < F < -9.00000000000000031e-67Initial program 99.4%
Taylor expanded in B around 0 89.7%
Taylor expanded in F around 0 89.7%
if -9.00000000000000031e-67 < F < 0.226000000000000006Initial program 99.5%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 94.5%
associate-/l*94.6%
Simplified94.6%
if 0.226000000000000006 < F Initial program 51.6%
Simplified70.5%
Taylor expanded in x around 0 70.6%
associate-*l/70.5%
*-lft-identity70.5%
+-commutative70.5%
unpow270.5%
fma-udef70.5%
Simplified70.5%
Taylor expanded in F around inf 99.7%
Final simplification96.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.3e-19)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.0) (- (* F (/ F (sin B))) t_0) (- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.3e-19) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.0) {
tmp = (F * (F / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.3d-19)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.0d0) then
tmp = (f * (f / sin(b))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.3e-19) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.0) {
tmp = (F * (F / Math.sin(B))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.3e-19: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.0: tmp = (F * (F / math.sin(B))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.3e-19) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.0) tmp = Float64(Float64(F * Float64(F / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.3e-19) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.0) tmp = (F * (F / sin(B))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.3e-19], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.0], N[(N[(F * N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.3 \cdot 10^{-19}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1:\\
\;\;\;\;F \cdot \frac{F}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.30000000000000006e-19Initial program 68.0%
Simplified81.2%
Taylor expanded in x around 0 81.2%
associate-*l/81.2%
*-lft-identity81.2%
+-commutative81.2%
unpow281.2%
fma-udef81.2%
Simplified81.2%
Taylor expanded in F around -inf 94.5%
if -1.30000000000000006e-19 < F < 1Initial program 99.5%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
fma-def99.6%
sqrt-div99.5%
metadata-eval99.5%
fma-def99.5%
Applied egg-rr99.5%
Taylor expanded in F around inf 74.5%
Taylor expanded in F around 0 74.5%
if 1 < F Initial program 51.6%
Simplified70.5%
Taylor expanded in x around 0 70.6%
associate-*l/70.5%
*-lft-identity70.5%
+-commutative70.5%
unpow270.5%
fma-udef70.5%
Simplified70.5%
Taylor expanded in F around inf 99.7%
Final simplification87.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.21)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.54) (- (* F (/ (sqrt 0.5) B)) t_0) (- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.21) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.54) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.21d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.54d0) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.21) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.54) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.21: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.54: tmp = (F * (math.sqrt(0.5) / B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.21) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.54) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.21) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.54) tmp = (F * (sqrt(0.5) / B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.21], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.54], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.21:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.54:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -0.209999999999999992Initial program 66.1%
Simplified80.1%
Taylor expanded in x around 0 80.1%
associate-*l/80.1%
*-lft-identity80.1%
+-commutative80.1%
unpow280.1%
fma-udef80.1%
Simplified80.1%
Taylor expanded in F around -inf 98.6%
if -0.209999999999999992 < F < 0.54000000000000004Initial program 99.5%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around 0 99.4%
Taylor expanded in B around 0 89.2%
if 0.54000000000000004 < F Initial program 51.6%
Simplified70.5%
Taylor expanded in x around 0 70.6%
associate-*l/70.5%
*-lft-identity70.5%
+-commutative70.5%
unpow270.5%
fma-udef70.5%
Simplified70.5%
Taylor expanded in F around inf 99.7%
Final simplification94.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.21)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.24) (- (/ F (/ B (sqrt 0.5))) 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 <= -0.21) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.24) {
tmp = (F / (B / sqrt(0.5))) - 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 <= (-0.21d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.24d0) then
tmp = (f / (b / sqrt(0.5d0))) - 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 <= -0.21) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.24) {
tmp = (F / (B / Math.sqrt(0.5))) - 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 <= -0.21: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.24: tmp = (F / (B / math.sqrt(0.5))) - 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 <= -0.21) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.24) tmp = Float64(Float64(F / Float64(B / sqrt(0.5))) - 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 <= -0.21) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.24) tmp = (F / (B / sqrt(0.5))) - 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, -0.21], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.24], N[(N[(F / N[(B / N[Sqrt[0.5], $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 -0.21:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.24:\\
\;\;\;\;\frac{F}{\frac{B}{\sqrt{0.5}}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -0.209999999999999992Initial program 66.1%
Simplified80.1%
Taylor expanded in x around 0 80.1%
associate-*l/80.1%
*-lft-identity80.1%
+-commutative80.1%
unpow280.1%
fma-udef80.1%
Simplified80.1%
Taylor expanded in F around -inf 98.6%
if -0.209999999999999992 < F < 0.23999999999999999Initial program 99.5%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around 0 99.4%
Taylor expanded in B around 0 89.2%
associate-/l*89.2%
Simplified89.2%
if 0.23999999999999999 < F Initial program 51.6%
Simplified70.5%
Taylor expanded in x around 0 70.6%
associate-*l/70.5%
*-lft-identity70.5%
+-commutative70.5%
unpow270.5%
fma-udef70.5%
Simplified70.5%
Taylor expanded in F around inf 99.7%
Final simplification94.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.8e-26)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 8.1e-13)
(- (/ F (* B (+ F (/ 1.0 F)))) 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 <= -3.8e-26) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 8.1e-13) {
tmp = (F / (B * (F + (1.0 / F)))) - 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 <= (-3.8d-26)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 8.1d-13) then
tmp = (f / (b * (f + (1.0d0 / f)))) - 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 <= -3.8e-26) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 8.1e-13) {
tmp = (F / (B * (F + (1.0 / F)))) - 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 <= -3.8e-26: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 8.1e-13: tmp = (F / (B * (F + (1.0 / F)))) - 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 <= -3.8e-26) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 8.1e-13) tmp = Float64(Float64(F / Float64(B * Float64(F + Float64(1.0 / F)))) - 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 <= -3.8e-26) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 8.1e-13) tmp = (F / (B * (F + (1.0 / F)))) - 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, -3.8e-26], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 8.1e-13], N[(N[(F / N[(B * N[(F + N[(1.0 / F), $MachinePrecision]), $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 -3.8 \cdot 10^{-26}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 8.1 \cdot 10^{-13}:\\
\;\;\;\;\frac{F}{B \cdot \left(F + \frac{1}{F}\right)} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -3.80000000000000015e-26Initial program 68.0%
Simplified81.2%
Taylor expanded in x around 0 81.2%
associate-*l/81.2%
*-lft-identity81.2%
+-commutative81.2%
unpow281.2%
fma-udef81.2%
Simplified81.2%
Taylor expanded in F around -inf 94.5%
if -3.80000000000000015e-26 < F < 8.0999999999999998e-13Initial program 99.5%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
fma-def99.6%
sqrt-div99.5%
metadata-eval99.5%
fma-def99.5%
Applied egg-rr99.5%
Taylor expanded in F around inf 75.8%
Taylor expanded in B around 0 75.8%
if 8.0999999999999998e-13 < F Initial program 53.0%
Simplified71.3%
Taylor expanded in x around 0 71.4%
associate-*l/71.3%
*-lft-identity71.3%
+-commutative71.3%
unpow271.3%
fma-udef71.3%
Simplified71.3%
Taylor expanded in F around inf 97.2%
Final simplification87.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.25e-22)
(- (/ -1.0 (sin B)) t_0)
(if (or (<= F 2.65e-11) (not (<= F 1.85e+180)))
(- (/ F (* B (+ F (/ 1.0 F)))) t_0)
(- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3.25e-22) {
tmp = (-1.0 / sin(B)) - t_0;
} else if ((F <= 2.65e-11) || !(F <= 1.85e+180)) {
tmp = (F / (B * (F + (1.0 / F)))) - t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-3.25d-22)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if ((f <= 2.65d-11) .or. (.not. (f <= 1.85d+180))) then
tmp = (f / (b * (f + (1.0d0 / f)))) - t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -3.25e-22) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if ((F <= 2.65e-11) || !(F <= 1.85e+180)) {
tmp = (F / (B * (F + (1.0 / F)))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -3.25e-22: tmp = (-1.0 / math.sin(B)) - t_0 elif (F <= 2.65e-11) or not (F <= 1.85e+180): tmp = (F / (B * (F + (1.0 / F)))) - t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.25e-22) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif ((F <= 2.65e-11) || !(F <= 1.85e+180)) tmp = Float64(Float64(F / Float64(B * Float64(F + Float64(1.0 / F)))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -3.25e-22) tmp = (-1.0 / sin(B)) - t_0; elseif ((F <= 2.65e-11) || ~((F <= 1.85e+180))) tmp = (F / (B * (F + (1.0 / F)))) - t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.25e-22], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[Or[LessEqual[F, 2.65e-11], N[Not[LessEqual[F, 1.85e+180]], $MachinePrecision]], N[(N[(F / N[(B * N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.25 \cdot 10^{-22}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 2.65 \cdot 10^{-11} \lor \neg \left(F \leq 1.85 \cdot 10^{+180}\right):\\
\;\;\;\;\frac{F}{B \cdot \left(F + \frac{1}{F}\right)} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -3.25000000000000022e-22Initial program 68.0%
Simplified81.2%
Taylor expanded in x around 0 81.2%
associate-*l/81.2%
*-lft-identity81.2%
+-commutative81.2%
unpow281.2%
fma-udef81.2%
Simplified81.2%
Taylor expanded in F around -inf 94.5%
if -3.25000000000000022e-22 < F < 2.6499999999999999e-11 or 1.8500000000000001e180 < F Initial program 82.3%
Simplified89.3%
Taylor expanded in x around 0 89.2%
associate-*l/89.2%
*-lft-identity89.2%
+-commutative89.2%
unpow289.2%
fma-udef89.2%
Simplified89.2%
fma-def89.2%
sqrt-div89.1%
metadata-eval89.1%
fma-def89.1%
Applied egg-rr89.1%
Taylor expanded in F around inf 81.4%
Taylor expanded in B around 0 77.6%
if 2.6499999999999999e-11 < F < 1.8500000000000001e180Initial program 74.4%
Taylor expanded in B around 0 59.4%
Taylor expanded in F around inf 80.3%
Final simplification83.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- (* F (sqrt 0.5)) x) B))
(t_1 (+ (* x (/ -1.0 (tan B))) (/ -1.0 B))))
(if (<= F -0.16)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -5e-198)
t_0
(if (<= F -2.8e-259)
t_1
(if (<= F -4e-301)
(/ (- x) B)
(if (<= F 9.5e-128)
t_1
(if (<= F 0.104) t_0 (- (/ 1.0 (sin B)) (/ x B))))))))))
double code(double F, double B, double x) {
double t_0 = ((F * sqrt(0.5)) - x) / B;
double t_1 = (x * (-1.0 / tan(B))) + (-1.0 / B);
double tmp;
if (F <= -0.16) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -5e-198) {
tmp = t_0;
} else if (F <= -2.8e-259) {
tmp = t_1;
} else if (F <= -4e-301) {
tmp = -x / B;
} else if (F <= 9.5e-128) {
tmp = t_1;
} else if (F <= 0.104) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((f * sqrt(0.5d0)) - x) / b
t_1 = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
if (f <= (-0.16d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-5d-198)) then
tmp = t_0
else if (f <= (-2.8d-259)) then
tmp = t_1
else if (f <= (-4d-301)) then
tmp = -x / b
else if (f <= 9.5d-128) then
tmp = t_1
else if (f <= 0.104d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F * Math.sqrt(0.5)) - x) / B;
double t_1 = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
double tmp;
if (F <= -0.16) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -5e-198) {
tmp = t_0;
} else if (F <= -2.8e-259) {
tmp = t_1;
} else if (F <= -4e-301) {
tmp = -x / B;
} else if (F <= 9.5e-128) {
tmp = t_1;
} else if (F <= 0.104) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = ((F * math.sqrt(0.5)) - x) / B t_1 = (x * (-1.0 / math.tan(B))) + (-1.0 / B) tmp = 0 if F <= -0.16: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -5e-198: tmp = t_0 elif F <= -2.8e-259: tmp = t_1 elif F <= -4e-301: tmp = -x / B elif F <= 9.5e-128: tmp = t_1 elif F <= 0.104: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B) t_1 = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)) tmp = 0.0 if (F <= -0.16) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -5e-198) tmp = t_0; elseif (F <= -2.8e-259) tmp = t_1; elseif (F <= -4e-301) tmp = Float64(Float64(-x) / B); elseif (F <= 9.5e-128) tmp = t_1; elseif (F <= 0.104) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F * sqrt(0.5)) - x) / B; t_1 = (x * (-1.0 / tan(B))) + (-1.0 / B); tmp = 0.0; if (F <= -0.16) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -5e-198) tmp = t_0; elseif (F <= -2.8e-259) tmp = t_1; elseif (F <= -4e-301) tmp = -x / B; elseif (F <= 9.5e-128) tmp = t_1; elseif (F <= 0.104) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.16], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5e-198], t$95$0, If[LessEqual[F, -2.8e-259], t$95$1, If[LessEqual[F, -4e-301], N[((-x) / B), $MachinePrecision], If[LessEqual[F, 9.5e-128], t$95$1, If[LessEqual[F, 0.104], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F \cdot \sqrt{0.5} - x}{B}\\
t_1 := x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{if}\;F \leq -0.16:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -5 \cdot 10^{-198}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -2.8 \cdot 10^{-259}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq -4 \cdot 10^{-301}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{elif}\;F \leq 9.5 \cdot 10^{-128}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 0.104:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -0.160000000000000003Initial program 66.1%
Taylor expanded in B around 0 45.4%
Taylor expanded in F around -inf 77.5%
distribute-lft-in77.5%
associate-*r/77.5%
metadata-eval77.5%
mul-1-neg77.5%
unsub-neg77.5%
Simplified77.5%
if -0.160000000000000003 < F < -4.9999999999999999e-198 or 9.50000000000000006e-128 < F < 0.103999999999999995Initial program 99.6%
Simplified99.5%
Taylor expanded in x around 0 99.4%
associate-*l/99.4%
*-lft-identity99.4%
+-commutative99.4%
unpow299.4%
fma-udef99.4%
Simplified99.4%
Taylor expanded in F around 0 99.1%
Taylor expanded in B around 0 62.4%
if -4.9999999999999999e-198 < F < -2.8e-259 or -4.00000000000000027e-301 < F < 9.50000000000000006e-128Initial program 99.4%
Taylor expanded in F around -inf 58.4%
Taylor expanded in B around 0 73.3%
if -2.8e-259 < F < -4.00000000000000027e-301Initial program 99.3%
Taylor expanded in B around 0 89.3%
Taylor expanded in x around inf 89.3%
associate-*r/89.3%
neg-mul-189.3%
Simplified89.3%
if 0.103999999999999995 < F Initial program 51.6%
Taylor expanded in B around 0 32.4%
Taylor expanded in F around inf 78.6%
Final simplification74.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- (* F (sqrt 0.5)) x) B)))
(if (<= F -0.135)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.4e-198)
t_0
(if (<= F -1.02e-256)
(- (* F (/ -1.0 (* F B))) (/ x (tan B)))
(if (<= F -1.05e-301)
(/ (- x) B)
(if (<= F 8.2e-128)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F 0.029) t_0 (- (/ 1.0 (sin B)) (/ x B))))))))))
double code(double F, double B, double x) {
double t_0 = ((F * sqrt(0.5)) - x) / B;
double tmp;
if (F <= -0.135) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.4e-198) {
tmp = t_0;
} else if (F <= -1.02e-256) {
tmp = (F * (-1.0 / (F * B))) - (x / tan(B));
} else if (F <= -1.05e-301) {
tmp = -x / B;
} else if (F <= 8.2e-128) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= 0.029) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((f * sqrt(0.5d0)) - x) / b
if (f <= (-0.135d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.4d-198)) then
tmp = t_0
else if (f <= (-1.02d-256)) then
tmp = (f * ((-1.0d0) / (f * b))) - (x / tan(b))
else if (f <= (-1.05d-301)) then
tmp = -x / b
else if (f <= 8.2d-128) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= 0.029d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F * Math.sqrt(0.5)) - x) / B;
double tmp;
if (F <= -0.135) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.4e-198) {
tmp = t_0;
} else if (F <= -1.02e-256) {
tmp = (F * (-1.0 / (F * B))) - (x / Math.tan(B));
} else if (F <= -1.05e-301) {
tmp = -x / B;
} else if (F <= 8.2e-128) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= 0.029) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = ((F * math.sqrt(0.5)) - x) / B tmp = 0 if F <= -0.135: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.4e-198: tmp = t_0 elif F <= -1.02e-256: tmp = (F * (-1.0 / (F * B))) - (x / math.tan(B)) elif F <= -1.05e-301: tmp = -x / B elif F <= 8.2e-128: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= 0.029: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B) tmp = 0.0 if (F <= -0.135) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.4e-198) tmp = t_0; elseif (F <= -1.02e-256) tmp = Float64(Float64(F * Float64(-1.0 / Float64(F * B))) - Float64(x / tan(B))); elseif (F <= -1.05e-301) tmp = Float64(Float64(-x) / B); elseif (F <= 8.2e-128) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= 0.029) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F * sqrt(0.5)) - x) / B; tmp = 0.0; if (F <= -0.135) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.4e-198) tmp = t_0; elseif (F <= -1.02e-256) tmp = (F * (-1.0 / (F * B))) - (x / tan(B)); elseif (F <= -1.05e-301) tmp = -x / B; elseif (F <= 8.2e-128) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= 0.029) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[F, -0.135], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.4e-198], t$95$0, If[LessEqual[F, -1.02e-256], N[(N[(F * N[(-1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.05e-301], N[((-x) / B), $MachinePrecision], If[LessEqual[F, 8.2e-128], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.029], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{if}\;F \leq -0.135:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.4 \cdot 10^{-198}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -1.02 \cdot 10^{-256}:\\
\;\;\;\;F \cdot \frac{-1}{F \cdot B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -1.05 \cdot 10^{-301}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{-128}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq 0.029:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -0.13500000000000001Initial program 66.1%
Taylor expanded in B around 0 45.4%
Taylor expanded in F around -inf 77.5%
distribute-lft-in77.5%
associate-*r/77.5%
metadata-eval77.5%
mul-1-neg77.5%
unsub-neg77.5%
Simplified77.5%
if -0.13500000000000001 < F < -1.4e-198 or 8.1999999999999999e-128 < F < 0.0290000000000000015Initial program 99.6%
Simplified99.5%
Taylor expanded in x around 0 99.4%
associate-*l/99.4%
*-lft-identity99.4%
+-commutative99.4%
unpow299.4%
fma-udef99.4%
Simplified99.4%
Taylor expanded in F around 0 99.1%
Taylor expanded in B around 0 62.4%
if -1.4e-198 < F < -1.01999999999999993e-256Initial program 99.6%
Simplified99.9%
Taylor expanded in F around -inf 75.9%
associate-/r*75.9%
Simplified75.9%
Taylor expanded in B around 0 83.8%
*-commutative83.8%
Simplified83.8%
if -1.01999999999999993e-256 < F < -1.0499999999999999e-301Initial program 99.3%
Taylor expanded in B around 0 89.3%
Taylor expanded in x around inf 89.3%
associate-*r/89.3%
neg-mul-189.3%
Simplified89.3%
if -1.0499999999999999e-301 < F < 8.1999999999999999e-128Initial program 99.4%
Taylor expanded in F around -inf 52.5%
Taylor expanded in B around 0 69.8%
if 0.0290000000000000015 < F Initial program 51.6%
Taylor expanded in B around 0 32.4%
Taylor expanded in F around inf 78.6%
Final simplification74.3%
(FPCore (F B x)
:precision binary64
(if (<= F -6.6e-8)
(- (/ -1.0 (sin B)) (/ x B))
(if (or (<= F 2.65e-11) (not (<= F 2.15e+182)))
(- (/ F (* B (+ F (/ 1.0 F)))) (/ x (tan B)))
(- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.6e-8) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if ((F <= 2.65e-11) || !(F <= 2.15e+182)) {
tmp = (F / (B * (F + (1.0 / F)))) - (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 <= (-6.6d-8)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if ((f <= 2.65d-11) .or. (.not. (f <= 2.15d+182))) then
tmp = (f / (b * (f + (1.0d0 / f)))) - (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 <= -6.6e-8) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if ((F <= 2.65e-11) || !(F <= 2.15e+182)) {
tmp = (F / (B * (F + (1.0 / F)))) - (x / Math.tan(B));
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6.6e-8: tmp = (-1.0 / math.sin(B)) - (x / B) elif (F <= 2.65e-11) or not (F <= 2.15e+182): tmp = (F / (B * (F + (1.0 / F)))) - (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 <= -6.6e-8) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif ((F <= 2.65e-11) || !(F <= 2.15e+182)) tmp = Float64(Float64(F / Float64(B * Float64(F + Float64(1.0 / F)))) - 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 <= -6.6e-8) tmp = (-1.0 / sin(B)) - (x / B); elseif ((F <= 2.65e-11) || ~((F <= 2.15e+182))) tmp = (F / (B * (F + (1.0 / F)))) - (x / tan(B)); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6.6e-8], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 2.65e-11], N[Not[LessEqual[F, 2.15e+182]], $MachinePrecision]], N[(N[(F / N[(B * N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 -6.6 \cdot 10^{-8}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.65 \cdot 10^{-11} \lor \neg \left(F \leq 2.15 \cdot 10^{+182}\right):\\
\;\;\;\;\frac{F}{B \cdot \left(F + \frac{1}{F}\right)} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -6.59999999999999954e-8Initial program 66.5%
Taylor expanded in B around 0 46.1%
Taylor expanded in F around -inf 76.7%
distribute-lft-in76.7%
associate-*r/76.7%
metadata-eval76.7%
mul-1-neg76.7%
unsub-neg76.7%
Simplified76.7%
if -6.59999999999999954e-8 < F < 2.6499999999999999e-11 or 2.1500000000000001e182 < F Initial program 82.8%
Simplified89.5%
Taylor expanded in x around 0 89.5%
associate-*l/89.5%
*-lft-identity89.5%
+-commutative89.5%
unpow289.5%
fma-udef89.5%
Simplified89.5%
fma-def89.5%
sqrt-div89.4%
metadata-eval89.4%
fma-def89.4%
Applied egg-rr89.4%
Taylor expanded in F around inf 79.8%
Taylor expanded in B around 0 76.2%
if 2.6499999999999999e-11 < F < 2.1500000000000001e182Initial program 74.4%
Taylor expanded in B around 0 59.4%
Taylor expanded in F around inf 80.3%
Final simplification76.9%
(FPCore (F B x) :precision binary64 (if (<= F -4.5e-23) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 6.5e-14) (/ (- x) B) (- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.5e-23) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 6.5e-14) {
tmp = -x / 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 <= (-4.5d-23)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 6.5d-14) then
tmp = -x / 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 <= -4.5e-23) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 6.5e-14) {
tmp = -x / B;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.5e-23: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 6.5e-14: tmp = -x / B else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.5e-23) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 6.5e-14) tmp = Float64(Float64(-x) / 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 <= -4.5e-23) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 6.5e-14) tmp = -x / B; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.5e-23], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.5e-14], N[((-x) / B), $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.5 \cdot 10^{-23}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 6.5 \cdot 10^{-14}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -4.49999999999999975e-23Initial program 68.0%
Taylor expanded in B around 0 47.5%
Taylor expanded in F around -inf 73.5%
distribute-lft-in73.5%
associate-*r/73.5%
metadata-eval73.5%
mul-1-neg73.5%
unsub-neg73.5%
Simplified73.5%
if -4.49999999999999975e-23 < F < 6.5000000000000001e-14Initial program 99.5%
Taylor expanded in B around 0 63.2%
Taylor expanded in x around inf 40.2%
associate-*r/40.2%
neg-mul-140.2%
Simplified40.2%
if 6.5000000000000001e-14 < F Initial program 53.0%
Taylor expanded in B around 0 34.4%
Taylor expanded in F around inf 76.6%
Final simplification61.1%
(FPCore (F B x) :precision binary64 (if (<= F -0.215) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 0.49) (/ (- (* F (sqrt 0.5)) x) B) (- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.215) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 0.49) {
tmp = ((F * sqrt(0.5)) - x) / 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.215d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 0.49d0) then
tmp = ((f * sqrt(0.5d0)) - x) / 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.215) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 0.49) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.215: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 0.49: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.215) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 0.49) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / 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.215) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 0.49) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.215], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.49], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $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.215:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.49:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -0.214999999999999997Initial program 66.1%
Taylor expanded in B around 0 45.4%
Taylor expanded in F around -inf 77.5%
distribute-lft-in77.5%
associate-*r/77.5%
metadata-eval77.5%
mul-1-neg77.5%
unsub-neg77.5%
Simplified77.5%
if -0.214999999999999997 < F < 0.48999999999999999Initial program 99.5%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around 0 99.4%
Taylor expanded in B around 0 55.2%
if 0.48999999999999999 < F Initial program 51.6%
Taylor expanded in B around 0 32.4%
Taylor expanded in F around inf 78.6%
Final simplification68.3%
(FPCore (F B x)
:precision binary64
(if (<= F -1e+209)
(+ (* B -0.16666666666666666) (/ (- -1.0 x) B))
(if (<= F -7.6e-16)
(/ -1.0 (sin B))
(if (<= F 7.8e-14) (/ (- x) B) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1e+209) {
tmp = (B * -0.16666666666666666) + ((-1.0 - x) / B);
} else if (F <= -7.6e-16) {
tmp = -1.0 / sin(B);
} else if (F <= 7.8e-14) {
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 <= (-1d+209)) then
tmp = (b * (-0.16666666666666666d0)) + (((-1.0d0) - x) / b)
else if (f <= (-7.6d-16)) then
tmp = (-1.0d0) / sin(b)
else if (f <= 7.8d-14) 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 <= -1e+209) {
tmp = (B * -0.16666666666666666) + ((-1.0 - x) / B);
} else if (F <= -7.6e-16) {
tmp = -1.0 / Math.sin(B);
} else if (F <= 7.8e-14) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1e+209: tmp = (B * -0.16666666666666666) + ((-1.0 - x) / B) elif F <= -7.6e-16: tmp = -1.0 / math.sin(B) elif F <= 7.8e-14: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1e+209) tmp = Float64(Float64(B * -0.16666666666666666) + Float64(Float64(-1.0 - x) / B)); elseif (F <= -7.6e-16) tmp = Float64(-1.0 / sin(B)); elseif (F <= 7.8e-14) 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 <= -1e+209) tmp = (B * -0.16666666666666666) + ((-1.0 - x) / B); elseif (F <= -7.6e-16) tmp = -1.0 / sin(B); elseif (F <= 7.8e-14) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1e+209], N[(N[(B * -0.16666666666666666), $MachinePrecision] + N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7.6e-16], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.8e-14], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1 \cdot 10^{+209}:\\
\;\;\;\;B \cdot -0.16666666666666666 + \frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq -7.6 \cdot 10^{-16}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 7.8 \cdot 10^{-14}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.0000000000000001e209Initial program 18.3%
Taylor expanded in B around 0 5.9%
Taylor expanded in F around -inf 86.1%
distribute-lft-in86.1%
associate-*r/86.1%
metadata-eval86.1%
mul-1-neg86.1%
unsub-neg86.1%
Simplified86.1%
Taylor expanded in B around 0 71.8%
+-commutative71.8%
mul-1-neg71.8%
unsub-neg71.8%
*-commutative71.8%
+-commutative71.8%
Simplified71.8%
if -1.0000000000000001e209 < F < -7.60000000000000024e-16Initial program 86.8%
Taylor expanded in B around 0 63.1%
Taylor expanded in F around -inf 68.7%
distribute-lft-in68.7%
associate-*r/68.7%
metadata-eval68.7%
mul-1-neg68.7%
unsub-neg68.7%
Simplified68.7%
Taylor expanded in B around inf 55.8%
if -7.60000000000000024e-16 < F < 7.7999999999999996e-14Initial program 99.5%
Taylor expanded in B around 0 63.2%
Taylor expanded in x around inf 40.2%
associate-*r/40.2%
neg-mul-140.2%
Simplified40.2%
if 7.7999999999999996e-14 < F Initial program 53.0%
Taylor expanded in B around 0 34.4%
Taylor expanded in F around inf 47.8%
Taylor expanded in B around 0 57.2%
Final simplification51.4%
(FPCore (F B x) :precision binary64 (if (<= F -5.1e-27) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 1.4e-12) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.1e-27) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1.4e-12) {
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 <= (-5.1d-27)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 1.4d-12) 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 <= -5.1e-27) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 1.4e-12) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5.1e-27: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 1.4e-12: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5.1e-27) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1.4e-12) 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 <= -5.1e-27) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 1.4e-12) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5.1e-27], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4e-12], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5.1 \cdot 10^{-27}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-12}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -5.0999999999999999e-27Initial program 68.0%
Taylor expanded in B around 0 47.5%
Taylor expanded in F around -inf 73.5%
distribute-lft-in73.5%
associate-*r/73.5%
metadata-eval73.5%
mul-1-neg73.5%
unsub-neg73.5%
Simplified73.5%
if -5.0999999999999999e-27 < F < 1.4000000000000001e-12Initial program 99.5%
Taylor expanded in B around 0 63.2%
Taylor expanded in x around inf 40.2%
associate-*r/40.2%
neg-mul-140.2%
Simplified40.2%
if 1.4000000000000001e-12 < F Initial program 53.0%
Taylor expanded in B around 0 34.4%
Taylor expanded in F around inf 47.8%
Taylor expanded in B around 0 57.2%
Final simplification55.8%
(FPCore (F B x) :precision binary64 (if (<= F -7.5e-14) (/ (- -1.0 x) B) (if (<= F 1.32e-13) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.5e-14) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.32e-13) {
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 <= (-7.5d-14)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.32d-13) 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 <= -7.5e-14) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.32e-13) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.5e-14: tmp = (-1.0 - x) / B elif F <= 1.32e-13: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.5e-14) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.32e-13) 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 <= -7.5e-14) tmp = (-1.0 - x) / B; elseif (F <= 1.32e-13) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.5e-14], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.32e-13], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.5 \cdot 10^{-14}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.32 \cdot 10^{-13}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -7.4999999999999996e-14Initial program 67.3%
Taylor expanded in F around -inf 96.4%
Taylor expanded in B around 0 48.7%
associate-*r/48.7%
distribute-lft-in48.7%
metadata-eval48.7%
neg-mul-148.7%
Simplified48.7%
if -7.4999999999999996e-14 < F < 1.3199999999999999e-13Initial program 99.5%
Taylor expanded in B around 0 63.9%
Taylor expanded in x around inf 39.5%
associate-*r/39.5%
neg-mul-139.5%
Simplified39.5%
if 1.3199999999999999e-13 < F Initial program 53.0%
Taylor expanded in B around 0 34.4%
Taylor expanded in F around inf 47.8%
Taylor expanded in B around 0 57.2%
Final simplification47.3%
(FPCore (F B x) :precision binary64 (if (<= F -2.25e-13) (- (/ -1.0 B) (/ x B)) (if (<= F 6.8e-14) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.25e-13) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 6.8e-14) {
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.25d-13)) then
tmp = ((-1.0d0) / b) - (x / b)
else if (f <= 6.8d-14) 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.25e-13) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 6.8e-14) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.25e-13: tmp = (-1.0 / B) - (x / B) elif F <= 6.8e-14: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.25e-13) tmp = Float64(Float64(-1.0 / B) - Float64(x / B)); elseif (F <= 6.8e-14) 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.25e-13) tmp = (-1.0 / B) - (x / B); elseif (F <= 6.8e-14) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.25e-13], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.8e-14], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.25 \cdot 10^{-13}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 6.8 \cdot 10^{-14}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.25e-13Initial program 67.3%
Taylor expanded in B around 0 46.2%
Taylor expanded in F around -inf 75.0%
distribute-lft-in75.0%
associate-*r/75.0%
metadata-eval75.0%
mul-1-neg75.0%
unsub-neg75.0%
Simplified75.0%
Taylor expanded in B around 0 48.7%
if -2.25e-13 < F < 6.80000000000000006e-14Initial program 99.5%
Taylor expanded in B around 0 63.9%
Taylor expanded in x around inf 39.5%
associate-*r/39.5%
neg-mul-139.5%
Simplified39.5%
if 6.80000000000000006e-14 < F Initial program 53.0%
Taylor expanded in B around 0 34.4%
Taylor expanded in F around inf 47.8%
Taylor expanded in B around 0 57.2%
Final simplification47.3%
(FPCore (F B x) :precision binary64 (if (<= F 6.8e-14) (/ (- x) B) (/ (- 1.0 x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 6.8e-14) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= 6.8d-14) then
tmp = -x / b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= 6.8e-14) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 6.8e-14: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 6.8e-14) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= 6.8e-14) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 6.8e-14], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 6.8 \cdot 10^{-14}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < 6.80000000000000006e-14Initial program 85.3%
Taylor expanded in B around 0 56.1%
Taylor expanded in x around inf 32.4%
associate-*r/32.4%
neg-mul-132.4%
Simplified32.4%
if 6.80000000000000006e-14 < F Initial program 53.0%
Taylor expanded in B around 0 34.4%
Taylor expanded in F around inf 47.8%
Taylor expanded in B around 0 57.2%
Final simplification39.2%
(FPCore (F B x) :precision binary64 (/ (- x) B))
double code(double F, double B, double x) {
return -x / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -x / b
end function
public static double code(double F, double B, double x) {
return -x / B;
}
def code(F, B, x): return -x / B
function code(F, B, x) return Float64(Float64(-x) / B) end
function tmp = code(F, B, x) tmp = -x / B; end
code[F_, B_, x_] := N[((-x) / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-x}{B}
\end{array}
Initial program 76.5%
Taylor expanded in B around 0 50.2%
Taylor expanded in x around inf 30.4%
associate-*r/30.4%
neg-mul-130.4%
Simplified30.4%
Final simplification30.4%
(FPCore (F B x) :precision binary64 (/ x B))
double code(double F, double B, double x) {
return x / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = x / b
end function
public static double code(double F, double B, double x) {
return x / B;
}
def code(F, B, x): return x / B
function code(F, B, x) return Float64(x / B) end
function tmp = code(F, B, x) tmp = x / B; end
code[F_, B_, x_] := N[(x / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{B}
\end{array}
Initial program 76.5%
Taylor expanded in B around 0 50.2%
Taylor expanded in x around inf 30.4%
associate-*r/30.4%
neg-mul-130.4%
Simplified30.4%
distribute-frac-neg30.4%
neg-sub030.4%
sub-neg30.4%
add-sqr-sqrt15.7%
sqrt-unprod11.9%
sqr-neg11.9%
sqrt-unprod1.6%
add-sqr-sqrt2.7%
Applied egg-rr2.7%
+-lft-identity2.7%
Simplified2.7%
Final simplification2.7%
herbie shell --seed 2024075
(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))))))