
(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 26 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-udef72.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-udef99.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-udef72.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-udef99.7%
Simplified99.7%
expm1-log1p-u85.0%
expm1-udef66.2%
associate-*r/66.2%
sqrt-div66.2%
metadata-eval66.2%
un-div-inv66.2%
Applied egg-rr66.2%
expm1-def85.0%
expm1-log1p99.6%
associate-/l/99.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-udef59.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-udef99.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-udef72.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-udef72.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-udef99.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
(if (<= F -2.9e-9)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -7e-129)
(- (/ F (* (sin B) (sqrt 2.0))) (/ x B))
(if (<= F 8.8e-205)
(/ (- x) (tan B))
(if (<= F 0.058)
(- (/ F (* (sin B) (sqrt (+ 2.0 (* x 2.0))))) (/ x B))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.9e-9) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -7e-129) {
tmp = (F / (sin(B) * sqrt(2.0))) - (x / B);
} else if (F <= 8.8e-205) {
tmp = -x / tan(B);
} else if (F <= 0.058) {
tmp = (F / (sin(B) * sqrt((2.0 + (x * 2.0))))) - (x / B);
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.9d-9)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-7d-129)) then
tmp = (f / (sin(b) * sqrt(2.0d0))) - (x / b)
else if (f <= 8.8d-205) then
tmp = -x / tan(b)
else if (f <= 0.058d0) then
tmp = (f / (sin(b) * sqrt((2.0d0 + (x * 2.0d0))))) - (x / b)
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.9e-9) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -7e-129) {
tmp = (F / (Math.sin(B) * Math.sqrt(2.0))) - (x / B);
} else if (F <= 8.8e-205) {
tmp = -x / Math.tan(B);
} else if (F <= 0.058) {
tmp = (F / (Math.sin(B) * Math.sqrt((2.0 + (x * 2.0))))) - (x / B);
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.9e-9: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -7e-129: tmp = (F / (math.sin(B) * math.sqrt(2.0))) - (x / B) elif F <= 8.8e-205: tmp = -x / math.tan(B) elif F <= 0.058: tmp = (F / (math.sin(B) * math.sqrt((2.0 + (x * 2.0))))) - (x / B) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.9e-9) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -7e-129) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(2.0))) - Float64(x / B)); elseif (F <= 8.8e-205) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 0.058) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.9e-9) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -7e-129) tmp = (F / (sin(B) * sqrt(2.0))) - (x / B); elseif (F <= 8.8e-205) tmp = -x / tan(B); elseif (F <= 0.058) tmp = (F / (sin(B) * sqrt((2.0 + (x * 2.0))))) - (x / B); else tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.9e-9], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7e-129], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.8e-205], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.058], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.9 \cdot 10^{-9}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -7 \cdot 10^{-129}:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{2}} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 8.8 \cdot 10^{-205}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 0.058:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{2 + x \cdot 2}} - \frac{x}{B}\\
\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-udef73.5%
Simplified73.5%
Taylor expanded in F around -inf 99.1%
if -2.89999999999999991e-9 < F < -6.9999999999999995e-129Initial program 99.3%
associate-*l/99.1%
+-commutative99.1%
*-commutative99.1%
fma-udef99.1%
fma-def99.1%
metadata-eval99.1%
metadata-eval99.1%
associate-/l*99.0%
fma-def99.0%
fma-udef99.0%
*-commutative99.0%
fma-def99.0%
fma-def99.0%
Applied egg-rr99.0%
Taylor expanded in F around 0 99.3%
Taylor expanded in B around 0 92.8%
Taylor expanded in x around 0 92.8%
*-commutative92.8%
Simplified92.8%
if -6.9999999999999995e-129 < F < 8.80000000000000036e-205Initial program 99.5%
Taylor expanded in F around -inf 33.5%
Taylor expanded in x around inf 84.9%
mul-1-neg84.9%
*-commutative84.9%
Simplified84.9%
expm1-log1p-u62.5%
expm1-udef23.7%
clear-num23.7%
*-un-lft-identity23.7%
*-commutative23.7%
times-frac23.7%
tan-quot23.7%
Applied egg-rr23.7%
expm1-def62.3%
expm1-log1p84.7%
associate-/r*84.9%
remove-double-div85.1%
Simplified85.1%
if 8.80000000000000036e-205 < F < 0.0580000000000000029Initial program 99.5%
associate-*l/99.4%
+-commutative99.4%
*-commutative99.4%
fma-udef99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-/l*99.6%
fma-def99.6%
fma-udef99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
Applied egg-rr99.6%
Taylor expanded in F around 0 97.4%
Taylor expanded in B around 0 77.9%
if 0.0580000000000000029 < F Initial program 52.2%
Taylor expanded in F around inf 99.8%
Final simplification92.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ (/ F (- (/ -1.0 F) F)) (sin B)) (/ x (tan B)))))
(if (<= F -2.9e-9)
t_0
(if (<= F -7e-129)
(- (/ F (* (sin B) (sqrt 2.0))) (/ x B))
(if (<= F 3e-208)
t_0
(if (<= F 0.038)
(- (/ F (* (sin B) (sqrt (+ 2.0 (* x 2.0))))) (/ x B))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B)))))))))
double code(double F, double B, double x) {
double t_0 = ((F / ((-1.0 / F) - F)) / sin(B)) - (x / tan(B));
double tmp;
if (F <= -2.9e-9) {
tmp = t_0;
} else if (F <= -7e-129) {
tmp = (F / (sin(B) * sqrt(2.0))) - (x / B);
} else if (F <= 3e-208) {
tmp = t_0;
} else if (F <= 0.038) {
tmp = (F / (sin(B) * sqrt((2.0 + (x * 2.0))))) - (x / B);
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((f / (((-1.0d0) / f) - f)) / sin(b)) - (x / tan(b))
if (f <= (-2.9d-9)) then
tmp = t_0
else if (f <= (-7d-129)) then
tmp = (f / (sin(b) * sqrt(2.0d0))) - (x / b)
else if (f <= 3d-208) then
tmp = t_0
else if (f <= 0.038d0) then
tmp = (f / (sin(b) * sqrt((2.0d0 + (x * 2.0d0))))) - (x / b)
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - (x / Math.tan(B));
double tmp;
if (F <= -2.9e-9) {
tmp = t_0;
} else if (F <= -7e-129) {
tmp = (F / (Math.sin(B) * Math.sqrt(2.0))) - (x / B);
} else if (F <= 3e-208) {
tmp = t_0;
} else if (F <= 0.038) {
tmp = (F / (Math.sin(B) * Math.sqrt((2.0 + (x * 2.0))))) - (x / B);
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = ((F / ((-1.0 / F) - F)) / math.sin(B)) - (x / math.tan(B)) tmp = 0 if F <= -2.9e-9: tmp = t_0 elif F <= -7e-129: tmp = (F / (math.sin(B) * math.sqrt(2.0))) - (x / B) elif F <= 3e-208: tmp = t_0 elif F <= 0.038: tmp = (F / (math.sin(B) * math.sqrt((2.0 + (x * 2.0))))) - (x / B) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - Float64(x / tan(B))) tmp = 0.0 if (F <= -2.9e-9) tmp = t_0; elseif (F <= -7e-129) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(2.0))) - Float64(x / B)); elseif (F <= 3e-208) tmp = t_0; elseif (F <= 0.038) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F / ((-1.0 / F) - F)) / sin(B)) - (x / tan(B)); tmp = 0.0; if (F <= -2.9e-9) tmp = t_0; elseif (F <= -7e-129) tmp = (F / (sin(B) * sqrt(2.0))) - (x / B); elseif (F <= 3e-208) tmp = t_0; elseif (F <= 0.038) tmp = (F / (sin(B) * sqrt((2.0 + (x * 2.0))))) - (x / B); 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[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.9e-9], t$95$0, If[LessEqual[F, -7e-129], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3e-208], t$95$0, If[LessEqual[F, 0.038], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.9 \cdot 10^{-9}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -7 \cdot 10^{-129}:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{2}} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3 \cdot 10^{-208}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 0.038:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{2 + x \cdot 2}} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -2.89999999999999991e-9 or -6.9999999999999995e-129 < F < 2.99999999999999986e-208Initial program 73.7%
Simplified84.0%
Taylor expanded in x around 0 84.0%
associate-*l/84.0%
*-lft-identity84.0%
+-commutative84.0%
unpow284.0%
fma-udef84.0%
Simplified84.0%
associate-*r/84.1%
sqrt-div84.0%
metadata-eval84.0%
un-div-inv84.1%
Applied egg-rr84.1%
Taylor expanded in F around -inf 93.7%
neg-mul-193.7%
Simplified93.7%
if -2.89999999999999991e-9 < F < -6.9999999999999995e-129Initial program 99.3%
associate-*l/99.1%
+-commutative99.1%
*-commutative99.1%
fma-udef99.1%
fma-def99.1%
metadata-eval99.1%
metadata-eval99.1%
associate-/l*99.0%
fma-def99.0%
fma-udef99.0%
*-commutative99.0%
fma-def99.0%
fma-def99.0%
Applied egg-rr99.0%
Taylor expanded in F around 0 99.3%
Taylor expanded in B around 0 92.8%
Taylor expanded in x around 0 92.8%
*-commutative92.8%
Simplified92.8%
if 2.99999999999999986e-208 < F < 0.0379999999999999991Initial program 99.5%
associate-*l/99.4%
+-commutative99.4%
*-commutative99.4%
fma-udef99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-/l*99.6%
fma-def99.6%
fma-udef99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
Applied egg-rr99.6%
Taylor expanded in F around 0 97.4%
Taylor expanded in B around 0 77.9%
if 0.0379999999999999991 < F Initial program 52.2%
Taylor expanded in F around inf 99.8%
Final simplification92.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -2.9e-9)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) (/ x (tan B)))
(if (<= F -5.7e-95)
(- (/ F (* (sin B) (sqrt 2.0))) (/ x B))
(if (<= F 1e-19)
(+ t_0 (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))))
(+ t_0 (/ 1.0 (sin B))))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -2.9e-9) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - (x / tan(B));
} else if (F <= -5.7e-95) {
tmp = (F / (sin(B) * sqrt(2.0))) - (x / B);
} else if (F <= 1e-19) {
tmp = t_0 + ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0)))));
} else {
tmp = t_0 + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-2.9d-9)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - (x / tan(b))
else if (f <= (-5.7d-95)) then
tmp = (f / (sin(b) * sqrt(2.0d0))) - (x / b)
else if (f <= 1d-19) then
tmp = t_0 + ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))
else
tmp = t_0 + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -2.9e-9) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -5.7e-95) {
tmp = (F / (Math.sin(B) * Math.sqrt(2.0))) - (x / B);
} else if (F <= 1e-19) {
tmp = t_0 + ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0)))));
} else {
tmp = t_0 + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -2.9e-9: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - (x / math.tan(B)) elif F <= -5.7e-95: tmp = (F / (math.sin(B) * math.sqrt(2.0))) - (x / B) elif F <= 1e-19: tmp = t_0 + ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) else: tmp = t_0 + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -2.9e-9) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - Float64(x / tan(B))); elseif (F <= -5.7e-95) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(2.0))) - Float64(x / B)); elseif (F <= 1e-19) tmp = Float64(t_0 + Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))))); else tmp = Float64(t_0 + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -2.9e-9) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - (x / tan(B)); elseif (F <= -5.7e-95) tmp = (F / (sin(B) * sqrt(2.0))) - (x / B); elseif (F <= 1e-19) tmp = t_0 + ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))); else tmp = t_0 + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.9e-9], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5.7e-95], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1e-19], N[(t$95$0 + N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -2.9 \cdot 10^{-9}:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -5.7 \cdot 10^{-95}:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{2}} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 10^{-19}:\\
\;\;\;\;t\_0 + \frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\\
\mathbf{else}:\\
\;\;\;\;t\_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -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-udef73.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 < -5.7e-95Initial program 99.4%
associate-*l/99.1%
+-commutative99.1%
*-commutative99.1%
fma-udef99.1%
fma-def99.1%
metadata-eval99.1%
metadata-eval99.1%
associate-/l*99.1%
fma-def99.1%
fma-udef99.1%
*-commutative99.1%
fma-def99.1%
fma-def99.1%
Applied egg-rr99.1%
Taylor expanded in F around 0 99.3%
Taylor expanded in B around 0 99.4%
Taylor expanded in x around 0 99.4%
*-commutative99.4%
Simplified99.4%
if -5.7e-95 < F < 9.9999999999999998e-20Initial program 99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 88.4%
if 9.9999999999999998e-20 < F Initial program 55.9%
Taylor expanded in F around inf 95.8%
Final simplification94.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -2.9e-9)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) (/ x (tan B)))
(if (<= F -1.06e-92)
(- (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (/ x B))
(if (<= F 1e-19)
(+ t_0 (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))))
(+ t_0 (/ 1.0 (sin B))))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -2.9e-9) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - (x / tan(B));
} else if (F <= -1.06e-92) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 1e-19) {
tmp = t_0 + ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0)))));
} else {
tmp = t_0 + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-2.9d-9)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - (x / tan(b))
else if (f <= (-1.06d-92)) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
else if (f <= 1d-19) then
tmp = t_0 + ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))
else
tmp = t_0 + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -2.9e-9) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -1.06e-92) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 1e-19) {
tmp = t_0 + ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0)))));
} else {
tmp = t_0 + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -2.9e-9: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - (x / math.tan(B)) elif F <= -1.06e-92: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) elif F <= 1e-19: tmp = t_0 + ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) else: tmp = t_0 + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -2.9e-9) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - Float64(x / tan(B))); elseif (F <= -1.06e-92) 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(t_0 + Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))))); else tmp = Float64(t_0 + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -2.9e-9) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - (x / tan(B)); elseif (F <= -1.06e-92) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); elseif (F <= 1e-19) tmp = t_0 + ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))); else tmp = t_0 + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.9e-9], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.06e-92], 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[(t$95$0 + N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -2.9 \cdot 10^{-9}:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -1.06 \cdot 10^{-92}:\\
\;\;\;\;\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}:\\
\;\;\;\;t\_0 + \frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\\
\mathbf{else}:\\
\;\;\;\;t\_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -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-udef73.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 < -1.06e-92Initial program 99.4%
Taylor expanded in B around 0 99.5%
if -1.06e-92 < F < 9.9999999999999998e-20Initial program 99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 88.4%
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 B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x B))))
(if (<= F -8.6e-10)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -2.2e-90)
t_0
(if (<= F 8.5e-205)
(/ (- x) (tan B))
(if (<= F 1e-19) t_0 (+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B)))))))))
double code(double F, double B, double x) {
double t_0 = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
double tmp;
if (F <= -8.6e-10) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -2.2e-90) {
tmp = t_0;
} else if (F <= 8.5e-205) {
tmp = -x / tan(B);
} else if (F <= 1e-19) {
tmp = 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 = ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / b)
if (f <= (-8.6d-10)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-2.2d-90)) then
tmp = t_0
else if (f <= 8.5d-205) then
tmp = -x / tan(b)
else if (f <= 1d-19) then
tmp = 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 = ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
double tmp;
if (F <= -8.6e-10) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -2.2e-90) {
tmp = t_0;
} else if (F <= 8.5e-205) {
tmp = -x / Math.tan(B);
} else if (F <= 1e-19) {
tmp = t_0;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B) tmp = 0 if F <= -8.6e-10: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -2.2e-90: tmp = t_0 elif F <= 8.5e-205: tmp = -x / math.tan(B) elif F <= 1e-19: tmp = 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(Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)) tmp = 0.0 if (F <= -8.6e-10) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -2.2e-90) tmp = t_0; elseif (F <= 8.5e-205) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 1e-19) tmp = 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 = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B); tmp = 0.0; if (F <= -8.6e-10) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -2.2e-90) tmp = t_0; elseif (F <= 8.5e-205) tmp = -x / tan(B); elseif (F <= 1e-19) tmp = 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[(N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -8.6e-10], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.2e-90], t$95$0, If[LessEqual[F, 8.5e-205], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1e-19], t$95$0, 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{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
\mathbf{if}\;F \leq -8.6 \cdot 10^{-10}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -2.2 \cdot 10^{-90}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{-205}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 10^{-19}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -8.60000000000000029e-10Initial 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-udef73.5%
Simplified73.5%
Taylor expanded in F around -inf 99.1%
if -8.60000000000000029e-10 < F < -2.19999999999999986e-90 or 8.5000000000000005e-205 < F < 9.9999999999999998e-20Initial program 99.4%
associate-*l/99.3%
+-commutative99.3%
*-commutative99.3%
fma-udef99.3%
fma-def99.3%
metadata-eval99.3%
metadata-eval99.3%
associate-/l*99.4%
fma-def99.4%
fma-udef99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
Applied egg-rr99.4%
Taylor expanded in F around 0 99.3%
Taylor expanded in B around 0 85.5%
Taylor expanded in B around 0 65.5%
if -2.19999999999999986e-90 < F < 8.5000000000000005e-205Initial program 99.4%
Taylor expanded in F around -inf 35.3%
Taylor expanded in x around inf 83.1%
mul-1-neg83.1%
*-commutative83.1%
Simplified83.1%
expm1-log1p-u62.6%
expm1-udef26.2%
clear-num26.2%
*-un-lft-identity26.2%
*-commutative26.2%
times-frac26.2%
tan-quot26.2%
Applied egg-rr26.2%
expm1-def62.5%
expm1-log1p82.9%
associate-/r*83.2%
remove-double-div83.3%
Simplified83.3%
if 9.9999999999999998e-20 < F Initial program 55.9%
Taylor expanded in F around inf 95.8%
Final simplification87.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ F (* (sin B) (sqrt 2.0))) (/ x B))))
(if (<= F -2.9e-9)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -7e-129)
t_0
(if (<= F 1.2e-204)
(/ (- x) (tan B))
(if (<= F 0.24) t_0 (+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B)))))))))
double code(double F, double B, double x) {
double t_0 = (F / (sin(B) * sqrt(2.0))) - (x / B);
double tmp;
if (F <= -2.9e-9) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -7e-129) {
tmp = t_0;
} else if (F <= 1.2e-204) {
tmp = -x / tan(B);
} else if (F <= 0.24) {
tmp = 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 = (f / (sin(b) * sqrt(2.0d0))) - (x / b)
if (f <= (-2.9d-9)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-7d-129)) then
tmp = t_0
else if (f <= 1.2d-204) then
tmp = -x / tan(b)
else if (f <= 0.24d0) then
tmp = 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 = (F / (Math.sin(B) * Math.sqrt(2.0))) - (x / B);
double tmp;
if (F <= -2.9e-9) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -7e-129) {
tmp = t_0;
} else if (F <= 1.2e-204) {
tmp = -x / Math.tan(B);
} else if (F <= 0.24) {
tmp = t_0;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = (F / (math.sin(B) * math.sqrt(2.0))) - (x / B) tmp = 0 if F <= -2.9e-9: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -7e-129: tmp = t_0 elif F <= 1.2e-204: tmp = -x / math.tan(B) elif F <= 0.24: tmp = 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(Float64(F / Float64(sin(B) * sqrt(2.0))) - Float64(x / B)) tmp = 0.0 if (F <= -2.9e-9) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -7e-129) tmp = t_0; elseif (F <= 1.2e-204) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 0.24) tmp = 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 = (F / (sin(B) * sqrt(2.0))) - (x / B); tmp = 0.0; if (F <= -2.9e-9) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -7e-129) tmp = t_0; elseif (F <= 1.2e-204) tmp = -x / tan(B); elseif (F <= 0.24) tmp = 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[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.9e-9], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7e-129], t$95$0, If[LessEqual[F, 1.2e-204], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.24], t$95$0, 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{F}{\sin B \cdot \sqrt{2}} - \frac{x}{B}\\
\mathbf{if}\;F \leq -2.9 \cdot 10^{-9}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -7 \cdot 10^{-129}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.2 \cdot 10^{-204}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 0.24:\\
\;\;\;\;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-udef73.5%
Simplified73.5%
Taylor expanded in F around -inf 99.1%
if -2.89999999999999991e-9 < F < -6.9999999999999995e-129 or 1.2e-204 < F < 0.23999999999999999Initial program 99.4%
associate-*l/99.3%
+-commutative99.3%
*-commutative99.3%
fma-udef99.3%
fma-def99.3%
metadata-eval99.3%
metadata-eval99.3%
associate-/l*99.4%
fma-def99.4%
fma-udef99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
Applied egg-rr99.4%
Taylor expanded in F around 0 98.0%
Taylor expanded in B around 0 82.8%
Taylor expanded in x around 0 82.8%
*-commutative82.8%
Simplified82.8%
if -6.9999999999999995e-129 < F < 1.2e-204Initial program 99.5%
Taylor expanded in F around -inf 33.5%
Taylor expanded in x around inf 84.9%
mul-1-neg84.9%
*-commutative84.9%
Simplified84.9%
expm1-log1p-u62.5%
expm1-udef23.7%
clear-num23.7%
*-un-lft-identity23.7%
*-commutative23.7%
times-frac23.7%
tan-quot23.7%
Applied egg-rr23.7%
expm1-def62.3%
expm1-log1p84.7%
associate-/r*84.9%
remove-double-div85.1%
Simplified85.1%
if 0.23999999999999999 < F Initial program 52.2%
Taylor expanded in F around inf 99.8%
Final simplification92.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x B)))
(t_1 (/ x (tan B))))
(if (<= F -2.8e-9)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -1.46e-90)
t_0
(if (<= F 1.2e-204)
(/ (- 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 / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
double t_1 = x / tan(B);
double tmp;
if (F <= -2.8e-9) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -1.46e-90) {
tmp = t_0;
} else if (F <= 1.2e-204) {
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 / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / b)
t_1 = x / tan(b)
if (f <= (-2.8d-9)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-1.46d-90)) then
tmp = t_0
else if (f <= 1.2d-204) 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 / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -2.8e-9) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -1.46e-90) {
tmp = t_0;
} else if (F <= 1.2e-204) {
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 / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B) t_1 = x / math.tan(B) tmp = 0 if F <= -2.8e-9: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -1.46e-90: tmp = t_0 elif F <= 1.2e-204: 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 / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.8e-9) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -1.46e-90) tmp = t_0; elseif (F <= 1.2e-204) 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 / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B); t_1 = x / tan(B); tmp = 0.0; if (F <= -2.8e-9) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -1.46e-90) tmp = t_0; elseif (F <= 1.2e-204) 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 / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.8e-9], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -1.46e-90], t$95$0, If[LessEqual[F, 1.2e-204], 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}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.8 \cdot 10^{-9}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -1.46 \cdot 10^{-90}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.2 \cdot 10^{-204}:\\
\;\;\;\;\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.79999999999999984e-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-udef73.5%
Simplified73.5%
Taylor expanded in F around -inf 99.1%
if -2.79999999999999984e-9 < F < -1.46000000000000004e-90 or 1.2e-204 < F < 9.9999999999999998e-20Initial program 99.4%
associate-*l/99.3%
+-commutative99.3%
*-commutative99.3%
fma-udef99.3%
fma-def99.3%
metadata-eval99.3%
metadata-eval99.3%
associate-/l*99.4%
fma-def99.4%
fma-udef99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
Applied egg-rr99.4%
Taylor expanded in F around 0 99.3%
Taylor expanded in B around 0 85.5%
Taylor expanded in B around 0 65.5%
if -1.46000000000000004e-90 < F < 1.2e-204Initial program 99.4%
Taylor expanded in F around -inf 35.3%
Taylor expanded in x around inf 83.1%
mul-1-neg83.1%
*-commutative83.1%
Simplified83.1%
expm1-log1p-u62.6%
expm1-udef26.2%
clear-num26.2%
*-un-lft-identity26.2%
*-commutative26.2%
times-frac26.2%
tan-quot26.2%
Applied egg-rr26.2%
expm1-def62.5%
expm1-log1p82.9%
associate-/r*83.2%
remove-double-div83.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-udef67.3%
Simplified67.3%
Taylor expanded in F around inf 95.8%
Final simplification87.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x B)))
(t_1 (/ (- x) (tan B))))
(if (<= F -2.9e-9)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -1.86e-90)
t_0
(if (<= F 4e-206)
t_1
(if (<= F 9.6e-20)
t_0
(if (<= F 3.1e-19) t_1 (- (/ F (* F (sin B))) (/ x B)))))))))
double code(double F, double B, double x) {
double t_0 = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
double t_1 = -x / tan(B);
double tmp;
if (F <= -2.9e-9) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -1.86e-90) {
tmp = t_0;
} else if (F <= 4e-206) {
tmp = t_1;
} else if (F <= 9.6e-20) {
tmp = t_0;
} else if (F <= 3.1e-19) {
tmp = t_1;
} else {
tmp = (F / (F * 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 / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / b)
t_1 = -x / tan(b)
if (f <= (-2.9d-9)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-1.86d-90)) then
tmp = t_0
else if (f <= 4d-206) then
tmp = t_1
else if (f <= 9.6d-20) then
tmp = t_0
else if (f <= 3.1d-19) then
tmp = t_1
else
tmp = (f / (f * sin(b))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
double t_1 = -x / Math.tan(B);
double tmp;
if (F <= -2.9e-9) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -1.86e-90) {
tmp = t_0;
} else if (F <= 4e-206) {
tmp = t_1;
} else if (F <= 9.6e-20) {
tmp = t_0;
} else if (F <= 3.1e-19) {
tmp = t_1;
} else {
tmp = (F / (F * Math.sin(B))) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B) t_1 = -x / math.tan(B) tmp = 0 if F <= -2.9e-9: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -1.86e-90: tmp = t_0 elif F <= 4e-206: tmp = t_1 elif F <= 9.6e-20: tmp = t_0 elif F <= 3.1e-19: tmp = t_1 else: tmp = (F / (F * math.sin(B))) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)) t_1 = Float64(Float64(-x) / tan(B)) tmp = 0.0 if (F <= -2.9e-9) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -1.86e-90) tmp = t_0; elseif (F <= 4e-206) tmp = t_1; elseif (F <= 9.6e-20) tmp = t_0; elseif (F <= 3.1e-19) tmp = t_1; else tmp = Float64(Float64(F / Float64(F * sin(B))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B); t_1 = -x / tan(B); tmp = 0.0; if (F <= -2.9e-9) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -1.86e-90) tmp = t_0; elseif (F <= 4e-206) tmp = t_1; elseif (F <= 9.6e-20) tmp = t_0; elseif (F <= 3.1e-19) tmp = t_1; else tmp = (F / (F * sin(B))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, 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] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.86e-90], t$95$0, If[LessEqual[F, 4e-206], t$95$1, If[LessEqual[F, 9.6e-20], t$95$0, If[LessEqual[F, 3.1e-19], t$95$1, N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
t_1 := \frac{-x}{\tan B}\\
\mathbf{if}\;F \leq -2.9 \cdot 10^{-9}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -1.86 \cdot 10^{-90}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 4 \cdot 10^{-206}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 9.6 \cdot 10^{-20}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 3.1 \cdot 10^{-19}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - \frac{x}{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-udef73.5%
Simplified73.5%
Taylor expanded in F around -inf 99.1%
if -2.89999999999999991e-9 < F < -1.86e-90 or 4.00000000000000011e-206 < F < 9.59999999999999971e-20Initial program 99.4%
associate-*l/99.3%
+-commutative99.3%
*-commutative99.3%
fma-udef99.3%
fma-def99.3%
metadata-eval99.3%
metadata-eval99.3%
associate-/l*99.4%
fma-def99.4%
fma-udef99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
Applied egg-rr99.4%
Taylor expanded in F around 0 99.3%
Taylor expanded in B around 0 85.5%
Taylor expanded in B around 0 65.5%
if -1.86e-90 < F < 4.00000000000000011e-206 or 9.59999999999999971e-20 < F < 3.0999999999999999e-19Initial program 99.5%
Taylor expanded in F around -inf 36.4%
Taylor expanded in x around inf 83.4%
mul-1-neg83.4%
*-commutative83.4%
Simplified83.4%
expm1-log1p-u61.5%
expm1-udef25.7%
clear-num25.7%
*-un-lft-identity25.7%
*-commutative25.7%
times-frac25.7%
tan-quot25.7%
Applied egg-rr25.7%
expm1-def61.4%
expm1-log1p83.2%
associate-/r*83.5%
remove-double-div83.6%
Simplified83.6%
if 3.0999999999999999e-19 < F Initial program 55.2%
associate-*l/66.9%
+-commutative66.9%
*-commutative66.9%
fma-udef66.9%
fma-def66.9%
metadata-eval66.9%
metadata-eval66.9%
associate-/l*66.8%
fma-def66.8%
fma-udef66.8%
*-commutative66.8%
fma-def66.8%
fma-def66.8%
Applied egg-rr66.8%
Taylor expanded in F around inf 95.6%
Taylor expanded in B around 0 79.7%
Final simplification83.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- x) (tan B)))
(t_1 (- (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x B))))
(if (<= F -1.7e+140)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -0.76)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.85e-90)
t_1
(if (<= F 4.5e-205)
t_0
(if (<= F 9.5e-20)
t_1
(if (<= F 3.1e-19) t_0 (- (/ F (* F (sin B))) (/ x B))))))))))
double code(double F, double B, double x) {
double t_0 = -x / tan(B);
double t_1 = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
double tmp;
if (F <= -1.7e+140) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -0.76) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.85e-90) {
tmp = t_1;
} else if (F <= 4.5e-205) {
tmp = t_0;
} else if (F <= 9.5e-20) {
tmp = t_1;
} else if (F <= 3.1e-19) {
tmp = t_0;
} else {
tmp = (F / (F * 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 = -x / tan(b)
t_1 = ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / b)
if (f <= (-1.7d+140)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-0.76d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.85d-90)) then
tmp = t_1
else if (f <= 4.5d-205) then
tmp = t_0
else if (f <= 9.5d-20) then
tmp = t_1
else if (f <= 3.1d-19) then
tmp = t_0
else
tmp = (f / (f * 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 t_1 = ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
double tmp;
if (F <= -1.7e+140) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -0.76) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.85e-90) {
tmp = t_1;
} else if (F <= 4.5e-205) {
tmp = t_0;
} else if (F <= 9.5e-20) {
tmp = t_1;
} else if (F <= 3.1e-19) {
tmp = t_0;
} else {
tmp = (F / (F * Math.sin(B))) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = -x / math.tan(B) t_1 = ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B) tmp = 0 if F <= -1.7e+140: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -0.76: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.85e-90: tmp = t_1 elif F <= 4.5e-205: tmp = t_0 elif F <= 9.5e-20: tmp = t_1 elif F <= 3.1e-19: tmp = t_0 else: tmp = (F / (F * math.sin(B))) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-x) / tan(B)) t_1 = Float64(Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)) tmp = 0.0 if (F <= -1.7e+140) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -0.76) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.85e-90) tmp = t_1; elseif (F <= 4.5e-205) tmp = t_0; elseif (F <= 9.5e-20) tmp = t_1; elseif (F <= 3.1e-19) tmp = t_0; else tmp = Float64(Float64(F / Float64(F * sin(B))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = -x / tan(B); t_1 = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B); tmp = 0.0; if (F <= -1.7e+140) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -0.76) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.85e-90) tmp = t_1; elseif (F <= 4.5e-205) tmp = t_0; elseif (F <= 9.5e-20) tmp = t_1; elseif (F <= 3.1e-19) tmp = t_0; else tmp = (F / (F * sin(B))) - (x / 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 / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.7e+140], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -0.76], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.85e-90], t$95$1, If[LessEqual[F, 4.5e-205], t$95$0, If[LessEqual[F, 9.5e-20], t$95$1, If[LessEqual[F, 3.1e-19], t$95$0, N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x}{\tan B}\\
t_1 := \frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
\mathbf{if}\;F \leq -1.7 \cdot 10^{+140}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -0.76:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.85 \cdot 10^{-90}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 4.5 \cdot 10^{-205}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 9.5 \cdot 10^{-20}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 3.1 \cdot 10^{-19}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.7e140Initial program 38.6%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 86.6%
if -1.7e140 < F < -0.76000000000000001Initial program 91.7%
Taylor expanded in F around -inf 97.3%
Taylor expanded in B around 0 93.4%
if -0.76000000000000001 < F < -1.85000000000000009e-90 or 4.49999999999999956e-205 < F < 9.5e-20Initial program 99.4%
associate-*l/99.3%
+-commutative99.3%
*-commutative99.3%
fma-udef99.3%
fma-def99.3%
metadata-eval99.3%
metadata-eval99.3%
associate-/l*99.4%
fma-def99.4%
fma-udef99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
Applied egg-rr99.4%
Taylor expanded in F around 0 99.3%
Taylor expanded in B around 0 82.7%
Taylor expanded in B around 0 63.4%
if -1.85000000000000009e-90 < F < 4.49999999999999956e-205 or 9.5e-20 < F < 3.0999999999999999e-19Initial program 99.5%
Taylor expanded in F around -inf 36.4%
Taylor expanded in x around inf 83.4%
mul-1-neg83.4%
*-commutative83.4%
Simplified83.4%
expm1-log1p-u61.5%
expm1-udef25.7%
clear-num25.7%
*-un-lft-identity25.7%
*-commutative25.7%
times-frac25.7%
tan-quot25.7%
Applied egg-rr25.7%
expm1-def61.4%
expm1-log1p83.2%
associate-/r*83.5%
remove-double-div83.6%
Simplified83.6%
if 3.0999999999999999e-19 < F Initial program 55.2%
associate-*l/66.9%
+-commutative66.9%
*-commutative66.9%
fma-udef66.9%
fma-def66.9%
metadata-eval66.9%
metadata-eval66.9%
associate-/l*66.8%
fma-def66.8%
fma-udef66.8%
*-commutative66.8%
fma-def66.8%
fma-def66.8%
Applied egg-rr66.8%
Taylor expanded in F around inf 95.6%
Taylor expanded in B around 0 79.7%
Final simplification79.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- x) (tan B)))
(t_1 (/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)))
(if (<= F -1.55e+140)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -0.24)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -2.4e-90)
t_1
(if (<= F 7.2e-205)
t_0
(if (<= F 9.5e-20)
t_1
(if (<= F 3e-19) t_0 (- (/ F (* F (sin B))) (/ x B))))))))))
double code(double F, double B, double x) {
double t_0 = -x / tan(B);
double t_1 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double tmp;
if (F <= -1.55e+140) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -0.24) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -2.4e-90) {
tmp = t_1;
} else if (F <= 7.2e-205) {
tmp = t_0;
} else if (F <= 9.5e-20) {
tmp = t_1;
} else if (F <= 3e-19) {
tmp = t_0;
} else {
tmp = (F / (F * 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 = -x / tan(b)
t_1 = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
if (f <= (-1.55d+140)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-0.24d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-2.4d-90)) then
tmp = t_1
else if (f <= 7.2d-205) then
tmp = t_0
else if (f <= 9.5d-20) then
tmp = t_1
else if (f <= 3d-19) then
tmp = t_0
else
tmp = (f / (f * 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 t_1 = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double tmp;
if (F <= -1.55e+140) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -0.24) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -2.4e-90) {
tmp = t_1;
} else if (F <= 7.2e-205) {
tmp = t_0;
} else if (F <= 9.5e-20) {
tmp = t_1;
} else if (F <= 3e-19) {
tmp = t_0;
} else {
tmp = (F / (F * Math.sin(B))) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = -x / math.tan(B) t_1 = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B tmp = 0 if F <= -1.55e+140: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -0.24: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -2.4e-90: tmp = t_1 elif F <= 7.2e-205: tmp = t_0 elif F <= 9.5e-20: tmp = t_1 elif F <= 3e-19: tmp = t_0 else: tmp = (F / (F * math.sin(B))) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-x) / tan(B)) t_1 = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B) tmp = 0.0 if (F <= -1.55e+140) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -0.24) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -2.4e-90) tmp = t_1; elseif (F <= 7.2e-205) tmp = t_0; elseif (F <= 9.5e-20) tmp = t_1; elseif (F <= 3e-19) tmp = t_0; else tmp = Float64(Float64(F / Float64(F * sin(B))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = -x / tan(B); t_1 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; tmp = 0.0; if (F <= -1.55e+140) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -0.24) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -2.4e-90) tmp = t_1; elseif (F <= 7.2e-205) tmp = t_0; elseif (F <= 9.5e-20) tmp = t_1; elseif (F <= 3e-19) tmp = t_0; else tmp = (F / (F * sin(B))) - (x / 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[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[F, -1.55e+140], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -0.24], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.4e-90], t$95$1, If[LessEqual[F, 7.2e-205], t$95$0, If[LessEqual[F, 9.5e-20], t$95$1, If[LessEqual[F, 3e-19], t$95$0, N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x}{\tan B}\\
t_1 := \frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{if}\;F \leq -1.55 \cdot 10^{+140}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -0.24:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -2.4 \cdot 10^{-90}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 7.2 \cdot 10^{-205}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 9.5 \cdot 10^{-20}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 3 \cdot 10^{-19}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.55e140Initial program 38.6%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 86.6%
if -1.55e140 < F < -0.23999999999999999Initial program 91.7%
Taylor expanded in F around -inf 97.3%
Taylor expanded in B around 0 93.4%
if -0.23999999999999999 < F < -2.4000000000000002e-90 or 7.1999999999999997e-205 < F < 9.5e-20Initial program 99.4%
Taylor expanded in F around 0 99.4%
Taylor expanded in B around 0 63.3%
if -2.4000000000000002e-90 < F < 7.1999999999999997e-205 or 9.5e-20 < F < 2.99999999999999993e-19Initial program 99.5%
Taylor expanded in F around -inf 36.4%
Taylor expanded in x around inf 83.4%
mul-1-neg83.4%
*-commutative83.4%
Simplified83.4%
expm1-log1p-u61.5%
expm1-udef25.7%
clear-num25.7%
*-un-lft-identity25.7%
*-commutative25.7%
times-frac25.7%
tan-quot25.7%
Applied egg-rr25.7%
expm1-def61.4%
expm1-log1p83.2%
associate-/r*83.5%
remove-double-div83.6%
Simplified83.6%
if 2.99999999999999993e-19 < F Initial program 55.2%
associate-*l/66.9%
+-commutative66.9%
*-commutative66.9%
fma-udef66.9%
fma-def66.9%
metadata-eval66.9%
metadata-eval66.9%
associate-/l*66.8%
fma-def66.8%
fma-udef66.8%
*-commutative66.8%
fma-def66.8%
fma-def66.8%
Applied egg-rr66.8%
Taylor expanded in F around inf 95.6%
Taylor expanded in B around 0 79.7%
Final simplification79.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- x) (tan B))) (t_1 (+ 2.0 (* x 2.0))))
(if (<= F -1.7e+140)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -1.05)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -7.6e-129)
(- (/ F (* B (sqrt t_1))) (/ x B))
(if (<= F 1.2e-204)
t_0
(if (<= F 8.6e-20)
(/ (- (* F (sqrt (/ 1.0 t_1))) x) B)
(if (<= F 1.75e-19) t_0 (- (/ F (* F (sin B))) (/ x B))))))))))
double code(double F, double B, double x) {
double t_0 = -x / tan(B);
double t_1 = 2.0 + (x * 2.0);
double tmp;
if (F <= -1.7e+140) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -1.05) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -7.6e-129) {
tmp = (F / (B * sqrt(t_1))) - (x / B);
} else if (F <= 1.2e-204) {
tmp = t_0;
} else if (F <= 8.6e-20) {
tmp = ((F * sqrt((1.0 / t_1))) - x) / B;
} else if (F <= 1.75e-19) {
tmp = t_0;
} else {
tmp = (F / (F * 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 = -x / tan(b)
t_1 = 2.0d0 + (x * 2.0d0)
if (f <= (-1.7d+140)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-1.05d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-7.6d-129)) then
tmp = (f / (b * sqrt(t_1))) - (x / b)
else if (f <= 1.2d-204) then
tmp = t_0
else if (f <= 8.6d-20) then
tmp = ((f * sqrt((1.0d0 / t_1))) - x) / b
else if (f <= 1.75d-19) then
tmp = t_0
else
tmp = (f / (f * 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 t_1 = 2.0 + (x * 2.0);
double tmp;
if (F <= -1.7e+140) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -1.05) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -7.6e-129) {
tmp = (F / (B * Math.sqrt(t_1))) - (x / B);
} else if (F <= 1.2e-204) {
tmp = t_0;
} else if (F <= 8.6e-20) {
tmp = ((F * Math.sqrt((1.0 / t_1))) - x) / B;
} else if (F <= 1.75e-19) {
tmp = t_0;
} else {
tmp = (F / (F * Math.sin(B))) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = -x / math.tan(B) t_1 = 2.0 + (x * 2.0) tmp = 0 if F <= -1.7e+140: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -1.05: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -7.6e-129: tmp = (F / (B * math.sqrt(t_1))) - (x / B) elif F <= 1.2e-204: tmp = t_0 elif F <= 8.6e-20: tmp = ((F * math.sqrt((1.0 / t_1))) - x) / B elif F <= 1.75e-19: tmp = t_0 else: tmp = (F / (F * math.sin(B))) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-x) / tan(B)) t_1 = Float64(2.0 + Float64(x * 2.0)) tmp = 0.0 if (F <= -1.7e+140) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -1.05) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -7.6e-129) tmp = Float64(Float64(F / Float64(B * sqrt(t_1))) - Float64(x / B)); elseif (F <= 1.2e-204) tmp = t_0; elseif (F <= 8.6e-20) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / t_1))) - x) / B); elseif (F <= 1.75e-19) tmp = t_0; else tmp = Float64(Float64(F / Float64(F * sin(B))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = -x / tan(B); t_1 = 2.0 + (x * 2.0); tmp = 0.0; if (F <= -1.7e+140) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -1.05) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -7.6e-129) tmp = (F / (B * sqrt(t_1))) - (x / B); elseif (F <= 1.2e-204) tmp = t_0; elseif (F <= 8.6e-20) tmp = ((F * sqrt((1.0 / t_1))) - x) / B; elseif (F <= 1.75e-19) tmp = t_0; else tmp = (F / (F * sin(B))) - (x / 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[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.7e+140], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.05], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7.6e-129], N[(N[(F / N[(B * N[Sqrt[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.2e-204], t$95$0, If[LessEqual[F, 8.6e-20], N[(N[(N[(F * N[Sqrt[N[(1.0 / t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.75e-19], t$95$0, N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x}{\tan B}\\
t_1 := 2 + x \cdot 2\\
\mathbf{if}\;F \leq -1.7 \cdot 10^{+140}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -1.05:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -7.6 \cdot 10^{-129}:\\
\;\;\;\;\frac{F}{B \cdot \sqrt{t\_1}} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.2 \cdot 10^{-204}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 8.6 \cdot 10^{-20}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{t\_1}} - x}{B}\\
\mathbf{elif}\;F \leq 1.75 \cdot 10^{-19}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.7e140Initial program 38.6%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 86.6%
if -1.7e140 < F < -1.05000000000000004Initial program 91.7%
Taylor expanded in F around -inf 97.3%
Taylor expanded in B around 0 93.4%
if -1.05000000000000004 < F < -7.59999999999999969e-129Initial program 99.3%
associate-*l/99.2%
+-commutative99.2%
*-commutative99.2%
fma-udef99.2%
fma-def99.2%
metadata-eval99.2%
metadata-eval99.2%
associate-/l*99.1%
fma-def99.1%
fma-udef99.1%
*-commutative99.1%
fma-def99.1%
fma-def99.1%
Applied egg-rr99.1%
Taylor expanded in F around 0 99.3%
Taylor expanded in B around 0 85.5%
Taylor expanded in B around 0 63.8%
if -7.59999999999999969e-129 < F < 1.2e-204 or 8.60000000000000022e-20 < F < 1.75000000000000008e-19Initial program 99.5%
Taylor expanded in F around -inf 34.7%
Taylor expanded in x around inf 85.1%
mul-1-neg85.1%
*-commutative85.1%
Simplified85.1%
expm1-log1p-u61.3%
expm1-udef23.2%
clear-num23.2%
*-un-lft-identity23.2%
*-commutative23.2%
times-frac23.2%
tan-quot23.2%
Applied egg-rr23.2%
expm1-def61.2%
expm1-log1p85.0%
associate-/r*85.2%
remove-double-div85.4%
Simplified85.4%
if 1.2e-204 < F < 8.60000000000000022e-20Initial program 99.4%
Taylor expanded in F around 0 99.4%
Taylor expanded in B around 0 63.7%
if 1.75000000000000008e-19 < F Initial program 55.2%
associate-*l/66.9%
+-commutative66.9%
*-commutative66.9%
fma-udef66.9%
fma-def66.9%
metadata-eval66.9%
metadata-eval66.9%
associate-/l*66.8%
fma-def66.8%
fma-udef66.8%
*-commutative66.8%
fma-def66.8%
fma-def66.8%
Applied egg-rr66.8%
Taylor expanded in F around inf 95.6%
Taylor expanded in B around 0 79.7%
Final simplification79.6%
(FPCore (F B x)
:precision binary64
(if (<= F -1.7e+140)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -0.52)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 3.1e-19) (/ (- x) (tan B)) (- (/ F (* F (sin B))) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.7e+140) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -0.52) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 3.1e-19) {
tmp = -x / tan(B);
} else {
tmp = (F / (F * sin(B))) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.7d+140)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-0.52d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 3.1d-19) then
tmp = -x / tan(b)
else
tmp = (f / (f * sin(b))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.7e+140) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -0.52) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 3.1e-19) {
tmp = -x / Math.tan(B);
} else {
tmp = (F / (F * Math.sin(B))) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.7e+140: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -0.52: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 3.1e-19: tmp = -x / math.tan(B) else: tmp = (F / (F * math.sin(B))) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.7e+140) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -0.52) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 3.1e-19) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(F / Float64(F * sin(B))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.7e+140) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -0.52) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 3.1e-19) tmp = -x / tan(B); else tmp = (F / (F * sin(B))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.7e+140], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -0.52], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.1e-19], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.7 \cdot 10^{+140}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -0.52:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.1 \cdot 10^{-19}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.7e140Initial program 38.6%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 86.6%
if -1.7e140 < F < -0.52000000000000002Initial program 91.7%
Taylor expanded in F around -inf 97.3%
Taylor expanded in B around 0 93.4%
if -0.52000000000000002 < F < 3.0999999999999999e-19Initial program 99.5%
Taylor expanded in F around -inf 33.7%
Taylor expanded in x around inf 64.2%
mul-1-neg64.2%
*-commutative64.2%
Simplified64.2%
expm1-log1p-u43.4%
expm1-udef24.2%
clear-num24.2%
*-un-lft-identity24.2%
*-commutative24.2%
times-frac24.2%
tan-quot24.2%
Applied egg-rr24.2%
expm1-def43.4%
expm1-log1p64.0%
associate-/r*64.2%
remove-double-div64.3%
Simplified64.3%
if 3.0999999999999999e-19 < F Initial program 55.2%
associate-*l/66.9%
+-commutative66.9%
*-commutative66.9%
fma-udef66.9%
fma-def66.9%
metadata-eval66.9%
metadata-eval66.9%
associate-/l*66.8%
fma-def66.8%
fma-udef66.8%
*-commutative66.8%
fma-def66.8%
fma-def66.8%
Applied egg-rr66.8%
Taylor expanded in F around inf 95.6%
Taylor expanded in B around 0 79.7%
Final simplification75.4%
(FPCore (F B x) :precision binary64 (if (<= F -1.7e+140) (+ (* x (/ -1.0 (tan B))) (/ -1.0 B)) (if (<= F -6.0) (- (/ -1.0 (sin B)) (/ x B)) (/ (- x) (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.7e+140) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -6.0) {
tmp = (-1.0 / sin(B)) - (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 (f <= (-1.7d+140)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-6.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (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 (F <= -1.7e+140) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -6.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else {
tmp = -x / Math.tan(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.7e+140: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -6.0: tmp = (-1.0 / math.sin(B)) - (x / B) else: tmp = -x / math.tan(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.7e+140) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -6.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(-x) / tan(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.7e+140) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -6.0) tmp = (-1.0 / sin(B)) - (x / B); else tmp = -x / tan(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.7e+140], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -6.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.7 \cdot 10^{+140}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -6:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\end{array}
\end{array}
if F < -1.7e140Initial program 38.6%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 86.6%
if -1.7e140 < F < -6Initial program 91.7%
Taylor expanded in F around -inf 97.3%
Taylor expanded in B around 0 93.4%
if -6 < F Initial program 83.7%
Taylor expanded in F around -inf 34.7%
Taylor expanded in x around inf 54.9%
mul-1-neg54.9%
*-commutative54.9%
Simplified54.9%
expm1-log1p-u36.1%
expm1-udef23.6%
clear-num23.6%
*-un-lft-identity23.6%
*-commutative23.6%
times-frac23.6%
tan-quot23.6%
Applied egg-rr23.6%
expm1-def36.0%
expm1-log1p54.8%
associate-/r*54.9%
remove-double-div55.0%
Simplified55.0%
Final simplification65.0%
(FPCore (F B x) :precision binary64 (if (<= F -2.85e-59) (/ (- -1.0 x) B) (if (<= F 540000000000.0) (/ (- x) (sin B)) (fabs (/ -1.0 B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.85e-59) {
tmp = (-1.0 - x) / B;
} else if (F <= 540000000000.0) {
tmp = -x / sin(B);
} else {
tmp = fabs((-1.0 / B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.85d-59)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 540000000000.0d0) then
tmp = -x / sin(b)
else
tmp = abs(((-1.0d0) / b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.85e-59) {
tmp = (-1.0 - x) / B;
} else if (F <= 540000000000.0) {
tmp = -x / Math.sin(B);
} else {
tmp = Math.abs((-1.0 / B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.85e-59: tmp = (-1.0 - x) / B elif F <= 540000000000.0: tmp = -x / math.sin(B) else: tmp = math.fabs((-1.0 / B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.85e-59) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 540000000000.0) tmp = Float64(Float64(-x) / sin(B)); else tmp = abs(Float64(-1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.85e-59) tmp = (-1.0 - x) / B; elseif (F <= 540000000000.0) tmp = -x / sin(B); else tmp = abs((-1.0 / B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.85e-59], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 540000000000.0], N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[Abs[N[(-1.0 / B), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.85 \cdot 10^{-59}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 540000000000:\\
\;\;\;\;\frac{-x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{-1}{B}\right|\\
\end{array}
\end{array}
if F < -2.85e-59Initial 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 -2.85e-59 < F < 5.4e11Initial program 99.4%
Taylor expanded in F around -inf 33.2%
Taylor expanded in x around inf 65.9%
mul-1-neg65.9%
*-commutative65.9%
Simplified65.9%
Taylor expanded in B around 0 37.9%
if 5.4e11 < F Initial program 51.4%
Taylor expanded in F around -inf 36.0%
Taylor expanded in B around 0 19.9%
associate-*r/19.9%
distribute-lft-in19.9%
metadata-eval19.9%
neg-mul-119.9%
Simplified19.9%
add-sqr-sqrt6.2%
sqrt-unprod6.2%
pow26.2%
add-sqr-sqrt1.5%
sqrt-unprod6.1%
sqr-neg6.1%
sqrt-unprod4.7%
add-sqr-sqrt6.2%
Applied egg-rr6.2%
unpow26.2%
rem-sqrt-square22.4%
Simplified22.4%
Taylor expanded in x around 0 17.2%
Final simplification37.8%
(FPCore (F B x)
:precision binary64
(if (<= F -8e-40)
(/ (- -1.0 x) B)
(if (<= F 470000000000.0)
(- (* B (- (* x -0.16666666666666666) (* x -0.5))) (/ x B))
(fabs (/ -1.0 B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8e-40) {
tmp = (-1.0 - x) / B;
} else if (F <= 470000000000.0) {
tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (x / B);
} else {
tmp = fabs((-1.0 / B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-8d-40)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 470000000000.0d0) then
tmp = (b * ((x * (-0.16666666666666666d0)) - (x * (-0.5d0)))) - (x / b)
else
tmp = abs(((-1.0d0) / b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -8e-40) {
tmp = (-1.0 - x) / B;
} else if (F <= 470000000000.0) {
tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (x / B);
} else {
tmp = Math.abs((-1.0 / B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -8e-40: tmp = (-1.0 - x) / B elif F <= 470000000000.0: tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (x / B) else: tmp = math.fabs((-1.0 / B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -8e-40) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 470000000000.0) tmp = Float64(Float64(B * Float64(Float64(x * -0.16666666666666666) - Float64(x * -0.5))) - Float64(x / B)); else tmp = abs(Float64(-1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -8e-40) tmp = (-1.0 - x) / B; elseif (F <= 470000000000.0) tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (x / B); else tmp = abs((-1.0 / B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -8e-40], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 470000000000.0], N[(N[(B * N[(N[(x * -0.16666666666666666), $MachinePrecision] - N[(x * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[Abs[N[(-1.0 / B), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -8 \cdot 10^{-40}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 470000000000:\\
\;\;\;\;B \cdot \left(x \cdot -0.16666666666666666 - x \cdot -0.5\right) - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{-1}{B}\right|\\
\end{array}
\end{array}
if F < -7.9999999999999994e-40Initial 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.9999999999999994e-40 < F < 4.7e11Initial program 99.4%
Taylor expanded in F around -inf 33.4%
Taylor expanded in x around inf 65.0%
mul-1-neg65.0%
*-commutative65.0%
Simplified65.0%
Taylor expanded in B around 0 36.3%
if 4.7e11 < F Initial program 51.4%
Taylor expanded in F around -inf 36.0%
Taylor expanded in B around 0 19.9%
associate-*r/19.9%
distribute-lft-in19.9%
metadata-eval19.9%
neg-mul-119.9%
Simplified19.9%
add-sqr-sqrt6.2%
sqrt-unprod6.2%
pow26.2%
add-sqr-sqrt1.5%
sqrt-unprod6.1%
sqr-neg6.1%
sqrt-unprod4.7%
add-sqr-sqrt6.2%
Applied egg-rr6.2%
unpow26.2%
rem-sqrt-square22.4%
Simplified22.4%
Taylor expanded in x around 0 17.2%
Final simplification37.1%
(FPCore (F B x) :precision binary64 (if (<= F -1.55) (- (/ -1.0 (sin B)) (/ x B)) (/ (- x) (tan B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.55) {
tmp = (-1.0 / sin(B)) - (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 (f <= (-1.55d0)) then
tmp = ((-1.0d0) / sin(b)) - (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 (F <= -1.55) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else {
tmp = -x / Math.tan(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.55: tmp = (-1.0 / math.sin(B)) - (x / B) else: tmp = -x / math.tan(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.55) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(-x) / tan(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.55) tmp = (-1.0 / sin(B)) - (x / B); else tmp = -x / tan(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.55], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.55:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\end{array}
\end{array}
if F < -1.55000000000000004Initial program 55.4%
Taylor expanded in F around -inf 99.0%
Taylor expanded in B around 0 75.9%
if -1.55000000000000004 < F Initial program 83.7%
Taylor expanded in F around -inf 34.7%
Taylor expanded in x around inf 54.9%
mul-1-neg54.9%
*-commutative54.9%
Simplified54.9%
expm1-log1p-u36.1%
expm1-udef23.6%
clear-num23.6%
*-un-lft-identity23.6%
*-commutative23.6%
times-frac23.6%
tan-quot23.6%
Applied egg-rr23.6%
expm1-def36.0%
expm1-log1p54.8%
associate-/r*54.9%
remove-double-div55.0%
Simplified55.0%
Final simplification61.2%
(FPCore (F B x) :precision binary64 (if (<= B 2.2e-123) (/ (- -1.0 x) B) (/ (- x) (tan B))))
double code(double F, double B, double x) {
double tmp;
if (B <= 2.2e-123) {
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 <= 2.2d-123) 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 <= 2.2e-123) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / Math.tan(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if B <= 2.2e-123: tmp = (-1.0 - x) / B else: tmp = -x / math.tan(B) return tmp
function code(F, B, x) tmp = 0.0 if (B <= 2.2e-123) 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 <= 2.2e-123) tmp = (-1.0 - x) / B; else tmp = -x / tan(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[B, 2.2e-123], 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 2.2 \cdot 10^{-123}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\end{array}
\end{array}
if B < 2.20000000000000006e-123Initial 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 2.20000000000000006e-123 < 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%
*-commutative56.6%
Simplified56.6%
expm1-log1p-u40.3%
expm1-udef29.0%
clear-num29.0%
*-un-lft-identity29.0%
*-commutative29.0%
times-frac29.0%
tan-quot29.0%
Applied egg-rr29.0%
expm1-def40.2%
expm1-log1p56.5%
associate-/r*56.6%
remove-double-div56.7%
Simplified56.7%
Final simplification45.2%
(FPCore (F B x) :precision binary64 (if (<= F -4e-36) (/ (- -1.0 x) B) (- (* B (- (* x -0.16666666666666666) (* x -0.5))) (/ x B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4e-36) {
tmp = (-1.0 - x) / B;
} else {
tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-4d-36)) then
tmp = ((-1.0d0) - x) / b
else
tmp = (b * ((x * (-0.16666666666666666d0)) - (x * (-0.5d0)))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4e-36) {
tmp = (-1.0 - x) / B;
} else {
tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4e-36: tmp = (-1.0 - x) / B else: tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4e-36) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(Float64(B * Float64(Float64(x * -0.16666666666666666) - Float64(x * -0.5))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4e-36) tmp = (-1.0 - x) / B; else tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4e-36], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(B * N[(N[(x * -0.16666666666666666), $MachinePrecision] - N[(x * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4 \cdot 10^{-36}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;B \cdot \left(x \cdot -0.16666666666666666 - x \cdot -0.5\right) - \frac{x}{B}\\
\end{array}
\end{array}
if F < -3.9999999999999998e-36Initial 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 -3.9999999999999998e-36 < 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%
*-commutative55.7%
Simplified55.7%
Taylor expanded in B around 0 31.4%
Final simplification38.3%
(FPCore (F B x) :precision binary64 (if (or (<= x -3.6e-199) (not (<= x 7.6e-44))) (- (/ x B)) (/ -1.0 B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -3.6e-199) || !(x <= 7.6e-44)) {
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 <= (-3.6d-199)) .or. (.not. (x <= 7.6d-44))) 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 <= -3.6e-199) || !(x <= 7.6e-44)) {
tmp = -(x / B);
} else {
tmp = -1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -3.6e-199) or not (x <= 7.6e-44): tmp = -(x / B) else: tmp = -1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -3.6e-199) || !(x <= 7.6e-44)) 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 <= -3.6e-199) || ~((x <= 7.6e-44))) tmp = -(x / B); else tmp = -1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -3.6e-199], N[Not[LessEqual[x, 7.6e-44]], $MachinePrecision]], (-N[(x / B), $MachinePrecision]), N[(-1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.6 \cdot 10^{-199} \lor \neg \left(x \leq 7.6 \cdot 10^{-44}\right):\\
\;\;\;\;-\frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B}\\
\end{array}
\end{array}
if x < -3.6000000000000002e-199 or 7.6000000000000002e-44 < 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%
distribute-neg-frac42.3%
Simplified42.3%
if -3.6000000000000002e-199 < x < 7.6000000000000002e-44Initial 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 -1.06e-57) (/ (- -1.0 x) B) (- (/ x B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.06e-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 <= (-1.06d-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 <= -1.06e-57) {
tmp = (-1.0 - x) / B;
} else {
tmp = -(x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.06e-57: tmp = (-1.0 - x) / B else: tmp = -(x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.06e-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 <= -1.06e-57) tmp = (-1.0 - x) / B; else tmp = -(x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.06e-57], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], (-N[(x / B), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.06 \cdot 10^{-57}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;-\frac{x}{B}\\
\end{array}
\end{array}
if F < -1.0600000000000001e-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 -1.0600000000000001e-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%
distribute-neg-frac30.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))))))