
(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 22 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 -4.2e+17)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 13500000000.0)
(- (* F (/ (sqrt (/ 1.0 (fma F F 2.0))) (sin B))) t_0)
(- (/ 1.0 (sin B)) (* (cos B) (/ x (sin B))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -4.2e+17) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 13500000000.0) {
tmp = (F * (sqrt((1.0 / fma(F, F, 2.0))) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - (cos(B) * (x / sin(B)));
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -4.2e+17) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 13500000000.0) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(cos(B) * Float64(x / sin(B)))); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4.2e+17], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 13500000000.0], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[Cos[B], $MachinePrecision] * N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -4.2 \cdot 10^{+17}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 13500000000:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \cos B \cdot \frac{x}{\sin B}\\
\end{array}
\end{array}
if F < -4.2e17Initial program 56.8%
+-commutative56.8%
unsub-neg56.8%
associate-*l/79.6%
associate-*r/79.5%
*-commutative79.5%
Simplified79.6%
Taylor expanded in x around 0 79.7%
associate-*l/79.6%
*-lft-identity79.6%
unpow279.6%
fma-udef79.6%
Simplified79.6%
Taylor expanded in F around -inf 99.9%
if -4.2e17 < F < 1.35e10Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.4%
associate-*r/99.5%
*-commutative99.5%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.7%
*-lft-identity99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
if 1.35e10 < F Initial program 58.8%
Taylor expanded in x around 0 58.9%
associate-*r/58.9%
Simplified58.9%
Taylor expanded in F around inf 99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -4e+156)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 2e+109)
(- (/ (/ F (sqrt (fma F F 2.0))) (sin B)) t_0)
(- (/ 1.0 (sin B)) (* (cos B) (/ x (sin B))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -4e+156) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 2e+109) {
tmp = ((F / sqrt(fma(F, F, 2.0))) / sin(B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - (cos(B) * (x / sin(B)));
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -4e+156) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 2e+109) tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, 2.0))) / sin(B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(cos(B) * Float64(x / sin(B)))); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4e+156], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2e+109], 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[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[Cos[B], $MachinePrecision] * N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -4 \cdot 10^{+156}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 2 \cdot 10^{+109}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \cos B \cdot \frac{x}{\sin B}\\
\end{array}
\end{array}
if F < -3.9999999999999999e156Initial program 34.3%
+-commutative34.3%
unsub-neg34.3%
associate-*l/65.0%
associate-*r/65.0%
*-commutative65.0%
Simplified65.1%
Taylor expanded in x around 0 65.1%
associate-*l/65.1%
*-lft-identity65.1%
unpow265.1%
fma-udef65.1%
Simplified65.1%
Taylor expanded in F around -inf 99.8%
if -3.9999999999999999e156 < F < 1.99999999999999996e109Initial program 96.7%
+-commutative96.7%
unsub-neg96.7%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
associate-*r/99.6%
sqrt-div99.6%
metadata-eval99.6%
un-div-inv99.7%
Applied egg-rr99.7%
if 1.99999999999999996e109 < F Initial program 45.3%
Taylor expanded in x around 0 45.4%
associate-*r/45.4%
Simplified45.4%
Taylor expanded in F around inf 99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(if (<= F -130000000.0)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 3.4e+14)
(+
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(* x (/ -1.0 (tan B))))
(- (/ 1.0 (sin B)) (* (cos B) (/ x (sin B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -130000000.0) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 3.4e+14) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / tan(B)));
} else {
tmp = (1.0 / sin(B)) - (cos(B) * (x / 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 <= (-130000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 3.4d+14) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) + (x * ((-1.0d0) / tan(b)))
else
tmp = (1.0d0 / sin(b)) - (cos(b) * (x / sin(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -130000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 3.4e+14) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / Math.tan(B)));
} else {
tmp = (1.0 / Math.sin(B)) - (Math.cos(B) * (x / Math.sin(B)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -130000000.0: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 3.4e+14: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / math.tan(B))) else: tmp = (1.0 / math.sin(B)) - (math.cos(B) * (x / math.sin(B))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -130000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 3.4e+14) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) + Float64(x * Float64(-1.0 / tan(B)))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(cos(B) * Float64(x / sin(B)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -130000000.0) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 3.4e+14) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) + (x * (-1.0 / tan(B))); else tmp = (1.0 / sin(B)) - (cos(B) * (x / sin(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -130000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.4e+14], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[Cos[B], $MachinePrecision] * N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -130000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 3.4 \cdot 10^{+14}:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} + x \cdot \frac{-1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \cos B \cdot \frac{x}{\sin B}\\
\end{array}
\end{array}
if F < -1.3e8Initial program 60.2%
+-commutative60.2%
unsub-neg60.2%
associate-*l/81.2%
associate-*r/81.1%
*-commutative81.1%
Simplified81.2%
Taylor expanded in x around 0 81.2%
associate-*l/81.2%
*-lft-identity81.2%
unpow281.2%
fma-udef81.2%
Simplified81.2%
Taylor expanded in F around -inf 99.9%
if -1.3e8 < F < 3.4e14Initial program 99.4%
if 3.4e14 < F Initial program 57.7%
Taylor expanded in x around 0 57.8%
associate-*r/57.7%
Simplified57.7%
Taylor expanded in F around inf 99.7%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(if (<= F -122000000.0)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 2.15e+14)
(+
(/ -1.0 (/ (tan B) x))
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(- (/ 1.0 (sin B)) (* (cos B) (/ x (sin B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -122000000.0) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 2.15e+14) {
tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / sin(B)) - (cos(B) * (x / 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 <= (-122000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 2.15d+14) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = (1.0d0 / sin(b)) - (cos(b) * (x / sin(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -122000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 2.15e+14) {
tmp = (-1.0 / (Math.tan(B) / x)) + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / Math.sin(B)) - (Math.cos(B) * (x / Math.sin(B)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -122000000.0: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 2.15e+14: tmp = (-1.0 / (math.tan(B) / x)) + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = (1.0 / math.sin(B)) - (math.cos(B) * (x / math.sin(B))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -122000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 2.15e+14) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(cos(B) * Float64(x / sin(B)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -122000000.0) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 2.15e+14) tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = (1.0 / sin(B)) - (cos(B) * (x / sin(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -122000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.15e+14], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[Cos[B], $MachinePrecision] * N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -122000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 2.15 \cdot 10^{+14}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \cos B \cdot \frac{x}{\sin B}\\
\end{array}
\end{array}
if F < -1.22e8Initial program 60.2%
+-commutative60.2%
unsub-neg60.2%
associate-*l/81.2%
associate-*r/81.1%
*-commutative81.1%
Simplified81.2%
Taylor expanded in x around 0 81.2%
associate-*l/81.2%
*-lft-identity81.2%
unpow281.2%
fma-udef81.2%
Simplified81.2%
Taylor expanded in F around -inf 99.9%
if -1.22e8 < F < 2.15e14Initial program 99.4%
div-inv99.6%
clear-num99.4%
Applied egg-rr99.4%
if 2.15e14 < F Initial program 57.7%
Taylor expanded in x around 0 57.8%
associate-*r/57.7%
Simplified57.7%
Taylor expanded in F around inf 99.7%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.9)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(if (<= F 0.054)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.9) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else if (F <= 0.054) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.9d0)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_0
else if (f <= 0.054d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.9) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_0;
} else if (F <= 0.054) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.9: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_0 elif F <= 0.054: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.9) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); elseif (F <= 0.054) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.9) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0; elseif (F <= 0.054) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; else tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.9], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.054], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.9:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.054:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.900000000000000022Initial program 62.0%
+-commutative62.0%
unsub-neg62.0%
associate-*l/82.0%
associate-*r/81.9%
*-commutative81.9%
Simplified82.0%
Taylor expanded in x around 0 82.1%
associate-*l/82.1%
*-lft-identity82.1%
unpow282.1%
fma-udef82.1%
Simplified82.1%
associate-*r/82.1%
sqrt-div82.1%
metadata-eval82.1%
un-div-inv82.2%
Applied egg-rr82.2%
Taylor expanded in F around -inf 98.9%
neg-mul-198.9%
Simplified98.9%
if -0.900000000000000022 < F < 0.0539999999999999994Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.4%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.7%
*-lft-identity99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
Taylor expanded in F around 0 98.8%
*-rgt-identity98.8%
times-frac98.8%
rem-square-sqrt43.1%
associate-*r/43.1%
/-rgt-identity43.1%
rem-square-sqrt98.8%
Simplified98.8%
if 0.0539999999999999994 < F Initial program 61.9%
+-commutative61.9%
unsub-neg61.9%
associate-*l/78.6%
associate-*r/78.5%
*-commutative78.5%
Simplified78.5%
Taylor expanded in x around 0 78.5%
associate-*l/78.5%
*-lft-identity78.5%
unpow278.5%
fma-udef78.5%
Simplified78.5%
associate-*r/78.6%
sqrt-div78.6%
metadata-eval78.6%
un-div-inv78.7%
Applied egg-rr78.7%
Taylor expanded in F around inf 98.2%
Final simplification98.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -12500000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -2.6e-28)
(- (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (/ x B))
(if (<= F 0.054)
(- (* F (/ (sqrt 0.5) B)) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -12500000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -2.6e-28) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 0.054) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-12500000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-2.6d-28)) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
else if (f <= 0.054d0) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -12500000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -2.6e-28) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 0.054) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -12500000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -2.6e-28: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) elif F <= 0.054: tmp = (F * (math.sqrt(0.5) / B)) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -12500000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -2.6e-28) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)); elseif (F <= 0.054) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -12500000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -2.6e-28) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); elseif (F <= 0.054) tmp = (F * (sqrt(0.5) / B)) - t_0; else tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -12500000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -2.6e-28], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.054], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -12500000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -2.6 \cdot 10^{-28}:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.054:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.25e7Initial program 60.2%
+-commutative60.2%
unsub-neg60.2%
associate-*l/81.2%
associate-*r/81.1%
*-commutative81.1%
Simplified81.2%
Taylor expanded in x around 0 81.2%
associate-*l/81.2%
*-lft-identity81.2%
unpow281.2%
fma-udef81.2%
Simplified81.2%
Taylor expanded in F around -inf 99.9%
if -1.25e7 < F < -2.6e-28Initial program 99.5%
Taylor expanded in B around 0 99.5%
if -2.6e-28 < F < 0.0539999999999999994Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.4%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.7%
*-lft-identity99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
Taylor expanded in B around 0 87.9%
associate-*r/87.9%
*-rgt-identity87.9%
unpow287.9%
fma-udef87.9%
unpow-187.9%
metadata-eval87.9%
pow-sqr87.9%
rem-sqrt-square87.9%
rem-square-sqrt87.7%
fabs-sqr87.7%
rem-square-sqrt87.9%
Simplified87.9%
Taylor expanded in F around 0 87.9%
if 0.0539999999999999994 < F Initial program 61.9%
+-commutative61.9%
unsub-neg61.9%
associate-*l/78.6%
associate-*r/78.5%
*-commutative78.5%
Simplified78.5%
Taylor expanded in x around 0 78.5%
associate-*l/78.5%
*-lft-identity78.5%
unpow278.5%
fma-udef78.5%
Simplified78.5%
associate-*r/78.6%
sqrt-div78.6%
metadata-eval78.6%
un-div-inv78.7%
Applied egg-rr78.7%
Taylor expanded in F around inf 98.2%
Final simplification94.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.0)
(- (/ (+ -1.0 (/ 1.0 (* F F))) (sin B)) t_0)
(if (<= F 0.054)
(- (* F (/ (sqrt 0.5) B)) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.0) {
tmp = ((-1.0 + (1.0 / (F * F))) / sin(B)) - t_0;
} else if (F <= 0.054) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.0d0)) then
tmp = (((-1.0d0) + (1.0d0 / (f * f))) / sin(b)) - t_0
else if (f <= 0.054d0) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.0) {
tmp = ((-1.0 + (1.0 / (F * F))) / Math.sin(B)) - t_0;
} else if (F <= 0.054) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.0: tmp = ((-1.0 + (1.0 / (F * F))) / math.sin(B)) - t_0 elif F <= 0.054: tmp = (F * (math.sqrt(0.5) / B)) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.0) tmp = Float64(Float64(Float64(-1.0 + Float64(1.0 / Float64(F * F))) / sin(B)) - t_0); elseif (F <= 0.054) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.0) tmp = ((-1.0 + (1.0 / (F * F))) / sin(B)) - t_0; elseif (F <= 0.054) tmp = (F * (sqrt(0.5) / B)) - t_0; else tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.0], N[(N[(N[(-1.0 + N[(1.0 / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.054], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1:\\
\;\;\;\;\frac{-1 + \frac{1}{F \cdot F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.054:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1Initial program 62.0%
+-commutative62.0%
unsub-neg62.0%
associate-*l/82.0%
associate-*r/81.9%
*-commutative81.9%
Simplified82.0%
Taylor expanded in x around 0 82.1%
associate-*l/82.1%
*-lft-identity82.1%
unpow282.1%
fma-udef82.1%
Simplified82.1%
associate-*r/82.1%
sqrt-div82.1%
metadata-eval82.1%
un-div-inv82.2%
Applied egg-rr82.2%
Taylor expanded in F around -inf 98.9%
sub-neg98.9%
unpow298.9%
metadata-eval98.9%
Simplified98.9%
if -1 < F < 0.0539999999999999994Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.4%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.7%
*-lft-identity99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
Taylor expanded in B around 0 83.4%
associate-*r/83.4%
*-rgt-identity83.4%
unpow283.4%
fma-udef83.4%
unpow-183.4%
metadata-eval83.4%
pow-sqr83.4%
rem-sqrt-square83.4%
rem-square-sqrt83.2%
fabs-sqr83.2%
rem-square-sqrt83.4%
Simplified83.4%
Taylor expanded in F around 0 82.8%
if 0.0539999999999999994 < F Initial program 61.9%
+-commutative61.9%
unsub-neg61.9%
associate-*l/78.6%
associate-*r/78.5%
*-commutative78.5%
Simplified78.5%
Taylor expanded in x around 0 78.5%
associate-*l/78.5%
*-lft-identity78.5%
unpow278.5%
fma-udef78.5%
Simplified78.5%
associate-*r/78.6%
sqrt-div78.6%
metadata-eval78.6%
un-div-inv78.7%
Applied egg-rr78.7%
Taylor expanded in F around inf 98.2%
Final simplification91.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.6e-31)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(if (<= F 0.052)
(- (* F (/ (sqrt 0.5) B)) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.6e-31) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else if (F <= 0.052) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.6d-31)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_0
else if (f <= 0.052d0) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.6e-31) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_0;
} else if (F <= 0.052) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.6e-31: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_0 elif F <= 0.052: tmp = (F * (math.sqrt(0.5) / B)) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.6e-31) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); elseif (F <= 0.052) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.6e-31) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0; elseif (F <= 0.052) tmp = (F * (sqrt(0.5) / B)) - t_0; else tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.6e-31], 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, 0.052], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.6 \cdot 10^{-31}:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.052:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.60000000000000009e-31Initial program 66.6%
+-commutative66.6%
unsub-neg66.6%
associate-*l/84.1%
associate-*r/84.1%
*-commutative84.1%
Simplified84.2%
Taylor expanded in x around 0 84.2%
associate-*l/84.2%
*-lft-identity84.2%
unpow284.2%
fma-udef84.2%
Simplified84.2%
associate-*r/84.2%
sqrt-div84.2%
metadata-eval84.2%
un-div-inv84.3%
Applied egg-rr84.3%
Taylor expanded in F around -inf 89.4%
neg-mul-189.4%
Simplified89.4%
if -1.60000000000000009e-31 < F < 0.0519999999999999976Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.4%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
Taylor expanded in B around 0 88.5%
associate-*r/88.6%
*-rgt-identity88.6%
unpow288.6%
fma-udef88.6%
unpow-188.6%
metadata-eval88.6%
pow-sqr88.6%
rem-sqrt-square88.6%
rem-square-sqrt88.3%
fabs-sqr88.3%
rem-square-sqrt88.6%
Simplified88.6%
Taylor expanded in F around 0 88.6%
if 0.0519999999999999976 < F Initial program 61.9%
+-commutative61.9%
unsub-neg61.9%
associate-*l/78.6%
associate-*r/78.5%
*-commutative78.5%
Simplified78.5%
Taylor expanded in x around 0 78.5%
associate-*l/78.5%
*-lft-identity78.5%
unpow278.5%
fma-udef78.5%
Simplified78.5%
associate-*r/78.6%
sqrt-div78.6%
metadata-eval78.6%
un-div-inv78.7%
Applied egg-rr78.7%
Taylor expanded in F around inf 98.2%
Final simplification91.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.2)
(- (/ (+ -1.0 (/ 1.0 (* F F))) (sin B)) t_0)
(if (<= F 0.054)
(- (* F (/ (sqrt 0.5) B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.2) {
tmp = ((-1.0 + (1.0 / (F * F))) / sin(B)) - t_0;
} else if (F <= 0.054) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.2d0)) then
tmp = (((-1.0d0) + (1.0d0 / (f * f))) / sin(b)) - t_0
else if (f <= 0.054d0) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.2) {
tmp = ((-1.0 + (1.0 / (F * F))) / Math.sin(B)) - t_0;
} else if (F <= 0.054) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.2: tmp = ((-1.0 + (1.0 / (F * F))) / math.sin(B)) - t_0 elif F <= 0.054: tmp = (F * (math.sqrt(0.5) / B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.2) tmp = Float64(Float64(Float64(-1.0 + Float64(1.0 / Float64(F * F))) / sin(B)) - t_0); elseif (F <= 0.054) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.2) tmp = ((-1.0 + (1.0 / (F * F))) / sin(B)) - t_0; elseif (F <= 0.054) tmp = (F * (sqrt(0.5) / B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.2], N[(N[(N[(-1.0 + N[(1.0 / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.054], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.2:\\
\;\;\;\;\frac{-1 + \frac{1}{F \cdot F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.054:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.19999999999999996Initial program 62.0%
+-commutative62.0%
unsub-neg62.0%
associate-*l/82.0%
associate-*r/81.9%
*-commutative81.9%
Simplified82.0%
Taylor expanded in x around 0 82.1%
associate-*l/82.1%
*-lft-identity82.1%
unpow282.1%
fma-udef82.1%
Simplified82.1%
associate-*r/82.1%
sqrt-div82.1%
metadata-eval82.1%
un-div-inv82.2%
Applied egg-rr82.2%
Taylor expanded in F around -inf 98.9%
sub-neg98.9%
unpow298.9%
metadata-eval98.9%
Simplified98.9%
if -1.19999999999999996 < F < 0.0539999999999999994Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.4%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.7%
*-lft-identity99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
Taylor expanded in B around 0 83.4%
associate-*r/83.4%
*-rgt-identity83.4%
unpow283.4%
fma-udef83.4%
unpow-183.4%
metadata-eval83.4%
pow-sqr83.4%
rem-sqrt-square83.4%
rem-square-sqrt83.2%
fabs-sqr83.2%
rem-square-sqrt83.4%
Simplified83.4%
Taylor expanded in F around 0 82.8%
if 0.0539999999999999994 < F Initial program 61.9%
+-commutative61.9%
unsub-neg61.9%
associate-*l/78.6%
associate-*r/78.5%
*-commutative78.5%
Simplified78.5%
Taylor expanded in x around 0 78.5%
associate-*l/78.5%
*-lft-identity78.5%
unpow278.5%
fma-udef78.5%
Simplified78.5%
Taylor expanded in F around inf 96.9%
Final simplification91.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.6e-31)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.0225)
(- (* F (/ (sqrt 0.5) B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.6e-31) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.0225) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.6d-31)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.0225d0) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.6e-31) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.0225) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.6e-31: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.0225: tmp = (F * (math.sqrt(0.5) / B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.6e-31) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.0225) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.6e-31) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.0225) tmp = (F * (sqrt(0.5) / B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.6e-31], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.0225], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.6 \cdot 10^{-31}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.0225:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.60000000000000009e-31Initial program 66.6%
+-commutative66.6%
unsub-neg66.6%
associate-*l/84.1%
associate-*r/84.1%
*-commutative84.1%
Simplified84.2%
Taylor expanded in x around 0 84.2%
associate-*l/84.2%
*-lft-identity84.2%
unpow284.2%
fma-udef84.2%
Simplified84.2%
Taylor expanded in F around -inf 88.8%
if -1.60000000000000009e-31 < F < 0.022499999999999999Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.4%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
Taylor expanded in B around 0 88.5%
associate-*r/88.6%
*-rgt-identity88.6%
unpow288.6%
fma-udef88.6%
unpow-188.6%
metadata-eval88.6%
pow-sqr88.6%
rem-sqrt-square88.6%
rem-square-sqrt88.3%
fabs-sqr88.3%
rem-square-sqrt88.6%
Simplified88.6%
Taylor expanded in F around 0 88.6%
if 0.022499999999999999 < F Initial program 61.9%
+-commutative61.9%
unsub-neg61.9%
associate-*l/78.6%
associate-*r/78.5%
*-commutative78.5%
Simplified78.5%
Taylor expanded in x around 0 78.5%
associate-*l/78.5%
*-lft-identity78.5%
unpow278.5%
fma-udef78.5%
Simplified78.5%
Taylor expanded in F around inf 96.9%
Final simplification91.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -4e-47)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.85e-41) (/ (- x) (tan B)) (- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -4e-47) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.85e-41) {
tmp = -x / tan(B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-4d-47)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.85d-41) then
tmp = -x / tan(b)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -4e-47) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.85e-41) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -4e-47: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.85e-41: tmp = -x / math.tan(B) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -4e-47) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.85e-41) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -4e-47) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.85e-41) tmp = -x / tan(B); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4e-47], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.85e-41], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -4 \cdot 10^{-47}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.85 \cdot 10^{-41}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -3.9999999999999999e-47Initial program 69.1%
+-commutative69.1%
unsub-neg69.1%
associate-*l/85.2%
associate-*r/85.2%
*-commutative85.2%
Simplified85.3%
Taylor expanded in x around 0 85.3%
associate-*l/85.3%
*-lft-identity85.3%
unpow285.3%
fma-udef85.3%
Simplified85.3%
Taylor expanded in F around -inf 85.0%
if -3.9999999999999999e-47 < F < 1.8500000000000001e-41Initial program 99.4%
Taylor expanded in F around -inf 39.7%
Taylor expanded in x around inf 75.7%
associate-*r/75.7%
neg-mul-175.7%
distribute-rgt-neg-in75.7%
Simplified75.7%
frac-2neg75.7%
distribute-frac-neg75.7%
add-sqr-sqrt20.5%
sqrt-unprod19.5%
sqr-neg19.5%
sqrt-unprod1.0%
add-sqr-sqrt2.2%
remove-double-neg2.2%
distribute-rgt-neg-out2.2%
frac-2neg2.2%
associate-/l*2.2%
add-sqr-sqrt1.1%
sqrt-unprod37.3%
sqr-neg37.3%
sqrt-unprod54.8%
add-sqr-sqrt75.6%
Applied egg-rr75.6%
associate-/r/75.6%
clear-num75.5%
tan-quot75.5%
*-commutative75.5%
add-sqr-sqrt34.0%
sqrt-unprod24.7%
sqr-neg24.7%
sqrt-unprod0.9%
add-sqr-sqrt2.2%
neg-sub02.2%
metadata-eval2.2%
sub-neg2.2%
add-sqr-sqrt0.9%
sqrt-unprod24.7%
sqr-neg24.7%
sqrt-unprod34.0%
add-sqr-sqrt75.5%
metadata-eval75.5%
un-div-inv75.7%
Applied egg-rr75.7%
+-lft-identity75.7%
Simplified75.7%
if 1.8500000000000001e-41 < F Initial program 64.9%
+-commutative64.9%
unsub-neg64.9%
associate-*l/80.3%
associate-*r/80.2%
*-commutative80.2%
Simplified80.2%
Taylor expanded in x around 0 80.2%
associate-*l/80.2%
*-lft-identity80.2%
unpow280.2%
fma-udef80.2%
Simplified80.2%
Taylor expanded in F around inf 92.9%
Final simplification84.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2e-48)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.054)
(/ (- x) (tan B))
(if (<= F 3.2e+82)
(- (- (/ 1.0 B) (/ 1.0 (* B (* F F)))) t_0)
(if (<= F 8.5e+158)
(- (* (/ F (sin B)) (/ 1.0 F)) (/ x B))
(- (/ 1.0 B) t_0)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2e-48) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.054) {
tmp = -x / tan(B);
} else if (F <= 3.2e+82) {
tmp = ((1.0 / B) - (1.0 / (B * (F * F)))) - t_0;
} else if (F <= 8.5e+158) {
tmp = ((F / sin(B)) * (1.0 / F)) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-2d-48)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.054d0) then
tmp = -x / tan(b)
else if (f <= 3.2d+82) then
tmp = ((1.0d0 / b) - (1.0d0 / (b * (f * f)))) - t_0
else if (f <= 8.5d+158) then
tmp = ((f / sin(b)) * (1.0d0 / f)) - (x / b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -2e-48) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.054) {
tmp = -x / Math.tan(B);
} else if (F <= 3.2e+82) {
tmp = ((1.0 / B) - (1.0 / (B * (F * F)))) - t_0;
} else if (F <= 8.5e+158) {
tmp = ((F / Math.sin(B)) * (1.0 / F)) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -2e-48: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.054: tmp = -x / math.tan(B) elif F <= 3.2e+82: tmp = ((1.0 / B) - (1.0 / (B * (F * F)))) - t_0 elif F <= 8.5e+158: tmp = ((F / math.sin(B)) * (1.0 / F)) - (x / B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2e-48) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.054) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 3.2e+82) tmp = Float64(Float64(Float64(1.0 / B) - Float64(1.0 / Float64(B * Float64(F * F)))) - t_0); elseif (F <= 8.5e+158) tmp = Float64(Float64(Float64(F / sin(B)) * Float64(1.0 / F)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -2e-48) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.054) tmp = -x / tan(B); elseif (F <= 3.2e+82) tmp = ((1.0 / B) - (1.0 / (B * (F * F)))) - t_0; elseif (F <= 8.5e+158) tmp = ((F / sin(B)) * (1.0 / F)) - (x / B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2e-48], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.054], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.2e+82], N[(N[(N[(1.0 / B), $MachinePrecision] - N[(1.0 / N[(B * N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 8.5e+158], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2 \cdot 10^{-48}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.054:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 3.2 \cdot 10^{+82}:\\
\;\;\;\;\left(\frac{1}{B} - \frac{1}{B \cdot \left(F \cdot F\right)}\right) - t_0\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{+158}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \frac{1}{F} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -1.9999999999999999e-48Initial program 69.1%
+-commutative69.1%
unsub-neg69.1%
associate-*l/85.2%
associate-*r/85.2%
*-commutative85.2%
Simplified85.3%
Taylor expanded in x around 0 85.3%
associate-*l/85.3%
*-lft-identity85.3%
unpow285.3%
fma-udef85.3%
Simplified85.3%
Taylor expanded in F around -inf 85.0%
if -1.9999999999999999e-48 < F < 0.0539999999999999994Initial program 99.4%
Taylor expanded in F around -inf 40.0%
Taylor expanded in x around inf 73.5%
associate-*r/73.5%
neg-mul-173.5%
distribute-rgt-neg-in73.5%
Simplified73.5%
frac-2neg73.5%
distribute-frac-neg73.5%
add-sqr-sqrt19.2%
sqrt-unprod18.2%
sqr-neg18.2%
sqrt-unprod1.0%
add-sqr-sqrt2.1%
remove-double-neg2.1%
distribute-rgt-neg-out2.1%
frac-2neg2.1%
associate-/l*2.1%
add-sqr-sqrt1.1%
sqrt-unprod36.8%
sqr-neg36.8%
sqrt-unprod54.0%
add-sqr-sqrt73.4%
Applied egg-rr73.4%
associate-/r/73.4%
clear-num73.3%
tan-quot73.4%
*-commutative73.4%
add-sqr-sqrt31.6%
sqrt-unprod23.0%
sqr-neg23.0%
sqrt-unprod0.9%
add-sqr-sqrt2.1%
neg-sub02.1%
metadata-eval2.1%
sub-neg2.1%
add-sqr-sqrt0.9%
sqrt-unprod23.0%
sqr-neg23.0%
sqrt-unprod31.6%
add-sqr-sqrt73.4%
metadata-eval73.4%
un-div-inv73.5%
Applied egg-rr73.5%
+-lft-identity73.5%
Simplified73.5%
if 0.0539999999999999994 < F < 3.19999999999999975e82Initial program 89.9%
+-commutative89.9%
unsub-neg89.9%
associate-*l/99.5%
associate-*r/99.3%
*-commutative99.3%
Simplified99.3%
Taylor expanded in x around 0 99.2%
associate-*l/99.4%
*-lft-identity99.4%
unpow299.4%
fma-udef99.4%
Simplified99.4%
Taylor expanded in B around 0 88.5%
associate-*r/88.7%
*-rgt-identity88.7%
unpow288.7%
fma-udef88.7%
unpow-188.7%
metadata-eval88.7%
pow-sqr88.7%
rem-sqrt-square88.7%
rem-square-sqrt88.3%
fabs-sqr88.3%
rem-square-sqrt88.7%
Simplified88.7%
Taylor expanded in F around inf 84.0%
unpow284.0%
Simplified84.0%
if 3.19999999999999975e82 < F < 8.49999999999999978e158Initial program 84.0%
Taylor expanded in F around inf 91.7%
Taylor expanded in B around 0 74.2%
if 8.49999999999999978e158 < F Initial program 31.6%
+-commutative31.6%
unsub-neg31.6%
associate-*l/58.2%
associate-*r/58.2%
*-commutative58.2%
Simplified58.2%
Taylor expanded in x around 0 58.2%
associate-*l/58.2%
*-lft-identity58.2%
unpow258.2%
fma-udef58.2%
Simplified58.2%
Taylor expanded in B around 0 58.2%
associate-*r/58.2%
*-rgt-identity58.2%
unpow258.2%
fma-udef58.2%
unpow-158.2%
metadata-eval58.2%
pow-sqr58.2%
rem-sqrt-square58.2%
rem-square-sqrt58.2%
fabs-sqr58.2%
rem-square-sqrt58.2%
Simplified58.2%
Taylor expanded in F around inf 85.5%
Final simplification79.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -9.5e+157)
(- (/ -1.0 B) t_0)
(if (<= F -2e-26)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 3.4e-6)
(/ (- x) (tan B))
(if (<= F 1.55e+83)
(- (- (/ 1.0 B) (/ 1.0 (* B (* F F)))) t_0)
(if (<= F 6.1e+159)
(- (* (/ F (sin B)) (/ 1.0 F)) (/ x B))
(- (/ 1.0 B) t_0))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -9.5e+157) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -2e-26) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 3.4e-6) {
tmp = -x / tan(B);
} else if (F <= 1.55e+83) {
tmp = ((1.0 / B) - (1.0 / (B * (F * F)))) - t_0;
} else if (F <= 6.1e+159) {
tmp = ((F / sin(B)) * (1.0 / F)) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-9.5d+157)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-2d-26)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 3.4d-6) then
tmp = -x / tan(b)
else if (f <= 1.55d+83) then
tmp = ((1.0d0 / b) - (1.0d0 / (b * (f * f)))) - t_0
else if (f <= 6.1d+159) then
tmp = ((f / sin(b)) * (1.0d0 / f)) - (x / b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -9.5e+157) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -2e-26) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 3.4e-6) {
tmp = -x / Math.tan(B);
} else if (F <= 1.55e+83) {
tmp = ((1.0 / B) - (1.0 / (B * (F * F)))) - t_0;
} else if (F <= 6.1e+159) {
tmp = ((F / Math.sin(B)) * (1.0 / F)) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -9.5e+157: tmp = (-1.0 / B) - t_0 elif F <= -2e-26: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 3.4e-6: tmp = -x / math.tan(B) elif F <= 1.55e+83: tmp = ((1.0 / B) - (1.0 / (B * (F * F)))) - t_0 elif F <= 6.1e+159: tmp = ((F / math.sin(B)) * (1.0 / F)) - (x / B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -9.5e+157) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -2e-26) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 3.4e-6) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 1.55e+83) tmp = Float64(Float64(Float64(1.0 / B) - Float64(1.0 / Float64(B * Float64(F * F)))) - t_0); elseif (F <= 6.1e+159) tmp = Float64(Float64(Float64(F / sin(B)) * Float64(1.0 / F)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -9.5e+157) tmp = (-1.0 / B) - t_0; elseif (F <= -2e-26) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 3.4e-6) tmp = -x / tan(B); elseif (F <= 1.55e+83) tmp = ((1.0 / B) - (1.0 / (B * (F * F)))) - t_0; elseif (F <= 6.1e+159) tmp = ((F / sin(B)) * (1.0 / F)) - (x / B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -9.5e+157], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -2e-26], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.4e-6], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.55e+83], N[(N[(N[(1.0 / B), $MachinePrecision] - N[(1.0 / N[(B * N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 6.1e+159], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -9.5 \cdot 10^{+157}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq -2 \cdot 10^{-26}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.4 \cdot 10^{-6}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 1.55 \cdot 10^{+83}:\\
\;\;\;\;\left(\frac{1}{B} - \frac{1}{B \cdot \left(F \cdot F\right)}\right) - t_0\\
\mathbf{elif}\;F \leq 6.1 \cdot 10^{+159}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \frac{1}{F} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -9.4999999999999996e157Initial program 37.2%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 87.2%
+-commutative87.2%
unsub-neg87.2%
un-div-inv87.3%
Applied egg-rr87.3%
if -9.4999999999999996e157 < F < -2.0000000000000001e-26Initial program 86.0%
Taylor expanded in F around -inf 82.6%
Taylor expanded in B around 0 73.6%
if -2.0000000000000001e-26 < F < 3.40000000000000006e-6Initial program 99.4%
Taylor expanded in F around -inf 40.2%
Taylor expanded in x around inf 70.8%
associate-*r/70.8%
neg-mul-170.8%
distribute-rgt-neg-in70.8%
Simplified70.8%
frac-2neg70.8%
distribute-frac-neg70.8%
add-sqr-sqrt17.7%
sqrt-unprod17.0%
sqr-neg17.0%
sqrt-unprod1.1%
add-sqr-sqrt2.1%
remove-double-neg2.1%
distribute-rgt-neg-out2.1%
frac-2neg2.1%
associate-/l*2.1%
add-sqr-sqrt1.1%
sqrt-unprod37.0%
sqr-neg37.0%
sqrt-unprod52.8%
add-sqr-sqrt70.7%
Applied egg-rr70.7%
associate-/r/70.7%
clear-num70.7%
tan-quot70.7%
*-commutative70.7%
add-sqr-sqrt31.2%
sqrt-unprod23.3%
sqr-neg23.3%
sqrt-unprod0.9%
add-sqr-sqrt2.1%
neg-sub02.1%
metadata-eval2.1%
sub-neg2.1%
add-sqr-sqrt0.9%
sqrt-unprod23.3%
sqr-neg23.3%
sqrt-unprod31.2%
add-sqr-sqrt70.7%
metadata-eval70.7%
un-div-inv70.9%
Applied egg-rr70.9%
+-lft-identity70.9%
Simplified70.9%
if 3.40000000000000006e-6 < F < 1.54999999999999996e83Initial program 89.9%
+-commutative89.9%
unsub-neg89.9%
associate-*l/99.5%
associate-*r/99.3%
*-commutative99.3%
Simplified99.3%
Taylor expanded in x around 0 99.2%
associate-*l/99.4%
*-lft-identity99.4%
unpow299.4%
fma-udef99.4%
Simplified99.4%
Taylor expanded in B around 0 88.5%
associate-*r/88.7%
*-rgt-identity88.7%
unpow288.7%
fma-udef88.7%
unpow-188.7%
metadata-eval88.7%
pow-sqr88.7%
rem-sqrt-square88.7%
rem-square-sqrt88.3%
fabs-sqr88.3%
rem-square-sqrt88.7%
Simplified88.7%
Taylor expanded in F around inf 84.0%
unpow284.0%
Simplified84.0%
if 1.54999999999999996e83 < F < 6.1e159Initial program 84.0%
Taylor expanded in F around inf 91.7%
Taylor expanded in B around 0 74.2%
if 6.1e159 < F Initial program 31.6%
+-commutative31.6%
unsub-neg31.6%
associate-*l/58.2%
associate-*r/58.2%
*-commutative58.2%
Simplified58.2%
Taylor expanded in x around 0 58.2%
associate-*l/58.2%
*-lft-identity58.2%
unpow258.2%
fma-udef58.2%
Simplified58.2%
Taylor expanded in B around 0 58.2%
associate-*r/58.2%
*-rgt-identity58.2%
unpow258.2%
fma-udef58.2%
unpow-158.2%
metadata-eval58.2%
pow-sqr58.2%
rem-sqrt-square58.2%
rem-square-sqrt58.2%
fabs-sqr58.2%
rem-square-sqrt58.2%
Simplified58.2%
Taylor expanded in F around inf 85.5%
Final simplification76.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.5e+159)
(- (/ -1.0 B) t_0)
(if (<= F -2e-26)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 1.4e-41)
(/ (- x) (tan B))
(if (or (<= F 1.12e+82) (not (<= F 9.5e+158)))
(- (/ 1.0 B) t_0)
(- (* (/ F (sin B)) (/ 1.0 F)) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3.5e+159) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -2e-26) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1.4e-41) {
tmp = -x / tan(B);
} else if ((F <= 1.12e+82) || !(F <= 9.5e+158)) {
tmp = (1.0 / B) - t_0;
} else {
tmp = ((F / sin(B)) * (1.0 / F)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-3.5d+159)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-2d-26)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 1.4d-41) then
tmp = -x / tan(b)
else if ((f <= 1.12d+82) .or. (.not. (f <= 9.5d+158))) then
tmp = (1.0d0 / b) - t_0
else
tmp = ((f / sin(b)) * (1.0d0 / f)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -3.5e+159) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -2e-26) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 1.4e-41) {
tmp = -x / Math.tan(B);
} else if ((F <= 1.12e+82) || !(F <= 9.5e+158)) {
tmp = (1.0 / B) - t_0;
} else {
tmp = ((F / Math.sin(B)) * (1.0 / F)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -3.5e+159: tmp = (-1.0 / B) - t_0 elif F <= -2e-26: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 1.4e-41: tmp = -x / math.tan(B) elif (F <= 1.12e+82) or not (F <= 9.5e+158): tmp = (1.0 / B) - t_0 else: tmp = ((F / math.sin(B)) * (1.0 / F)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.5e+159) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -2e-26) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1.4e-41) tmp = Float64(Float64(-x) / tan(B)); elseif ((F <= 1.12e+82) || !(F <= 9.5e+158)) tmp = Float64(Float64(1.0 / B) - t_0); else tmp = Float64(Float64(Float64(F / sin(B)) * Float64(1.0 / F)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -3.5e+159) tmp = (-1.0 / B) - t_0; elseif (F <= -2e-26) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 1.4e-41) tmp = -x / tan(B); elseif ((F <= 1.12e+82) || ~((F <= 9.5e+158))) tmp = (1.0 / B) - t_0; else tmp = ((F / sin(B)) * (1.0 / F)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.5e+159], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -2e-26], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4e-41], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 1.12e+82], N[Not[LessEqual[F, 9.5e+158]], $MachinePrecision]], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.5 \cdot 10^{+159}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq -2 \cdot 10^{-26}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-41}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 1.12 \cdot 10^{+82} \lor \neg \left(F \leq 9.5 \cdot 10^{+158}\right):\\
\;\;\;\;\frac{1}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \frac{1}{F} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -3.4999999999999999e159Initial program 37.2%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 87.2%
+-commutative87.2%
unsub-neg87.2%
un-div-inv87.3%
Applied egg-rr87.3%
if -3.4999999999999999e159 < F < -2.0000000000000001e-26Initial program 86.0%
Taylor expanded in F around -inf 82.6%
Taylor expanded in B around 0 73.6%
if -2.0000000000000001e-26 < F < 1.4000000000000001e-41Initial program 99.4%
Taylor expanded in F around -inf 39.9%
Taylor expanded in x around inf 72.6%
associate-*r/72.6%
neg-mul-172.6%
distribute-rgt-neg-in72.6%
Simplified72.6%
frac-2neg72.6%
distribute-frac-neg72.6%
add-sqr-sqrt18.8%
sqrt-unprod18.0%
sqr-neg18.0%
sqrt-unprod1.1%
add-sqr-sqrt2.2%
remove-double-neg2.2%
distribute-rgt-neg-out2.2%
frac-2neg2.2%
associate-/l*2.2%
add-sqr-sqrt1.1%
sqrt-unprod37.5%
sqr-neg37.5%
sqrt-unprod53.5%
add-sqr-sqrt72.5%
Applied egg-rr72.5%
associate-/r/72.6%
clear-num72.5%
tan-quot72.5%
*-commutative72.5%
add-sqr-sqrt33.3%
sqrt-unprod24.9%
sqr-neg24.9%
sqrt-unprod0.9%
add-sqr-sqrt2.2%
neg-sub02.2%
metadata-eval2.2%
sub-neg2.2%
add-sqr-sqrt0.9%
sqrt-unprod24.9%
sqr-neg24.9%
sqrt-unprod33.3%
add-sqr-sqrt72.5%
metadata-eval72.5%
un-div-inv72.7%
Applied egg-rr72.7%
+-lft-identity72.7%
Simplified72.7%
if 1.4000000000000001e-41 < F < 1.11999999999999998e82 or 9.49999999999999913e158 < F Initial program 57.6%
+-commutative57.6%
unsub-neg57.6%
associate-*l/75.9%
associate-*r/75.8%
*-commutative75.8%
Simplified75.9%
Taylor expanded in x around 0 75.8%
associate-*l/75.9%
*-lft-identity75.9%
unpow275.9%
fma-udef75.9%
Simplified75.9%
Taylor expanded in B around 0 70.9%
associate-*r/71.0%
*-rgt-identity71.0%
unpow271.0%
fma-udef71.0%
unpow-171.0%
metadata-eval71.0%
pow-sqr71.0%
rem-sqrt-square71.0%
rem-square-sqrt70.8%
fabs-sqr70.8%
rem-square-sqrt71.0%
Simplified71.0%
Taylor expanded in F around inf 79.6%
if 1.11999999999999998e82 < F < 9.49999999999999913e158Initial program 84.0%
Taylor expanded in F around inf 91.7%
Taylor expanded in B around 0 74.2%
Final simplification76.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.35e+159)
(- (/ -1.0 B) t_0)
(if (<= F -2e-26)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 2.8e-41) (/ (- x) (tan B)) (- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3.35e+159) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -2e-26) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 2.8e-41) {
tmp = -x / tan(B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-3.35d+159)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-2d-26)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 2.8d-41) then
tmp = -x / tan(b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -3.35e+159) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -2e-26) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 2.8e-41) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -3.35e+159: tmp = (-1.0 / B) - t_0 elif F <= -2e-26: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 2.8e-41: tmp = -x / math.tan(B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.35e+159) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -2e-26) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 2.8e-41) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -3.35e+159) tmp = (-1.0 / B) - t_0; elseif (F <= -2e-26) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 2.8e-41) tmp = -x / tan(B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.35e+159], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -2e-26], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.8e-41], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.35 \cdot 10^{+159}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq -2 \cdot 10^{-26}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.8 \cdot 10^{-41}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -3.35000000000000009e159Initial program 37.2%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 87.2%
+-commutative87.2%
unsub-neg87.2%
un-div-inv87.3%
Applied egg-rr87.3%
if -3.35000000000000009e159 < F < -2.0000000000000001e-26Initial program 86.0%
Taylor expanded in F around -inf 82.6%
Taylor expanded in B around 0 73.6%
if -2.0000000000000001e-26 < F < 2.8000000000000002e-41Initial program 99.4%
Taylor expanded in F around -inf 39.9%
Taylor expanded in x around inf 72.6%
associate-*r/72.6%
neg-mul-172.6%
distribute-rgt-neg-in72.6%
Simplified72.6%
frac-2neg72.6%
distribute-frac-neg72.6%
add-sqr-sqrt18.8%
sqrt-unprod18.0%
sqr-neg18.0%
sqrt-unprod1.1%
add-sqr-sqrt2.2%
remove-double-neg2.2%
distribute-rgt-neg-out2.2%
frac-2neg2.2%
associate-/l*2.2%
add-sqr-sqrt1.1%
sqrt-unprod37.5%
sqr-neg37.5%
sqrt-unprod53.5%
add-sqr-sqrt72.5%
Applied egg-rr72.5%
associate-/r/72.6%
clear-num72.5%
tan-quot72.5%
*-commutative72.5%
add-sqr-sqrt33.3%
sqrt-unprod24.9%
sqr-neg24.9%
sqrt-unprod0.9%
add-sqr-sqrt2.2%
neg-sub02.2%
metadata-eval2.2%
sub-neg2.2%
add-sqr-sqrt0.9%
sqrt-unprod24.9%
sqr-neg24.9%
sqrt-unprod33.3%
add-sqr-sqrt72.5%
metadata-eval72.5%
un-div-inv72.7%
Applied egg-rr72.7%
+-lft-identity72.7%
Simplified72.7%
if 2.8000000000000002e-41 < F Initial program 64.9%
+-commutative64.9%
unsub-neg64.9%
associate-*l/80.3%
associate-*r/80.2%
*-commutative80.2%
Simplified80.2%
Taylor expanded in x around 0 80.2%
associate-*l/80.2%
*-lft-identity80.2%
unpow280.2%
fma-udef80.2%
Simplified80.2%
Taylor expanded in B around 0 63.7%
associate-*r/63.8%
*-rgt-identity63.8%
unpow263.8%
fma-udef63.8%
unpow-163.8%
metadata-eval63.8%
pow-sqr63.8%
rem-sqrt-square63.8%
rem-square-sqrt63.6%
fabs-sqr63.6%
rem-square-sqrt63.8%
Simplified63.8%
Taylor expanded in F around inf 71.1%
Final simplification74.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.9e-92)
(- (/ -1.0 B) t_0)
(if (<= F 1.1e-41) (/ (- x) (tan B)) (- (/ 1.0 B) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.9e-92) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 1.1e-41) {
tmp = -x / tan(B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-2.9d-92)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= 1.1d-41) then
tmp = -x / tan(b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -2.9e-92) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 1.1e-41) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -2.9e-92: tmp = (-1.0 / B) - t_0 elif F <= 1.1e-41: tmp = -x / math.tan(B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.9e-92) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= 1.1e-41) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -2.9e-92) tmp = (-1.0 / B) - t_0; elseif (F <= 1.1e-41) tmp = -x / tan(B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.9e-92], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.1e-41], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.9 \cdot 10^{-92}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq 1.1 \cdot 10^{-41}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -2.89999999999999985e-92Initial program 72.4%
Taylor expanded in F around -inf 79.3%
Taylor expanded in B around 0 60.3%
+-commutative60.3%
unsub-neg60.3%
un-div-inv60.3%
Applied egg-rr60.3%
if -2.89999999999999985e-92 < F < 1.1e-41Initial program 99.5%
Taylor expanded in F around -inf 40.5%
Taylor expanded in x around inf 79.9%
associate-*r/79.9%
neg-mul-179.9%
distribute-rgt-neg-in79.9%
Simplified79.9%
frac-2neg79.9%
distribute-frac-neg79.9%
add-sqr-sqrt21.7%
sqrt-unprod20.4%
sqr-neg20.4%
sqrt-unprod1.1%
add-sqr-sqrt2.1%
remove-double-neg2.1%
distribute-rgt-neg-out2.1%
frac-2neg2.1%
associate-/l*2.1%
add-sqr-sqrt1.0%
sqrt-unprod39.0%
sqr-neg39.0%
sqrt-unprod57.8%
add-sqr-sqrt79.8%
Applied egg-rr79.8%
associate-/r/79.8%
clear-num79.7%
tan-quot79.7%
*-commutative79.7%
add-sqr-sqrt35.6%
sqrt-unprod26.1%
sqr-neg26.1%
sqrt-unprod0.9%
add-sqr-sqrt2.1%
neg-sub02.1%
metadata-eval2.1%
sub-neg2.1%
add-sqr-sqrt0.9%
sqrt-unprod26.1%
sqr-neg26.1%
sqrt-unprod35.6%
add-sqr-sqrt79.7%
metadata-eval79.7%
un-div-inv79.9%
Applied egg-rr79.9%
+-lft-identity79.9%
Simplified79.9%
if 1.1e-41 < F Initial program 64.9%
+-commutative64.9%
unsub-neg64.9%
associate-*l/80.3%
associate-*r/80.2%
*-commutative80.2%
Simplified80.2%
Taylor expanded in x around 0 80.2%
associate-*l/80.2%
*-lft-identity80.2%
unpow280.2%
fma-udef80.2%
Simplified80.2%
Taylor expanded in B around 0 63.7%
associate-*r/63.8%
*-rgt-identity63.8%
unpow263.8%
fma-udef63.8%
unpow-163.8%
metadata-eval63.8%
pow-sqr63.8%
rem-sqrt-square63.8%
rem-square-sqrt63.6%
fabs-sqr63.6%
rem-square-sqrt63.8%
Simplified63.8%
Taylor expanded in F around inf 71.1%
Final simplification70.1%
(FPCore (F B x) :precision binary64 (if (or (<= x -1.15e-186) (not (<= x 9.2e-233))) (/ (- x) (tan B)) (fabs (/ (+ -1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if ((x <= -1.15e-186) || !(x <= 9.2e-233)) {
tmp = -x / tan(B);
} else {
tmp = fabs(((-1.0 + x) / B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-1.15d-186)) .or. (.not. (x <= 9.2d-233))) then
tmp = -x / tan(b)
else
tmp = abs((((-1.0d0) + x) / b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -1.15e-186) || !(x <= 9.2e-233)) {
tmp = -x / Math.tan(B);
} else {
tmp = Math.abs(((-1.0 + x) / B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -1.15e-186) or not (x <= 9.2e-233): tmp = -x / math.tan(B) else: tmp = math.fabs(((-1.0 + x) / B)) return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -1.15e-186) || !(x <= 9.2e-233)) tmp = Float64(Float64(-x) / tan(B)); else tmp = abs(Float64(Float64(-1.0 + x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -1.15e-186) || ~((x <= 9.2e-233))) tmp = -x / tan(B); else tmp = abs(((-1.0 + x) / B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -1.15e-186], N[Not[LessEqual[x, 9.2e-233]], $MachinePrecision]], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[Abs[N[(N[(-1.0 + x), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.15 \cdot 10^{-186} \lor \neg \left(x \leq 9.2 \cdot 10^{-233}\right):\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{-1 + x}{B}\right|\\
\end{array}
\end{array}
if x < -1.15e-186 or 9.2000000000000007e-233 < x Initial program 78.0%
Taylor expanded in F around -inf 62.9%
Taylor expanded in x around inf 69.2%
associate-*r/69.2%
neg-mul-169.2%
distribute-rgt-neg-in69.2%
Simplified69.2%
frac-2neg69.2%
distribute-frac-neg69.2%
add-sqr-sqrt23.6%
sqrt-unprod21.2%
sqr-neg21.2%
sqrt-unprod0.9%
add-sqr-sqrt1.7%
remove-double-neg1.7%
distribute-rgt-neg-out1.7%
frac-2neg1.7%
associate-/l*1.7%
add-sqr-sqrt0.7%
sqrt-unprod31.4%
sqr-neg31.4%
sqrt-unprod45.4%
add-sqr-sqrt69.1%
Applied egg-rr69.1%
associate-/r/69.1%
clear-num69.0%
tan-quot69.1%
*-commutative69.1%
add-sqr-sqrt34.8%
sqrt-unprod24.0%
sqr-neg24.0%
sqrt-unprod0.8%
add-sqr-sqrt1.7%
neg-sub01.7%
metadata-eval1.7%
sub-neg1.7%
add-sqr-sqrt0.8%
sqrt-unprod24.0%
sqr-neg24.0%
sqrt-unprod34.8%
add-sqr-sqrt69.1%
metadata-eval69.1%
un-div-inv69.2%
Applied egg-rr69.2%
+-lft-identity69.2%
Simplified69.2%
if -1.15e-186 < x < 9.2000000000000007e-233Initial program 78.9%
Taylor expanded in F around -inf 28.8%
Taylor expanded in B around 0 13.3%
associate-*r/13.3%
distribute-lft-in13.3%
metadata-eval13.3%
neg-mul-113.3%
Simplified13.3%
add-sqr-sqrt8.4%
sqrt-unprod13.4%
pow213.4%
add-sqr-sqrt12.2%
sqrt-unprod13.4%
sqr-neg13.4%
sqrt-unprod1.2%
add-sqr-sqrt13.4%
Applied egg-rr13.4%
unpow213.4%
rem-sqrt-square20.9%
Simplified20.9%
Final simplification58.5%
(FPCore (F B x) :precision binary64 (if (<= F -9.5e-93) (- (/ -1.0 B) (/ x (tan B))) (/ (- x) (tan B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9.5e-93) {
tmp = (-1.0 / B) - (x / tan(B));
} else {
tmp = -x / tan(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-9.5d-93)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else
tmp = -x / tan(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -9.5e-93) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else {
tmp = -x / Math.tan(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9.5e-93: tmp = (-1.0 / B) - (x / math.tan(B)) else: tmp = -x / math.tan(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -9.5e-93) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); else tmp = Float64(Float64(-x) / tan(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -9.5e-93) tmp = (-1.0 / B) - (x / tan(B)); else tmp = -x / tan(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9.5e-93], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9.5 \cdot 10^{-93}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\end{array}
\end{array}
if F < -9.5000000000000001e-93Initial program 72.4%
Taylor expanded in F around -inf 79.3%
Taylor expanded in B around 0 60.3%
+-commutative60.3%
unsub-neg60.3%
un-div-inv60.3%
Applied egg-rr60.3%
if -9.5000000000000001e-93 < F Initial program 81.3%
Taylor expanded in F around -inf 42.3%
Taylor expanded in x around inf 61.8%
associate-*r/61.8%
neg-mul-161.8%
distribute-rgt-neg-in61.8%
Simplified61.8%
frac-2neg61.8%
distribute-frac-neg61.8%
add-sqr-sqrt21.3%
sqrt-unprod19.4%
sqr-neg19.4%
sqrt-unprod1.1%
add-sqr-sqrt2.0%
remove-double-neg2.0%
distribute-rgt-neg-out2.0%
frac-2neg2.0%
associate-/l*2.0%
add-sqr-sqrt0.9%
sqrt-unprod27.4%
sqr-neg27.4%
sqrt-unprod40.3%
add-sqr-sqrt61.8%
Applied egg-rr61.8%
associate-/r/61.7%
clear-num61.7%
tan-quot61.7%
*-commutative61.7%
add-sqr-sqrt29.7%
sqrt-unprod19.5%
sqr-neg19.5%
sqrt-unprod0.9%
add-sqr-sqrt2.0%
neg-sub02.0%
metadata-eval2.0%
sub-neg2.0%
add-sqr-sqrt0.9%
sqrt-unprod19.5%
sqr-neg19.5%
sqrt-unprod29.7%
add-sqr-sqrt61.7%
metadata-eval61.7%
un-div-inv61.8%
Applied egg-rr61.8%
+-lft-identity61.8%
Simplified61.8%
Final simplification61.3%
(FPCore (F B x) :precision binary64 (if (or (<= F -2.6e+100) (not (<= F -1.4e-19))) (/ (- x) (tan B)) (+ (* x (* B 0.3333333333333333)) (/ (- -1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if ((F <= -2.6e+100) || !(F <= -1.4e-19)) {
tmp = -x / tan(B);
} else {
tmp = (x * (B * 0.3333333333333333)) + ((-1.0 - x) / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((f <= (-2.6d+100)) .or. (.not. (f <= (-1.4d-19)))) then
tmp = -x / tan(b)
else
tmp = (x * (b * 0.3333333333333333d0)) + (((-1.0d0) - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((F <= -2.6e+100) || !(F <= -1.4e-19)) {
tmp = -x / Math.tan(B);
} else {
tmp = (x * (B * 0.3333333333333333)) + ((-1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if (F <= -2.6e+100) or not (F <= -1.4e-19): tmp = -x / math.tan(B) else: tmp = (x * (B * 0.3333333333333333)) + ((-1.0 - x) / B) return tmp
function code(F, B, x) tmp = 0.0 if ((F <= -2.6e+100) || !(F <= -1.4e-19)) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(x * Float64(B * 0.3333333333333333)) + Float64(Float64(-1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((F <= -2.6e+100) || ~((F <= -1.4e-19))) tmp = -x / tan(B); else tmp = (x * (B * 0.3333333333333333)) + ((-1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[F, -2.6e+100], N[Not[LessEqual[F, -1.4e-19]], $MachinePrecision]], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(B * 0.3333333333333333), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.6 \cdot 10^{+100} \lor \neg \left(F \leq -1.4 \cdot 10^{-19}\right):\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(B \cdot 0.3333333333333333\right) + \frac{-1 - x}{B}\\
\end{array}
\end{array}
if F < -2.6000000000000002e100 or -1.40000000000000001e-19 < F Initial program 76.1%
Taylor expanded in F around -inf 52.0%
Taylor expanded in x around inf 60.2%
associate-*r/60.2%
neg-mul-160.2%
distribute-rgt-neg-in60.2%
Simplified60.2%
frac-2neg60.2%
distribute-frac-neg60.2%
add-sqr-sqrt21.7%
sqrt-unprod19.2%
sqr-neg19.2%
sqrt-unprod1.0%
add-sqr-sqrt1.9%
remove-double-neg1.9%
distribute-rgt-neg-out1.9%
frac-2neg1.9%
associate-/l*1.9%
add-sqr-sqrt1.0%
sqrt-unprod27.1%
sqr-neg27.1%
sqrt-unprod38.4%
add-sqr-sqrt60.2%
Applied egg-rr60.2%
associate-/r/60.2%
clear-num60.1%
tan-quot60.2%
*-commutative60.2%
add-sqr-sqrt30.1%
sqrt-unprod21.2%
sqr-neg21.2%
sqrt-unprod0.9%
add-sqr-sqrt1.9%
neg-sub01.9%
metadata-eval1.9%
sub-neg1.9%
add-sqr-sqrt0.9%
sqrt-unprod21.2%
sqr-neg21.2%
sqrt-unprod30.1%
add-sqr-sqrt60.2%
metadata-eval60.2%
un-div-inv60.3%
Applied egg-rr60.3%
+-lft-identity60.3%
Simplified60.3%
if -2.6000000000000002e100 < F < -1.40000000000000001e-19Initial program 93.4%
Taylor expanded in F around -inf 79.4%
Taylor expanded in B around 0 46.3%
Taylor expanded in B around 0 43.7%
+-commutative43.7%
mul-1-neg43.7%
unsub-neg43.7%
*-commutative43.7%
*-commutative43.7%
associate-*l*43.7%
Simplified43.7%
Final simplification58.3%
(FPCore (F B x) :precision binary64 (if (or (<= x -3.6e-138) (not (<= x 9.2e-181))) (/ (- x) B) (/ -1.0 B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -3.6e-138) || !(x <= 9.2e-181)) {
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-138)) .or. (.not. (x <= 9.2d-181))) 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-138) || !(x <= 9.2e-181)) {
tmp = -x / B;
} else {
tmp = -1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -3.6e-138) or not (x <= 9.2e-181): tmp = -x / B else: tmp = -1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -3.6e-138) || !(x <= 9.2e-181)) 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-138) || ~((x <= 9.2e-181))) tmp = -x / B; else tmp = -1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -3.6e-138], N[Not[LessEqual[x, 9.2e-181]], $MachinePrecision]], N[((-x) / B), $MachinePrecision], N[(-1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.6 \cdot 10^{-138} \lor \neg \left(x \leq 9.2 \cdot 10^{-181}\right):\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B}\\
\end{array}
\end{array}
if x < -3.60000000000000018e-138 or 9.19999999999999963e-181 < x Initial program 79.7%
Taylor expanded in F around -inf 67.3%
Taylor expanded in B around 0 35.5%
associate-*r/35.5%
distribute-lft-in35.5%
metadata-eval35.5%
neg-mul-135.5%
Simplified35.5%
Taylor expanded in x around inf 41.0%
associate-*r/41.0%
mul-1-neg41.0%
Simplified41.0%
if -3.60000000000000018e-138 < x < 9.19999999999999963e-181Initial program 75.1%
Taylor expanded in F around -inf 30.7%
Taylor expanded in B around 0 16.9%
associate-*r/16.9%
distribute-lft-in16.9%
metadata-eval16.9%
neg-mul-116.9%
Simplified16.9%
Taylor expanded in x around 0 16.9%
Final simplification33.1%
(FPCore (F B x) :precision binary64 (if (<= F -2.2e-93) (/ (- -1.0 x) B) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.2e-93) {
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 <= (-2.2d-93)) 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 <= -2.2e-93) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.2e-93: tmp = (-1.0 - x) / B else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.2e-93) 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 <= -2.2e-93) tmp = (-1.0 - x) / B; else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.2e-93], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.2 \cdot 10^{-93}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -2.19999999999999996e-93Initial program 72.4%
Taylor expanded in F around -inf 79.3%
Taylor expanded in B around 0 39.0%
associate-*r/39.0%
distribute-lft-in39.0%
metadata-eval39.0%
neg-mul-139.0%
Simplified39.0%
if -2.19999999999999996e-93 < F Initial program 81.3%
Taylor expanded in F around -inf 42.3%
Taylor expanded in B around 0 24.1%
associate-*r/24.1%
distribute-lft-in24.1%
metadata-eval24.1%
neg-mul-124.1%
Simplified24.1%
Taylor expanded in x around inf 34.0%
associate-*r/34.0%
mul-1-neg34.0%
Simplified34.0%
Final simplification35.8%
(FPCore (F B x) :precision binary64 (/ -1.0 B))
double code(double F, double B, double x) {
return -1.0 / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = (-1.0d0) / b
end function
public static double code(double F, double B, double x) {
return -1.0 / B;
}
def code(F, B, x): return -1.0 / B
function code(F, B, x) return Float64(-1.0 / B) end
function tmp = code(F, B, x) tmp = -1.0 / B; end
code[F_, B_, x_] := N[(-1.0 / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{B}
\end{array}
Initial program 78.2%
Taylor expanded in F around -inf 55.3%
Taylor expanded in B around 0 29.4%
associate-*r/29.4%
distribute-lft-in29.4%
metadata-eval29.4%
neg-mul-129.4%
Simplified29.4%
Taylor expanded in x around 0 9.7%
Final simplification9.7%
herbie shell --seed 2023215
(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))))))