
(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 21 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 -5e+22)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 200000000.0)
(- (* F (/ (sqrt (/ 1.0 (fma F F 2.0))) (sin B))) t_0)
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -5e+22) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 200000000.0) {
tmp = (F * (sqrt((1.0 / fma(F, F, 2.0))) / sin(B))) - t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -5e+22) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 200000000.0) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) / sin(B))) - t_0); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5e+22], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 200000000.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[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5 \cdot 10^{+22}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 200000000:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -4.9999999999999996e22Initial program 54.2%
Simplified72.1%
Taylor expanded in x around 0 72.1%
associate-*l/72.1%
*-lft-identity72.1%
+-commutative72.1%
unpow272.1%
fma-undefine72.1%
Simplified72.1%
Taylor expanded in F around -inf 99.8%
if -4.9999999999999996e22 < F < 2e8Initial program 99.5%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
if 2e8 < F Initial program 52.2%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2e+18)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 100000000000.0)
(- (/ F (* (sin B) (sqrt (fma F F 2.0)))) t_0)
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2e+18) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 100000000000.0) {
tmp = (F / (sin(B) * sqrt(fma(F, F, 2.0)))) - t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2e+18) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 100000000000.0) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(fma(F, F, 2.0)))) - t_0); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2e+18], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 100000000000.0], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2 \cdot 10^{+18}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 100000000000:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -2e18Initial program 54.8%
Simplified72.5%
Taylor expanded in x around 0 72.5%
associate-*l/72.5%
*-lft-identity72.5%
+-commutative72.5%
unpow272.5%
fma-undefine72.5%
Simplified72.5%
Taylor expanded in F around -inf 99.8%
if -2e18 < F < 1e11Initial program 99.5%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
associate-*r/99.6%
clear-num99.6%
sqrt-div99.5%
metadata-eval99.5%
un-div-inv99.6%
Applied egg-rr99.6%
associate-/r/99.6%
times-frac99.6%
*-lft-identity99.6%
Simplified99.6%
if 1e11 < F Initial program 52.2%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1e+158)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 5e+126)
(- (/ (/ F (sqrt (fma F F 2.0))) (sin B)) t_0)
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1e+158) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 5e+126) {
tmp = ((F / sqrt(fma(F, F, 2.0))) / sin(B)) - t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1e+158) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 5e+126) tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, 2.0))) / sin(B)) - t_0); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1e+158], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 5e+126], N[(N[(N[(F / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1 \cdot 10^{+158}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 5 \cdot 10^{+126}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -9.99999999999999953e157Initial program 37.4%
Simplified59.8%
Taylor expanded in x around 0 59.8%
associate-*l/59.8%
*-lft-identity59.8%
+-commutative59.8%
unpow259.8%
fma-undefine59.8%
Simplified59.8%
Taylor expanded in F around -inf 99.8%
if -9.99999999999999953e157 < F < 4.99999999999999977e126Initial program 98.3%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
associate-*r/99.6%
sqrt-div99.6%
metadata-eval99.6%
un-div-inv99.6%
Applied egg-rr99.6%
if 4.99999999999999977e126 < F Initial program 28.7%
Taylor expanded in F around inf 99.9%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -300000000.0)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 190000000.0)
(+ t_0 (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(+ t_0 (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -300000000.0) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 190000000.0) {
tmp = t_0 + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = t_0 + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-300000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 190000000.0d0) then
tmp = t_0 + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = t_0 + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -300000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 190000000.0) {
tmp = t_0 + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = t_0 + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -300000000.0: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 190000000.0: tmp = t_0 + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = t_0 + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -300000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 190000000.0) tmp = Float64(t_0 + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5))); else tmp = Float64(t_0 + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -300000000.0) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 190000000.0) tmp = t_0 + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = t_0 + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -300000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 190000000.0], N[(t$95$0 + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -300000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 190000000:\\
\;\;\;\;t\_0 + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;t\_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -3e8Initial program 54.8%
Simplified72.5%
Taylor expanded in x around 0 72.5%
associate-*l/72.5%
*-lft-identity72.5%
+-commutative72.5%
unpow272.5%
fma-undefine72.5%
Simplified72.5%
Taylor expanded in F around -inf 99.8%
if -3e8 < F < 1.9e8Initial program 99.5%
if 1.9e8 < F Initial program 52.2%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.92)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(if (<= F 1.4)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.92) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else if (F <= 1.4) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.92d0)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_0
else if (f <= 1.4d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.92) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_0;
} else if (F <= 1.4) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.92: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_0 elif F <= 1.4: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.92) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); elseif (F <= 1.4) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.92) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0; elseif (F <= 1.4) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; else tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.92], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / 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[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.92:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -0.92000000000000004Initial program 55.4%
Simplified72.8%
Taylor expanded in x around 0 72.8%
associate-*l/72.8%
*-lft-identity72.8%
+-commutative72.8%
unpow272.8%
fma-undefine72.8%
Simplified72.8%
associate-*r/72.9%
sqrt-div72.9%
metadata-eval72.9%
un-div-inv73.0%
Applied egg-rr73.0%
Taylor expanded in F around -inf 99.4%
neg-mul-199.4%
Simplified99.4%
if -0.92000000000000004 < F < 1.3999999999999999Initial program 99.5%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
Taylor expanded in F around 0 98.9%
if 1.3999999999999999 < F Initial program 52.2%
Taylor expanded in F around inf 99.8%
Final simplification99.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- x) (tan B)))
(t_1 (/ (- (* F (sqrt 0.5)) x) B))
(t_2 (/ x (tan B))))
(if (<= F -1.7e+140)
(- (/ -1.0 B) t_2)
(if (<= F -0.29)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.46e-90)
t_1
(if (<= F 1.2e-204)
t_0
(if (<= F 9.5e-20)
t_1
(if (<= F 1.95e+39) t_0 (fabs (+ t_2 (/ -1.0 B)))))))))))
double code(double F, double B, double x) {
double t_0 = -x / tan(B);
double t_1 = ((F * sqrt(0.5)) - x) / B;
double t_2 = x / tan(B);
double tmp;
if (F <= -1.7e+140) {
tmp = (-1.0 / B) - t_2;
} else if (F <= -0.29) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.46e-90) {
tmp = t_1;
} else if (F <= 1.2e-204) {
tmp = t_0;
} else if (F <= 9.5e-20) {
tmp = t_1;
} else if (F <= 1.95e+39) {
tmp = t_0;
} else {
tmp = fabs((t_2 + (-1.0 / B)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = -x / tan(b)
t_1 = ((f * sqrt(0.5d0)) - x) / b
t_2 = x / tan(b)
if (f <= (-1.7d+140)) then
tmp = ((-1.0d0) / b) - t_2
else if (f <= (-0.29d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.46d-90)) then
tmp = t_1
else if (f <= 1.2d-204) then
tmp = t_0
else if (f <= 9.5d-20) then
tmp = t_1
else if (f <= 1.95d+39) then
tmp = t_0
else
tmp = abs((t_2 + ((-1.0d0) / b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = -x / Math.tan(B);
double t_1 = ((F * Math.sqrt(0.5)) - x) / B;
double t_2 = x / Math.tan(B);
double tmp;
if (F <= -1.7e+140) {
tmp = (-1.0 / B) - t_2;
} else if (F <= -0.29) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.46e-90) {
tmp = t_1;
} else if (F <= 1.2e-204) {
tmp = t_0;
} else if (F <= 9.5e-20) {
tmp = t_1;
} else if (F <= 1.95e+39) {
tmp = t_0;
} else {
tmp = Math.abs((t_2 + (-1.0 / B)));
}
return tmp;
}
def code(F, B, x): t_0 = -x / math.tan(B) t_1 = ((F * math.sqrt(0.5)) - x) / B t_2 = x / math.tan(B) tmp = 0 if F <= -1.7e+140: tmp = (-1.0 / B) - t_2 elif F <= -0.29: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.46e-90: tmp = t_1 elif F <= 1.2e-204: tmp = t_0 elif F <= 9.5e-20: tmp = t_1 elif F <= 1.95e+39: tmp = t_0 else: tmp = math.fabs((t_2 + (-1.0 / B))) return tmp
function code(F, B, x) t_0 = Float64(Float64(-x) / tan(B)) t_1 = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B) t_2 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.7e+140) tmp = Float64(Float64(-1.0 / B) - t_2); elseif (F <= -0.29) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.46e-90) tmp = t_1; elseif (F <= 1.2e-204) tmp = t_0; elseif (F <= 9.5e-20) tmp = t_1; elseif (F <= 1.95e+39) tmp = t_0; else tmp = abs(Float64(t_2 + Float64(-1.0 / B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = -x / tan(B); t_1 = ((F * sqrt(0.5)) - x) / B; t_2 = x / tan(B); tmp = 0.0; if (F <= -1.7e+140) tmp = (-1.0 / B) - t_2; elseif (F <= -0.29) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.46e-90) tmp = t_1; elseif (F <= 1.2e-204) tmp = t_0; elseif (F <= 9.5e-20) tmp = t_1; elseif (F <= 1.95e+39) tmp = t_0; else tmp = abs((t_2 + (-1.0 / B))); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.7e+140], N[(N[(-1.0 / B), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[F, -0.29], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.46e-90], t$95$1, If[LessEqual[F, 1.2e-204], t$95$0, If[LessEqual[F, 9.5e-20], t$95$1, If[LessEqual[F, 1.95e+39], t$95$0, N[Abs[N[(t$95$2 + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x}{\tan B}\\
t_1 := \frac{F \cdot \sqrt{0.5} - x}{B}\\
t_2 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.7 \cdot 10^{+140}:\\
\;\;\;\;\frac{-1}{B} - t\_2\\
\mathbf{elif}\;F \leq -0.29:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.46 \cdot 10^{-90}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 1.2 \cdot 10^{-204}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 9.5 \cdot 10^{-20}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 1.95 \cdot 10^{+39}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\left|t\_2 + \frac{-1}{B}\right|\\
\end{array}
\end{array}
if F < -1.7e140Initial program 38.6%
Taylor expanded in F around -inf 59.1%
Taylor expanded in B around 0 45.9%
+-commutative45.9%
div-inv45.9%
unsub-neg45.9%
*-commutative45.9%
frac-2neg45.9%
metadata-eval45.9%
frac-times86.6%
*-un-lft-identity86.6%
Applied egg-rr86.6%
associate-/r*86.6%
neg-mul-186.6%
*-commutative86.6%
*-rgt-identity86.6%
times-frac86.6%
metadata-eval86.6%
metadata-eval86.6%
times-frac86.6%
*-rgt-identity86.6%
*-commutative86.6%
neg-mul-186.6%
*-rgt-identity86.6%
*-rgt-identity86.6%
metadata-eval86.6%
distribute-rgt-neg-in86.6%
distribute-lft-neg-in86.6%
times-frac86.6%
*-inverses86.6%
metadata-eval86.6%
metadata-eval86.6%
Simplified86.6%
if -1.7e140 < F < -0.28999999999999998Initial program 91.7%
Taylor expanded in F around -inf 97.3%
Taylor expanded in B around 0 93.4%
if -0.28999999999999998 < F < -1.46000000000000004e-90 or 1.2e-204 < F < 9.5e-20Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 63.3%
if -1.46000000000000004e-90 < F < 1.2e-204 or 9.5e-20 < F < 1.95e39Initial program 99.4%
Taylor expanded in F around -inf 37.0%
Taylor expanded in x around inf 77.3%
mul-1-neg77.3%
associate-/l*77.4%
distribute-neg-frac77.4%
Simplified77.4%
tan-quot77.5%
*-un-lft-identity77.5%
*-commutative77.5%
Applied egg-rr77.5%
*-rgt-identity77.5%
Simplified77.5%
if 1.95e39 < F Initial program 47.0%
Taylor expanded in F around -inf 28.6%
Taylor expanded in B around 0 30.1%
add-sqr-sqrt9.0%
sqrt-unprod10.6%
pow210.6%
Applied egg-rr10.6%
unpow210.6%
rem-sqrt-square14.1%
fma-undefine14.1%
times-frac26.1%
*-commutative26.1%
neg-mul-126.1%
*-commutative26.1%
associate-/r*26.2%
*-rgt-identity26.2%
*-rgt-identity26.2%
metadata-eval26.2%
distribute-rgt-neg-in26.2%
distribute-lft-neg-in26.2%
times-frac26.2%
*-inverses26.2%
metadata-eval26.2%
metadata-eval26.2%
Simplified26.2%
Final simplification66.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- (* F (sqrt 0.5)) x) B))
(t_1 (/ (- x) (tan B)))
(t_2 (/ x (tan B))))
(if (<= F -2.9e-9)
(- (/ -1.0 (sin B)) t_2)
(if (<= F -1.85e-90)
t_0
(if (<= F 1.15e-204)
t_1
(if (<= F 1e-19)
t_0
(if (<= F 1.6e+42) t_1 (fabs (+ t_2 (/ -1.0 B))))))))))
double code(double F, double B, double x) {
double t_0 = ((F * sqrt(0.5)) - x) / B;
double t_1 = -x / tan(B);
double t_2 = x / tan(B);
double tmp;
if (F <= -2.9e-9) {
tmp = (-1.0 / sin(B)) - t_2;
} else if (F <= -1.85e-90) {
tmp = t_0;
} else if (F <= 1.15e-204) {
tmp = t_1;
} else if (F <= 1e-19) {
tmp = t_0;
} else if (F <= 1.6e+42) {
tmp = t_1;
} else {
tmp = fabs((t_2 + (-1.0 / B)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = ((f * sqrt(0.5d0)) - x) / b
t_1 = -x / tan(b)
t_2 = x / tan(b)
if (f <= (-2.9d-9)) then
tmp = ((-1.0d0) / sin(b)) - t_2
else if (f <= (-1.85d-90)) then
tmp = t_0
else if (f <= 1.15d-204) then
tmp = t_1
else if (f <= 1d-19) then
tmp = t_0
else if (f <= 1.6d+42) then
tmp = t_1
else
tmp = abs((t_2 + ((-1.0d0) / 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 / Math.tan(B);
double t_2 = x / Math.tan(B);
double tmp;
if (F <= -2.9e-9) {
tmp = (-1.0 / Math.sin(B)) - t_2;
} else if (F <= -1.85e-90) {
tmp = t_0;
} else if (F <= 1.15e-204) {
tmp = t_1;
} else if (F <= 1e-19) {
tmp = t_0;
} else if (F <= 1.6e+42) {
tmp = t_1;
} else {
tmp = Math.abs((t_2 + (-1.0 / B)));
}
return tmp;
}
def code(F, B, x): t_0 = ((F * math.sqrt(0.5)) - x) / B t_1 = -x / math.tan(B) t_2 = x / math.tan(B) tmp = 0 if F <= -2.9e-9: tmp = (-1.0 / math.sin(B)) - t_2 elif F <= -1.85e-90: tmp = t_0 elif F <= 1.15e-204: tmp = t_1 elif F <= 1e-19: tmp = t_0 elif F <= 1.6e+42: tmp = t_1 else: tmp = math.fabs((t_2 + (-1.0 / B))) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B) t_1 = Float64(Float64(-x) / tan(B)) t_2 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.9e-9) tmp = Float64(Float64(-1.0 / sin(B)) - t_2); elseif (F <= -1.85e-90) tmp = t_0; elseif (F <= 1.15e-204) tmp = t_1; elseif (F <= 1e-19) tmp = t_0; elseif (F <= 1.6e+42) tmp = t_1; else tmp = abs(Float64(t_2 + Float64(-1.0 / B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F * sqrt(0.5)) - x) / B; t_1 = -x / tan(B); t_2 = x / tan(B); tmp = 0.0; if (F <= -2.9e-9) tmp = (-1.0 / sin(B)) - t_2; elseif (F <= -1.85e-90) tmp = t_0; elseif (F <= 1.15e-204) tmp = t_1; elseif (F <= 1e-19) tmp = t_0; elseif (F <= 1.6e+42) tmp = t_1; else tmp = abs((t_2 + (-1.0 / 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[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.9e-9], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[F, -1.85e-90], t$95$0, If[LessEqual[F, 1.15e-204], t$95$1, If[LessEqual[F, 1e-19], t$95$0, If[LessEqual[F, 1.6e+42], t$95$1, N[Abs[N[(t$95$2 + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F \cdot \sqrt{0.5} - x}{B}\\
t_1 := \frac{-x}{\tan B}\\
t_2 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.9 \cdot 10^{-9}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_2\\
\mathbf{elif}\;F \leq -1.85 \cdot 10^{-90}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.15 \cdot 10^{-204}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 10^{-19}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.6 \cdot 10^{+42}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left|t\_2 + \frac{-1}{B}\right|\\
\end{array}
\end{array}
if F < -2.89999999999999991e-9Initial program 56.5%
Simplified73.5%
Taylor expanded in x around 0 73.5%
associate-*l/73.5%
*-lft-identity73.5%
+-commutative73.5%
unpow273.5%
fma-undefine73.5%
Simplified73.5%
Taylor expanded in F around -inf 99.1%
if -2.89999999999999991e-9 < F < -1.85000000000000009e-90 or 1.15e-204 < F < 9.9999999999999998e-20Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 65.4%
if -1.85000000000000009e-90 < F < 1.15e-204 or 9.9999999999999998e-20 < F < 1.60000000000000001e42Initial program 99.4%
Taylor expanded in F around -inf 37.0%
Taylor expanded in x around inf 77.3%
mul-1-neg77.3%
associate-/l*77.4%
distribute-neg-frac77.4%
Simplified77.4%
tan-quot77.5%
*-un-lft-identity77.5%
*-commutative77.5%
Applied egg-rr77.5%
*-rgt-identity77.5%
Simplified77.5%
if 1.60000000000000001e42 < F Initial program 47.0%
Taylor expanded in F around -inf 28.6%
Taylor expanded in B around 0 30.1%
add-sqr-sqrt9.0%
sqrt-unprod10.6%
pow210.6%
Applied egg-rr10.6%
unpow210.6%
rem-sqrt-square14.1%
fma-undefine14.1%
times-frac26.1%
*-commutative26.1%
neg-mul-126.1%
*-commutative26.1%
associate-/r*26.2%
*-rgt-identity26.2%
*-rgt-identity26.2%
metadata-eval26.2%
distribute-rgt-neg-in26.2%
distribute-lft-neg-in26.2%
times-frac26.2%
*-inverses26.2%
metadata-eval26.2%
metadata-eval26.2%
Simplified26.2%
Final simplification70.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.9e-9)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(if (<= F -2.8e-90)
(- (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (/ x B))
(if (<= F 1e-19)
(- (/ F (/ B (sqrt 0.5))) t_0)
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.9e-9) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else if (F <= -2.8e-90) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 1e-19) {
tmp = (F / (B / sqrt(0.5))) - t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-2.9d-9)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_0
else if (f <= (-2.8d-90)) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
else if (f <= 1d-19) then
tmp = (f / (b / sqrt(0.5d0))) - t_0
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -2.9e-9) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_0;
} else if (F <= -2.8e-90) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 1e-19) {
tmp = (F / (B / Math.sqrt(0.5))) - t_0;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -2.9e-9: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_0 elif F <= -2.8e-90: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) elif F <= 1e-19: tmp = (F / (B / math.sqrt(0.5))) - t_0 else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.9e-9) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); elseif (F <= -2.8e-90) 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 <= 1e-19) tmp = Float64(Float64(F / Float64(B / sqrt(0.5))) - t_0); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -2.9e-9) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0; elseif (F <= -2.8e-90) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); elseif (F <= 1e-19) tmp = (F / (B / sqrt(0.5))) - t_0; else tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.9e-9], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -2.8e-90], 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, 1e-19], N[(N[(F / N[(B / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.9 \cdot 10^{-9}:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -2.8 \cdot 10^{-90}:\\
\;\;\;\;\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 10^{-19}:\\
\;\;\;\;\frac{F}{\frac{B}{\sqrt{0.5}}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -2.89999999999999991e-9Initial program 56.5%
Simplified73.5%
Taylor expanded in x around 0 73.5%
associate-*l/73.5%
*-lft-identity73.5%
+-commutative73.5%
unpow273.5%
fma-undefine73.5%
Simplified73.5%
associate-*r/73.6%
sqrt-div73.6%
metadata-eval73.6%
un-div-inv73.6%
Applied egg-rr73.6%
Taylor expanded in F around -inf 99.4%
neg-mul-199.4%
Simplified99.4%
if -2.89999999999999991e-9 < F < -2.7999999999999999e-90Initial program 99.4%
Taylor expanded in B around 0 99.5%
if -2.7999999999999999e-90 < F < 9.9999999999999998e-20Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 88.6%
associate-/l*88.7%
Simplified88.7%
if 9.9999999999999998e-20 < F Initial program 55.9%
Taylor expanded in F around inf 95.8%
Final simplification94.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- (* F (sqrt 0.5)) x) B)) (t_1 (/ x (tan B))))
(if (<= F -2.9e-9)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -1.65e-90)
t_0
(if (<= F 4.5e-205)
(/ (- x) (tan B))
(if (<= F 1e-19) t_0 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = ((F * sqrt(0.5)) - x) / B;
double t_1 = x / tan(B);
double tmp;
if (F <= -2.9e-9) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -1.65e-90) {
tmp = t_0;
} else if (F <= 4.5e-205) {
tmp = -x / tan(B);
} else if (F <= 1e-19) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((f * sqrt(0.5d0)) - x) / b
t_1 = x / tan(b)
if (f <= (-2.9d-9)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-1.65d-90)) then
tmp = t_0
else if (f <= 4.5d-205) then
tmp = -x / tan(b)
else if (f <= 1d-19) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F * Math.sqrt(0.5)) - x) / B;
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -2.9e-9) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -1.65e-90) {
tmp = t_0;
} else if (F <= 4.5e-205) {
tmp = -x / Math.tan(B);
} else if (F <= 1e-19) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = ((F * math.sqrt(0.5)) - x) / B t_1 = x / math.tan(B) tmp = 0 if F <= -2.9e-9: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -1.65e-90: tmp = t_0 elif F <= 4.5e-205: tmp = -x / math.tan(B) elif F <= 1e-19: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.9e-9) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -1.65e-90) tmp = t_0; elseif (F <= 4.5e-205) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 1e-19) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F * sqrt(0.5)) - x) / B; t_1 = x / tan(B); tmp = 0.0; if (F <= -2.9e-9) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -1.65e-90) tmp = t_0; elseif (F <= 4.5e-205) tmp = -x / tan(B); elseif (F <= 1e-19) tmp = t_0; else tmp = (1.0 / sin(B)) - t_1; 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[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.9e-9], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -1.65e-90], t$95$0, If[LessEqual[F, 4.5e-205], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1e-19], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F \cdot \sqrt{0.5} - x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.9 \cdot 10^{-9}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -1.65 \cdot 10^{-90}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 4.5 \cdot 10^{-205}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 10^{-19}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -2.89999999999999991e-9Initial program 56.5%
Simplified73.5%
Taylor expanded in x around 0 73.5%
associate-*l/73.5%
*-lft-identity73.5%
+-commutative73.5%
unpow273.5%
fma-undefine73.5%
Simplified73.5%
Taylor expanded in F around -inf 99.1%
if -2.89999999999999991e-9 < F < -1.65e-90 or 4.49999999999999956e-205 < F < 9.9999999999999998e-20Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 65.4%
if -1.65e-90 < F < 4.49999999999999956e-205Initial program 99.4%
Taylor expanded in F around -inf 35.3%
Taylor expanded in x around inf 83.1%
mul-1-neg83.1%
associate-/l*83.2%
distribute-neg-frac83.2%
Simplified83.2%
tan-quot83.3%
*-un-lft-identity83.3%
*-commutative83.3%
Applied egg-rr83.3%
*-rgt-identity83.3%
Simplified83.3%
if 9.9999999999999998e-20 < F Initial program 55.9%
Simplified67.3%
Taylor expanded in x around 0 67.3%
associate-*l/67.3%
*-lft-identity67.3%
+-commutative67.3%
unpow267.3%
fma-undefine67.3%
Simplified67.3%
Taylor expanded in F around inf 95.8%
Final simplification87.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.295)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1e-19)
(- (* 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.295) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1e-19) {
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.295d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1d-19) 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.295) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1e-19) {
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.295: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1e-19: 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.295) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1e-19) 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.295) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1e-19) 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.295], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1e-19], 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.295:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 10^{-19}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -0.294999999999999984Initial program 55.4%
Simplified72.8%
Taylor expanded in x around 0 72.8%
associate-*l/72.8%
*-lft-identity72.8%
+-commutative72.8%
unpow272.8%
fma-undefine72.8%
Simplified72.8%
Taylor expanded in F around -inf 99.0%
if -0.294999999999999984 < F < 9.9999999999999998e-20Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 86.2%
if 9.9999999999999998e-20 < F Initial program 55.9%
Simplified67.3%
Taylor expanded in x around 0 67.3%
associate-*l/67.3%
*-lft-identity67.3%
+-commutative67.3%
unpow267.3%
fma-undefine67.3%
Simplified67.3%
Taylor expanded in F around inf 95.8%
Final simplification92.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.27)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1e-19)
(- (* F (/ (sqrt 0.5) B)) t_0)
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.27) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1e-19) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.27d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1d-19) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.27) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1e-19) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.27: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1e-19: tmp = (F * (math.sqrt(0.5) / B)) - t_0 else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.27) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1e-19) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.27) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1e-19) tmp = (F * (sqrt(0.5) / B)) - t_0; else tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.27], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1e-19], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.27:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 10^{-19}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -0.27000000000000002Initial program 55.4%
Simplified72.8%
Taylor expanded in x around 0 72.8%
associate-*l/72.8%
*-lft-identity72.8%
+-commutative72.8%
unpow272.8%
fma-undefine72.8%
Simplified72.8%
Taylor expanded in F around -inf 99.0%
if -0.27000000000000002 < F < 9.9999999999999998e-20Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 86.2%
if 9.9999999999999998e-20 < F Initial program 55.9%
Taylor expanded in F around inf 95.8%
Final simplification92.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.39)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(if (<= F 1e-19)
(- (* F (/ (sqrt 0.5) B)) t_0)
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.39) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else if (F <= 1e-19) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.39d0)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_0
else if (f <= 1d-19) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.39) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_0;
} else if (F <= 1e-19) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.39: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_0 elif F <= 1e-19: tmp = (F * (math.sqrt(0.5) / B)) - t_0 else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.39) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); elseif (F <= 1e-19) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.39) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0; elseif (F <= 1e-19) tmp = (F * (sqrt(0.5) / B)) - t_0; else tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.39], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1e-19], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.39:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 10^{-19}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -0.39000000000000001Initial program 55.4%
Simplified72.8%
Taylor expanded in x around 0 72.8%
associate-*l/72.8%
*-lft-identity72.8%
+-commutative72.8%
unpow272.8%
fma-undefine72.8%
Simplified72.8%
associate-*r/72.9%
sqrt-div72.9%
metadata-eval72.9%
un-div-inv73.0%
Applied egg-rr73.0%
Taylor expanded in F around -inf 99.4%
neg-mul-199.4%
Simplified99.4%
if -0.39000000000000001 < F < 9.9999999999999998e-20Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 86.2%
if 9.9999999999999998e-20 < F Initial program 55.9%
Taylor expanded in F around inf 95.8%
Final simplification92.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- (* F (sqrt 0.5)) x) B)))
(if (<= F -1.6e+140)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F -0.26)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.7e-90)
t_0
(if (<= F 4.8e-205)
(/ (- x) (tan B))
(if (<= F 9.5e-20) t_0 (* x (/ 1.0 (- (tan B)))))))))))
double code(double F, double B, double x) {
double t_0 = ((F * sqrt(0.5)) - x) / B;
double tmp;
if (F <= -1.6e+140) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= -0.26) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.7e-90) {
tmp = t_0;
} else if (F <= 4.8e-205) {
tmp = -x / tan(B);
} else if (F <= 9.5e-20) {
tmp = t_0;
} else {
tmp = x * (1.0 / -tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((f * sqrt(0.5d0)) - x) / b
if (f <= (-1.6d+140)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= (-0.26d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.7d-90)) then
tmp = t_0
else if (f <= 4.8d-205) then
tmp = -x / tan(b)
else if (f <= 9.5d-20) then
tmp = t_0
else
tmp = x * (1.0d0 / -tan(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 <= -1.6e+140) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= -0.26) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.7e-90) {
tmp = t_0;
} else if (F <= 4.8e-205) {
tmp = -x / Math.tan(B);
} else if (F <= 9.5e-20) {
tmp = t_0;
} else {
tmp = x * (1.0 / -Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = ((F * math.sqrt(0.5)) - x) / B tmp = 0 if F <= -1.6e+140: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= -0.26: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.7e-90: tmp = t_0 elif F <= 4.8e-205: tmp = -x / math.tan(B) elif F <= 9.5e-20: tmp = t_0 else: tmp = x * (1.0 / -math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B) tmp = 0.0 if (F <= -1.6e+140) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= -0.26) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.7e-90) tmp = t_0; elseif (F <= 4.8e-205) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 9.5e-20) tmp = t_0; else tmp = Float64(x * Float64(1.0 / Float64(-tan(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 <= -1.6e+140) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= -0.26) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.7e-90) tmp = t_0; elseif (F <= 4.8e-205) tmp = -x / tan(B); elseif (F <= 9.5e-20) tmp = t_0; else tmp = x * (1.0 / -tan(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, -1.6e+140], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -0.26], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.7e-90], t$95$0, If[LessEqual[F, 4.8e-205], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9.5e-20], t$95$0, N[(x * N[(1.0 / (-N[Tan[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{if}\;F \leq -1.6 \cdot 10^{+140}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -0.26:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.7 \cdot 10^{-90}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 4.8 \cdot 10^{-205}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 9.5 \cdot 10^{-20}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{1}{-\tan B}\\
\end{array}
\end{array}
if F < -1.60000000000000005e140Initial program 38.6%
Taylor expanded in F around -inf 59.1%
Taylor expanded in B around 0 45.9%
+-commutative45.9%
div-inv45.9%
unsub-neg45.9%
*-commutative45.9%
frac-2neg45.9%
metadata-eval45.9%
frac-times86.6%
*-un-lft-identity86.6%
Applied egg-rr86.6%
associate-/r*86.6%
neg-mul-186.6%
*-commutative86.6%
*-rgt-identity86.6%
times-frac86.6%
metadata-eval86.6%
metadata-eval86.6%
times-frac86.6%
*-rgt-identity86.6%
*-commutative86.6%
neg-mul-186.6%
*-rgt-identity86.6%
*-rgt-identity86.6%
metadata-eval86.6%
distribute-rgt-neg-in86.6%
distribute-lft-neg-in86.6%
times-frac86.6%
*-inverses86.6%
metadata-eval86.6%
metadata-eval86.6%
Simplified86.6%
if -1.60000000000000005e140 < F < -0.26000000000000001Initial program 91.7%
Taylor expanded in F around -inf 97.3%
Taylor expanded in B around 0 93.4%
if -0.26000000000000001 < F < -1.69999999999999997e-90 or 4.8000000000000004e-205 < F < 9.5e-20Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 63.3%
if -1.69999999999999997e-90 < F < 4.8000000000000004e-205Initial program 99.4%
Taylor expanded in F around -inf 35.3%
Taylor expanded in x around inf 83.1%
mul-1-neg83.1%
associate-/l*83.2%
distribute-neg-frac83.2%
Simplified83.2%
tan-quot83.3%
*-un-lft-identity83.3%
*-commutative83.3%
Applied egg-rr83.3%
*-rgt-identity83.3%
Simplified83.3%
if 9.5e-20 < F Initial program 55.9%
Taylor expanded in F around -inf 37.4%
Taylor expanded in x around inf 39.0%
mul-1-neg39.0%
associate-/l*39.0%
distribute-neg-frac39.0%
Simplified39.0%
tan-quot39.0%
frac-2neg39.0%
div-inv39.1%
remove-double-neg39.1%
Applied egg-rr39.1%
Final simplification69.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- (* F (sqrt 0.5)) x) B)))
(if (<= F -1.5e-9)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F -2.1e-90)
t_0
(if (<= F 1.16e-204)
(/ (- x) (tan B))
(if (<= F 1e-19) t_0 (* x (/ 1.0 (- (tan B))))))))))
double code(double F, double B, double x) {
double t_0 = ((F * sqrt(0.5)) - x) / B;
double tmp;
if (F <= -1.5e-9) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= -2.1e-90) {
tmp = t_0;
} else if (F <= 1.16e-204) {
tmp = -x / tan(B);
} else if (F <= 1e-19) {
tmp = t_0;
} else {
tmp = x * (1.0 / -tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((f * sqrt(0.5d0)) - x) / b
if (f <= (-1.5d-9)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= (-2.1d-90)) then
tmp = t_0
else if (f <= 1.16d-204) then
tmp = -x / tan(b)
else if (f <= 1d-19) then
tmp = t_0
else
tmp = x * (1.0d0 / -tan(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 <= -1.5e-9) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= -2.1e-90) {
tmp = t_0;
} else if (F <= 1.16e-204) {
tmp = -x / Math.tan(B);
} else if (F <= 1e-19) {
tmp = t_0;
} else {
tmp = x * (1.0 / -Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = ((F * math.sqrt(0.5)) - x) / B tmp = 0 if F <= -1.5e-9: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= -2.1e-90: tmp = t_0 elif F <= 1.16e-204: tmp = -x / math.tan(B) elif F <= 1e-19: tmp = t_0 else: tmp = x * (1.0 / -math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B) tmp = 0.0 if (F <= -1.5e-9) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= -2.1e-90) tmp = t_0; elseif (F <= 1.16e-204) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 1e-19) tmp = t_0; else tmp = Float64(x * Float64(1.0 / Float64(-tan(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 <= -1.5e-9) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= -2.1e-90) tmp = t_0; elseif (F <= 1.16e-204) tmp = -x / tan(B); elseif (F <= 1e-19) tmp = t_0; else tmp = x * (1.0 / -tan(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, -1.5e-9], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.1e-90], t$95$0, If[LessEqual[F, 1.16e-204], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1e-19], t$95$0, N[(x * N[(1.0 / (-N[Tan[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{if}\;F \leq -1.5 \cdot 10^{-9}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -2.1 \cdot 10^{-90}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.16 \cdot 10^{-204}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 10^{-19}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{1}{-\tan B}\\
\end{array}
\end{array}
if F < -1.49999999999999999e-9Initial program 56.5%
Taylor expanded in F around -inf 69.4%
Taylor expanded in B around 0 49.2%
+-commutative49.2%
div-inv49.2%
unsub-neg49.2%
*-commutative49.2%
frac-2neg49.2%
metadata-eval49.2%
frac-times78.7%
*-un-lft-identity78.7%
Applied egg-rr78.7%
associate-/r*78.8%
neg-mul-178.8%
*-commutative78.8%
*-rgt-identity78.8%
times-frac78.8%
metadata-eval78.8%
metadata-eval78.8%
times-frac78.8%
*-rgt-identity78.8%
*-commutative78.8%
neg-mul-178.8%
*-rgt-identity78.8%
*-rgt-identity78.8%
metadata-eval78.8%
distribute-rgt-neg-in78.8%
distribute-lft-neg-in78.8%
times-frac78.8%
*-inverses78.8%
metadata-eval78.8%
metadata-eval78.8%
Simplified78.8%
if -1.49999999999999999e-9 < F < -2.0999999999999999e-90 or 1.16000000000000007e-204 < F < 9.9999999999999998e-20Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 65.4%
if -2.0999999999999999e-90 < F < 1.16000000000000007e-204Initial program 99.4%
Taylor expanded in F around -inf 35.3%
Taylor expanded in x around inf 83.1%
mul-1-neg83.1%
associate-/l*83.2%
distribute-neg-frac83.2%
Simplified83.2%
tan-quot83.3%
*-un-lft-identity83.3%
*-commutative83.3%
Applied egg-rr83.3%
*-rgt-identity83.3%
Simplified83.3%
if 9.9999999999999998e-20 < F Initial program 55.9%
Taylor expanded in F around -inf 37.4%
Taylor expanded in x around inf 39.0%
mul-1-neg39.0%
associate-/l*39.0%
distribute-neg-frac39.0%
Simplified39.0%
tan-quot39.0%
frac-2neg39.0%
div-inv39.1%
remove-double-neg39.1%
Applied egg-rr39.1%
Final simplification66.9%
(FPCore (F B x) :precision binary64 (if (<= F -6.2e-59) (- (/ -1.0 B) (/ x (tan B))) (/ (- x) (tan B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.2e-59) {
tmp = (-1.0 / B) - (x / tan(B));
} else {
tmp = -x / tan(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-6.2d-59)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else
tmp = -x / tan(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -6.2e-59) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else {
tmp = -x / Math.tan(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6.2e-59: tmp = (-1.0 / B) - (x / math.tan(B)) else: tmp = -x / math.tan(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6.2e-59) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); else tmp = Float64(Float64(-x) / tan(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -6.2e-59) tmp = (-1.0 / B) - (x / tan(B)); else tmp = -x / tan(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6.2e-59], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.2 \cdot 10^{-59}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\end{array}
\end{array}
if F < -6.19999999999999998e-59Initial program 61.0%
Taylor expanded in F around -inf 65.2%
Taylor expanded in B around 0 47.0%
+-commutative47.0%
div-inv47.0%
unsub-neg47.0%
*-commutative47.0%
frac-2neg47.0%
metadata-eval47.0%
frac-times73.5%
*-un-lft-identity73.5%
Applied egg-rr73.5%
associate-/r*73.6%
neg-mul-173.6%
*-commutative73.6%
*-rgt-identity73.6%
times-frac73.6%
metadata-eval73.6%
metadata-eval73.6%
times-frac73.6%
*-rgt-identity73.6%
*-commutative73.6%
neg-mul-173.6%
*-rgt-identity73.6%
*-rgt-identity73.6%
metadata-eval73.6%
distribute-rgt-neg-in73.6%
distribute-lft-neg-in73.6%
times-frac73.6%
*-inverses73.6%
metadata-eval73.6%
metadata-eval73.6%
Simplified73.6%
if -6.19999999999999998e-59 < F Initial program 82.7%
Taylor expanded in F around -inf 34.2%
Taylor expanded in x around inf 56.0%
mul-1-neg56.0%
associate-/l*56.1%
distribute-neg-frac56.1%
Simplified56.1%
tan-quot56.1%
*-un-lft-identity56.1%
*-commutative56.1%
Applied egg-rr56.1%
*-rgt-identity56.1%
Simplified56.1%
Final simplification62.1%
(FPCore (F B x) :precision binary64 (if (<= B 6e-124) (/ (- -1.0 x) B) (/ (- x) (tan B))))
double code(double F, double B, double x) {
double tmp;
if (B <= 6e-124) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / tan(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (b <= 6d-124) then
tmp = ((-1.0d0) - x) / b
else
tmp = -x / tan(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (B <= 6e-124) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / Math.tan(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if B <= 6e-124: tmp = (-1.0 - x) / B else: tmp = -x / math.tan(B) return tmp
function code(F, B, x) tmp = 0.0 if (B <= 6e-124) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(Float64(-x) / tan(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (B <= 6e-124) tmp = (-1.0 - x) / B; else tmp = -x / tan(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[B, 6e-124], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 6 \cdot 10^{-124}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\end{array}
\end{array}
if B < 6e-124Initial program 71.2%
Taylor expanded in F around -inf 52.7%
Taylor expanded in B around 0 39.1%
associate-*r/39.1%
distribute-lft-in39.1%
metadata-eval39.1%
neg-mul-139.1%
Simplified39.1%
if 6e-124 < B Initial program 83.1%
Taylor expanded in F around -inf 55.9%
Taylor expanded in x around inf 56.6%
mul-1-neg56.6%
associate-/l*56.6%
distribute-neg-frac56.6%
Simplified56.6%
tan-quot56.7%
*-un-lft-identity56.7%
*-commutative56.7%
Applied egg-rr56.7%
*-rgt-identity56.7%
Simplified56.7%
Final simplification45.2%
(FPCore (F B x) :precision binary64 (if (<= F -1.65e-57) (+ (* 0.3333333333333333 (* B x)) (/ (- -1.0 x) B)) (- (- (/ x B)) (* B (* x -0.3333333333333333)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.65e-57) {
tmp = (0.3333333333333333 * (B * x)) + ((-1.0 - x) / B);
} else {
tmp = -(x / B) - (B * (x * -0.3333333333333333));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.65d-57)) then
tmp = (0.3333333333333333d0 * (b * x)) + (((-1.0d0) - x) / b)
else
tmp = -(x / b) - (b * (x * (-0.3333333333333333d0)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.65e-57) {
tmp = (0.3333333333333333 * (B * x)) + ((-1.0 - x) / B);
} else {
tmp = -(x / B) - (B * (x * -0.3333333333333333));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.65e-57: tmp = (0.3333333333333333 * (B * x)) + ((-1.0 - x) / B) else: tmp = -(x / B) - (B * (x * -0.3333333333333333)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.65e-57) tmp = Float64(Float64(0.3333333333333333 * Float64(B * x)) + Float64(Float64(-1.0 - x) / B)); else tmp = Float64(Float64(-Float64(x / B)) - Float64(B * Float64(x * -0.3333333333333333))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.65e-57) tmp = (0.3333333333333333 * (B * x)) + ((-1.0 - x) / B); else tmp = -(x / B) - (B * (x * -0.3333333333333333)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.65e-57], N[(N[(0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], N[((-N[(x / B), $MachinePrecision]) - N[(B * N[(x * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.65 \cdot 10^{-57}:\\
\;\;\;\;0.3333333333333333 \cdot \left(B \cdot x\right) + \frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\left(-\frac{x}{B}\right) - B \cdot \left(x \cdot -0.3333333333333333\right)\\
\end{array}
\end{array}
if F < -1.6499999999999999e-57Initial program 61.0%
Taylor expanded in F around -inf 65.2%
Taylor expanded in B around 0 47.0%
Taylor expanded in B around 0 51.7%
+-commutative51.7%
mul-1-neg51.7%
unsub-neg51.7%
Simplified51.7%
if -1.6499999999999999e-57 < F Initial program 82.7%
Taylor expanded in F around -inf 34.2%
Taylor expanded in x around inf 56.0%
mul-1-neg56.0%
associate-/l*56.1%
distribute-neg-frac56.1%
Simplified56.1%
Taylor expanded in B around 0 31.3%
distribute-lft-out31.3%
distribute-rgt-out--31.3%
metadata-eval31.3%
Simplified31.3%
Final simplification38.3%
(FPCore (F B x) :precision binary64 (if (<= F -7.4e-41) (/ (- -1.0 x) B) (- (- (/ x B)) (* B (* x -0.3333333333333333)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.4e-41) {
tmp = (-1.0 - x) / B;
} else {
tmp = -(x / B) - (B * (x * -0.3333333333333333));
}
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.4d-41)) then
tmp = ((-1.0d0) - x) / b
else
tmp = -(x / b) - (b * (x * (-0.3333333333333333d0)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -7.4e-41) {
tmp = (-1.0 - x) / B;
} else {
tmp = -(x / B) - (B * (x * -0.3333333333333333));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.4e-41: tmp = (-1.0 - x) / B else: tmp = -(x / B) - (B * (x * -0.3333333333333333)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.4e-41) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(Float64(-Float64(x / B)) - Float64(B * Float64(x * -0.3333333333333333))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -7.4e-41) tmp = (-1.0 - x) / B; else tmp = -(x / B) - (B * (x * -0.3333333333333333)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.4e-41], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-N[(x / B), $MachinePrecision]) - N[(B * N[(x * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.4 \cdot 10^{-41}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\left(-\frac{x}{B}\right) - B \cdot \left(x \cdot -0.3333333333333333\right)\\
\end{array}
\end{array}
if F < -7.4000000000000004e-41Initial program 59.6%
Taylor expanded in F around -inf 93.7%
Taylor expanded in B around 0 52.2%
associate-*r/52.2%
distribute-lft-in52.2%
metadata-eval52.2%
neg-mul-152.2%
Simplified52.2%
if -7.4000000000000004e-41 < F Initial program 83.0%
Taylor expanded in F around -inf 34.3%
Taylor expanded in x around inf 55.7%
mul-1-neg55.7%
associate-/l*55.7%
distribute-neg-frac55.7%
Simplified55.7%
Taylor expanded in B around 0 31.4%
distribute-lft-out31.4%
distribute-rgt-out--31.4%
metadata-eval31.4%
Simplified31.4%
Final simplification38.3%
(FPCore (F B x) :precision binary64 (if (or (<= x -4.1e-199) (not (<= x 2.4e-42))) (- (/ x B)) (/ -1.0 B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -4.1e-199) || !(x <= 2.4e-42)) {
tmp = -(x / B);
} else {
tmp = -1.0 / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-4.1d-199)) .or. (.not. (x <= 2.4d-42))) then
tmp = -(x / b)
else
tmp = (-1.0d0) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -4.1e-199) || !(x <= 2.4e-42)) {
tmp = -(x / B);
} else {
tmp = -1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -4.1e-199) or not (x <= 2.4e-42): tmp = -(x / B) else: tmp = -1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -4.1e-199) || !(x <= 2.4e-42)) tmp = Float64(-Float64(x / B)); else tmp = Float64(-1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -4.1e-199) || ~((x <= 2.4e-42))) tmp = -(x / B); else tmp = -1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -4.1e-199], N[Not[LessEqual[x, 2.4e-42]], $MachinePrecision]], (-N[(x / B), $MachinePrecision]), N[(-1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.1 \cdot 10^{-199} \lor \neg \left(x \leq 2.4 \cdot 10^{-42}\right):\\
\;\;\;\;-\frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B}\\
\end{array}
\end{array}
if x < -4.10000000000000022e-199 or 2.40000000000000003e-42 < x Initial program 80.6%
Taylor expanded in F around -inf 67.9%
Taylor expanded in B around 0 37.3%
associate-*r/37.3%
distribute-lft-in37.3%
metadata-eval37.3%
neg-mul-137.3%
Simplified37.3%
Taylor expanded in x around inf 42.3%
mul-1-neg42.3%
Simplified42.3%
if -4.10000000000000022e-199 < x < 2.40000000000000003e-42Initial program 66.4%
Taylor expanded in F around -inf 29.8%
Taylor expanded in B around 0 19.7%
associate-*r/19.7%
distribute-lft-in19.7%
metadata-eval19.7%
neg-mul-119.7%
Simplified19.7%
Taylor expanded in x around 0 19.7%
Final simplification33.9%
(FPCore (F B x) :precision binary64 (if (<= F -4.2e-57) (/ (- -1.0 x) B) (- (/ x B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.2e-57) {
tmp = (-1.0 - x) / B;
} else {
tmp = -(x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-4.2d-57)) then
tmp = ((-1.0d0) - x) / b
else
tmp = -(x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4.2e-57) {
tmp = (-1.0 - x) / B;
} else {
tmp = -(x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.2e-57: tmp = (-1.0 - x) / B else: tmp = -(x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.2e-57) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(-Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4.2e-57) tmp = (-1.0 - x) / B; else tmp = -(x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.2e-57], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], (-N[(x / B), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.2 \cdot 10^{-57}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;-\frac{x}{B}\\
\end{array}
\end{array}
if F < -4.1999999999999999e-57Initial program 61.0%
Taylor expanded in F around -inf 91.8%
Taylor expanded in B around 0 51.7%
associate-*r/51.7%
distribute-lft-in51.7%
metadata-eval51.7%
neg-mul-151.7%
Simplified51.7%
if -4.1999999999999999e-57 < F Initial program 82.7%
Taylor expanded in F around -inf 34.2%
Taylor expanded in B around 0 20.0%
associate-*r/20.0%
distribute-lft-in20.0%
metadata-eval20.0%
neg-mul-120.0%
Simplified20.0%
Taylor expanded in x around inf 30.6%
mul-1-neg30.6%
Simplified30.6%
Final simplification37.8%
(FPCore (F B x) :precision binary64 (/ -1.0 B))
double code(double F, double B, double x) {
return -1.0 / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = (-1.0d0) / b
end function
public static double code(double F, double B, double x) {
return -1.0 / B;
}
def code(F, B, x): return -1.0 / B
function code(F, B, x) return Float64(-1.0 / B) end
function tmp = code(F, B, x) tmp = -1.0 / B; end
code[F_, B_, x_] := N[(-1.0 / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{B}
\end{array}
Initial program 75.3%
Taylor expanded in F around -inf 53.8%
Taylor expanded in B around 0 30.8%
associate-*r/30.8%
distribute-lft-in30.8%
metadata-eval30.8%
neg-mul-130.8%
Simplified30.8%
Taylor expanded in x around 0 11.6%
Final simplification11.6%
herbie shell --seed 2024041
(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))))))